blob: 51aa81cd3191d0ff7ebeb1ba73f0a96f9d6f3889 [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
labels:
app: hashtag
name: hashtag
annotations:
beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}'
skia.org.domain: hashtag.skia.org
spec:
ports:
- name: metrics
port: 20000
- name: http
port: 8000
selector:
app: hashtag
type: NodePort
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: hashtag
spec:
replicas: 2
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: hashtag
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: hashtag
image: gcr.io/skia-public/hashtag:2019-11-21T16_15_39Z-jcgregorio-3ddc697-clean
args:
- "--logtostderr"
- "--port=:8000"
- "--prom_port=:20000"
- "--resources_dir=/usr/local/share/hashtag/"
ports:
- containerPort: 20000
- containerPort: 8000
volumeMounts:
- name: skia-public-auth
mountPath: /var/secrets/skia-public-auth
- name: skia-hashtag-sa
mountPath: /var/secrets/google
- name: csrf-salt
mountPath: /var/skia/
- name: skia-org-legacy-login-secrets
mountPath: /etc/skia.org/
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
resources:
requests:
memory: "100Mi"
cpu: "50m"
readinessProbe:
httpGet:
path: /metrics
port: 20000
initialDelaySeconds: 1
periodSeconds: 3
volumes:
- name: skia-public-auth
secret:
secretName: skia-public-auth
- name: skia-hashtag-sa
secret:
secretName: skia-hashtag
- name: csrf-salt
secret:
secretName: csrf-salt
- name: skia-org-legacy-login-secrets
secret:
secretName: skia-org-legacy-login-secrets