apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: custom-metrics-apiserver
  name: custom-metrics-apiserver
  namespace: custom-metrics
spec:
  replicas: 1
  selector:
    matchLabels:
      app: custom-metrics-apiserver
  template:
    metadata:
      labels:
        app: custom-metrics-apiserver
      name: custom-metrics-apiserver
    spec:
      serviceAccountName: custom-metrics-apiserver
      containers:
      - name: custom-metrics-apiserver
        imagePullPolicy: IfNotPresent
        image: wavefronthq/wavefront-hpa-adapter:0.9.2
        args:
        - /wavefront-adapter
        - --wavefront-url=https://<INSTANCE>.wavefront.com
        - --wavefront-token=<TOKEN_HERE>
        - --wavefront-metric-prefix=kubernetes
        - --cert-dir=/etc/ssl/certs
        - --secure-port=6443
        - --metrics-relist-interval=15m
        - --external-metrics-config=/etc/adapter/config.yaml
        - --logtostderr=true
        - --v=5
        ports:
        - containerPort: 6443
        volumeMounts:
        - mountPath: /tmp
          name: temp-vol
        - mountPath: /etc/adapter/
          name: config
          readOnly: true
      volumes:
      - name: temp-vol
        emptyDir: {}
      - name: config
        configMap:
          name: adapter-config
