blob: fa1f43407580573a946cd44a019e35470d472e02 [file] [log] [blame]
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: autoroll-be-cros-proto-infra-autoroll
spec:
serviceName: "autoroll-be-cros-proto-infra-autoroll"
replicas: 1
selector:
matchLabels:
app: autoroll-be-cros-proto-infra-autoroll
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: autoroll-be-cros-proto-infra-autoroll # Pod template's label selector
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: autoroll-be-cros-proto-infra-autoroll
image: gcr.io/skia-public/autoroll-be:2019-10-01T16_39_30Z-borenet-ad41711-clean
args:
- "--logtostderr"
- "--config=eyJjaGlsZE5hbWUiOiJjaHJvbWl1bW9zL2luZnJhL3Byb3RvIiwiY29udGFjdHMiOlsic2VhbmFicmFoYW1AZ29vZ2xlLmNvbSJdLCJpc0ludGVybmFsIjpmYWxzZSwicGFyZW50TmFtZSI6ImluZnJhIiwicGFyZW50V2F0ZXJmYWxsIjoiaHR0cHM6Ly9jaS5jaHJvbWl1bS5vcmcvcC9pbmZyYS9nL2luZnJhL2NvbnNvbGUiLCJyb2xsZXJOYW1lIjoiY3Jvcy1wcm90by1pbmZyYS1hdXRvcm9sbCIsInNlcnZpY2VBY2NvdW50IjoiY2hyb21pdW0tYXV0b3JvbGxAc2tpYS1wdWJsaWMuaWFtLmdzZXJ2aWNlYWNjb3VudC5jb20iLCJzaGVyaWZmIjpbInNlYW5hYnJhaGFtK2F1dG9yb2xsQGdvb2dsZS5jb20iXSwiZ2Vycml0Ijp7InVybCI6Imh0dHBzOi8vY2hyb21pdW0tcmV2aWV3Lmdvb2dsZXNvdXJjZS5jb20iLCJwcm9qZWN0IjoiaW5mcmEvaW5mcmEiLCJjb25maWciOiJjaHJvbWl1bSJ9LCJmcmVlVHlwZVJlcG9NYW5hZ2VyIjpudWxsLCJub0NoZWNrb3V0REVQU1JlcG9NYW5hZ2VyIjp7ImNoaWxkQnJhbmNoIjoibWFzdGVyIiwiY2hpbGRQYXRoIjoiaW5mcmEvZ28vc3JjL2dvLmNocm9taXVtLm9yZy9jaHJvbWl1bW9zL2luZnJhL3Byb3RvIiwicGFyZW50QnJhbmNoIjoibWFzdGVyIiwiY2hpbGRSZXZMaW5rVG1wbCI6Imh0dHBzOi8vY2hyb21pdW0uZ29vZ2xlc291cmNlLmNvbS9jaHJvbWl1bW9zL2luZnJhL3Byb3RvLmdpdC8rLyVzIiwiY29tbWl0TXNnVG1wbCI6IiIsInBhcmVudFJlcG8iOiJodHRwczovL2Nocm9taXVtLmdvb2dsZXNvdXJjZS5jb20vaW5mcmEvaW5mcmEuZ2l0IiwiY2hpbGRSZXBvIjoiaHR0cHM6Ly9jaHJvbWl1bS5nb29nbGVzb3VyY2UuY29tL2Nocm9taXVtb3MvaW5mcmEvcHJvdG8uZ2l0IiwiaW5jbHVkZUJ1Z3MiOnRydWUsImluY2x1ZGVMb2ciOnRydWUsInRyYW5zaXRpdmVEZXBzIjpudWxsfSwia3ViZXJuZXRlcyI6eyJjcHUiOiIxIiwibWVtb3J5IjoiMkdpIiwiZGlzayI6IiJ9LCJtYXhSb2xsRnJlcXVlbmN5IjoiMG0ifQ=="
- "--email_creds=/var/secrets/autoroll-email-creds"
- "--firestore_instance=production"
- "--port=:8000"
- "--prom_port=:20000"
- "--recipes_cfg=/usr/local/share/autoroll/recipes.cfg"
- "--workdir=/tmp"
- "--chat_webhooks_file=/etc/notifier-chat-config/chat_config.txt"
ports:
- containerPort: 8000
- containerPort: 20000
volumeMounts:
- name: autoroll-be-chromium-autoroll-sa
mountPath: /var/secrets/google
- name: autoroll-email-creds
mountPath: /var/secrets/autoroll-email-creds
- name: notifier-chat-config
mountPath: /etc/notifier-chat-config/
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
- name: TMPDIR
value: /tmp
resources:
limits:
memory: "2Gi"
cpu: 1
readinessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 30
periodSeconds: 30
failureThreshold: 10
volumes:
- name: autoroll-be-chromium-autoroll-sa
secret:
secretName: chromium-autoroll
- name: autoroll-email-creds
secret:
secretName: autoroll-email-creds
- name: notifier-chat-config
secret:
secretName: notifier-chat-config