| apiVersion: v1 |
| kind: Service |
| metadata: |
| labels: |
| app: notifier |
| name: notifier |
| spec: |
| ports: |
| - name: metrics |
| port: 20000 |
| - name: internal-http |
| port: 9000 |
| selector: |
| app: notifier |
| type: NodePort |
| --- |
| apiVersion: apps/v1beta1 |
| kind: Deployment |
| metadata: |
| name: notifier |
| spec: |
| replicas: 2 |
| strategy: |
| type: RollingUpdate |
| template: |
| metadata: |
| labels: |
| app: notifier |
| annotations: |
| prometheus.io.scrape: "true" |
| prometheus.io.port: "20000" |
| spec: |
| automountServiceAccountToken: false |
| securityContext: |
| runAsUser: 2000 # aka skia |
| fsGroup: 2000 # aka skia |
| containers: |
| - name: notifier |
| image: gcr.io/skia-public/notifier:2018-05-18T21_16_49Z-jcgregorio-1dad246-clean |
| args: |
| - "--logtostderr" |
| - "--port=:9000" |
| - "--prom_port=:20000" |
| - "--email_client_secret_file=/etc/notifier-alertserver-skia-org-secrets/client_secret.json" |
| - "--email_token_cache_file=/etc/notifier-alertserver-skia-org-secrets/client_token.json" |
| - "--chat_webhooks_file=/etc/notifier-chat-config/chat_config.txt" |
| ports: |
| - containerPort: 9000 |
| - containerPort: 20000 |
| volumeMounts: |
| - name: notifier-alertserver-skia-org-secrets |
| mountPath: /etc/notifier-alertserver-skia-org-secrets |
| - name: notifier-chat-config |
| mountPath: /etc/notifier-chat-config/ |
| resources: |
| requests: |
| memory: "30Mi" |
| cpu: "20m" |
| livenessProbe: |
| httpGet: |
| path: /healthz |
| port: 9000 |
| initialDelaySeconds: 3 |
| periodSeconds: 3 |
| volumes: |
| - name: notifier-alertserver-skia-org-secrets |
| secret: |
| secretName: notifier-alertserver-skia-org-secrets |
| - name: notifier-chat-config |
| secret: |
| secretName: notifier-chat-config |