Skip to content

Commit 738b4c9

Browse files
authored
Merge pull request #34 from cybertec-postgresql/cronjob_fix
Cronjob fix
2 parents 737c26e + 5f2d00b commit 738b4c9

37 files changed

+241
-241
lines changed

charts/postgres-operator-ui/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ envs:
4343
# UI and operator API. Insert the service name of the operator API here!
4444
appUrl: "http://localhost:8081"
4545
operatorApiUrl: "http://postgres-operator:8080"
46-
operatorClusterNameLabel: "cluster-name"
46+
operatorClusterNameLabel: "cluster.cpo.opensource.cybertec.at/name"
4747
resourcesVisible: "False"
4848
targetNamespace: "default"
4949
teams:

charts/postgres-operator/crds/operatorconfigurations.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ spec:
6868
type: string
6969
docker_image:
7070
type: string
71-
default: "ghcr.io/zalando/spilo-15:3.0-p1"
71+
default: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.2-1"
7272
enable_crd_registration:
7373
type: boolean
7474
default: true
@@ -151,7 +151,7 @@ spec:
151151
default: 180
152152
replication_username:
153153
type: string
154-
default: standby
154+
default: cpo_replication
155155
super_username:
156156
type: string
157157
default: postgres
@@ -186,10 +186,10 @@ spec:
186186
additionalProperties:
187187
type: string
188188
default:
189-
application: spilo
189+
application: cpo
190190
cluster_name_label:
191191
type: string
192-
default: "cluster-name"
192+
default: "cluster.cpo.opensource.cybertec.at/name"
193193
custom_pod_annotations:
194194
type: object
195195
additionalProperties:
@@ -311,13 +311,13 @@ spec:
311311
type: string
312312
pod_role_label:
313313
type: string
314-
default: "spilo-role"
314+
default: "member.cpo.opensource.cybertec.at/role"
315315
pod_service_account_definition:
316316
type: string
317317
default: ""
318318
pod_service_account_name:
319319
type: string
320-
default: "postgres-pod"
320+
default: "cpo-pod"
321321
pod_service_account_role_binding_definition:
322322
type: string
323323
default: ""
@@ -574,7 +574,7 @@ spec:
574574
default: "https://info.example.com/oauth2/tokeninfo?access_token= uid realm=/employees"
575575
pam_role_name:
576576
type: string
577-
default: "zalandos"
577+
default: "cpo_pam"
578578
postgres_superuser_teams:
579579
type: array
580580
items:

charts/postgres-operator/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ configKubernetes:
102102
cluster_domain: cluster.local
103103
# additional labels assigned to the cluster objects
104104
cluster_labels:
105-
application: spilo
105+
application: cpo
106106
# label assigned to Kubernetes objects created by the operator
107-
cluster_name_label: cluster-name
107+
cluster_name_label: cluster.cpo.opensource.cybertec.at/name
108108
# additional annotations to add to every database pod
109109
# custom_pod_annotations:
110110
# keya: valuea
@@ -181,7 +181,7 @@ configKubernetes:
181181
# specify the pod management policy of stateful sets of Postgres clusters
182182
pod_management_policy: "ordered_ready"
183183
# label assigned to the Postgres pods (and services/endpoints)
184-
pod_role_label: spilo-role
184+
pod_role_label: member.cpo.opensource.cybertec.at/role
185185
# service account definition as JSON/YAML string to be used by postgres cluster pods
186186
# pod_service_account_definition: ""
187187

docker/logical-backup/dump.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ declare -a search_strategy=(
158158
)
159159

160160
function list_all_replica_pods_current_node {
161-
get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dreplica&fieldSelector=spec.nodeName%3D${CURRENT_NODENAME}" | tee | head -n 1
161+
get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},member.cpo.opensource.cybertec.at/role%3Dreplica&fieldSelector=spec.nodeName%3D${CURRENT_NODENAME}" | tee | head -n 1
162162
}
163163

