---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kube-bootstrap-token-manager
  namespace: kube-system
  labels:
    app: kube-bootstrap-token-manager
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kube-bootstrap-token-manager
  template:
    metadata:
      labels:
        app: kube-bootstrap-token-manager
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/path: /metrics
        prometheus.io/port: "8080"
    spec:
      serviceAccountName: kube-bootstrap-token-manager
      containers:
        - name: kube-bootstrap-token-manager
          image: webdevops/kube-bootstrap-token-manager:latest
          imagePullPolicy: Always
          env:
            - name: CLOUD_PROVIDER
              value: "azure"
            ###########################
            # CloudProvider: Azure
            - name: CLOUD_CONFIG
              value: "/config/cloudprovider-azure.json"
            - name: AZURE_ENVIRONMENT
              value: "AzurePublicCloud"
            - name: AZURE_KEYVAULT_NAME
              value: "mblaschke-k8s"
          securityContext:
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            capabilities:
              drop: ['ALL']
          ports:
            - containerPort: 8080
              name: http-metrics
              protocol: TCP
          resources:
            limits:
              cpu: 100m
              memory: 100Mi
            requests:
              cpu: 1m
              memory: 100Mi
          volumeMounts:
            - name: config
              mountPath: /config
              readOnly: true
      volumes:
        - name: config
          secret:
            secretName: kube-bootstrap-token-manager



