File tree 3 files changed +52
-0
lines changed
e2e-tests/tests/init-deploy
3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -383,6 +383,10 @@ spec:
383
383
# repo3-path: /pgbackrest/postgres-operator/cluster1-multi-repo/repo3
384
384
# repo4-path: /pgbackrest/postgres-operator/cluster1-multi-repo/repo4
385
385
repoHost :
386
+ # resources:
387
+ # limits:
388
+ # cpu: 200m
389
+ # memory: 128Mi
386
390
affinity :
387
391
podAntiAffinity :
388
392
preferredDuringSchedulingIgnoredDuringExecution :
Original file line number Diff line number Diff line change @@ -17,6 +17,52 @@ metadata:
17
17
name : init-deploy
18
18
controller : true
19
19
blockOwnerDeletion : true
20
+ spec :
21
+ serviceName : init-deploy-pods
22
+ template :
23
+ metadata :
24
+ annotations :
25
+ test-annotation : test
26
+ spec :
27
+ containers :
28
+ - command :
29
+ - pgbackrest
30
+ - server
31
+ name : pgbackrest
32
+ resources :
33
+ limits :
34
+ cpu : 200m
35
+ memory : 128Mi
36
+ - command :
37
+ - bash
38
+ - -ceu
39
+ - --
40
+ - |-
41
+ monitor() {
42
+ exec {fd}<> <(:||:)
43
+ until read -r -t 5 -u "${fd}"; do
44
+ if
45
+ [[ "${filename}" -nt "/proc/self/fd/${fd}" ]] &&
46
+ pkill -HUP --exact --parent=0 pgbackrest
47
+ then
48
+ exec {fd}>&- && exec {fd}<> <(:||:)
49
+ stat --dereference --format='Loaded configuration dated %y' "${filename}"
50
+ elif
51
+ { [[ "${directory}" -nt "/proc/self/fd/${fd}" ]] ||
52
+ [[ "${authority}" -nt "/proc/self/fd/${fd}" ]]
53
+ } &&
54
+ pkill -HUP --exact --parent=0 pgbackrest
55
+ then
56
+ exec {fd}>&- && exec {fd}<> <(:||:)
57
+ stat --format='Loaded certificates dated %y' "${directory}"
58
+ fi
59
+ done
60
+ }; export directory="$1" authority="$2" filename="$3"; export -f monitor; exec -a "$0" bash -ceu monitor
61
+ - pgbackrest-config
62
+ - /etc/pgbackrest/server
63
+ - /etc/pgbackrest/conf.d/~postgres-operator/tls-ca.crt
64
+ - /etc/pgbackrest/conf.d/~postgres-operator_server.conf
65
+ name : pgbackrest-config
20
66
status :
21
67
observedGeneration : 1
22
68
replicas : 1
Original file line number Diff line number Diff line change @@ -11,4 +11,6 @@ commands:
11
11
get_cr \
12
12
| yq '.spec.metadata.labels.test-label = "test"' \
13
13
| yq '.spec.metadata.annotations.test-annotation = "test"' \
14
+ | yq '.spec.backups.pgbackrest.repoHost.resources.limits.cpu = "200m"' \
15
+ | yq '.spec.backups.pgbackrest.repoHost.resources.limits.memory = "128Mi"' \
14
16
| kubectl -n "${NAMESPACE}" apply -f -
You can’t perform that action at this time.
0 commit comments