-
Notifications
You must be signed in to change notification settings - Fork 94
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
🐛 Regenerate the hub kubeconfig secret if the cluster name of the current context changes #473
🐛 Regenerate the hub kubeconfig secret if the cluster name of the current context changes #473
Conversation
/cc @elgnay @qiujian16 |
/hold |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #473 +/- ##
==========================================
- Coverage 62.72% 62.71% -0.01%
==========================================
Files 136 136
Lines 11573 11578 +5
==========================================
+ Hits 7259 7261 +2
- Misses 3546 3549 +3
Partials 768 768
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
8513589
to
657dc12
Compare
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 need an integration or e2e to test the cluster name change
…nt context changes Signed-off-by: zhujian <jiazhu@redhat.com>
657dc12
to
ad2f9e0
Compare
FYI @xuezhaojun this should also be considered in your PR |
pkg/registration/spoke/spokeagent.go
Outdated
@@ -236,11 +236,12 @@ func (o *SpokeAgentConfig) RunSpokeAgentWithSpokeInformers(ctx context.Context, | |||
managementKubeClient, 10*time.Minute, informers.WithNamespace(o.agentOptions.ComponentNamespace)) | |||
|
|||
// create a kubeconfig with references to the key/cert files in the same secret | |||
srever, proxyURL, caData, err := parseKubeconfig(o.registrationOption.BootstrapKubeconfig) | |||
contextClusterName, srever, proxyURL, caData, err := parseKubeconfig(o.registrationOption.BootstrapKubeconfig) |
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.
srever -> server
/lgtm |
Signed-off-by: zhujian <jiazhu@redhat.com>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiujian16, zhujian7 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 |
/unhold |
66d4e78
into
open-cluster-management-io:main
…rent context changes (open-cluster-management-io#473) * Regenerate the hub kubeconfig secret if the cluster name of the current context changes Signed-off-by: zhujian <jiazhu@redhat.com> * Add an integration test Signed-off-by: zhujian <jiazhu@redhat.com> --------- Signed-off-by: zhujian <jiazhu@redhat.com>
…rent context changes (open-cluster-management-io#473) (#71) * Regenerate the hub kubeconfig secret if the cluster name of the current context changes * Add an integration test --------- Signed-off-by: zhujian <jiazhu@redhat.com>
Summary
Related issue(s)
Fixes #