apiVersion: apps/v1
kind: Deployment
metadata:
  name: mock-calico-node
  namespace: calico-system
spec:
  selector:
    matchLabels:
      k8s-app: mock-calico-node
  template:
    metadata:
      labels:
        k8s-app: mock-calico-node
    spec:
      containers:
        - env:
            - name: DATASTORE_TYPE
              value: kubernetes
            - name: NODENAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: spec.nodeName
            - name: NAMESPACE
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.namespace
            - name: FIPS_MODE_ENABLED
              value: "false"
          image: calico/mock-node:master
          imagePullPolicy: IfNotPresent
          name: mock-calico-node
          volumeMounts:
            - mountPath: /etc/pki/tls/certs
              name: tigera-ca-bundle
              readOnly: true
            - mountPath: /etc/pki/tls/cert.pem
              name: tigera-ca-bundle
              readOnly: true
              subPath: ca-bundle.crt
            - mountPath: /node-certs
              name: node-certs
              readOnly: true
            - mountPath: /calico-node-prometheus-server-tls
              name: calico-node-prometheus-server-tls
              readOnly: true
      dnsPolicy: ClusterFirst
      imagePullSecrets:
        - name: tigera-pull-secret
      nodeSelector:
        kubernetes.io/os: linux
      restartPolicy: Always
      serviceAccount: calico-node
      serviceAccountName: calico-node
      terminationGracePeriodSeconds: 5
      volumes:
        - configMap:
            defaultMode: 420
            name: tigera-ca-bundle
          name: tigera-ca-bundle
        - name: node-certs
          secret:
            defaultMode: 420
            secretName: node-certs
        - name: calico-node-prometheus-server-tls
          secret:
            defaultMode: 420
            secretName: calico-node-prometheus-server-tls