164164
function list_all_replica_pods_any_node {
165-
get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dreplica" | tee | head -n 1
165+
get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},member.cpo.opensource.cybertec.at/role%3Dreplica" | tee | head -n 1
166166
}
167167

168168
function get_master_pod {
169-
get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dmaster" | tee | head -n 1
169+
get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},member.cpo.opensource.cybertec.at/role%3Dmaster" | tee | head -n 1
170170
}
171171

172172
CURRENT_NODENAME=$(get_current_pod | jq .items[].spec.nodeName --raw-output)

docs/diagrams/neutral_operator.excalidraw

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@
367367
"version": 166,
368368
"versionNonce": 1814670812,
369369
"isDeleted": false,
370-
"text": "spilo-role=master",
370+
"text": "member.cpo.opensource.cybertec.at/role=master",
371371
"fontSize": 20,
372372
"fontFamily": 1,
373373
"textAlign": "left",
@@ -393,7 +393,7 @@
393393
"version": 245,
394394
"versionNonce": 116764132,
395395
"isDeleted": false,
396-
"text": "spilo-role=replica",
396+
"text": "member.cpo.opensource.cybertec.at/role=replica",
397397
"fontSize": 20,
398398
"fontFamily": 1,
399399
"textAlign": "left",
@@ -471,7 +471,7 @@
471471
"version": 314,
472472
"versionNonce": 411363036,
473473
"isDeleted": false,
474-
"text": "spilo-role=replica",
474+
"text": "member.cpo.opensource.cybertec.at/role=replica",
475475
"fontSize": 20,
476476
"fontFamily": 1,
477477
"textAlign": "left",
@@ -2039,7 +2039,7 @@
20392039
"version": 331,
20402040
"versionNonce": 1673009380,
20412041
"isDeleted": false,
2042-
"text": "spilo-role=master",
2042+
"text": "member.cpo.opensource.cybertec.at/role=master",
20432043
"fontSize": 20,
20442044
"fontFamily": 1,
20452045
"textAlign": "left",
@@ -2887,7 +2887,7 @@
28872887
"version": 374,
28882888
"versionNonce": 349956068,
28892889
"isDeleted": false,
2890-
"text": "spilo-role=replica",
2890+
"text": "member.cpo.opensource.cybertec.at/role=replica",
28912891
"fontSize": 20,
28922892
"fontFamily": 1,
28932893
"textAlign": "left",
@@ -3071,7 +3071,7 @@
30713071
"version": 456,
30723072
"versionNonce": 241829340,
30733073
"isDeleted": false,
3074-
"text": "spilo-role=master",
3074+
"text": "member.cpo.opensource.cybertec.at/role=master",
30753075
"fontSize": 20,
30763076
"fontFamily": 1,
30773077
"textAlign": "left",

