-
Notifications
You must be signed in to change notification settings - Fork 197
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
Make cilium install idempotent #206
Conversation
This PR makes the command cilium install idempotent. It checks the error returned from the API and continues in case the resource has been created already. Fixes: cilium#205 Signed-off-by: Lorenzo Fundaró <lorenzofundaro@gmail.com>
No tests yet, since there remains the question whether |
From the issue reactions, it looks like it would be appreciated :-) Could you update the PR with tests? I switched to draft mode in the meantime. |
sure 👍 . I'll ping you back when I have something to review. Cheers. |
@pchaigno, one question, in this PR we are skipping the installation of certificates if we see there is a resource already there. Is this the behavior that we want ? I'm thinking some edge cases:
wdyt ? I'm leaning towards |
AFAIU, option 1 also means the command won't actually be idempotent. Probably worth asking the wider community for opinions on #development (although note many folks are currently OOO with the long weekend). |
yes, we would lose idempotency, but if option 2 is more important then we may as well forget about that property. I will ask on a wider forum. Cheers ! |
Making As discussed on Slack, introducing skips does not add idempotency. It will cause headaches when we make this install routine create more resources and a user runs |
I would lean towards this approach. In practical terms, it yields the same value as merging I'll ping you both when I have a commit. Cheers ! |
[No tests yet, waiting for discussion with Authors]
This PR makes the command cilium install idempotent.
It checks the error returned from the API and continues
in case the resource has been created already.
Fixes: #205
Signed-off-by: Lorenzo Fundaró lorenzofundaro@gmail.com