Files
home-cluster-ops/kubernetes/infrastructure/consul/app/statefulset.yaml
2024-06-27 00:59:10 +10:00

45 lines
1.0 KiB
YAML

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