-
Notifications
You must be signed in to change notification settings - Fork 295
Failing-fast or warn when tried to update cluster created with older kube-aws #585
Comments
Couldn't we add a metadata to EDIT: That's what I'm doing here; I manually added a comment at the top of my |
@danielfm Thanks for the suggestion. That sounds good to me 👍 |
I think users may just update it in the yaml if it's in there? Especially if they use the git flow style mechanism of updating. Having said that, ideally we only want to prevent updates where we know running update will break. |
Good point. Then, we'd better add a cfn tag via a template snippet like |
@mumoshu if we do that though, how do we support upgrade path for cases that do work? We reject by default unless an update is allowed? Or allow by default unless an update is disallowed? |
@c-knowles I guess the former is better because then we can ensure that only upgrade paths tested by contributors can be allowed explicitly in code. |
{{ .KubeAwsVersion }} is not informative enough as it mightbe just a git commit of a private fork :) |
@redbaron Thanks for the feedback 👍
|
how kube-aws itself defines which version is updatable and which is not? |
@redbaron Probably in a golang type and func which is used like: func (g UpdateGate) ValidateClusterUpgradableTo(v Version) error {
// All the upgrade paths tested by contributors
testedUpgradePaths := TestedUpgradePaths{
// Tested by @mumoshu
TestedUpgradePath{ClusterVersion: NewVersion("v0.9.5"), KubeAwsVersion: NewVersion("v0.9.6")},
// Tested by @redbaron
TestedUpgradePath{ClusterVersion: NewVersion("v0.9.5"), KubeAwsVersion: NewVersion("v0.9.7")},
}
for p, _ := range testedUpgdatePaths {
if p.MatchVersions(g.ClusterKubeAwsVersion, v) {
return nil
}
}
return fmt.Errorf("Automatic upgrade path from kube-aws %s to %s is not tested: Updating a cluster created by kube-aws %s with kube-aws %s is not not allowed.", g.ClusterKubeAwsVersion, v, g.ClusterKubeAwsVersion, v))
}
// And somewhere in the code path of `kube-aws update`
if err := NewUpdateGate(clusterKubeAwsVersion).ValidateUpgradableTo(kubeAwsVersion); err != nil {
return err
} |
@redbaron Does my idea make sense to you? I'd appreciate your feedback 🙇 |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
According to #455, you need to recreate your cluster to upgrade kube-aws as of today.
However, I believe some people are still getting into trouble trying to run
kube-aws update
with newer kube-aws on their old clusters.Making kube-aws failing fast when tried to do so would allow people to notice the fact.
The text was updated successfully, but these errors were encountered: