-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #428 from percona/EVEREST-107-configmap-bug
EVEREST-107 | Fix bug with Everest ConfigMaps (RBAC, settings) getting reset on upgrade
- Loading branch information
Showing
7 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 11 additions & 2 deletions
13
charts/everest/templates/everest-server/rbac.configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
{{- $cmName := (printf "everest-rbac") -}} | ||
{{- $cm := (lookup "v1" "ConfigMap" (include "everest.namespace" .) $cmName ) -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: everest-rbac | ||
name: {{ $cmName }} | ||
namespace: {{ include "everest.namespace" . }} | ||
data: | ||
{{- if or (not $cm) .Release.IsInstall }} | ||
enabled: {{ .Values.server.rbac.enabled | default "false" | quote }} | ||
policy.csv: | | ||
{{- .Values.server.rbac | nindent 4 }} | ||
{{- .Values.server.rbac.policy | nindent 4 }} | ||
{{- else }} | ||
{{- range $key, $value := $cm.data }} | ||
{{ $key }}: {{ $value }} | ||
{{- end }} | ||
{{- end }} |
10 changes: 9 additions & 1 deletion
10
charts/everest/templates/everest-server/settings.configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
{{- $cmName := (printf "everest-settings") -}} | ||
{{- $cm := (lookup "v1" "ConfigMap" (include "everest.namespace" .) $cmName ) -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: everest-settings | ||
name: {{ $cmName }} | ||
namespace: {{ include "everest.namespace" . }} | ||
data: | ||
{{- if or (not $cm) .Release.IsInstall }} | ||
{{- if .Values.server.oidc }} | ||
oidc.config: | | ||
{{- toYaml .Values.server.oidc | nindent 4 }} | ||
{{- end }} | ||
{{- else }} | ||
{{- range $key, $value := $cm.data }} | ||
{{ $key }}: {{ $value }} | ||
{{- end }} | ||
{{- end }} | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters