mirror of
https://github.com/henrygd/beszel.git
synced 2026-08-19 08:47:46 +02:00
feat: huge beszel hub and agent helm chart update (#1582)
This commit is contained in:
20
supplemental/helm/beszel-agent/templates/secret.yaml
Normal file
20
supplemental/helm/beszel-agent/templates/secret.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- if and (not .Values.secret.existingSecret) (not .Values.env.KEY) }}
|
||||
{{- fail "env.KEY is required when not using an existingSecret. Please provide an SSH public key for agent authentication." }}
|
||||
{{- end }}
|
||||
{{- if and .Values.secret.existingSecret .Values.env.KEY }}
|
||||
{{- fail "Cannot use both existingSecret and env.KEY. Please choose one method for providing authentication credentials." }}
|
||||
{{- end }}
|
||||
{{- if not .Values.secret.existingSecret }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "beszel-agent.fullname" . }}
|
||||
labels:
|
||||
{{- include "beszel-agent.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{ .Values.secret.sshKey }}: {{ .Values.env.KEY | b64enc | quote }}
|
||||
{{- if .Values.env.TOKEN }}
|
||||
{{ .Values.secret.tokenKey }}: {{ .Values.env.TOKEN | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user