blob: 81e61b199ba485fa91869467d1258ddcbf6a531c [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
labels:
app: api
name: api
annotations:
beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}'
skia.org.domain: api.skia.org
spec:
ports:
- name: metrics
port: 20000
- name: http
port: 8000
selector:
app: api
type: NodePort
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: api
spec:
replicas: 2
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: api
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: api
image: gcr.io/skia-public/api:10e5257ec90234bc2810a8f53b64d8e8cfda7406
args:
- --logtostderr
- --port=:8000
- --prom_port=:20000
- --resources_dir=/usr/local/share/api/docs/
ports:
- containerPort: 8000
- containerPort: 20000
resources:
requests:
memory: "10Mi"
cpu: "200m"
readinessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 1
periodSeconds: 2