-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
teams rewrite secret/env functionality (#3799)
* teams rewrite secret/env functionality * Add configmap mounting for RBAC teams Signed-off-by: Sean Holcomb <seanholcomb@gmail.com> * Unify variables and redefine values structure Signed-off-by: Sean Holcomb <seanholcomb@gmail.com> * Update values file w/ new changes + an example team * Fix indent * Remove trailing whitespace failing CT lint Signed-off-by: Neal Ormsbee <neal.ormsbee@gmail.com> * Remove explicit teams enable + teams configmap name param * Add comments to teams values --------- Signed-off-by: Sean Holcomb <seanholcomb@gmail.com> Signed-off-by: Neal Ormsbee <neal.ormsbee@gmail.com> Co-authored-by: Sean Holcomb <seanholcomb@gmail.com> Co-authored-by: Neal Ormsbee <neal.ormsbee@gmail.com>
- Loading branch information
1 parent
4b53497
commit 7b12dd6
Showing
7 changed files
with
212 additions
and
6 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
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
18 changes: 18 additions & 0 deletions
18
cost-analyzer/templates/kubecost-rbac-secret-template.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if eq (include "rbacTeamsEnabled" .) "true" }} | ||
apiVersion: v1 | ||
kind: Secret | ||
type: Opaque | ||
metadata: | ||
name: kubecost-rbac-secret | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "cost-analyzer.commonLabels" . | nindent 4 }} | ||
stringData: | ||
key: | ||
{{- if .Values.oidc.enabled }} | ||
{{ .Values.oidc.authSecret | default (randAlphaNum 32 | quote) }} | ||
{{- end }} | ||
{{- if .Values.saml.enabled }} | ||
{{ .Values.saml.authSecret | default (randAlphaNum 32 | quote) }} | ||
{{- end }} | ||
{{- end }} |
13 changes: 13 additions & 0 deletions
13
cost-analyzer/templates/kubecost-rbac-teams-configmap-template.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{- if eq (include "rbacTeamsConfigEnabled" .) "true" }} | ||
{{- if not .Values.teams.teamsConfigMapName }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: "kubecost-rbac-teams-config" | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "cost-analyzer.commonLabels" . | nindent 4 }} | ||
data: | ||
rbac-teams-configs.json: '{{ toJson .Values.rbacTeams.teamsConfig }}' | ||
{{- end }} | ||
{{- end }} |
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