Skip to content

Commit cc077e5

Browse files
authored
Merge pull request #15 from nofusscomputing/cloud-native-pg-operator
2 parents ae07555 + 4294ba5 commit cc077e5

27 files changed

+18442
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
base/Namespace**
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# CloudnativePG Operator Kustomize
2+
3+
4+
## Upgrading manifests
5+
6+
1. Fetch new release manifest
7+
8+
- Navigate to repository https://github.com/cloudnative-pg/cloudnative-pg
9+
10+
- Go To `releases` directory
11+
12+
- Change the branch to the desired tag _Tag sgould match the desired release_
13+
14+
- click on the file that matches the release version
15+
16+
- copy the permalink raw URL
17+
18+
Keep a copy of this url so it can be added to the commit message. Doing this will allow validity checking if required.
19+
20+
1. split the manifest
21+
22+
From the apps dir `manifests/<app name>` run:
23+
24+
``` bash
25+
26+
docker run -ti \
27+
-e "KUBECTL_SLICE_INPUT_FILE=<Raw URL of manifest>" \
28+
-e "KUBECTL_SLICE_OUTPUT_DIR=base/" \
29+
-v manifests/cloudnativepg-operator:/workdir \
30+
--rm \
31+
nofusscomputing/kubernetes-manifest-tools:latest
32+
33+
```
34+
35+
1. update the Base kustomization
36+
37+
From the apps dir `manifests/<app name>` run:
38+
39+
``` bash
40+
41+
ansible-playbook ../../../../other/kubernetes-manifest-tools/collection/playbooks/update-kustomize.yaml \
42+
--extra-vars "namespace=operators" \
43+
--extra-vars "manifest_dir=${PWD}/base"
44+
45+
```
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/managed-by: kustomize
7+
app.kubernetes.io/name: cloudnative-pg-kubebuilderv4
8+
name: cnpg-database-editor-role
9+
rules:
10+
- apiGroups:
11+
- postgresql.cnpg.io
12+
resources:
13+
- databases
14+
verbs:
15+
- create
16+
- delete
17+
- get
18+
- list
19+
- patch
20+
- update
21+
- watch
22+
- apiGroups:
23+
- postgresql.cnpg.io
24+
resources:
25+
- databases/status
26+
verbs:
27+
- get
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/managed-by: kustomize
7+
app.kubernetes.io/name: cloudnative-pg-kubebuilderv4
8+
name: cnpg-database-viewer-role
9+
rules:
10+
- apiGroups:
11+
- postgresql.cnpg.io
12+
resources:
13+
- databases
14+
verbs:
15+
- get
16+
- list
17+
- watch
18+
- apiGroups:
19+
- postgresql.cnpg.io
20+
resources:
21+
- databases/status
22+
verbs:
23+
- get
Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: cnpg-manager
6+
rules:
7+
- apiGroups:
8+
- ''
9+
resources:
10+
- configmaps
11+
- secrets
12+
- services
13+
verbs:
14+
- create
15+
- delete
16+
- get
17+
- list
18+
- patch
19+
- update
20+
- watch
21+
- apiGroups:
22+
- ''
23+
resources:
24+
- configmaps/status
25+
- secrets/status
26+
verbs:
27+
- get
28+
- patch
29+
- update
30+
- apiGroups:
31+
- ''
32+
resources:
33+
- events
34+
verbs:
35+
- create
36+
- patch
37+
- apiGroups:
38+
- ''
39+
resources:
40+
- nodes
41+
verbs:
42+
- get
43+
- list
44+
- watch
45+
- apiGroups:
46+
- ''
47+
resources:
48+
- persistentvolumeclaims
49+
- pods
50+
- pods/exec
51+
verbs:
52+
- create
53+
- delete
54+
- get
55+
- list
56+
- patch
57+
- watch
58+
- apiGroups:
59+
- ''
60+
resources:
61+
- pods/status
62+
verbs:
63+
- get
64+
- apiGroups:
65+
- ''
66+
resources:
67+
- serviceaccounts
68+
verbs:
69+
- create
70+
- get
71+
- list
72+
- patch
73+
- update
74+
- watch
75+
- apiGroups:
76+
- admissionregistration.k8s.io
77+
resources:
78+
- mutatingwebhookconfigurations
79+
- validatingwebhookconfigurations
80+
verbs:
81+
- get
82+
- patch
83+
- apiGroups:
84+
- apps
85+
resources:
86+
- deployments
87+
verbs:
88+
- create
89+
- delete
90+
- get
91+
- list
92+
- patch
93+
- update
94+
- watch
95+
- apiGroups:
96+
- batch
97+
resources:
98+
- jobs
99+
verbs:
100+
- create
101+
- delete
102+
- get
103+
- list
104+
- patch
105+
- watch
106+
- apiGroups:
107+
- coordination.k8s.io
108+
resources:
109+
- leases
110+
verbs:
111+
- create
112+
- get
113+
- update
114+
- apiGroups:
115+
- monitoring.coreos.com
116+
resources:
117+
- podmonitors
118+
verbs:
119+
- create
120+
- delete
121+
- get
122+
- list
123+
- patch
124+
- watch
125+
- apiGroups:
126+
- policy
127+
resources:
128+
- poddisruptionbudgets
129+
verbs:
130+
- create
131+
- delete
132+
- get
133+
- list
134+
- patch
135+
- update
136+
- watch
137+
- apiGroups:
138+
- postgresql.cnpg.io
139+
resources:
140+
- backups
141+
- clusters
142+
- databases
143+
- poolers
144+
- publications
145+
- scheduledbackups
146+
- subscriptions
147+
verbs:
148+
- create
149+
- delete
150+
- get
151+
- list
152+
- patch
153+
- update
154+
- watch
155+
- apiGroups:
156+
- postgresql.cnpg.io
157+
resources:
158+
- backups/status
159+
- databases/status
160+
- publications/status
161+
- scheduledbackups/status
162+
- subscriptions/status
163+
verbs:
164+
- get
165+
- patch
166+
- update
167+
- apiGroups:
168+
- postgresql.cnpg.io
169+
resources:
170+
- clusterimagecatalogs
171+
- imagecatalogs
172+
verbs:
173+
- get
174+
- list
175+
- watch
176+
- apiGroups:
177+
- postgresql.cnpg.io
178+
resources:
179+
- clusters/finalizers
180+
- poolers/finalizers
181+
verbs:
182+
- update
183+
- apiGroups:
184+
- postgresql.cnpg.io
185+
resources:
186+
- clusters/status
187+
- poolers/status
188+
verbs:
189+
- get
190+
- patch
191+
- update
192+
- watch
193+
- apiGroups:
194+
- rbac.authorization.k8s.io
195+
resources:
196+
- rolebindings
197+
- roles
198+
verbs:
199+
- create
200+
- get
201+
- list
202+
- patch
203+
- update
204+
- watch
205+
- apiGroups:
206+
- snapshot.storage.k8s.io
207+
resources:
208+
- volumesnapshots
209+
verbs:
210+
- create
211+
- get
212+
- list
213+
- patch
214+
- watch
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/managed-by: kustomize
7+
app.kubernetes.io/name: cloudnative-pg-kubebuilderv4
8+
name: cnpg-publication-editor-role
9+
rules:
10+
- apiGroups:
11+
- postgresql.cnpg.io
12+
resources:
13+
- publications
14+
verbs:
15+
- create
16+
- delete
17+
- get
18+
- list
19+
- patch
20+
- update
21+
- watch
22+
- apiGroups:
23+
- postgresql.cnpg.io
24+
resources:
25+
- publications/status
26+
verbs:
27+
- get
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/managed-by: kustomize
7+
app.kubernetes.io/name: cloudnative-pg-kubebuilderv4
8+
name: cnpg-publication-viewer-role
9+
rules:
10+
- apiGroups:
11+
- postgresql.cnpg.io
12+
resources:
13+
- publications
14+
verbs:
15+
- get
16+
- list
17+
- watch
18+
- apiGroups:
19+
- postgresql.cnpg.io
20+
resources:
21+
- publications/status
22+
verbs:
23+
- get
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app.kubernetes.io/managed-by: kustomize
7+
app.kubernetes.io/name: cloudnative-pg-kubebuilderv4
8+
name: cnpg-subscription-editor-role
9+
rules:
10+
- apiGroups:
11+
- postgresql.cnpg.io
12+
resources:
13+
- subscriptions
14+
verbs:
15+
- create
16+
- delete
17+
- get
18+
- list
19+
- patch
20+
- update
21+
- watch
22+
- apiGroups:
23+
- postgresql.cnpg.io
24+
resources:
25+
- subscriptions/status
26+
verbs:
27+
- get

0 commit comments

Comments
 (0)