Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions deploy/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,10 @@ spec:
# repo3-path: /pgbackrest/postgres-operator/cluster1-multi-repo/repo3
# repo4-path: /pgbackrest/postgres-operator/cluster1-multi-repo/repo4
repoHost:
# resources:
Comment thread
hors marked this conversation as resolved.
# limits:
# cpu: 200m
# memory: 128Mi
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand Down
46 changes: 46 additions & 0 deletions e2e-tests/tests/init-deploy/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,52 @@ metadata:
name: init-deploy
controller: true
blockOwnerDeletion: true
spec:
serviceName: init-deploy-pods
template:
metadata:
annotations:
test-annotation: test
spec:
containers:
- command:
- pgbackrest
- server
name: pgbackrest
resources:
limits:
cpu: 200m
memory: 128Mi
- command:
- bash
- -ceu
- --
- |-
monitor() {
exec {fd}<> <(:||:)
until read -r -t 5 -u "${fd}"; do
if
[[ "${filename}" -nt "/proc/self/fd/${fd}" ]] &&
pkill -HUP --exact --parent=0 pgbackrest
then
exec {fd}>&- && exec {fd}<> <(:||:)
stat --dereference --format='Loaded configuration dated %y' "${filename}"
elif
{ [[ "${directory}" -nt "/proc/self/fd/${fd}" ]] ||
[[ "${authority}" -nt "/proc/self/fd/${fd}" ]]
} &&
pkill -HUP --exact --parent=0 pgbackrest
then
exec {fd}>&- && exec {fd}<> <(:||:)
stat --format='Loaded certificates dated %y' "${directory}"
fi
done
}; export directory="$1" authority="$2" filename="$3"; export -f monitor; exec -a "$0" bash -ceu monitor
- pgbackrest-config
- /etc/pgbackrest/server
- /etc/pgbackrest/conf.d/~postgres-operator/tls-ca.crt
- /etc/pgbackrest/conf.d/~postgres-operator_server.conf
name: pgbackrest-config
status:
observedGeneration: 1
replicas: 1
Expand Down
2 changes: 2 additions & 0 deletions e2e-tests/tests/init-deploy/01-create-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ commands:
get_cr \
| yq '.spec.metadata.labels.test-label = "test"' \
| yq '.spec.metadata.annotations.test-annotation = "test"' \
| yq '.spec.backups.pgbackrest.repoHost.resources.limits.cpu = "200m"' \
| yq '.spec.backups.pgbackrest.repoHost.resources.limits.memory = "128Mi"' \
| kubectl -n "${NAMESPACE}" apply -f -