[tazblog] Add tazblog deployment & svc
This commit is contained in:
parent
ef8846eb00
commit
a02148d832
2 changed files with 69 additions and 0 deletions
36
tazblog/tazblog-db.yaml
Normal file
36
tazblog/tazblog-db.yaml
Normal 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
33
tazblog/tazblog.yaml
Normal 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
|
Loading…
Reference in a new issue