apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "novnc.fullname" . }}-conf
  labels:
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
    app.kubernetes.io/name: {{ template "novnc.name" . }}
data:
  config.properties: |
    [API]
    token = {{ .Values.token.apiMytr }}
  init.sh: |
    while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://openvpn-api:8000/api-token-auth/)" != "405" ]]; do echo "En attente de l'API OpenVPN"; done