[tazblog] Add tazblog deployment & svc

This commit is contained in:
Vincent Ambo 2016-09-21 02:27:50 +02:00
parent ef8846eb00
commit a02148d832
No known key found for this signature in database
GPG key ID: 66F505681DB8F43B
2 changed files with 69 additions and 0 deletions

36
tazblog/tazblog-db.yaml Normal file
View file

@ -0,0 +1,36 @@
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: tazblog-db
spec:
template:
metadata:
labels:
app: tazblog-db
spec:
containers:
- image: eu.gcr.io/composite-watch-759/tazblog-haskell:f33723a
name: tazblog-db
command: ["tazblog-db"]
volumeMounts:
- name: tazblog-state
mountPath: /var/tazblog
volumes:
- name: tazblog-state
gcePersistentDisk:
pdName: tazblog-state
fsType: ext4
---
apiVersion: v1
kind: Service
metadata:
name: tazblog-db
labels:
app: tazblog-db
spec:
selector:
app: tazblog-db
ports:
- port: 8070
name: tazblog-db

33
tazblog/tazblog.yaml Normal file
View file

@ -0,0 +1,33 @@
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: tazblog
spec:
replicas: 2
template:
metadata:
labels:
app: tazblog
spec:
containers:
- image: eu.gcr.io/composite-watch-759/tazblog-haskell:f33723a
imagePullPolicy: Always
name: tazblog
command: ["tazblog", "--dbHost", "tazblog-db.default.svc.cluster.local"]
---
apiVersion: v1
kind: Service
metadata:
name: tazblog-priv
labels:
app: tazblog
annotations:
acme/certificate: "www.tazj.in"
spec:
selector:
app: tazblog
ports:
- port: 80
targetPort: 8000
name: tazblog-http