apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: prom-integration
  name: prom-integration
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: prom-integration
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: prom-integration
    spec:
      serviceAccountName: prom-integration-sa
      containers:
        - args:
            - --config-path=/etc/metrics-integration/config.yaml
          command:
            - /prometheus
          env:
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.name
            - name: AWS_DEFAULT_REGION
              value: us-west-2
            - name: AWS_REGION
              value: us-west-2
            - name: AWS_DEFAULT_PROFILE
              value: dbaas
            - name: AWS_CONFIG_FILE
              value: /etc/aws/config
            - name: AWS_SDK_LOAD_CONFIG
              value: "1"
          image: <IMAGES_PLACEHOLDER>
          imagePullPolicy: IfNotPresent
          name: prom-integration
          resources:
            limits:
              cpu: 500m
              memory: 1000Mi
            requests:
              cpu: 500m
              memory: 1000Mi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
            - mountPath: /etc/metrics-integration
              name: prom-integration-meta-config
              readOnly: true
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      volumes:
        - configMap:
            defaultMode: 420
            name: prom-integration-meta-config
          name: prom-integration-meta-config
