21 lines
753 B
YAML
21 lines
753 B
YAML
{{- 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: 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 }}
|