-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
132 additions
and
88 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
19 changes: 19 additions & 0 deletions
19
deploy/helm-chart/kubernetes-secret-generator/templates/clusterrole.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,19 @@ | ||
{{- if and .Values.rbac.create .Values.rbac.clusterRole -}} | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: "mittwald:{{ include "kubernetes-secret-generator.serviceAccountName" . }}" | ||
labels: | ||
{{ include "kubernetes-secret-generator.labels" . | nindent 4 }} | ||
rules: | ||
# actual operator functionality | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- update | ||
{{- end -}} |
16 changes: 16 additions & 0 deletions
16
deploy/helm-chart/kubernetes-secret-generator/templates/clusterrolebinding.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,16 @@ | ||
{{- if and .Values.rbac.create .Values.rbac.clusterRole -}} | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: "mittwald:{{ include "kubernetes-secret-generator.serviceAccountName" . }}" | ||
labels: | ||
{{ include "kubernetes-secret-generator.labels" . | nindent 4 }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: "mittwald:{{ include "kubernetes-secret-generator.serviceAccountName" . }}" | ||
apiGroup: rbac.authorization.k8s.io | ||
subjects: | ||
- kind: ServiceAccount | ||
namespace: {{ .Release.Namespace | quote }} | ||
name: {{ include "kubernetes-secret-generator.serviceAccountName" . }} | ||
{{- 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
87 changes: 0 additions & 87 deletions
87
deploy/helm-chart/kubernetes-secret-generator/templates/rbac.yaml
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
deploy/helm-chart/kubernetes-secret-generator/templates/role.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,44 @@ | ||
{{- if .Values.rbac.create -}} | ||
kind: Role | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: "mittwald:{{ include "kubernetes-secret-generator.serviceAccountName" . }}" | ||
labels: | ||
{{ include "kubernetes-secret-generator.labels" . | nindent 4 }} | ||
rules: | ||
# leader election | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
verbs: | ||
- create | ||
- delete | ||
- get | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
verbs: | ||
- delete | ||
- get | ||
- apiGroups: | ||
- monitoring.coreos.com | ||
resources: | ||
- servicemonitors | ||
verbs: | ||
- "get" | ||
- "create" | ||
{{- if and .Values.rbac.create (not .Values.rbac.clusterRole) }} | ||
# Permissions to access secrets in this namespace if no cluster role is created. | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- update | ||
{{- end -}} | ||
{{- end -}} |
16 changes: 16 additions & 0 deletions
16
deploy/helm-chart/kubernetes-secret-generator/templates/rolebinding.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,16 @@ | ||
{{- if .Values.rbac.create -}} | ||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: "mittwald:{{ include "kubernetes-secret-generator.serviceAccountName" . }}" | ||
labels: | ||
{{ include "kubernetes-secret-generator.labels" . | nindent 4 }} | ||
roleRef: | ||
kind: Role | ||
name: "mittwald:{{ include "kubernetes-secret-generator.serviceAccountName" . }}" | ||
apiGroup: rbac.authorization.k8s.io | ||
subjects: | ||
- kind: ServiceAccount | ||
namespace: {{ .Release.Namespace | quote }} | ||
name: {{ include "kubernetes-secret-generator.serviceAccountName" . }} | ||
{{- end -}} |
8 changes: 8 additions & 0 deletions
8
deploy/helm-chart/kubernetes-secret-generator/templates/serviceaccount.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,8 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "kubernetes-secret-generator.serviceAccountName" . }} | ||
labels: | ||
{{ include "kubernetes-secret-generator.labels" . | nindent 4 }} | ||
{{- 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