8000 Fix namespace target customization support with no defaults by weyfonk · Pull Request #3052 · rancher/fleet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix namespace target customization support with no defaults #3052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 7, 2024

Conversation

weyfonk
Copy link
Contributor
@weyfonk weyfonk commented Nov 6, 2024

This initialises maps in bundle deployment options when those are empty due to no default configuration being provided.
As a results, this prevents panics when namespace labels or annotations are set as target customizations without default, all-targets configuration.

Refers to #2441
Depends on rancher/fleet-test-data#23.

@weyfonk weyfonk force-pushed the 2441-target-custom-ns-no-defaults branch from de85973 to 61f9f53 Compare November 6, 2024 12:44
These tests now verify that the created namespace does bear expected
labels and annotations.
This commit also paves the way for additional tests with customizations
over unconfigured namespace labels and annotations, which currently
cause a panic.
This prevents panics when namespace labels or annotations are
configured as target customizations over nonexistent defaults.
The required changes made in that repo have been merged.
@weyfonk weyfonk force-pushed the 2441-target-custom-ns-no-defaults branch from 95af638 to f396966 Compare November 7, 2024 15:01
@weyfonk weyfonk marked this pull request as ready for review November 7, 2024 15:01
@weyfonk weyfonk requested a review from a team as a code owner November 7, 2024 15:01

// initialiseOptionsMaps initialises options and staged options maps of namespace labels and annotations on bd, if
// needed.
// Assumes that bd is not nil.
Copy link
Member
@manno manno Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: At this point we could just pass spec?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, indeed we could!

@manno manno merged commit ad2551d into rancher:main Nov 7, 2024
12 checks passed
manno pushed a commit that referenced this pull request Nov 7, 2024
* Improve namespace target customization tests

These tests now verify that the created namespace does bear expected
labels and annotations.
This commit also paves the way for additional tests with customizations
over unconfigured namespace labels and annotations, which currently
cause a panic.

* Initialise options maps when empty

This prevents panics when namespace labels or annotations are
configured as target customizations over nonexistent defaults.

* Use main branch of `rancher/fleet-test-data

The required changes made in that repo have been merged.
thardeck pushed a commit that referenced this pull request Nov 8, 2024
* Improve namespace target customization tests

These tests now verify that the created namespace does bear expected
labels and annotations.
This commit also paves the way for additional tests with customizations
over unconfigured namespace labels and annotations, which currently
cause a panic.

* Initialise options maps when empty

This prevents panics when namespace labels or annotations are
configured as target customizations over nonexistent defaults.

* Use main branch of `rancher/fleet-test-data

The required changes made in that repo have been merged.
weyfonk added a commit to weyfonk/fleet that referenced this pull request Nov 15, 2024
…3052)

* Improve namespace target customization tests

These tests now verify that the created namespace does bear expected
labels and annotations.
This commit also paves the way for additional tests with customizations
over unconfigured namespace labels and annotations, which currently
cause a panic.

* Initialise options maps when empty

This prevents panics when namespace labels or annotations are
configured as target customizations over nonexistent defaults.

* Use main branch of `rancher/fleet-test-data

The required changes made in that repo have been merged.
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.

2 participants
0