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

feat(k8s): add a configuration option to list allowed service accounts #6505

Merged

Conversation

slonka
Copy link
Contributor

@slonka slonka commented Apr 11, 2023

Add a configuration option to list allowed service accounts for ValidatingAdmissionWebhook. This is needed for storageversionmigrator that creates modification request (that actually don't modify anything from the user perspective "...gets the object, then writes it back to the API server without modification.") .

fixes #6504

Tested locally with KUMA_RUNTIME_KUBERNETES_ALLOWED_SERVICE_ACCOUNTS=system:serviceaccount:kube-system:default and it works, storageversionmigrator stopped spinning and got:


I0411 09:35:51.902047       1 kubemigrator.go:127] meshes.kuma.io-tdj5q: migration succeeded
I0411 09:35:52.912257       1 kubemigrator.go:110] priorityclasses.scheduling.k8s.io-492zv: migration running
I0411 09:35:52.947596       1 kubemigrator.go:127] priorityclasses.scheduling.k8s.io-492zv: migration succeeded
...

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? -- not sure?
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

…s for ValidatingAdmissionWebhook

Signed-off-by: slonka <slonka@users.noreply.github.com>
Signed-off-by: slonka <slonka@users.noreply.github.com>
Signed-off-by: slonka <slonka@users.noreply.github.com>
@slonka slonka marked this pull request as ready for review April 11, 2023 07:51
@slonka slonka requested review from a team, michaelbeaumont, Automaat and lukidzi and removed request for a team and michaelbeaumont April 11, 2023 07:51
Signed-off-by: slonka <slonka@users.noreply.github.com>
Signed-off-by: slonka <slonka@users.noreply.github.com>
Signed-off-by: slonka <slonka@users.noreply.github.com>
Signed-off-by: slonka <slonka@users.noreply.github.com>
@slonka slonka merged commit bec905a into kumahq:release-2.2 Apr 11, 2023
@slonka
Copy link
Contributor Author

slonka commented Apr 12, 2023

@lahabana should I backport this to all active releases? It doesn't panic / crash or hang but it does spin consuming a lot of CPU.

@lahabana
Copy link
Contributor

I'd do without

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.

3 participants