kind: Deployment
apiVersion: apps/v1
metadata:
  name: cluster-autoscaler
  namespace: kube-system
  labels:
    app: cluster-autoscaler
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cluster-autoscaler
  template:
    metadata:
      namespace: kube-system
      labels:
        app: cluster-autoscaler
    spec:
      serviceAccountName: cluster-autoscaler-account
      containers:
        - name: cluster-autoscaler
          image: thartland/magnum-autoscaler:v1.0
          imagePullPolicy: Always
          command:
            - ./cluster-autoscaler
            - --alsologtostderr
            - --cluster-name=scaler-01
            - --cloud-config=/config/cloud-config
            - --cloud-provider=magnum
            - --nodes=1:10:DefaultNodeGroup
          volumeMounts:
            - name: cloud-config
              mountPath: /config
              readOnly: true
      volumes:
        - name: cloud-config
          secret:
            secretName: cluster-autoscaler-cloud-config
