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

47 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: 'consul:1.15.4'
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
volumes:
- name: consul-data
hostPath:
path: /mnt/nfs/AppData/consul/data
type: Directory
- name: consul-config
hostPath:
path: /mnt/nfs/AppData/consul/config
type: Directory
restartPolicy: Always
serviceName: consul