Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/onyxia/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 3.1.0
version: 3.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
33 changes: 33 additions & 0 deletions charts/onyxia/templates/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,37 @@ subjects:
name: {{ include "onyxia.api.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end -}}
{{- if .Values.serviceAccount.clusterMinPrivilege -}}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: clusterMinPrivilegeRole
rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list", "create"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["rolebindings"]
verbs: ["create"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["clusterroles"]
verbs: ["bind"]
resourceNames: ["admin","edit","view"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "onyxia.fullname" . }}
labels:
{{- include "onyxia.api.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: clusterMinPrivilegeRole
subjects:
- kind: ServiceAccount
name: {{ include "onyxia.api.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end -}}
{{- end -}}
5 changes: 4 additions & 1 deletion charts/onyxia/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ imagePullSecrets: []
serviceAccount:
# Specifies whether a service account should be created
create: true
clusterAdmin: false # If true, give cluster admin permissions. Otherwise, be admin scoped to the namespace
clusterAdmin: false
clusterMinPrivilege: false
# If clusterAdmintrue, give cluster admin permissions. Otherwise, be admin scoped to the namespace
# If clusterMinPrivilege, try to stick to the minprileve neeeded by api
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
Expand Down