Skip to content

Commit ffed3da

Browse files
committed
feat(postgres): Add Overlay HA
ref: #18
1 parent fbf09e6 commit ffed3da

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
3+
apiVersion: kustomize.config.k8s.io/v1beta1
4+
kind: Kustomization
5+
6+
namespace: postgres-15
7+
8+
9+
resources:
10+
- ../production
11+
12+
13+
components:
14+
- ../../components/ha
15+
16+
17+
patches:
18+
19+
# yamllint disable rule:indentation
20+
- patch: |-
21+
22+
- op: replace
23+
path: /spec/instances
24+
value: 2
25+
# yamllint enable rule:indentation
26+
target:
27+
kind: Cluster
28+
29+
# yamllint disable rule:indentation
30+
- patch: |-
31+
32+
- op: replace
33+
path: /spec/imageName
34+
value: ghcr.io/cloudnative-pg/postgresql:15.12-11
35+
# yamllint enable rule:indentation
36+
target:
37+
kind: Cluster
38+
39+
40+
replacements:
41+
42+
# Updates extenal cluster DNS name octet that contains the namespace
43+
- source:
44+
kind: Cluster
45+
name: main-01
46+
fieldPath: metadata.namespace
47+
targets:
48+
- select:
49+
kind: Cluster
50+
fieldPaths:
51+
- spec.externalClusters.[name=main-01].connectionParameters.host
52+
- spec.externalClusters.[name=main-02].connectionParameters.host
53+
options:
54+
delimiter: "."
55+
index: 1

0 commit comments

Comments
 (0)