mirror of
https://github.com/clearml/clearml-helm-charts
synced 2025-01-31 09:06:48 +00:00
7041c62f44
* Added: enterprise features alignment * Changed: version bump * Fixed: trailing spaces * Fixed: comment starting space * Changed: owner-token feature * Fixed: secret reference name * Changed: owner-token enterprise reference
73 lines
1.7 KiB
YAML
73 lines
1.7 KiB
YAML
{{- if not .Values.agentk8sglue.serviceExistingAccountName }}
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: {{ include "clearml.serviceAccountName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
{{- end }}
|
|
{{- if .Values.enterpriseFeatures.serviceAccountClusterAccess }}
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: {{ include "clearml.name" . }}-kpa
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- pods
|
|
- secrets
|
|
- services
|
|
verbs: ["get", "list", "watch", "create", "patch", "delete"]
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- namespaces
|
|
verbs: ["list"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: {{ include "clearml.name" . }}-kpa
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ include "clearml.serviceAccountName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: {{ include "clearml.name" . }}-kpa
|
|
{{- else }}
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: {{ include "clearml.name" . }}-kpa
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- pods
|
|
- secrets
|
|
- services
|
|
verbs: ["get", "list", "watch", "create", "patch", "delete"]
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- namespaces
|
|
verbs: ["list"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: {{ include "clearml.name" . }}-kpa
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ include "clearml.serviceAccountName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: {{ include "clearml.name" . }}-kpa
|
|
{{- end }}
|