-
Notifications
You must be signed in to change notification settings - Fork 533
Fix error on exiting #1332
Fix error on exiting #1332
Conversation
1d7d03f
to
d20cd0f
Compare
/assign @jimmidyson |
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 don't fully agree with the changes proposed herein as I believe the semantics and the implementation should be simpler:
- If
--error-on-existing
is set totrue
and the secret exists, return an error. - If
--error-on-existing
is set tofalse
and the secret exists, just update it.
My main concern is around the update logic that you're introducing here which in my opinion makes the interface more complicated for users to reason about (adding annotations) and error-prone, basically something that might not work as expected.
So in my humble opinion just updating the secret in any case if error-on-existing
is set to false
is just simpler and less error-prone.
@makkes if we don't auto trigger clustercontroller reconcile, the joinedcluster will use old token until it restart or somethingelse trigger reconcile, it will confuse user find real reason if the token not work . |
18edaa7
to
77af1e6
Compare
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
maybe @hectorj2f or @jimmidyson might want to chime in here as well. |
77af1e6
to
fd3efad
Compare
/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
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hectorj2f, huiwq1990, makkes 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 |
What this PR does / why we need it:
When use kubefedctl join cluster setting
error-on-existing=false
andsecret-name
have specify value, it will case secret exist error. Join command demo:Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer: