Permalink
Fetching contributors…
Cannot retrieve contributors at this time
117 lines (112 sloc) 3.49 KB
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: keeper-deployment
spec:
replicas: 2
template:
metadata:
labels:
name: keeper
spec:
containers:
- name: nginx
imagePullPolicy: "Always"
image: "lsstsqre/nginx-python:k8s"
ports:
# from keeper-service
- name: keeper-nginx
containerPort: 8080
- name: cloudsql-proxy
image: b.gcr.io/cloudsql-docker/gce-proxy:1.05
command: ["/cloud_sql_proxy", "-dir=/cloudsql", "-credential_file=/secret/file.json", "-instances=$(CLOUD_SQL_INSTANCE)"]
env:
- name: CLOUD_SQL_INSTANCE
valueFrom:
configMapKeyRef:
name: keeper-config
key: cloud-sql-instance
volumeMounts:
- name: cloudsql
mountPath: /cloudsql
- name: cloudsql-secret-volume
mountPath: /secret/
- name: cloudsql-ssl-certs
mountPath: /etc/ssl/certs
- name: uwsgi
imagePullPolicy: "Always"
image: "lsstsqre/ltd-keeper:1.14.1"
ports:
- containerPort: 3031
name: keeper
volumeMounts:
- name: cloudsql
mountPath: /cloudsql
env:
# References the keeper-redis service
- name: REDIS_URL
value: "redis://keeper-redis:6379"
- name: LTD_KEEPER_PROFILE
valueFrom:
configMapKeyRef:
name: keeper-config
key: profile
- name: LTD_KEEPER_URL_SCHEME
valueFrom:
configMapKeyRef:
name: keeper-config
key: url-scheme
- name: LTD_DASHER_URL
valueFrom:
configMapKeyRef:
name: keeper-config
key: dasher-url
- name: LTD_KEEPER_SECRET_KEY
valueFrom:
secretKeyRef:
name: keeper-secrets
key: secret-key
- name: LTD_KEEPER_AWS_ID
valueFrom:
secretKeyRef:
name: keeper-secrets
key: aws-id
- name: LTD_KEEPER_AWS_SECRET
valueFrom:
secretKeyRef:
name: keeper-secrets
key: aws-secret
- name: LTD_KEEPER_FASTLY_ID
valueFrom:
secretKeyRef:
name: keeper-secrets
key: fastly-id
- name: LTD_KEEPER_FASTLY_KEY
valueFrom:
secretKeyRef:
name: keeper-secrets
key: fastly-key
- name: LTD_KEEPER_BOOTSTRAP_USER
valueFrom:
secretKeyRef:
name: keeper-secrets
key: default-user
- name: LTD_KEEPER_BOOTSTRAP_PASSWORD
valueFrom:
secretKeyRef:
name: keeper-secrets
key: default-password
- name: LTD_KEEPER_DB_URL
valueFrom:
secretKeyRef:
name: keeper-secrets
key: db-url
volumes:
- name: cloudsql-secret-volume
secret:
secretName: cloudsql-secrets
- name: cloudsql-ssl-certs
hostPath:
path: /etc/ssl/certs
- name: cloudsql
emptyDir: