| apiVersion: v1 |
| kind: Service |
| metadata: |
| labels: |
| app: alertmanager |
| name: alertmanager |
| spec: |
| ports: |
| - name: http |
| port: 8000 |
| - name: internal-http |
| port: 9090 |
| - name: iap-proxy-metrics |
| port: 10000 |
| selector: |
| app: alertmanager |
| type: NodePort |
| --- |
| apiVersion: apps/v1beta1 |
| kind: StatefulSet |
| metadata: |
| name: alertmanager |
| spec: |
| selector: |
| matchLabels: |
| app: alertmanager # Label selector that determines which Pods belong to the StatefulSet |
| # Must match spec: template: metadata: labels |
| serviceName: "alertmanager" |
| replicas: 1 |
| updateStrategy: |
| type: RollingUpdate |
| template: |
| metadata: |
| labels: |
| app: alertmanager # Pod template's label selector |
| spec: |
| automountServiceAccountToken: false |
| securityContext: |
| runAsUser: 2000 # aka skia |
| fsGroup: 2000 # aka skia |
| containers: |
| - name: alertmanager |
| image: prom/alertmanager:v0.14.0 |
| args: |
| - "--web.listen-address=:9090" |
| - "--config.file=/etc/alertmanager/alertmanager.yml" |
| - "--storage.path=/mnt/alertmanager" |
| - "--web.external-url=https://alerts2.skia.org" |
| ports: |
| - containerPort: 9090 |
| volumeMounts: |
| - name: alertmanager-volume |
| mountPath: /etc/alertmanager |
| - name: alertmanager-storage-volume |
| mountPath: /mnt/alertmanager |
| resources: |
| requests: |
| memory: "30Mi" |
| cpu: "100m" |
| livenessProbe: |
| httpGet: |
| path: / |
| port: 9090 |
| initialDelaySeconds: 3 |
| periodSeconds: 3 |
| - name: configmap-reload |
| args: |
| - "--volume-dir=/etc/alertmanager/" |
| - "--webhook-method=POST" |
| - "--webhook-url=http://localhost:9090/-/reload" |
| image: gcr.io/skia-public/configmap-reload:2018-05-16T14_13_33Z-jcgregorio-80445ff-clean |
| volumeMounts: |
| - name: alertmanager-volume |
| mountPath: /etc/alertmanager |
| resources: |
| requests: |
| memory: "30Mi" |
| cpu: "20m" |
| - name: iap-proxy |
| args: |
| - "--logtostderr" |
| - "--aud=/projects/145247227042/global/backendServices/8486191600510710914" |
| - "--port=:8000" |
| - "--target_port=:9090" |
| - "--prom_port=:10000" |
| image: gcr.io/skia-public/iap-proxy:2018-05-16T14_13_55Z-jcgregorio-80445ff-clean |
| ports: |
| - containerPort: 8000 |
| - containerPort: 10000 |
| volumeMounts: |
| - name: skia-public-auth |
| mountPath: /var/secrets/skia-public-auth |
| resources: |
| requests: |
| memory: "30Mi" |
| cpu: "100m" |
| volumes: |
| - name: alertmanager-volume |
| configMap: |
| name: alertmanager-conf |
| - name: skia-public-auth |
| secret: |
| secretName: skia-public-auth |
| volumeClaimTemplates: |
| - metadata: |
| name: alertmanager-storage-volume |
| spec: |
| accessModes: [ "ReadWriteOnce" ] |
| resources: |
| requests: |
| storage: 10Gi |