blob: 1d4ee1b942c19323b64f6bc432d3772eb8362caa [file] [log] [blame]
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: autoroll-be-catapult-autoroll
spec:
serviceName: "autoroll-be-catapult-autoroll"
replicas: 1
selector:
matchLabels:
app: autoroll-be-catapult-autoroll
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: autoroll-be-catapult-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-catapult-autoroll
image: gcr.io/skia-public/autoroll-be:2019-12-02T18_21_00Z-borenet-cec0bcf-clean
command: ["/usr/local/bin/autoroll-be"]
args:
- "--logtostderr"
- "--config=eyJjaGlsZE5hbWUiOiJDYXRhcHVsdCIsImNvbnRhY3RzIjpbImNocm9tZS1zcGVlZC1vcGVyYXRpb25zQGdvb2dsZS5jb20iLCJjcm91bGVhdUBjaHJvbWl1bS5vcmciLCJkYmVycmlzQGNocm9taXVtLm9yZyIsInN1bGxpdmFuQGNocm9taXVtLm9yZyIsImpidWRvcmlja0BjaHJvbWl1bS5vcmciXSwiaXNJbnRlcm5hbCI6ZmFsc2UsInBhcmVudE5hbWUiOiJDaHJvbWl1bSIsInBhcmVudFdhdGVyZmFsbCI6Imh0dHBzOi8vYnVpbGQuY2hyb21pdW0ub3JnIiwicm9sbGVyTmFtZSI6ImNhdGFwdWx0LWF1dG9yb2xsIiwic2VydmljZUFjY291bnQiOiJjaHJvbWl1bS1hdXRvcm9sbEBza2lhLXB1YmxpYy5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInNoZXJpZmYiOlsiaHR0cHM6Ly9yb3RhLW5nLmFwcHNwb3QuY29tL2xlZ2FjeS9zaGVyaWZmX3BlcmZib3QuanNvbiJdLCJzaGVyaWZmQmFja3VwIjpbImNyb3VsZWF1QGNocm9taXVtLm9yZyJdLCJnZXJyaXQiOn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YXhSb2xsRnJlcXVlbmN5IjoiMG0iLCJub3RpZmllcnMiOlt7ImZpbHRlciI6ImVycm9yIiwiZW1haWwiOnsiZW1haWxzIjpbImNocm9tZS1zcGVlZC1vcGVyYXRpb25zQGdvb2dsZS5jb20iXX19XX0="
- "--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