{{- if .Values.magicache.enabled }}
{{- if not .Values.magicache.secretName }}
---
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "dagger.fullname" . }}-magicache-token
  namespace:  {{ .Release.Namespace }}
  labels: 
    {{- include "dagger.labels" . | nindent 4 }}
data:
  _EXPERIMENTAL_DAGGER_CACHESERVICE_TOKEN: {{ required "A magicache token is required" .Values.magicache.token | b64enc | quote }}
{{- end }}
{{- end }}
