-
Notifications
You must be signed in to change notification settings - Fork 929
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
External etcd
Support for Karmada Operator - Part 2
#5720
Conversation
@RainbowMango, I gave some thought into how to best implement this part of the feature. Given that @chaosi-zju is doing some great work for standardizing naming conventions, my goal was to not duplicate that work. As such, the approach I took here is intended to:
|
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.
/assign
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.
Generally looks good to me.
But the unit test is failing:
# go test ./operator/pkg/controller/karmada/...
I1023 14:40:51.153174 499685 defaults.go:53] default Karmada Image Version: v0.0.0-master
--- FAIL: TestNewPlannerFor (0.00s)
--- FAIL: TestNewPlannerFor/NewPlannerFor_WithInitAction_PlannerConstructed (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x178edff]
goroutine 42 [running]:
testing.tRunner.func1.2({0x1984860, 0x2c942f0})
/root/.local/share/mise/installs/go/1.22.7/src/testing/testing.go:1631 +0x24a
testing.tRunner.func1()
/root/.local/share/mise/installs/go/1.22.7/src/testing/testing.go:1634 +0x377
panic({0x1984860?, 0x2c942f0?})
/root/.local/share/mise/installs/go/1.22.7/src/runtime/panic.go:770 +0x132
github.com/karmada-io/karmada/operator/pkg.NewInitJob(0xc0001b4a80)
/root/go/src/github.com/karmada-io/karmada/operator/pkg/init.go:123 +0x73f
github.com/karmada-io/karmada/operator/pkg/controller/karmada.NewPlannerFor(0xc000602300, {0x7f57f0111bc8, 0xc000130d20}, 0xc00047c908)
/root/go/src/github.com/karmada-io/karmada/operator/pkg/controller/karmada/planner.go:72 +0x14f
github.com/karmada-io/karmada/operator/pkg/controller/karmada.TestNewPlannerFor.func1(0xc0001c7520)
/root/go/src/github.com/karmada-io/karmada/operator/pkg/controller/karmada/planner_test.go:79 +0x3c
testing.tRunner(0xc0001c7520, 0xc000130e10)
/root/.local/share/mise/installs/go/1.22.7/src/testing/testing.go:1689 +0xfb
created by testing.(*T).Run in goroutine 41
/root/.local/share/mise/installs/go/1.22.7/src/testing/testing.go:1742 +0x390
FAIL github.com/karmada-io/karmada/operator/pkg/controller/karmada 0.024s
operator/pkg/constants/constants.go
Outdated
// EtcClientCredentialsVolumeName defines the name of the volume for the etcd client credentials | ||
EtcClientCredentialsVolumeName = "etcd-client" // #nosec G101 | ||
// EtcClientCredentialsMountPath defines the mount path for the etcd client credentials data | ||
EtcClientCredentialsMountPath = "/etc/karmada/pki/etcd-client" // #nosec G101 |
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.
// EtcClientCredentialsVolumeName defines the name of the volume for the etcd client credentials | |
EtcClientCredentialsVolumeName = "etcd-client" // #nosec G101 | |
// EtcClientCredentialsMountPath defines the mount path for the etcd client credentials data | |
EtcClientCredentialsMountPath = "/etc/karmada/pki/etcd-client" // #nosec G101 | |
// EtcdClientCredentialsVolumeName defines the name of the volume for the etcd client credentials | |
EtcdClientCredentialsVolumeName = "etcd-client-cert" // #nosec G101 | |
// EtcdClientCredentialsMountPath defines the mount path for the etcd client credentials data | |
EtcdClientCredentialsMountPath = "/etc/karmada/pki/etcd-client" // #nosec G101 |
const name: s/Etc/Etcd
volume name: s/etcd-client/etcd-client-cert
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5720 +/- ##
==========================================
+ Coverage 40.52% 40.85% +0.32%
==========================================
Files 650 651 +1
Lines 55184 55256 +72
==========================================
+ Hits 22365 22573 +208
+ Misses 31386 31241 -145
- Partials 1433 1442 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@RainbowMango , I just pushed changes to address those issues. |
Great! |
Signed-off-by: Joe Nathan Abellard <[email protected]> Onwards! Signed-off-by: Joe Nathan Abellard <[email protected]> Onwards! Signed-off-by: Joe Nathan Abellard <[email protected]> Onwards! Signed-off-by: Joe Nathan Abellard <[email protected]> Onwards! Signed-off-by: Joe Nathan Abellard <[email protected]> Onwards! Signed-off-by: Joe Nathan Abellard <[email protected]> Onwards! Signed-off-by: Joe Nathan Abellard <[email protected]>
cf6a2b4
to
5442736
Compare
Just squashed. |
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @jabellard |
This is amazing! Thank you! |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This is an implementation of this proposal for adding support to the Karmada operator for external etcd cluster connections.
Which issue(s) this PR fixes:
Fixes #5242
Special notes for your reviewer:
Does this PR introduce a user-facing change?: