kind: Deployment
apiVersion: apps/v1
metadata:
  name: os-autoscaler-nodecleaner
  namespace: kube-system
  labels:
    app: autoscaler
spec:
  replicas: 1
  selector:
    matchLabels:
      app: autoscaler-nodecleaner
  template:
    metadata:
      namespace: kube-system
      labels:
        app: autoscaler-nodecleaner
    spec:
      serviceAccountName: os-autoscaler-nodecleaner-account
      containers:
        - name: os-autoscaler-nodecleaner
          image: thartland/os-autoscaler-nodecleaner:latest
          imagePullPolicy: Always
          command:
            - /app/main
            - --logtostderr
            - --cluster-name=scaler-01
            - --cloud-config=/config/cloud-config
          volumeMounts:
            - name: cloud-config
              mountPath: /config
              readOnly: true
      volumes:
        - name: cloud-config
          secret:
            secretName: autoscaler-os-cloud-config
