-
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.
Add kubeRBACProxy property to support querying in cluster prometheus …
…in openshift (#3700) * Add kubeRBACProxy property to support querying in cluster prometheus in openshift
- Loading branch information
1 parent
fe03983
commit b01e76c
Showing
9 changed files
with
79 additions
and
0 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
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
17 changes: 17 additions & 0 deletions
17
cost-analyzer/templates/monitoring-role-binding-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,17 @@ | ||
{{- if (.Values.global.platforms.openshift.enabled) }} | ||
{{- if (.Values.global.platforms.openshift.createMonitoringResourceReaderRoleBinding) }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
name: {{ template "cost-analyzer.fullname" . }}-reader | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Values.global.platforms.openshift.monitoringServiceAccountName | quote }} | ||
namespace: openshift-monitoring | ||
roleRef: | ||
kind: Role | ||
name: {{ template "cost-analyzer.fullname" . }}-reader | ||
apiGroup: rbac.authorization.k8s.io | ||
{{- 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- if (.Values.global.platforms.openshift.enabled) }} | ||
{{- if (.Values.global.platforms.openshift.createMonitoringResourceReaderRoleBinding) }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
name: {{ template "cost-analyzer.fullname" . }}-reader | ||
rules: | ||
- apiGroups: | ||
- '' | ||
resources: | ||
- "pods" | ||
- "services" | ||
- "endpoints" | ||
verbs: | ||
- list | ||
- watch | ||
{{- 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
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