-
Notifications
You must be signed in to change notification settings - Fork 5
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
Dynamic update of Kubespray and K8s [#10] #11
Dynamic update of Kubespray and K8s [#10] #11
Conversation
Adds support for latest Kubespray release and supported K8s version
@@ -153,6 +153,10 @@ class K8sInfra < Thor | |||
if options['dry-run'] then | |||
puts "Dry-run successfully completed" | |||
else | |||
if @cluster_hash['k8s_infra']["release_type"]=="kubespray" then | |||
latest = ks.latest_kubespray_release |
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.
indent these lines
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.
In the file it looks as follows - I think that's correct?
else
if @cluster_hash['k8s_infra']["release_type"]=="kubespray" then
latest = ks.latest_kubespray_release
ks.update_kubespray(latest)
end
@@ -153,6 +153,10 @@ class K8sInfra < Thor | |||
if options['dry-run'] then | |||
puts "Dry-run successfully completed" | |||
else | |||
if @cluster_hash['k8s_infra']["release_type"]=="kubespray" then | |||
latest = ks.latest_kubespray_release | |||
ks.update_kubespray(latest) |
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.
updating kubespray itself every time might be a good idea even if using the latest stable K8s release from upstream.
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 can be done. What about the addition of Multus and CNI plugins in the installation? Should that be part of default, or should it be kept as a separate e.g. "release" similar to how it is with dynamic Kubespray/K8s now?
ks = Kubespray.new(@cluster_hash) | ||
ks_version = ks.latest_kubespray_release | ||
k8s_version = ks.latest_supported_kubernetes(ks_version) | ||
kubernetes_release = k8s_version + "\n" |
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.
are the newlines necessary?
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 is used to ensure the configuration file prints properly. I noticed lines were combined without it. I added it here as it is only a problem when kubernetes_release
and stable_k8s_release
are fetched dynamically.
With the release of v2.13, previous issues have been fixed
Previous workarounds for Kubespray v2.12 have been removed, since they are all fixed with the most recent v2.13 |
Description
Adds dynamic update of Kubespray at provisioning stage.
The version will be the most recent release of Kubespray. In addition, the Kubernetes version is based on the most recent supported version in Kubespray.
The Kubernetes version is fetched during the
generate_config
stage, while Kubespray is updated in theprovision
stage.To utilize the dynamic update, release type must be specified as "kubespray" when generating the configuration file
In addition to the dynamic update, a few patches to the Kubespray code are also included.
Context
With the existing image, the newest (stable) Kubernetes release is deployed. While this might be unofficially supported in the most recent Kubespray release, this cannot be guaranteed.
The changes are done based on observations in CNF Testbed, which deploys Kubernetes with Multus and CNI plugins by default. Due to this, a small set of patches are included to the Kubespray code, when deploying with the "kubespray" release-type.
Issues:
#10
cncf/cnf-testbed#344
cncf/cnf-testbed#345
How Has This Been Tested?
Types of changes
Checklist: