Skip to content

feat: port 9 upstream improvements from open PRs - #13

Open
ermakov-oleg wants to merge 18 commits into
mainfrom
test/all-upstream-ports
Open

feat: port 9 upstream improvements from open PRs#13
ermakov-oleg wants to merge 18 commits into
mainfrom
test/all-upstream-ports

Conversation

@ermakov-oleg

@ermakov-oleg ermakov-oleg commented Feb 13, 2026

Copy link
Copy Markdown
Owner

Summary

Объединённый PR с 9 портированными изменениями из открытых PR в operasoftware/cnpg-plugin-pgbackrest.

Баг-фиксы

  • fix/object-cache-bugs (upstream #63) — 5 багов в ExtendedClient cache: type assertion, GVK comparison через reflect.TypeOf, removeObject condition, TTL init, isExpired() seconds vs nanoseconds. Добавлены unit-тесты.
  • fix/rbac-cluster-finalizers (upstream #66) — RBAC clusters/finalizers permission + fix Makefile paths для kubebuilder markers
  • fix/leader-election-release (upstream #64) — LeaderElectionReleaseOnCancel: true для быстрого переключения при rolling updates
  • fix/streaming-available-check (upstream #65) — early return в isStreamingAvailable когда CurrentPrimary == ""

Фичи

  • feat/grpc-error-codes (upstream #67) — gRPC status codes: NotFound, OutOfRange, FailedPrecondition
  • feat/lifecycle-capabilities (upstream #68) — TYPE_PATCHTYPE_EVALUATE (cnpg-i v0.3.0)
  • feat/prometheus-metrics (upstream #69) — Prometheus-метрики cnpg_pgbackrest_first_recoverability_point и cnpg_pgbackrest_last_available_backup_timestamp. Рефакторинг getRecoveryWindow(), фильтрация errored backups. Добавлены unit-тесты.
  • feat/default-security-context (upstream #70) — hardened default SecurityContext (non-root, read-only, drop ALL)
  • feat/archive-ref-dedup (upstream #71) — дедупликация ссылок на Archive-объекты

@ermakov-oleg
ermakov-oleg force-pushed the test/all-upstream-ports branch 2 times, most recently from 7177f9e to 32e5126 Compare February 13, 2026 14:37
…e projections

Port of upstream PR #331. When the same Archive is referenced multiple
times (e.g. as both archive and recovery), volume projections were
duplicated causing Job creation failures.

Signed-off-by: ermakov-oleg <ermakovolegs@gmail.com>
Signed-off-by: ermakov-oleg <ermakovolegs@gmail.com>
Signed-off-by: ermakov-oleg <ermakovolegs@gmail.com>
Port of upstream PRs #378 and #222. TYPE_PATCH is useless for Pods
(immutable in K8s). TYPE_EVALUATE allows triggering rolling deployment
when sidecar config changes. Also updates cnpg-i to v0.3.0.

Signed-off-by: ermakov-oleg <ermakovolegs@gmail.com>
Port of upstream PR #549. WAL not found returns NotFound, end of WAL
stream returns OutOfRange, missing permissions returns FailedPrecondition.

Signed-off-by: ermakov-oleg <ermakovolegs@gmail.com>
…ssionEnforcement

Port upstream fixes for clusters/finalizers RBAC and keep Task-based
manifest generation aligned with kubebuilder RBAC markers under internal/.
This updates Makefile/Taskfile generation paths and regenerates role/manifest.

Signed-off-by: ermakov-oleg <ermakovolegs@gmail.com>
Port of upstream PR #604. When CurrentPrimary is empty (first instance),
streaming is not available — prevents incorrect WAL predictions with
custom segment sizes during restore.

Signed-off-by: ermakov-oleg <ermakovolegs@gmail.com>
Port of upstream PR #615. Without this flag, RollingUpdate causes deadlock —
old pod holds leader lease preventing new pod from becoming ready.

Signed-off-by: ermakov-oleg <ermakovolegs@gmail.com>
Signed-off-by: ermakov-oleg <ermakovolegs@gmail.com>
@ermakov-oleg
ermakov-oleg force-pushed the test/all-upstream-ports branch from 32e5126 to d12c450 Compare February 17, 2026 09:14
@ermakov-oleg ermakov-oleg changed the title feat: port 10 upstream improvements from plugin-barman-cloud feat: port 9 upstream improvements from open PRs Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant