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