blob: 1dadd04bceafe96452f2fafc91c5fe6b009d79ab [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
labels:
app: contest
name: contest
annotations:
beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}'
skia.org.domain: contest.skia.org
spec:
ports:
- name: metrics
port: 20000
- name: http
port: 8000
selector:
app: contest
type: NodePort
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: contest
spec:
replicas: 2
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: contest
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: contest
image: gcr.io/skia-public/contest:2019-05-06T17_48_53Z-kjlubick-a7d0bf7-clean
args:
- "--logtostderr"
- "--port=:8000"
- "--prom_port=:20000"
ports:
- containerPort: 8000
- containerPort: 20000
volumeMounts:
- name: skia-contest-sa
mountPath: /var/secrets/google
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
resources:
requests:
memory: "10Mi"
cpu: "10m"
readinessProbe:
httpGet:
path: /
port: 8000
initialDelaySeconds: 3
periodSeconds: 3
volumes:
- name: skia-contest-sa
secret:
secretName: skia-contest