apiVersion: v1
kind: ConfigMap
metadata:
  name: cloudcore
  labels:
    k8s-app: kubeedge
    kubeedge: cloudcore
data:
  cloudcore.yaml: |
    apiVersion: cloudcore.config.kubeedge.io/v1alpha2
    kind: CloudCore
    kubeAPIConfig:
      kubeConfig: ""
      master: ""
    modules:
      cloudHub:
        advertiseAddress:
        {{- range .Values.cloudCore.cloudHub.advertiseAddress }}
        - {{  .  }}
        {{- end}}
        nodeLimit: {{ .Values.cloudCore.cloudHub.nodeLimit }}
        tlsCAFile: /etc/kubeedge/ca/rootCA.crt
        tlsCertFile: /etc/kubeedge/certs/edge.crt
        tlsPrivateKeyFile: /etc/kubeedge/certs/edge.key
        unixsocket:
          address: unix:///var/lib/kubeedge/kubeedge.sock
          enable: true
        websocket:
          address: 0.0.0.0
          enable: {{ .Values.cloudCore.cloudHub.websocket.enable }}
          port: {{ .Values.cloudCore.cloudhubPort }}
        quic:
          address: 0.0.0.0
          enable: {{ .Values.cloudCore.cloudHub.quic.enable }}
          maxIncomingStreams: {{ .Values.cloudCore.cloudHub.quic.maxIncomingStreams }}
          port: {{ .Values.cloudCore.cloudhubQuicPort }}
        https:
          address: 0.0.0.0
          enable: {{ .Values.cloudCore.cloudHub.https.enable }}
          port: {{ .Values.cloudCore.cloudhubHttpsPort }}
      cloudStream:
        enable: {{ .Values.cloudCore.cloudStream.enable }}
        streamPort: {{ .Values.cloudCore.cloudstreamPort }}
        tunnelPort: {{ .Values.cloudCore.tunnelPort }}
