Files
helm-actions/templates/rolebinding-job.yaml
Christopher Homberger 41c4bf1bc7 refactor: use gitea.actions for global defines (#10)
### Description of the change

Just moves all defines under a new gitea.actions prefix.

### Additional information

Reduce possibility to cause a name clash with the helm-gitea chart if both would be included in a single helm chart installation.

Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/10
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
2025-04-09 19:33:45 +00:00

23 lines
694 B
YAML

{{- if .Values.enabled }}
{{- if and (and .Values.provisioning.enabled .Values.persistence.enabled) .Values.persistence.mount }}
{{- $name := include "gitea.actions.workername" (dict "global" . "worker" "actions-token-job") }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ $name }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
{{- include "gitea.actions.labels" . | nindent 4 }}
app.kubernetes.io/component: token-job
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ $name }}
subjects:
- kind: ServiceAccount
name: {{ $name }}
namespace: {{ .Release.Namespace }}
{{- end }}
{{- end }}