Skip to content

Commit

Permalink
Add custom labels and annotations to created app and backup secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
Iaroslav Ivchenkov authored and cndoit18 committed Oct 28, 2021
1 parent 2bc3093 commit 0e3e443
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Added
* Add `orchestrator.persistence.fsGroupWorkaroundEnabled` for persistent volume
provisioners wich don't support fsGroup in security context (fixes #615)
* Add `appSecretLabels`, `appSecretAnnotations`, `backupSecretLabels`, `backupSecretAnnotations` to provide
custom labels and annotations to created app and backup secrets
### Changed
* Allow setting pod security context when deploying with Helm
* Use [distroless](https://github.com/GoogleContainerTools/distroless) as base image for orchestrator container
Expand Down
7 changes: 7 additions & 0 deletions deploy/charts/mysql-cluster/templates/backup-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.backupSecretLabels }}
{{- toYaml .Values.backupSecretLabels | nindent 4 }}
{{- end }}
{{- if .Values.backupSecretAnnotations }}
annotations:
{{ toYaml .Values.backupSecretAnnotations }}
{{- end }}
type: Opaque
data:
{{- range $key, $value := .Values.backupCredentials }}
Expand Down
7 changes: 7 additions & 0 deletions deploy/charts/mysql-cluster/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.appSecretLabels }}
{{- toYaml .Values.appSecretLabels | nindent 4 }}
{{- end }}
{{- if .Values.appSecretAnnotations }}
annotations:
{{ toYaml .Values.appSecretAnnotations }}
{{- end }}
type: Opaque
data:
ROOT_PASSWORD: {{ required ".rootPassword is missing" .Values.rootPassword | b64enc | quote }}
Expand Down
4 changes: 4 additions & 0 deletions deploy/charts/mysql-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ rootPassword: ""
appUser: ""
appPassword: ""
appDatabase: ""
# appSecretLabels: {}
# appSecretAnnotations: {}

podSpec:
mysqlConf:
Expand All @@ -30,6 +32,8 @@ backupScheduleJobsHistoryLimit:
backupURL:
backupSecretName:
backupRemoteDeletePolicy:
# backupSecretLabels: {}
# backupSecretAnnotations: {}
backupCredentials:
# AWS_ACCESS_KEY_ID: ?
# AWS_SECRET_ACCESS_KEY: ?
Expand Down

0 comments on commit 0e3e443

Please sign in to comment.