Skip to content

Commit bbc0de3

Browse files
authored
Add custom annotations to postgres-operator-ui objects (#1748)
* Add custom annotations to postgres-operator-ui's pod and service Signed-off-by: Antoine Bardoux <[email protected]>
1 parent bb2617a commit bbc0de3

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

charts/postgres-operator-ui/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ spec:
1919
labels:
2020
app.kubernetes.io/name: {{ template "postgres-operator-ui.name" . }}
2121
app.kubernetes.io/instance: {{ .Release.Name }}
22+
{{- with .Values.podAnnotations }}
23+
annotations:
24+
{{- toYaml . | nindent 8 }}
25+
{{- end }}
2226
spec:
2327
serviceAccountName: {{ include "postgres-operator-ui.serviceAccountName" . }}
2428
{{- if .Values.imagePullSecrets }}

charts/postgres-operator-ui/templates/service.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ metadata:
66
helm.sh/chart: {{ template "postgres-operator-ui.chart" . }}
77
app.kubernetes.io/managed-by: {{ .Release.Service }}
88
app.kubernetes.io/instance: {{ .Release.Name }}
9+
{{- with .Values.service.annotations }}
10+
annotations:
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
913
name: {{ template "postgres-operator-ui.fullname" . }}
1014
namespace: {{ .Release.Namespace }}
1115
spec:

charts/postgres-operator-ui/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ envs:
4848
teams:
4949
- "acid"
5050

51+
# Extra pod annotations
52+
podAnnotations:
53+
{}
54+
5155
# configure extra UI ENVs
5256
# Extra ENVs are writen in kubenertes format and added "as is" to the pod's env variables
5357
# https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/
@@ -85,6 +89,8 @@ service:
8589
# If the type of the service is NodePort a port can be specified using the nodePort field
8690
# If the nodePort field is not specified, or if it has no value, then a random port is used
8791
# nodePort: 32521
92+
annotations:
93+
{}
8894

8995
# configure UI ingress. If needed: "enabled: true"
9096
ingress:

0 commit comments

Comments
 (0)