diff --git a/production/helm/fluent-bit/Chart.yaml b/production/helm/fluent-bit/Chart.yaml index 909edfd06dfa1..cdeff1f45fb00 100644 --- a/production/helm/fluent-bit/Chart.yaml +++ b/production/helm/fluent-bit/Chart.yaml @@ -1,3 +1,4 @@ +apiVersion: "v1" name: fluent-bit version: 0.0.2 appVersion: v0.0.1 diff --git a/production/helm/loki-stack/Chart.yaml b/production/helm/loki-stack/Chart.yaml index eb14e6690a754..3d804f8fd0e5b 100644 --- a/production/helm/loki-stack/Chart.yaml +++ b/production/helm/loki-stack/Chart.yaml @@ -1,5 +1,6 @@ +apiVersion: "v1" name: loki-stack -version: 0.17.3 +version: 0.17.4 appVersion: v0.3.0 kubeVersion: "^1.10.0-0" description: "Loki: like Prometheus, but for logs." diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index 80ed0585503c6..e2576ca10c2bb 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -1,5 +1,6 @@ +apiVersion: "v1" name: loki -version: 0.16.0 +version: 0.16.1 appVersion: v0.3.0 kubeVersion: "^1.10.0-0" description: "Loki: like Prometheus, but for logs." diff --git a/production/helm/loki/templates/_helpers.tpl b/production/helm/loki/templates/_helpers.tpl index 2e333aae60f88..5e12a470f1787 100644 --- a/production/helm/loki/templates/_helpers.tpl +++ b/production/helm/loki/templates/_helpers.tpl @@ -41,3 +41,21 @@ Create the name of the service account {{ default "default" .Values.serviceAccount.name }} {{- end -}} {{- end -}} + +{{/* +Create the app name of loki clients. Defaults to the same logic as "loki.fullname", and default client expects "promtail". +*/}} +{{- define "client.name" -}} +{{- if .Values.client.name -}} +{{- .Values.client.name -}} +{{- else if .Values.client.fullnameOverride -}} +{{- .Values.client.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default "promtail" .Values.client.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/production/helm/loki/templates/networkpolicy.yaml b/production/helm/loki/templates/networkpolicy.yaml index dea85abcaf2fd..31d24d70031c0 100644 --- a/production/helm/loki/templates/networkpolicy.yaml +++ b/production/helm/loki/templates/networkpolicy.yaml @@ -19,7 +19,7 @@ spec: - from: - podSelector: matchLabels: - app: {{ template "promtail.name" . }} + app: {{ template "client.name" . }} release: {{ .Release.Name }} - ports: - port: {{ .Values.service.port }} diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 7088515eb2cd3..ca4a84cdcefd6 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -84,6 +84,10 @@ livenessProbe: networkPolicy: enabled: false +## The app name of loki clients +client: {} + # name: + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ nodeSelector: {} diff --git a/production/helm/promtail/Chart.yaml b/production/helm/promtail/Chart.yaml index 12fd854ffdf79..4ecc958a7c079 100644 --- a/production/helm/promtail/Chart.yaml +++ b/production/helm/promtail/Chart.yaml @@ -1,3 +1,4 @@ +apiVersion: "v1" name: promtail version: 0.12.3 appVersion: v0.3.0