Skip to content

Commit

Permalink
Adds flexibility to rbac components (#47)
Browse files Browse the repository at this point in the history
* Adds flexibility to rbac components

* fix: appVersion correction
  • Loading branch information
rwc authored Jul 3, 2024
1 parent 7a11aa9 commit f3cc41e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/databricks-kube-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 0.7.0
name: databricks-kube-operator
description: A kube-rs operator for managing Databricks API resources
version: 0.7.0
version: 0.8.0

home: https://github.com/mach-kernel/databricks-kube-operator
sources:
Expand Down
11 changes: 6 additions & 5 deletions charts/databricks-kube-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{{- $svcAccount := include "databricks-kube-operator.serviceAccountName" . }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: databricks-kube-operator
name: "{{ $svcAccount }}"
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: databricks-kube-operator
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
Expand Down Expand Up @@ -37,13 +38,13 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: databricks-kube-operator
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
subjects:
- namespace: {{ .Release.Namespace }}
kind: ServiceAccount
name: databricks-kube-operator
name: "{{ $svcAccount }}"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: databricks-kube-operator
name: {{ .Release.Name }}
4 changes: 3 additions & 1 deletion charts/databricks-kube-operator/templates/sts.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{- $svcAccount := include "databricks-kube-operator.serviceAccountName" . }}
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand All @@ -19,7 +21,7 @@ spec:
labels:
app: {{ template "databricks-kube-operator.name" . }}
spec:
serviceAccountName: databricks-kube-operator
serviceAccountName: "{{ $svcAccount }}"
terminationGracePeriodSeconds: 10
containers:
- name: dko
Expand Down
4 changes: 4 additions & 0 deletions charts/databricks-kube-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ nodeSelector:
kubernetes.io/arch: amd64
resources: {}
affinity: {}

serviceAccount:
create: true
name: "databricks-kube-operator"

0 comments on commit f3cc41e

Please sign in to comment.