@@ -1,113 +0,0 @@
|
|||||||
kind: Deployment
|
|
||||||
apiVersion: apps/v1
|
|
||||||
metadata:
|
|
||||||
name: flask-consul
|
|
||||||
namespace: consul
|
|
||||||
labels:
|
|
||||||
app: flask-consul
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: flask-consul
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: flask-consul
|
|
||||||
spec:
|
|
||||||
initContainers:
|
|
||||||
- name: wait-for-consul
|
|
||||||
image: busybox
|
|
||||||
command:
|
|
||||||
- sh
|
|
||||||
- '-c'
|
|
||||||
- >-
|
|
||||||
for i in \$(seq 1 60); do nc -z -w3 consul 8500 && exit 0 ||
|
|
||||||
sleep 5; done; exit 1
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
containers:
|
|
||||||
- name: flask-consul
|
|
||||||
image: 'edeedeeed/flask_consul:v0.1.0'
|
|
||||||
ports:
|
|
||||||
- name: http-2026
|
|
||||||
containerPort: 2026
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: admin_passwd
|
|
||||||
value: ${dashboard_8919_admin_passwd}
|
|
||||||
- name: consul_token
|
|
||||||
value: ${dashboard_8919_consul_token}
|
|
||||||
- name: consul_url
|
|
||||||
value: 'http://consul:8500/v1'
|
|
||||||
- name: log_level
|
|
||||||
value: INFO
|
|
||||||
- name: TZ
|
|
||||||
value: Australia/Sydney
|
|
||||||
imagePullPolicy: Always
|
|
||||||
restartPolicy: Always
|
|
||||||
---
|
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: flask-consul
|
|
||||||
namespace: consul
|
|
||||||
labels:
|
|
||||||
app: flask-consul
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- name: http-2026
|
|
||||||
protocol: TCP
|
|
||||||
port: 2026
|
|
||||||
targetPort: 2026
|
|
||||||
selector:
|
|
||||||
app: flask-consul
|
|
||||||
type: ClusterIP
|
|
||||||
---
|
|
||||||
kind: Deployment
|
|
||||||
apiVersion: apps/v1
|
|
||||||
metadata:
|
|
||||||
name: nginx-consul
|
|
||||||
namespace: consul
|
|
||||||
labels:
|
|
||||||
app: nginx-consul
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: nginx-consul
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: nginx-consul
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: nginx-consul
|
|
||||||
image: 'nicholasjackson/nginx-consul:v0.1.0'
|
|
||||||
ports:
|
|
||||||
- name: http-1026
|
|
||||||
containerPort: 1026
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: TZ
|
|
||||||
value: Australia/Sydney
|
|
||||||
imagePullPolicy: Always
|
|
||||||
restartPolicy: Always
|
|
||||||
---
|
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: nginx-consul
|
|
||||||
namespace: consul
|
|
||||||
labels:
|
|
||||||
app: consul
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- name: nginx-consul
|
|
||||||
protocol: TCP
|
|
||||||
port: 1026
|
|
||||||
targetPort: 1026
|
|
||||||
nodePort: 31026
|
|
||||||
selector:
|
|
||||||
app: nginx-consul
|
|
||||||
type: NodePort
|
|
||||||
externalTrafficPolicy: Cluster
|
|
||||||
Reference in New Issue
Block a user