blob: 331300927dae36a56cfaf57d62db100e5d9353cf [file] [log] [blame]
kind: Service
apiVersion: v1
metadata:
name: gold-flutter-engine-diffserver
labels:
app: gold-flutter-engine-diffserver
spec:
ports:
- name: grpc
port: 8000
- name: http
port: 8001
- name: metrics
port: 20000
selector:
app: gold-flutter-engine-diffserver
type: NodePort
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: gold-flutter-engine-diffserver
spec:
replicas: 1
selector:
matchLabels:
app: gold-flutter-engine-diffserver # Label selector that determines which Pods belong to the StatefulSet
# Must match spec: template: metadata: labels
serviceName: "gold-flutter-engine-diffserver"
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: gold-flutter-engine-diffserver # Pod template's label selector
appgroup: gold-flutter-engine
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:2019-09-12T16_11_23Z-kjlubick-0f37d14-clean
args:
- "--cache_size=10"
- "--grpc_port=:8000"
- "--gs_bucket=skia-gold-flutter-engine"
- "--image_dir=/data"
- "--image_port=:8001"
- "--logtostderr"
- "--no_cloud_log"
- "--prom_port=:20000"
ports:
- containerPort: 8000
name: grpc
- containerPort: 8001
name: http
- containerPort: 20000
name: prom
volumeMounts:
- name: gold-flutter-engine-diffserver-diffs-storage-volume
mountPath: /data
- name: gold-service-account-secrets
mountPath: /var/secrets/google/
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/service-account.json
resources:
requests:
memory: "32G"
cpu: "4"
livenessProbe:
httpGet:
path: /healthz
port: 8001
initialDelaySeconds: 15
periodSeconds: 15
failureThreshold: 10
readinessProbe:
httpGet:
path: /healthz
port: 8001
initialDelaySeconds: 5
periodSeconds: 5
volumes:
- name: gold-service-account-secrets
secret:
secretName: gold-service-account-secrets
volumeClaimTemplates:
- metadata:
name: gold-flutter-engine-diffserver-diffs-storage-volume
spec:
storageClassName: ssd-disk
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1000Gi