apiVersion: v1
kind: Secret
metadata:
  name: {{ include "rtfs.fullname" . }}
  namespace: {{ .Release.Namespace | quote }}
  labels: {{- include "common.labels.standard" . | nindent 4 }}
  {{- if .Values.commonAnnotations }}
  annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  {{- end }}
type: Opaque
data:
    {{- if or .Values.joinKey .Values.global.joinKey }}
    {{- if not (or .Values.joinKeySecretName .Values.global.joinKeySecretName) }}
    join-key: {{ include "rtfs.joinKey" . | b64enc | quote }}
    {{- end }}
    {{- end }}
    {{- if or .Values.masterKey .Values.global.masterKey }}
    {{- if not (or .Values.masterKeySecretName .Values.global.masterKeySecretName) }}
    master-key: {{ include "rtfs.masterKey" . | b64enc | quote }}
    {{- end }}
    {{- end }}