Repository navigation
[Backport release-1.4] fix(backups): carry dropdown option sources in CRD annotations, not schema - #2825
Closed
github-actions[bot] wants to merge 2 commits into
Closed
[Backport release-1.4] fix(backups): carry dropdown option sources in CRD annotations, not schema#2825github-actions[bot] wants to merge 2 commits into
github-actions[bot] wants to merge 2 commits into
Conversation
…chema
The four backups.cozystack.io CRDs injected the x-cozystack-options vendor
extension into their OpenAPI validation schema. apiextensions JSONSchemaProps
is a closed struct that only preserves x-kubernetes-* vendor extensions, so
helm-controller's server-side apply rejected the unknown key ("field not
declared in schema") and the CRDs never applied — the controller crash-looped
and backups were non-functional.
Move the field-to-source mapping the dashboard needs into CRD
metadata.annotations (preserved by the apiserver), emitted via
+kubebuilder:metadata:annotations markers, and drop the post-processing awk
injector. The dashboard reattaches the extension client-side.
A helm-unittest suite pins the contract: each dropdown field carries its source
in metadata.annotations and must not carry x-cozystack-options in the schema,
guarding against re-introducing the injector.
Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
(cherry picked from commit 2363f2d)
The HR readiness gate in e2e-install-cozystack.bats was toothless in two layers: the backgrounded kubectl-wait fan-out discarded child exit codes (POSIX `wait` without args returns 0), and the final check echoed "Some HelmReleases failed to reconcile" without exiting non-zero — a regression from 1f24038, which replaced the unavailable bats `fail` helper with a bare echo. A permanently-failing platform HelmRelease (e.g. the backup-controller CRD rejection, #2822) shipped through green CI for weeks. Replace the fan-out with a single `kubectl wait hr --all -A` for trace visibility, gate on an outcome-based re-list (which also covers HRs created after the snapshot, with a 120s retry to absorb momentary drift-reconcile flaps), and dump the full Ready condition message per non-ready HR so the real error is visible in the test output. Refs #2822 Assisted-By: Claude <[email protected]> Signed-off-by: Myasnikov Daniil <[email protected]> (cherry picked from commit 67b1a96)
Contributor
|
Fix not needed because initial feature was not included into 1.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #2823 to
release-1.4.