{{- $kubeconfig := .Values.kubeconfig | default (.Files.Get "files/org.etsi.osl.controllers.sylva/config") -}}
apiVersion: v1
kind: Secret
metadata:
  namespace: {{ .Release.Namespace }}
  labels:
    app: {{ include "openslice.fullname" . }}
    org.etsi.osl.service: org.etsi.osl.controllers.sylva
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    {{- include "openslice.labels" . | nindent 4 }}
  name: {{ include "openslice.fullname" . }}-oslsylva-kubeconfig
type: Opaque
data:
  config: |-
    {{- required "A kubeconfig file is required." ($kubeconfig | b64enc) | nindent 4 }}
