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

Set request UID when returning admission errors #363

Merged
merged 2 commits into from
Jun 17, 2022

Conversation

tvoran
Copy link
Member

@tvoran tvoran commented Jun 16, 2022

Otherwise the error returned from vault-k8s will not show up in the events of the object that owns the Pod (ex. a ReplicaSet). I suspect the UID started being required with v1 of the admission API.

Currently without this patch, kube-apiserver logs something like this when vault-k8s returns an AdmissionError:

E0616 23:21:07.674311       1 dispatcher.go:184] failed calling webhook "vault.hashicorp.com": received invalid webhook response: expected response.uid="3d19f57a-2a0e-4bc9-8a0e-d54c413b21e5", got ""

Otherwise the error returned from vault-k8s will not show up in the
events of the object that owns the Pod (ex. a ReplicaSet). I suspect
the UID started being required with v1 of the admission API.
@tvoran tvoran requested review from swenson and tomhjp June 16, 2022 23:23
Copy link

@swenson swenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tvoran tvoran merged commit 101a82a into main Jun 17, 2022
@tvoran tvoran deleted the VAULT-6571/return-admission-errors branch June 17, 2022 17:32
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