{{- if not .Values.rbac.only }}
{{- if and .Values.licenseKey.create .Values.licenseKey.secret.create }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ .Values.licenseKey.secret.name }}
  namespace: {{ include "traffic-manager.namespace" . }}
  labels:
    {{- include "telepresence.labels" . | nindent 4 }}
data:
  hostDomain: {{ .Values.licenseKey.hostDomain | default "auth.datawire.io" | b64enc | quote }}
  license: {{ .Values.licenseKey.value | b64enc | quote }}
{{- end }}
{{- end }}
