blob: 08c1d08663006992f22a3ee5b3d60d98e2c7e384 [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"}}'
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-01-08T13_21_02Z-jcgregorio-2f5ed19-dirty
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