{{- if .Values.enabled }} {{- if and (and .Values.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: v1 kind: Secret metadata: name: {{ $secretName }} namespace: {{ .Values.namespace | default .Release.Namespace }} labels: {{- include "gitea.labels" . | nindent 4 }} app.kubernetes.io/component: token-job {{ $secret := (lookup "v1" "Secret" .Release.Namespace $secretName) -}} {{ if $secret -}} data: token: {{ (b64dec (index $secret.data "token")) | b64enc }} {{ end -}} {{- end }} {{- end }}