blob: 2f93bb537c09d6867c3369f8257b3ae243f02634 [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
labels:
app: jsfiddle
name: jsfiddle
annotations:
beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}'
spec:
ports:
- name: metrics
port: 20000
- name: http
port: 8000
selector:
app: jsfiddle
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: jsfiddle
spec:
replicas: 2
selector:
matchLabels:
app: jsfiddle
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: jsfiddle
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: jsfiddle
image: gcr.io/skia-public/jsfiddle:eb46bd892dd8f1053bd1c0285e2d8735a13b5775
args:
- "--logtostderr"
- "--port=:8000"
- "--prom_port=:20000"
- "--resources_dir=/usr/local/share/jsfiddle/"
ports:
- containerPort: 8000
- containerPort: 20000
volumeMounts:
- name: skia-jsfiddle-sa
mountPath: /var/secrets/google
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
resources:
requests:
memory: "100M"
cpu: "500m"
limits:
memory: "10G"
cpu: "6"
readinessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 1
periodSeconds: 10
volumes:
- name: skia-jsfiddle-sa
secret:
secretName: skia-jsfiddle