-
Notifications
You must be signed in to change notification settings - Fork 41
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 kubernetes models for API server, and yaml generation #85
Conversation
85b2be5
to
3422555
Compare
3422555
to
8ed3729
Compare
8ed3729
to
1e0a2f1
Compare
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.
👢
#[derive(Clone, Debug, Default, Serialize, Deserialize, Eq, PartialEq, JsonSchema)] | ||
pub struct BottlerocketNodeStatus { | ||
current_version: String, | ||
available_versions: Vec<String>, |
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.
available_versions
might be an empty Vec which means current version is the latest version, I think it's better to use Option<Vec<String>>
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.
I think it's only best to wrap a Vec
in Option
if there is a meaningful distinction between an empty vector, and a null one. In this case, both represent the absence of updates, so it's probably best to only allow a single representation of it if possible. I think not using Option
is more clear here.
1e0a2f1
to
ecd12b3
Compare
ecd12b3
to
c7d31d8
Compare
Issue number: #77
Description of changes:
This change adds a build step which converts our Rust models into YAML files which can be deployed to kubernetes.
Included is a client which can be used to create and update the
BottlerocketNode
custom resourcesTesting done:
The YAML files were applied to an EKS cluster, and then a
BottlerocketNodeClient
was used to create aBottlerocketNode
custom resource, and update its status: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.