docs/quickstart.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,18 @@ are named like the cluster. The database pods can be identified by their number
184184
suffix, starting from `-0`. They run the [Spilo](https://github.com/zalando/spilo)
185185
container image by Zalando. As for the services and endpoints, there will be one
186186
for the master pod and another one for all the replicas (`-repl` suffix). Check
187-
if all components are coming up. Use the label `application=spilo` to filter and
188-
list the label `spilo-role` to see who is currently the master.
187+
if all components are coming up. Use the label `application=cpo` to filter and
188+
list the label `member.cpo.opensource.cybertec.at/role` to see who is currently the master.
189189

190190
```bash
191191
# check the deployed cluster
192192
kubectl get postgresql
193193

194194
# check created database pods
195-
kubectl get pods -l application=spilo -L spilo-role
195+
kubectl get pods -l application=cpo -L member.cpo.opensource.cybertec.at/role
196196

197197
# check created service resources
198-
kubectl get svc -l application=spilo -L spilo-role
198+
kubectl get svc -l application=cpo -L member.cpo.opensource.cybertec.at/role
199199
```
200200

201201
## Connect to the Postgres cluster via psql

docs/reference/operator_parameters.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,11 +387,11 @@ configuration they are grouped under the `kubernetes` key.
387387

388388
* **pod_role_label**
389389
name of the label assigned to the Postgres pods (and services/endpoints) by
390-
the operator. The default is `spilo-role`.
390+
the operator. The default is `member.cpo.opensource.cybertec.at/role`.
391391

392392
* **cluster_labels**
393393
list of `name:value` pairs for additional labels assigned to the cluster
394-
objects. The default is `application:spilo`.
394+
objects. The default is `application:cpo`.
395395

396396
* **inherited_labels**
397397
list of label keys that can be inherited from the cluster manifest, and
@@ -404,7 +404,7 @@ configuration they are grouped under the `kubernetes` key.
404404
* **cluster_name_label**
405405
name of the label assigned to Kubernetes objects created by the operator
406406
that indicates which cluster a given object belongs to. The default is
407-
`cluster-name`.
407+
`cluster.cpo.opensource.cybertec.at/name`.
408408

409409
* **node_readiness_label**
410410
a set of labels that a running and active node should possess to be

docs/user.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ cluster name length is 53 characters.
5454

5555
## Watch pods being created
5656

57-
Check if the database pods are coming up. Use the label `application=spilo` to
58-
filter and list the label `spilo-role` to see when the master is promoted and
57+
Check if the database pods are coming up. Use the label `application=cpo` to
58+
filter and list the label `member.cpo.opensource.cybertec.at/role` to see when the master is promoted and
5959
replicas get their labels.
6060

6161
```bash
62-
kubectl get pods -l application=spilo -L spilo-role -w
62+
kubectl get pods -l application=cpo -L member.cpo.opensource.cybertec.at/role -w
6363
```
6464

6565
The operator also emits K8s events to the Postgresql CRD which can be inspected
@@ -77,7 +77,7 @@ the master pod of our test cluster.
7777

7878
```bash
7979
# get name of master pod of acid-minimal-cluster
80-
export PGMASTER=$(kubectl get pods -o jsonpath={.items..metadata.name} -l application=spilo,cluster-name=acid-minimal-cluster,spilo-role=master -n default)
80+
export PGMASTER=$(kubectl get pods -o jsonpath={.items..metadata.name} -l application=cpo,cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster,member.cpo.opensource.cybertec.at/role=master -n default)
8181

8282
# set up port forward
8383
kubectl port-forward $PGMASTER 6432:5432 -n default

e2e/scripts/cleanup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
kubectl delete postgresql acid-minimal-cluster
3-
kubectl delete deployments -l application=db-connection-pooler,cluster-name=acid-minimal-cluster
4-
kubectl delete statefulsets -l application=spilo,cluster-name=acid-minimal-cluster
5-
kubectl delete services -l application=spilo,cluster-name=acid-minimal-cluster
3+
kubectl delete deployments -l application=db-connection-pooler,cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster
4+
kubectl delete statefulsets -l application=cpo,cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster
5+
kubectl delete services -l application=cpo,cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster
66
kubectl delete configmap postgres-operator
77
kubectl delete deployment postgres-operator

e2e/scripts/watch_objects.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ kubectl get pods -o jsonpath='{.items[].metadata.annotations.zalando-postgres-op
88
echo
99
echo
1010
echo 'Pods'
11-
kubectl get pods -l application=spilo -o wide --all-namespaces
11+
kubectl get pods -l application=cpo -o wide --all-namespaces
1212
echo
1313
kubectl get pods -l application=db-connection-pooler -o wide --all-namespaces
1414
echo
@@ -25,7 +25,7 @@ kubectl get pods -l name=postgres-operator -o jsonpath='{.items..metadata.annota
2525
echo
2626
echo
2727
echo 'Spilo Image in statefulset'
28-
kubectl get pods -l application=spilo -o jsonpath='{.items..spec.containers..image}'
28+
kubectl get pods -l application=cpo -o jsonpath='{.items..spec.containers..image}'
2929
echo
3030
echo
3131
echo 'Queue Status'

0 commit comments

Comments
 (0)