You've already forked helm-actions

### 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>
21 lines
761 B
YAML
21 lines
761 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") }}
|
|
{{- $secretName := include "gitea.actions.workername" (dict "global" . "worker" "actions-token") }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ $secretName }}
|
|
namespace: {{ .Values.namespace | default .Release.Namespace }}
|
|
labels:
|
|
{{- include "gitea.actions.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 }}
|