blob: 1eb090d5584290f77ea9ee78c8b956c83c440f61 [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
labels:
app: docserver
name: docserver
annotations:
beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}'
skia.org.domain: skia.org
spec:
ports:
- name: metrics
port: 20000
- name: http
port: 8000
selector:
app: docserver
type: NodePort
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: docserver
spec:
replicas: 2
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: docserver
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: docserver
image: gcr.io/skia-public/docserverk:2019-08-13T15_23_30Z-jcgregorio-0e9a307-clean
args:
- "--logtostderr"
- "--resources_dir=/usr/local/share/docserverk/"
- "--work_dir=/mnt/docserverk"
- "--port=:8000"
- "--prom_port=:20000"
ports:
- containerPort: 8000
- containerPort: 20000
volumeMounts:
- name: skia-docs-sa
mountPath: /var/secrets/google
- name: docserverk-storage
mountPath: /mnt/docserverk
- name: skia-org-legacy-login-secrets
mountPath: /etc/skia.org/
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
resources:
requests:
memory: "1.3Gi"
cpu: "100m"
readinessProbe:
httpGet:
path: /
port: 8000
initialDelaySeconds: 45
periodSeconds: 3
volumes:
- name: skia-docs-sa
secret:
secretName: skia-docs
- name: docserverk-storage
emptyDir: {}
- name: skia-org-legacy-login-secrets
secret:
secretName: skia-org-legacy-login-secrets