blob: bd9615cb286fda1010585e655ddca853d5cecf4e [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
labels:
app: named-fiddles
name: named-fiddles
annotations:
beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}'
spec:
ports:
- name: metrics
port: 20000
- name: http
port: 8000
selector:
app: named-fiddles
type: NodePort
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: named-fiddles
spec:
replicas: 2
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: named-fiddles
appgroup: fiddle
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: named-fiddles
image: gcr.io/skia-public/named-fiddles:2019-02-12T16_04_26Z-jcgregorio-7233765-clean
args:
- "--aud=/projects/145247227042/global/backendServices/3939162981849939737"
- "--logtostderr"
- "--port=:8000"
- "--prom_port=:20000"
- "--resources_dir=/usr/local/share/named-fiddles/"
ports:
- containerPort: 8000
- containerPort: 20000
volumeMounts:
- name: skia-public-auth
mountPath: /var/secrets/skia-public-auth
- name: skia-fiddle-sa
mountPath: /var/secrets/google
- name: csrf-salt
mountPath: /var/skia/
- name: skia-org-legacy-login-secrets
mountPath: /etc/skia.org/
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
resources:
requests:
memory: "100M"
cpu: "50m"
limits:
memory: "1G"
cpu: "1"
readinessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 1
periodSeconds: 10
volumes:
- name: skia-org-legacy-login-secrets
secret:
secretName: skia-org-legacy-login-secrets
- name: skia-public-auth
secret:
secretName: skia-public-auth
- name: skia-fiddle-sa
secret:
secretName: skia-fiddle
- name: csrf-salt
secret:
secretName: csrf-salt