-
Notifications
You must be signed in to change notification settings - Fork 6
fix(api): use correct helm client k8s version #2751
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
fix(api): use correct helm client k8s version #2751
Conversation
return nil | ||
} | ||
|
||
k8sVersion, err := m.getK8sVersion() |
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.
edge case: this logic can break later on upgrades if we start to deploy the app first before upgrading infra. for now it's fine
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.
why would we install the app before upgrading the infra? is this how it works today? i could see running the app preflights before installing the infra.
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.
Ah preflights is a good point. No that's not how it works today, we deploy infra first today
return manifests, nil | ||
} | ||
|
||
func (m *appReleaseManager) setupHelmClient() error { |
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 we should break this template.go file down later on, it feels overloaded now
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.
moved this to the util.go file
appreleasemanager.WithReleaseData(controller.releaseData), | ||
appreleasemanager.WithLicense(license), | ||
appreleasemanager.WithPrivateCACertConfigMapName(controller.privateCACertConfigMapName), | ||
appreleasemanager.WithK8sVersion(controller.k8sVersion), |
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.
this is only passing the version to the release manager, not the install manager. is that correct?
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.
Hmm does the install manager assume a linux target and uses the k0s version? If so then it should be fixed to follow the pattern in this PR.
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.
updated so they both use it
This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID. Online Installer:
Airgap Installer (may take a few minutes before the airgap bundle is built):
Happy debugging! |
} | ||
|
||
k8sVersion := m.k8sVersion | ||
if k8sVersion == "" { |
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 feel this is going to be hard to debug if the caller forgets to pass the k8s version. what if we make it a required option?
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.
updated
* fix(api): use correct helm client k8s version * f * use embedded k0s version for linux installs * use embedded k0s version for linux installs * pass in k8s version to app release manager when target is kubernetes * f
* fix(api): use correct helm client k8s version * f * use embedded k0s version for linux installs * use embedded k0s version for linux installs * pass in k8s version to app release manager when target is kubernetes * f
What this PR does / why we need it:
App release manager needs to use a helm client with the k8s version so that it can properly render templates using KubeVersion helm built-in.
Additionally, app install manager is using the incorrect k8s version when instantiating the helm client for target=kubernetes. It is using the version from the build when it should be using the version discovered from the cluster. This makes it so the version is always retrieved from the cluster.
Which issue(s) this PR fixes:
Does this PR require a test?
Does this PR require a release note?
Does this PR require documentation?