apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    k8s-app: kubeedge
    kubeedge: cloudcore
  name: cloudcore
  namespace: kubeedge
spec:
  selector:
    matchLabels:
      k8s-app: kubeedge
      kubeedge: cloudcore
  template:
    metadata:
      labels:
        k8s-app: kubeedge
        kubeedge: cloudcore
    spec:
      hostNetwork: true
      containers:
      - name: cloudcore
        image: kubeedge/cloudcore:v1.2.1
        imagePullPolicy: Always
        ports:
        - containerPort: 10000
          name: cloudhub
          protocol: TCP
        resources:
          limits:
            cpu: 200m
            memory: 1Gi
          requests:
            cpu: 100m
            memory: 512Mi
        volumeMounts:
        - name: conf
          mountPath: /etc/kubeedge/config
        - name: certs
          mountPath: /etc/kubeedge
      restartPolicy: Always
      serviceAccount: cloudcore
      serviceAccountName: cloudcore
      volumes:
      - name: conf
        configMap:
          name: cloudcore
      - name: certs
        secret:
          secretName: cloudcore
          items:
          - key: edge.crt
            path: certs/edge.crt
          - key: edge.key
            path: certs/edge.key
          - key: rootCA.crt
            path: ca/rootCA.crt
