blob: 9333208deb4ae5b7f352745bb32df060903d4f91 [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
name: gold-skia-diffserver
labels:
app: gold-skia
annotations:
beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}'
spec:
ports:
- name: grpc
port: 8000
- name: http
port: 8001
- name: prometheus
port: 20000
selector:
app: gold-skia-diffserver
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: gold-skia-diffserver
spec:
replicas: 1
selector:
matchLabels:
app: gold-skia-diffserver # Label selector that determines which Pods belong to the StatefulSet
# Must match spec: template: metadata: labels
serviceName: "gold-skia-diffserver"
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: gold-skia-diffserver # Pod template's label selector
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: gold-diffserver
image: gcr.io/skia-public/gold-diff-server:2018-09-28T17_13_10Z-stephana-646bd0c-clean
args:
- "--cache_size=10"
- "--grpc_port=:8000"
- "--gs_buckets=skia-infra-gm,skia-infra-gm-internal"
- "--image_dir=/mnt/diffserver"
- "--image_port=:8001"
- "--logtostderr"
- "--no_cloud_log"
- "--prom_port=:20000"
- "--service_account_file=/etc/gold-config/service-account.json"
ports:
- containerPort: 8000
- containerPort: 8001
- containerPort: 20000
volumeMounts:
- name: gold-skia-diffserver-storage-volume
mountPath: /mnt/diffserver
- name: gold-skia-diffserver-diffs-storage-volume
mountPath: /mnt/diffserver/imageStore/diffs
- name: gold-service-account-secrets
mountPath: /etc/gold-config/
resources:
limits:
memory: "16G"
cpu: "4"
readinessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 5
periodSeconds: 5
volumes:
- name: gold-service-account-secrets
secret:
secretName: gold-service-account-secrets
volumeClaimTemplates:
- metadata:
name: gold-skia-diffserver-storage-volume
spec:
storageClassName: ssd-disk
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 2000Gi
- metadata:
name: gold-skia-diffserver-diffs-storage-volume
spec:
storageClassName: standard
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 30000Gi