Skip to content
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

update to bottlerocket-settings-models v0.2.0 #4118

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

tzneal
Copy link
Contributor

@tzneal tzneal commented Jul 30, 2024

Issue number:

Closes #

Description of changes:

This adds support for hostname-override-source, so we add a migration as well.

Depends on bottlerocket-os/bottlerocket-core-kit#59

Testing done:

Build an AMI and verified that it works correctly when overriding the hostname source.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

This adds support for hostname-override-source, so we add
a migration as well. Updates the external cloud provider
default to use a hostname-override-source of private-dns-name
to match the current behavior.
@tzneal tzneal force-pushed the add-hostname-override-source branch from f4ce427 to cd22011 Compare July 31, 2024 14:27
Comment on lines +8 to +11
migrate(AddSettingsMigration(&[
"settings.kubernetes.hostname-override-source",
]))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Reading this, my concern is that current hosts (with no hostname-override-source set) will have their default generator behavior changed on update because we don't populate the new default value here if it's empty.

But I suppose that's not an issue because the hostname-override will have been set on first-boot and therefore the hostname-override generator won't run again and this value is meaningless.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, hostname-override is a weird property with the way it auto-sets. For variants where that occurs, changing hostname-override-source after the instance has no effect.

Copy link
Contributor

Choose a reason for hiding this comment

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

The core kit migration and moving pluto away from a setting generator has made this hard to follow.

In 1.20.x, aws-k8s-1.25+ had a hostname-override setting generator defined that would call pluto private-dns-name to generate a hostname override.

In this PR, aws-k8s-1.25+ will instead get hostname-override-source = "private-dns-name" (via storewolf and the newer defaults), which triggers the equivalent path in the newer pluto. But newer pluto will also skip over all of this if hostname-override is already set, which it would be on upgrade from an existing aws-k8s-1.25+ host.

@cbgbt cbgbt merged commit 5675fe2 into bottlerocket-os:develop Aug 1, 2024
29 checks passed
@vigh-m vigh-m mentioned this pull request Aug 1, 2024
16 tasks
@tzneal tzneal deleted the add-hostname-override-source branch August 2, 2024 13:26
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.

4 participants