mirror of
https://github.com/clearml/clearml-helm-charts
synced 2025-01-31 17:16:47 +00:00
5540188db1
* Added: task as job support * Added: template generator * Fixed: typo * Changed: bump version * Added: changelog reference * Fixed: include function name * Fixed: checksum generator * Added: nindent * Added: changelog item * Fixed: job env var switch * Fixed: double Restart policy removed * Fixed: job template apiVersion
89 lines
2.1 KiB
YAML
89 lines
2.1 KiB
YAML
{{- if not .Values.agentk8sglue.serviceExistingAccountName }}
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: {{ include "clearmlAgent.serviceAccountName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
{{- end }}
|
|
{{- if .Values.enterpriseFeatures.serviceAccountClusterAccess }}
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: {{ include "clearmlAgent.name" . }}-kpa
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- pods
|
|
- secrets
|
|
- services
|
|
verbs: ["get", "list", "watch", "create", "patch", "delete"]
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- namespaces
|
|
verbs: ["list"]
|
|
{{- if .Values.agentk8sglue.taskAsJob }}
|
|
- apiGroups:
|
|
- batch
|
|
- extensions
|
|
resources:
|
|
- jobs
|
|
verbs: ["get", "list", "watch", "create", "patch", "delete"]
|
|
{{- end }}
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: {{ include "clearmlAgent.name" . }}-kpa
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ include "clearmlAgent.serviceAccountName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: {{ include "clearmlAgent.name" . }}-kpa
|
|
{{- else }}
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: {{ include "clearmlAgent.name" . }}-kpa
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- pods
|
|
- secrets
|
|
- services
|
|
verbs: ["get", "list", "watch", "create", "patch", "delete"]
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- namespaces
|
|
verbs: ["list"]
|
|
{{- if .Values.agentk8sglue.taskAsJob }}
|
|
- apiGroups:
|
|
- batch
|
|
- extensions
|
|
resources:
|
|
- jobs
|
|
verbs: ["get", "list", "watch", "create", "patch", "delete"]
|
|
{{- end }}
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: {{ include "clearmlAgent.name" . }}-kpa
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ include "clearmlAgent.serviceAccountName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: {{ include "clearmlAgent.name" . }}-kpa
|
|
{{- end }}
|