FEAT(storage): enable HA with replica 2 and soft anti-affinity
- Add replicaCount: 2 to cnpg, pgweb, velero-ui, minio-console - Add soft pod anti-affinity for node distribution - Configure affinity for all storage components
This commit is contained in:
@@ -8,7 +8,7 @@ image:
|
|||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
# Replica count for operator
|
# Replica count for operator
|
||||||
replicaCount: 1
|
replicaCount: 2
|
||||||
|
|
||||||
# Resource requests for operator
|
# Resource requests for operator
|
||||||
resources:
|
resources:
|
||||||
@@ -67,8 +67,16 @@ nodeSelector: {}
|
|||||||
# Tolerations
|
# Tolerations
|
||||||
tolerations: []
|
tolerations: []
|
||||||
|
|
||||||
# Affinity
|
# Affinity - Soft Anti-Affinity to spread pods across nodes
|
||||||
affinity: {}
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: cloudnative-pg
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
|
||||||
# Security context
|
# Security context
|
||||||
securityContext:
|
securityContext:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
app: minio-console
|
app: minio-console
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 2
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: minio-console
|
app: minio-console
|
||||||
@@ -15,6 +15,15 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: minio-console
|
app: minio-console
|
||||||
spec:
|
spec:
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: minio-console
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: console
|
||||||
image: ghcr.io/georgmangold/console:v1.9.1
|
image: ghcr.io/georgmangold/console:v1.9.1
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
controllers:
|
controllers:
|
||||||
main:
|
main:
|
||||||
|
replicaCount: 2
|
||||||
annotations:
|
annotations:
|
||||||
reloader.stakater.com/auto: "true"
|
reloader.stakater.com/auto: "true"
|
||||||
containers:
|
containers:
|
||||||
@@ -42,6 +43,16 @@ controllers:
|
|||||||
port: 8081
|
port: 8081
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
|
# Affinity - Soft Anti-Affinity to spread pods across nodes
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: pgweb
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
|
||||||
service:
|
service:
|
||||||
main:
|
main:
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ spec:
|
|||||||
tag: latest
|
tag: latest
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
replicaCount: 1
|
replicaCount: 2
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
@@ -87,6 +87,16 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: BASIC_AUTH_ENABLED
|
- name: BASIC_AUTH_ENABLED
|
||||||
value: "false"
|
value: "false"
|
||||||
|
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: velero-ui
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
envFrom: []
|
envFrom: []
|
||||||
|
|
||||||
podSecurityContext:
|
podSecurityContext:
|
||||||
|
|||||||
Reference in New Issue
Block a user