-
Notifications
You must be signed in to change notification settings - Fork 521
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
Add support for kubernetes device-ownership-from-security-context #4345
Conversation
migrate(AddSettingsMigration(&[ | ||
"settings.kubernetes.device-ownership-from-security-context", | ||
])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will also want to add migration for the affected services so that the containerd service gets restarted upon migration.
Reference this code - https://github.com/bottlerocket-os/bottlerocket/blob/develop/sources/settings-migrations/v1.23.0/nvidia-container-runtime-metadata/src/main.rs#L7-L10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense.
Should the Metadata Migration be in addition to the existing SettingsMigration
or in place of it?
From my read of the migration logic for AddMetadataMigration
it looks like it only removes the affected-services
and not the actual setting from the datastore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline. Reference PR #4182 where both a settings and a metadata migrations were added to support a new setting
054c931
to
9dadde1
Compare
8cb45f7
to
5ab22ef
Compare
Twoliter.toml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would need to bump the the core-kit version with the change released in new core-kit right? I will approve when it is released and the version bump is added here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#4351 bumps the core-kit version to include that change
⬆️ Rebased for the latest changes |
Description of changes:
Testing done:
The setting shows up as expected in an AMI built using this
settings-sdk
Changing the setting works as defined:
The setting has the desired effect on device ownership
true
:false
:migration testing
Starting AMI ->
bottlerocket-aws-k8s-1.30-x86_64-v1.29.0-c55d099c
On Upgrade, the settings show up as expected
On downgrade, the settings are removed
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.