-
Notifications
You must be signed in to change notification settings - Fork 419
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 <[email protected]> * Unify variables and redefine values structure Signed-off-by: Sean Holcomb <[email protected]> * Update values file w/ new changes + an example team * Fix indent * Remove trailing whitespace failing CT lint Signed-off-by: Neal Ormsbee <[email protected]> * Remove explicit teams enable + teams configmap name param * Add comments to teams values --------- Signed-off-by: Sean Holcomb <[email protected]> Signed-off-by: Neal Ormsbee <[email protected]> Co-authored-by: Sean Holcomb <[email protected]> Co-authored-by: Neal Ormsbee <[email protected]>
- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -423,6 +423,44 @@ oidc: | |
# claimValues: | ||
# - "editor" | ||
|
||
# teams: | ||
# teamsConfigMapName: kubecost-rbac-teams-config # Name of the ConfigMap containing the teams configuration, if manually created, which overrides any other configured teams | ||
# teamsConfig: # Values-defined teams configuration, if teamsConfigMapName is not set, which will override UI-configured teams | ||
# - id: '' | ||
# name: helm-team | ||
# roles: | ||
# - id: '' | ||
# name: helm-role | ||
# description: helm configrured role | ||
# pages: | ||
# showOverview: true | ||
# showAllocation: true | ||
# showAsset: true | ||
# showCloudCost: true | ||
# showClusters: true | ||
# showExternalCosts: true | ||
# showNetwork: true | ||
# showCollections: true | ||
# showReports: true | ||
# showInsights: true | ||
# showActions: true | ||
# showAlerts: true | ||
# showBudgets: true | ||
# showAnomalies: true | ||
# showEfficiency: true | ||
# showSettings: true | ||
# permissions: admin | ||
# routes: [] | ||
# allocationFilters: | ||
# - key: cluster | ||
# operator: ":" | ||
# value: cluster-one | ||
# assetFilters: [] | ||
# cloudCostFilters: [] | ||
# claims: | ||
# NameID: [email protected] | ||
|
||
|
||
## Adds the HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables to all | ||
## containers. Typically used in environments that have firewall rules which | ||
## prevent kubecost from accessing cloud provider resources. | ||
|