-
Notifications
You must be signed in to change notification settings - Fork 526
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
static-pods: remove conditional compilation #3891
Conversation
e231f63
to
83a755d
Compare
sources/api/migration/migrations/v1.20.0/static-pods-services-cfg-v0-1-0/src/main.rs
Outdated
Show resolved
Hide resolved
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.
Code-wise this looks good.
For testing, I'd like to be sure that cluster provisioning still works, as that depends on static pods functioning as expected.
I'd also like to understand whether enabling a new static pod or disabling an existing one causes any impact to other running pods. I would expect reconciliation to happen as for anything else in Kubernetes, but static pods have an unusual lifecycle and don't always follow the same rules.
sources/api/migration/migrations/v1.20.0/static-pods-services-cfg-v0-1-0/src/main.rs
Outdated
Show resolved
Hide resolved
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.
It would be good to push the small fixes today if possible.
sources/api/migration/migrations/v1.20.0/static-pods-services-cfg-v0-1-0/src/main.rs
Outdated
Show resolved
Hide resolved
300b619
to
1ae7893
Compare
So unfortunately testing showed a few problems. First kubernetes does not actually support defining multiple pods in a single manifest file for static pods. It does not error with it but will only spin up the first defined pod in the manifest file as this is because it maps a 1 to 1 relationship from manifest file and static pod. I then added a split-by config in thar-be-settings to have it divide a template amongst multiple files such as manifest.yaml.0 manifest.yaml.1. This works on initial creation but when disabling or removing a pod, it does not remove and clean up the file. This could be fixed by more expansion of thar-be-settings functionality, but at this point I think that is too risky of a move right now. IMO going back to keeping the agent with a toml configuration file is the saner approach, and maintaining it having that logic that already exists. |
1ae7893
to
57d2e06
Compare
57d2e06
to
7959b6e
Compare
Fixed missing newline and serde requirement |
The requested change was made, but github won't mark it done cause force push removed it from history??
sources/api/static-pods/src/main.rs
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.
note for future reviewers: easiest way to review this is to checkout the PR branch locally and
git diff 396a042e:sources/api/static-pods/src/static_pods.rs 7959b6e9:sources/api/static-pods/src/main.rs
sources/api/migration/migrations/v1.20.0/static-pods-services-cfg-v0-1-0/src/main.rs
Show resolved
Hide resolved
7959b6e
to
cf7a4e6
Compare
Fix source-groups and migration spacing |
Approach changed since discussion, we did talk about going this route I believe should the direct to template didn't work. More info is on PR
[package.metadata.build-package] | ||
source-groups = [ | ||
"api/static-pods" | ||
] |
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.
If static-pods
no longer depends on the API, it should move out from under sources/api
so that this package can watch the specific directory (sources/static-pods
) and so that changes don't also trigger a rebuild of os
.
Issue number: 3619
Closes #3619
Description of changes:
thar-be-settings + model:
static-pods:
Testing done:
cargo +nightly udeps
to ensure all unused dependencies have been removedTest Report
Initial_Build_ID.Output
Initial_Config.Output
/etc/kubernetes/static-pods-manifest.toml
configuration-files.static-pods-toml
services.static-pods
Downgrade.Output
Downgrade_Build_ID.Output
Downgrade_Config.Output
configuration-files.static-pods-toml
services.static-pods
Upgrade.Output
Upgrade_Build_ID.Output
Upgrade_Config.Output
/etc/kubernetes/static-pods-manifest.toml
configuration-files.static-pods-toml
Change_Settings.Output
Manually ran:
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.