Skip to content

Commit

Permalink
Helm: use $.Release.Namespace consistently (#9330)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed May 17, 2023
1 parent 8e8dcdf commit bd7fe5c
Show file tree
Hide file tree
Showing 43 changed files with 54 additions and 10 deletions.
4 changes: 4 additions & 0 deletions production/helm/loki/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Entries should include a reference to the pull request that introduced the chang

- [CHANGE] Add clusterLabelOverride for alert label overrides.

## 5.5.2

- [BUGFIX] Use $.Release.Namespace consistently

## 5.5.1

- [FEATURE] Added ability to reference images by digest
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: loki
description: Helm chart for Grafana Loki in simple, scalable mode
type: application
appVersion: 2.8.2
version: 5.5.1
version: 5.5.2
home: https://grafana.github.io/helm-charts
sources:
- https://github.com/grafana/loki
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# loki

![Version: 5.5.1](https://img.shields.io/badge/Version-5.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square)
![Version: 5.5.2](https://img.shields.io/badge/Version-5.5.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square)

Helm chart for Grafana Loki in simple, scalable mode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "loki.backendFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.backendLabels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.backendFullname" . }}-headless
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.backendSelectorLabels" . | nindent 4 }}
prometheus.io/service-monitor: "false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.backendFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.backendLabels" . | nindent 4 }}
{{- with .Values.backend.serviceLabels }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "loki.backendFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.backendLabels" . | nindent 4 }}
app.kubernetes.io/part-of: memberlist
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "loki.name" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "loki.gatewayFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.gatewayLabels" . | nindent 4 }}
data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "loki.gatewayFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.gatewayLabels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/gateway/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "loki.gatewayFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.gatewayLabels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ apiVersion: {{ include "loki.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "loki.gatewayFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.gatewayLabels" . | nindent 4 }}
{{- with .Values.gateway.ingress.annotations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "loki.gatewayFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.gatewayLabels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/gateway/secret-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ include "loki.gatewayFullname" $ }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.gatewayLabels" $ | nindent 4 }}
stringData:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.gatewayFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.gatewayLabels" . | nindent 4 }}
{{- with .Values.gateway.service.labels }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: {{ include "loki.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "loki.fullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/loki-canary/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "loki-canary.fullname" $ }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki-canary.labels" $ | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/loki-canary/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "loki-canary.fullname" $ }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki-canary.labels" $ | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "loki-canary.fullname" $ }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki-canary.labels" $ | nindent 4 }}
annotations:
Expand Down
7 changes: 7 additions & 0 deletions production/helm/loki/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "loki.name" . }}-namespace-only
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
spec:
Expand All @@ -23,6 +24,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "loki.name" . }}-egress-dns
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
spec:
Expand All @@ -43,6 +45,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "loki.name" . }}-ingress
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
spec:
Expand Down Expand Up @@ -80,6 +83,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "loki.name" . }}-ingress-metrics
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
spec:
Expand Down Expand Up @@ -114,6 +118,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "loki.name" . }}-egress-alertmanager
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
spec:
Expand Down Expand Up @@ -143,6 +148,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "loki.name" . }}-egress-external-storage
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
spec:
Expand Down Expand Up @@ -174,6 +180,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "loki.name" . }}-egress-discovery
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: batch/v1
kind: Job
metadata:
name: {{ template "enterprise-logs.provisionerFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "enterprise-logs.provisionerLabels" . | nindent 4 }}
{{- with .Values.enterprise.provisioner.labels }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "enterprise-logs.provisionerFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "enterprise-logs.provisionerLabels" . | nindent 4 }}
{{- with .Values.enterprise.provisioner.labels }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "enterprise-logs.provisionerFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "enterprise-logs.provisionerLabels" . | nindent 4 }}
{{- with .Values.enterprise.provisioner.labels }}
Expand All @@ -21,5 +22,5 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ template "enterprise-logs.provisionerFullname" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ $.Release.Namespace }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "enterprise-logs.provisionerFullname" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "enterprise-logs.provisionerLabels" . | nindent 4 }}
{{- with .Values.enterprise.provisioner.labels }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/read/deployment-read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "loki.readFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
app.kubernetes.io/part-of: memberlist
{{- include "loki.readLabels" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "loki.readFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.readLabels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.readFullname" . }}-headless
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.readSelectorLabels" . | nindent 4 }}
prometheus.io/service-monitor: "false"
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/read/service-read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.readFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.readLabels" . | nindent 4 }}
{{- with .Values.read.serviceLabels }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/read/statefulset-read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "loki.readFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
app.kubernetes.io/part-of: memberlist
{{- include "loki.readLabels" . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "loki.name" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
{{- if .Values.rbac.pspEnabled }}
Expand Down
3 changes: 2 additions & 1 deletion production/helm/loki/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "loki.name" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
roleRef:
Expand All @@ -12,5 +13,5 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ include "loki.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ $.Release.Namespace }}
{{- end }}
1 change: 1 addition & 0 deletions production/helm/loki/templates/runtime-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "loki.name" . }}-runtime
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
data:
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/secret-license.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: enterprise-logs-license
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
data:
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/service-memberlist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.memberlist" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "loki.serviceAccountName" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.labels }}
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/templates/single-binary/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "loki.fullname" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.name" . }}-headless
namespace: {{ .Release.Namespace }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
variant: headless
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/single-binary/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.singleBinaryFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "loki.singleBinaryFullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.singleBinaryLabels" . | nindent 4 }}
app.kubernetes.io/part-of: memberlist
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/tests/test-canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: v1
kind: Pod
metadata:
name: "{{ include "loki.name" $ }}-helm-test"
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.helmTestLabels" $ | nindent 4 }}
{{- with .labels }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ template "enterprise-logs.tokengenFullname" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ $.Release.Namespace }}
{{- end }}
Loading

0 comments on commit bd7fe5c

Please sign in to comment.