apiVersion: v1
kind: Pod
metadata:
  annotations:
    scheduler.alpha.kubernetes.io/critical-pod: ""
  labels:
    component: cloud-controller-manager
    tier: control-plane
  name: openstack-cloud-controller-manager
  namespace: kube-system
spec:
  containers:
    - name: openstack-cloud-controller-manager
      image: docker.io/k8scloudprovider/openstack-cloud-controller-manager:latest
      args:
        - /bin/openstack-cloud-controller-manager
        - --v=1
        - --cloud-config=$(CLOUD_CONFIG)
        - --cloud-provider=openstack
        - --use-service-account-credentials=true
        - --address=127.0.0.1
      volumeMounts:
        - mountPath: /etc/kubernetes/pki
          name: k8s-certs
          readOnly: true
        - mountPath: /etc/ssl/certs
          name: ca-certs
          readOnly: true
        - mountPath: /etc/config
          name: cloud-config-volume
          readOnly: true
      resources:
        requests:
          cpu: 200m
      env:
        - name: CLOUD_CONFIG
          value: /etc/config/cloud.conf
  hostNetwork: true
  securityContext:
    runAsUser: 1001
  volumes:
  - hostPath:
      path: /etc/kubernetes/pki
      type: DirectoryOrCreate
    name: k8s-certs
  - hostPath:
      path: /etc/ssl/certs
      type: DirectoryOrCreate
    name: ca-certs
  - name: cloud-config-volume
    secret:
      secretName: cloud-config
