blob: dd736f8ca370cf14daa8e3df3c9ca8715bd906dd [file] [log] [blame]
kind: Service
apiVersion: v1
metadata:
name: gold-lottie-traceservice
labels:
app: gold-lottie
annotations:
beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}'
spec:
ports:
- name: grpc
port: 9090
- name: http-ready
port: 9091
- name: prometheus
port: 20000
selector:
app: gold-lottie-traceserver
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: gold-lottie-traceserver
spec:
selector:
matchLabels:
app: gold-lottie-traceserver # Label selector that determines which Pods belong to the StatefulSet
# Must match spec: template: metadata: labels
serviceName: "gold-lottie-traceserver"
replicas: 1
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: gold-lottie-traceserver # 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-lottie-traceserver
image: gcr.io/skia-public/gold-traceserver:2018-12-03T18_56_55Z-stephana-8095b0d-clean
args:
- "--db_file=/mnt/traceserver/traces.db"
- "--http_port=:9091"
- "--logtostderr"
- "--no_cloud_log"
- "--port=:9090"
- "--prom_port=:20000"
ports:
- containerPort: 9090
- containerPort: 9091
- containerPort: 20000
volumeMounts:
- name: gold-lottie-traceserver-storage-volume
mountPath: /mnt/traceserver
resources:
limits:
memory: "500Mi"
cpu: "500m"
readinessProbe:
httpGet:
path: /ready
port: 9091
initialDelaySeconds: 30
periodSeconds: 10
volumeClaimTemplates:
- metadata:
name: gold-lottie-traceserver-storage-volume
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 20Gi