blob: ec77351db2b39e544805b97c8f7766ef3424e66b [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
labels:
app: alert-to-pubsub
name: alert-to-pubsub
spec:
ports:
- name: metrics
port: 20000
- name: http
port: 8000
selector:
app: alert-to-pubsub
type: NodePort
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: alert-to-pubsub
spec:
replicas: 2
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: alert-to-pubsub
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: alert-to-pubsub
image: gcr.io/skia-public/alert-to-pubsub:2019-02-04T13_49_30Z-jcgregorio-5af4a62-dirty
args:
- "--location=skia-public"
- "--logtostderr"
- "--port=:8000"
- "--prom_port=:20000"
ports:
- containerPort: 20000
- containerPort: 8000
volumeMounts:
- name: skia-alert-to-pubsub-sa
mountPath: /var/secrets/google
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
resources:
requests:
memory: "100Mi"
cpu: "50m"
readinessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 1
periodSeconds: 3
volumes:
- name: skia-alert-to-pubsub-sa
secret:
secretName: skia-alert-to-pubsub