Skip to content

Commit 0acfe03

Browse files
authored
fix: missing common annotations in the helm chart (#1471)
**Description of the change** Add common annotations to all resources in the helm chart as per the [documentation](https://github.com/bitnami-labs/sealed-secrets/blob/main/helm/sealed-secrets/values.yaml#L19): `## @param commonAnnotations [object] Annotations to add to all deployed resources` **Benefits** Add common annotations to all resources in the helm chart as per the documentation **Applicable issues** - fixes #1372 Signed-off-by: cyrgim <[email protected]>
1 parent e5a59d5 commit 0acfe03

14 files changed

+69
-11
lines changed

helm/sealed-secrets/templates/cluster-role-binding.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ metadata:
1010
{{- if .Values.commonLabels }}
1111
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
1212
{{- end }}
13+
annotations:
14+
{{- if .Values.commonAnnotations }}
15+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
16+
{{- end }}
1317
roleRef:
1418
apiGroup: rbac.authorization.k8s.io
1519
kind: ClusterRole

helm/sealed-secrets/templates/cluster-role.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ metadata:
1010
{{- if .Values.commonLabels }}
1111
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
1212
{{- end }}
13+
annotations:
14+
{{- if .Values.commonAnnotations }}
15+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
16+
{{- end }}
1317
rules:
1418
- apiGroups:
1519
- bitnami.com

helm/sealed-secrets/templates/configmap-dashboards.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ metadata:
1818
{{- if $.Values.metrics.dashboards.annotations }}
1919
{{- include "sealed-secrets.render" ( dict "value" $.Values.metrics.dashboards.annotations "context" $) | nindent 4 }}
2020
{{- end }}
21+
{{- if $.Values.commonAnnotations }}
22+
{{- include "sealed-secrets.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
23+
{{- end }}
2124
data:
2225
{{ base $path }}: |-
2326
{{ $.Files.Get $path | indent 4 }}

helm/sealed-secrets/templates/deployment.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ metadata:
88
{{- if .Values.commonLabels }}
99
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
1010
{{- end }}
11-
{{- if .Values.commonAnnotations }}
12-
annotations: {{- toYaml .Values.commonAnnotations | nindent 4 }}
13-
{{- end }}
11+
annotations:
12+
{{- if .Values.commonAnnotations }}
13+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
14+
{{- end }}
1415
spec:
1516
replicas: 1
1617
{{- if .Values.revisionHistoryLimit }}

helm/sealed-secrets/templates/ingress.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ metadata:
88
{{- if .Values.commonLabels }}
99
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
1010
{{- end }}
11-
{{- if .Values.ingress.annotations }}
1211
annotations:
1312
{{- if .Values.ingress.annotations }}
1413
{{- include "sealed-secrets.render" ( dict "value" .Values.ingress.annotations "context" $) | nindent 4 }}
1514
{{- end }}
16-
{{- end }}
15+
{{- if .Values.commonAnnotations }}
16+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
17+
{{- end }}
1718
spec:
1819
{{- if and .Values.ingress.ingressClassName (eq "true" (include "sealed-secrets.supportsIngressClassname" .)) }}
1920
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}

helm/sealed-secrets/templates/networkpolicy.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ metadata:
88
{{- if .Values.commonLabels }}
99
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
1010
{{- end }}
11+
annotations:
12+
{{- if .Values.commonAnnotations }}
13+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
14+
{{- end }}
1115
spec:
1216
podSelector:
1317
matchLabels: {{- include "sealed-secrets.matchLabels" . | nindent 6 }}

helm/sealed-secrets/templates/pdb.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ metadata:
88
{{- if .Values.commonLabels }}
99
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
1010
{{- end }}
11-
{{- if .Values.commonAnnotations }}
12-
annotations: {{- toYaml .Values.commonAnnotations | nindent 4 }}
13-
{{- end }}
11+
annotations:
12+
{{- if .Values.commonAnnotations }}
13+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
14+
{{- end }}
1415
spec:
1516
{{- if regexMatch "64$" (typeOf .Values.pdb.minAvailable) }}
1617
minAvailable: {{ .Values.pdb.minAvailable }}

helm/sealed-secrets/templates/psp-clusterrole.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ metadata:
1010
{{- if .Values.commonLabels }}
1111
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
1212
{{- end }}
13+
annotations:
14+
{{- if .Values.commonAnnotations }}
15+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
16+
{{- end }}
1317
rules:
1418
- apiGroups: ['extensions']
1519
resources: ['podsecuritypolicies']

helm/sealed-secrets/templates/psp-clusterrolebinding.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ metadata:
1010
{{- if .Values.commonLabels }}
1111
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
1212
{{- end }}
13+
annotations:
14+
{{- if .Values.commonAnnotations }}
15+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
16+
{{- end }}
1317
roleRef:
1418
apiGroup: rbac.authorization.k8s.io
1519
kind: ClusterRole

helm/sealed-secrets/templates/psp.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ metadata:
77
{{- if .Values.commonLabels }}
88
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
99
{{- end }}
10+
annotations:
11+
{{- if .Values.commonAnnotations }}
12+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
13+
{{- end }}
1014
spec:
1115
privileged: false
1216
allowPrivilegeEscalation: false

helm/sealed-secrets/templates/role-binding.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ metadata:
1111
{{- if .Values.commonLabels }}
1212
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
1313
{{- end }}
14+
annotations:
15+
{{- if .Values.commonAnnotations }}
16+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
17+
{{- end }}
1418
roleRef:
1519
apiGroup: rbac.authorization.k8s.io
1620
kind: Role
@@ -35,6 +39,10 @@ metadata:
3539
{{- if .Values.commonLabels }}
3640
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
3741
{{- end }}
42+
annotations:
43+
{{- if .Values.commonAnnotations }}
44+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
45+
{{- end }}
3846
roleRef:
3947
apiGroup: rbac.authorization.k8s.io
4048
kind: Role
@@ -54,6 +62,10 @@ metadata:
5462
{{- if $.Values.rbac.labels }}
5563
{{- include "sealed-secrets.render" ( dict "value" $.Values.rbac.labels "context" $) | nindent 4 }}
5664
{{- end }}
65+
annotations:
66+
{{- if .Values.commonAnnotations }}
67+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
68+
{{- end }}
5769
roleRef:
5870
apiGroup: rbac.authorization.k8s.io
5971
kind: Role

helm/sealed-secrets/templates/role.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ metadata:
1111
{{- if .Values.commonLabels }}
1212
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
1313
{{- end }}
14+
annotations:
15+
{{- if .Values.commonAnnotations }}
16+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
17+
{{- end }}
1418
rules:
1519
- apiGroups:
1620
- ""

helm/sealed-secrets/templates/servicemonitor.yaml

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ metadata:
1515
{{- if .Values.commonLabels }}
1616
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
1717
{{- end }}
18-
{{- if .Values.metrics.serviceMonitor.annotations }}
19-
annotations: {{- include "sealed-secrets.render" (dict "value" .Values.metrics.serviceMonitor.annotations "context" $) | nindent 4 }}
20-
{{- end }}
18+
annotations:
19+
{{- if .Values.metrics.serviceMonitor.annotations }}
20+
{{- include "sealed-secrets.render" (dict "value" .Values.metrics.serviceMonitor.annotations "context" $) | nindent 4 }}
21+
{{- end }}
22+
{{- if .Values.commonAnnotations }}
23+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
24+
{{- end }}
2125
spec:
2226
endpoints:
2327
- port: metrics

helm/sealed-secrets/templates/tls-secret.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ metadata:
1010
{{- if .Values.commonLabels }}
1111
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
1212
{{- end }}
13+
annotations:
14+
{{- if .Values.commonAnnotations }}
15+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
16+
{{- end }}
1317
type: kubernetes.io/tls
1418
data:
1519
tls.crt: {{ .certificate | b64enc }}
@@ -29,6 +33,10 @@ metadata:
2933
{{- if .Values.commonLabels }}
3034
{{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
3135
{{- end }}
36+
annotations:
37+
{{- if .Values.commonAnnotations }}
38+
{{- include "sealed-secrets.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
39+
{{- end }}
3240
type: kubernetes.io/tls
3341
data:
3442
tls.crt: {{ $cert.Cert | b64enc | quote }}

0 commit comments

Comments
 (0)