Skip to content
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

fix(ca/builtin): be less verbose when creating CA secrets #6217

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

michaelbeaumont
Copy link
Contributor

There's always a race condition possible using the k8s store between checking whether a resource exists and trying to create it, leading to superfluous errors on startup like:

2023-03-07T10:58:59.597Z	ERROR	kube-manager	Reconciler error	{"controller": "mesh", "controllerGroup": "kuma.io", "controllerKind": "Mesh", "Mesh": {"name":"default"}, "namespace": "", "name": "default", "reconcileID": "90c63204-743b-48a2-b37b-0082ac351117", "error": "could not update default mesh resources: could not ensure CA backends of type builtin: failed to create CA for mesh \"default\" and backend \"ca-1\": Resource already exists: type=\"Secret\" name=\"default.ca-builtin-cert-ca-1\" mesh=\"default\"

We can leave the initial check in to avoid creating a CA if unnecessary.

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues --
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Tests (Unit test, E2E tests, manual test on universal and k8s) --
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

@michaelbeaumont michaelbeaumont requested review from a team, slonka, Automaat and lahabana and removed request for a team March 7, 2023 11:23
@michaelbeaumont michaelbeaumont merged commit 3b5e8db into kumahq:master Mar 7, 2023
@michaelbeaumont michaelbeaumont deleted the fix/ca_verbose branch March 7, 2023 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants