blob: 8a810457ae3b3efa7716e20dd69c5891b217a9d9 [file] [log] [blame]
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: autoroll-be-skcms-skia-autoroll
spec:
serviceName: "autoroll-be-skcms-skia-autoroll"
replicas: 1
selector:
matchLabels:
app: autoroll-be-skcms-skia-autoroll
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: autoroll-be-skcms-skia-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-skcms-skia-autoroll
image: gcr.io/skia-public/autoroll-be:2019-10-01T16_39_30Z-borenet-ad41711-clean
args:
- "--logtostderr"
- "--config=eyJjaGlsZE5hbWUiOiJza2NtcyIsImNvbnRhY3RzIjpbImJyaWFub3NtYW5AZ29vZ2xlLmNvbSIsIm10a2xlaW5AZ29vZ2xlLmNvbSJdLCJpc0ludGVybmFsIjpmYWxzZSwicGFyZW50TmFtZSI6IlNraWEiLCJwYXJlbnRXYXRlcmZhbGwiOiJodHRwczovL3N0YXR1cy5za2lhLm9yZyIsInJvbGxlck5hbWUiOiJza2Ntcy1za2lhLWF1dG9yb2xsIiwic2VydmljZUFjY291bnQiOiJza2lhLWF1dG9yb2xsQHNraWEtcHVibGljLmlhbS5nc2VydmljZWFjY291bnQuY29tIiwic2hlcmlmZiI6WyJodHRwczovL3NraWEtdHJlZS1zdGF0dXMuYXBwc3BvdC5jb20vY3VycmVudC1zaGVyaWZmIiwibXRrbGVpbkBnb29nbGUuY29tIl0sImdlcnJpdCI6eyJ1cmwiOiJodHRwczovL3NraWEtcmV2aWV3Lmdvb2dsZXNvdXJjZS5jb20iLCJwcm9qZWN0Ijoic2tjbXMiLCJjb25maWciOiJjaHJvbWl1bSJ9LCJjb3B5UmVwb01hbmFnZXIiOnsiY2hpbGRCcmFuY2giOiJtYXN0ZXIiLCJjaGlsZFBhdGgiOiJ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LCJtZW1vcnkiOiI4R2kiLCJkaXNrIjoiNTBHaSJ9LCJjcUV4dHJhVHJ5Ym90cyI6WyJsdWNpLmNocm9taXVtLnRyeTpsaW51eC1ibGluay1yZWwiXSwibWF4Um9sbEZyZXF1ZW5jeSI6IjBtIiwic3VwcG9ydHNNYW51YWxSb2xscyI6dHJ1ZX0="
- "--email_creds=/var/secrets/autoroll-email-creds"
- "--firestore_instance=production"
- "--port=:8000"
- "--prom_port=:20000"
- "--recipes_cfg=/usr/local/share/autoroll/recipes.cfg"
- "--workdir=/data"
- "--chat_webhooks_file=/etc/notifier-chat-config/chat_config.txt"
ports:
- containerPort: 8000
- containerPort: 20000
volumeMounts:
- name: autoroll-be-skcms-skia-autoroll-storage
mountPath: /data
- name: autoroll-be-skia-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: /data/tmp
resources:
limits:
memory: "8Gi"
cpu: 1
readinessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 600
periodSeconds: 60
failureThreshold: 10
volumes:
- name: autoroll-be-skia-autoroll-sa
secret:
secretName: skia-autoroll
- name: autoroll-email-creds
secret:
secretName: autoroll-email-creds
- name: notifier-chat-config
secret:
secretName: notifier-chat-config
volumeClaimTemplates:
- metadata:
name: autoroll-be-skcms-skia-autoroll-storage
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 50Gi