{{- range .Values.apprepository.initialRepos }}
{{- if or .caCert .authorizationHeader }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "kubeapps.apprepository-secret.name" . }}
  annotations:
    "helm.sh/hook": pre-install
  labels:{{ include "kubeapps.labels" $ | nindent 4 }}
data:
  {{- if .caCert }}
  ca.crt: |-
    {{- .caCert | b64enc }}
  {{- end }}
  {{- if .authorizationHeader }}
  authorizationHeader: |-
    {{ .authorizationHeader | b64enc }}
  {{- end }}
{{- end }}
{{- end }}
