-
Notifications
You must be signed in to change notification settings - Fork 499
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
Migrate Kubernetes StatefulSet to Advanced StatefulSet automatically #1580
Conversation
@@ -704,7 +704,7 @@ var _ = ginkgo.Describe("[tidb-operator] TiDBCluster", func() { | |||
}) | |||
|
|||
ginkgo.It("should be operable without helm [API]", func() { | |||
tc := fixture.GetTidbCluster(ns, "plain-cr", "v2.1.16") | |||
tc := fixture.GetTidbCluster(ns, "plain-cr", utilimage.TiDBV2Version) |
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.
use shared version to reduce the total images we used in e2e
Signed-off-by: Yecheng Fu <[email protected]>
/run-e2e-tests |
1 similar comment
/run-e2e-tests |
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.
The rest LGTM
tests/e2e/tidbcluster/serial.go
Outdated
defer func() { | ||
// ginkgo.By("Uninstall tidb-operator") | ||
// oa.CleanOperatorOrDie(ocfg) | ||
// ginkgo.By("Uninstalling CRDs") | ||
// oa.CleanCRDOrDie() | ||
}() |
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.
remove this or add a comment
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, I should uncomment 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.
done
pkg/upgrader/upgrader.go
Outdated
klog.Infof("Upgrader: found %d Kubernetes StatefulSets, trying to migrate one by one", len(stsList.Items)) | ||
for _, sts := range stsList.Items { | ||
_, err := helper.Upgrade(u.kubeCli, u.asCli, &sts) | ||
if err != nil { | ||
return err | ||
} | ||
klog.Infof("Upgrader: successfully migrated Kubernetes StatefulSet %s/%s", sts.Namespace, sts.Name) |
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 only migrate statefulset owned by tidbcluster
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.
good catch!
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.
fixed in d9f0d8e
Signed-off-by: Yecheng Fu <[email protected]>
@cofyc Could add some details to explain how |
The Rest LGTM |
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.
LGTM
sure, the basic procedure is like this:
|
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.
LGTM
cherry pick to release-1.1 in PR #1583 |
…1580) (#1583) * Upgrade to Advanced StatefulSet automatically Signed-off-by: Yecheng Fu <[email protected]> * we should only migrate statefulsets owned by tidbcluster Signed-off-by: Yecheng Fu <[email protected]> Co-authored-by: Yecheng Fu <[email protected]>
Signed-off-by: Yecheng Fu [email protected]
What problem does this PR solve?
fixes #1115
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Related changes
Does this PR introduce a user-facing change?: