Skip to content

Commit

Permalink
[CD] add HA configuration for csdb (#2131)
Browse files Browse the repository at this point in the history
* add HA configuration for csdb

Signed-off-by: Allen Li <[email protected]>

* add labelselector

Signed-off-by: Allen Li <[email protected]>

---------

Signed-off-by: Allen Li <[email protected]>
  • Loading branch information
qpdpQ authored Aug 12, 2024
1 parent 330d17a commit f62eed0
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions controllers/constant/odlm.go
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,36 @@ spec:
- CREATE DATABASE zen OWNER zen_user
- GRANT ALL PRIVILEGES ON DATABASE zen TO zen_user
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- ppc64le
- s390x
additionalPodAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: k8s.enterprisedb.io/cluster
operator: In
values:
- common-service-db
topologyKey: kubernetes.io/hostname
weight: 50
podAntiAffinityType: preferred
topologyKey: topology.kubernetes.io/zone
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
- maxSkew: 1
topologyKey: topology.kubernetes.io/region
whenUnsatisfiable: ScheduleAnyway
imageName:
templatingValueFrom:
default:
Expand Down

0 comments on commit f62eed0

Please sign in to comment.