add infra consul

This commit is contained in:
2024-06-27 00:59:10 +10:00
parent 6a5d02b21b
commit 2c6c85df47
6 changed files with 176 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: consul
namespace: consul
labels:
app: consul
spec:
replicas: 1
selector:
matchLabels:
app: consul
template:
metadata:
labels:
app: consul
spec:
containers:
- name: consul
image: 'swr.cn-south-1.myhuaweicloud.com/starsl.cn/consul:latest'
args:
- agent
ports:
- name: http
containerPort: 8500
protocol: TCP
env:
- name: TZ
value: Australia/Sydney
volumeMounts:
- name: consul-data
mountPath: /consul/data
- name: consul-config
mountPath: /consul/config
imagePullPolicy: IfNotPresent
restartPolicy: Always
volumes:
- name: consul-data
persistentVolumeClaim:
claimName: consul-data-pvc
- name: consul-config
persistentVolumeClaim:
claimName: consul-config-pvc
serviceName: consul