2024-11-10 13:35:56 +00:00
|
|
|
{{- if .Values.actions.enabled }}
|
|
|
|
{{- if and (and .Values.actions.provisioning.enabled .Values.persistence.enabled) .Values.persistence.mount }}
|
|
|
|
{{- $name := include "gitea.workername" (dict "global" . "worker" "actions-token-job") }}
|
|
|
|
{{- $secretName := include "gitea.workername" (dict "global" . "worker" "actions-token") }}
|
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: Role
|
|
|
|
metadata:
|
|
|
|
name: {{ $name }}
|
2024-11-30 14:47:18 +00:00
|
|
|
namespace: {{ .Values.namespace | default .Release.Namespace }}
|
2024-11-10 13:35:56 +00:00
|
|
|
labels:
|
|
|
|
{{- include "gitea.labels" . | nindent 4 }}
|
|
|
|
app.kubernetes.io/component: token-job
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- secrets
|
|
|
|
resourceNames:
|
|
|
|
- {{ $secretName }}
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- update
|
|
|
|
- patch
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|