Skip to content

Commit 0e3e443

Browse files
Iaroslav Ivchenkovcndoit18
authored andcommitted
Add custom labels and annotations to created app and backup secrets
1 parent 2bc3093 commit 0e3e443

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
99
### Added
1010
* Add `orchestrator.persistence.fsGroupWorkaroundEnabled` for persistent volume
1111
provisioners wich don't support fsGroup in security context (fixes #615)
12+
* Add `appSecretLabels`, `appSecretAnnotations`, `backupSecretLabels`, `backupSecretAnnotations` to provide
13+
custom labels and annotations to created app and backup secrets
1214
### Changed
1315
* Allow setting pod security context when deploying with Helm
1416
* Use [distroless](https://github.com/GoogleContainerTools/distroless) as base image for orchestrator container

deploy/charts/mysql-cluster/templates/backup-secret.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ metadata:
88
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
99
release: {{ .Release.Name }}
1010
heritage: {{ .Release.Service }}
11+
{{- if .Values.backupSecretLabels }}
12+
{{- toYaml .Values.backupSecretLabels | nindent 4 }}
13+
{{- end }}
14+
{{- if .Values.backupSecretAnnotations }}
15+
annotations:
16+
{{ toYaml .Values.backupSecretAnnotations }}
17+
{{- end }}
1118
type: Opaque
1219
data:
1320
{{- range $key, $value := .Values.backupCredentials }}

deploy/charts/mysql-cluster/templates/secret.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ metadata:
88
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
99
release: {{ .Release.Name }}
1010
heritage: {{ .Release.Service }}
11+
{{- if .Values.appSecretLabels }}
12+
{{- toYaml .Values.appSecretLabels | nindent 4 }}
13+
{{- end }}
14+
{{- if .Values.appSecretAnnotations }}
15+
annotations:
16+
{{ toYaml .Values.appSecretAnnotations }}
17+
{{- end }}
1118
type: Opaque
1219
data:
1320
ROOT_PASSWORD: {{ required ".rootPassword is missing" .Values.rootPassword | b64enc | quote }}

deploy/charts/mysql-cluster/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ rootPassword: ""
1515
appUser: ""
1616
appPassword: ""
1717
appDatabase: ""
18+
# appSecretLabels: {}
19+
# appSecretAnnotations: {}
1820

1921
podSpec:
2022
mysqlConf:
@@ -30,6 +32,8 @@ backupScheduleJobsHistoryLimit:
3032
backupURL:
3133
backupSecretName:
3234
backupRemoteDeletePolicy:
35+
# backupSecretLabels: {}
36+
# backupSecretAnnotations: {}
3337
backupCredentials:
3438
# AWS_ACCESS_KEY_ID: ?
3539
# AWS_SECRET_ACCESS_KEY: ?

0 commit comments

Comments
 (0)