-
Notifications
You must be signed in to change notification settings - Fork 45
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 #399 from mesosphere/jr/opsportal-rbac-roles
[opsportal] add opsportal and kibana RBAC roles
- Loading branch information
Showing
3 changed files
with
125 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{{- if .Values.opsportalRBAC.enabled }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ template "opsportal.fullname" . }}-admin | ||
labels: | ||
app.kubernetes.io/managed-by: {{ .Release.Service | quote }} | ||
app.kubernetes.io/instance: {{ .Release.Name | quote }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion }} | ||
rules: | ||
- nonResourceURLs: | ||
- {{ .Values.opsportalRBAC.path | trimSuffix "/"}} | ||
- {{ .Values.opsportalRBAC.path | trimSuffix "/" }}/* | ||
verbs: | ||
- get | ||
- head | ||
- post | ||
- put | ||
- delete | ||
|
||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ template "opsportal.fullname" . }}-view | ||
labels: | ||
app.kubernetes.io/managed-by: {{ .Release.Service | quote }} | ||
app.kubernetes.io/instance: {{ .Release.Name | quote }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion }} | ||
rules: | ||
- nonResourceURLs: | ||
- {{ .Values.opsportalRBAC.path | trimSuffix "/"}} | ||
- {{ .Values.opsportalRBAC.path | trimSuffix "/" }}/* | ||
verbs: | ||
- get | ||
- head | ||
|
||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ template "opsportal.fullname" . }}-edit | ||
labels: | ||
app.kubernetes.io/managed-by: {{ .Release.Service | quote }} | ||
app.kubernetes.io/instance: {{ .Release.Name | quote }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion }} | ||
rules: | ||
- nonResourceURLs: | ||
- {{ .Values.opsportalRBAC.path | trimSuffix "/"}} | ||
- {{ .Values.opsportalRBAC.path | trimSuffix "/" }}/* | ||
verbs: | ||
- get | ||
- head | ||
- post | ||
- put | ||
{{- 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,60 @@ | ||
## Kibana is deployed from an upstream chart so we must introduce a temporary | ||
## cross application dependency | ||
## This template should be removed in 1.4 https://jira.d2iq.com/browse/D2IQ-63746 | ||
{{- if .Values.kibanaRBAC.enabled }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ template "opsportal.fullname" . }}-kibana-edit | ||
lables: | ||
app: {{ template "opsportal.fullname" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
rules: | ||
- nonResourceURLs: | ||
- {{ .Values.kibanaRBAC.path | trimSuffix "/"}} | ||
- {{ .Values.kibanaRBAC.path | trimSuffix "/" }}/* | ||
verbs: | ||
- get | ||
- head | ||
- post | ||
- put | ||
|
||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ template "opsportal.fullname" . }}-kibana-admin | ||
lables: | ||
app: {{ template "opsportal.fullname" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
rules: | ||
- nonResourceURLs: | ||
- {{ .Values.kibanaRBAC.path | trimSuffix "/"}} | ||
- {{ .Values.kibanaRBAC.path | trimSuffix "/" }}/* | ||
verbs: | ||
- get | ||
- head | ||
- post | ||
- put | ||
- delete | ||
|
||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ template "opsportal.fullname" . }}-kibana-view | ||
lables: | ||
app: {{ template "opsportal.fullname" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
rules: | ||
- nonResourceURLs: | ||
- {{ .Values.kibanaRBAC.path | trimSuffix "/"}} | ||
- {{ .Values.kibanaRBAC.path | trimSuffix "/" }}/* | ||
verbs: | ||
- get | ||
- head | ||
{{- 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