-
Notifications
You must be signed in to change notification settings - Fork 335
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
Configmap for defaults #306
Labels
Comments
I think what I'd like to see here is changing these interfaces to pass a |
mattmoor
added a commit
to mattmoor/pkg
that referenced
this issue
Mar 20, 2019
mattmoor
added a commit
to mattmoor/pkg
that referenced
this issue
Mar 27, 2019
… context. Clients of webhook can now decorate the request context with additional metadata via: ``` ac := &AdmissionController{ ... // As before WithContext: func(ctx context.Context) context.Context { // logic to attach stuff to ctx } } ``` This metadata can then be accessed off of the context in methods like `SetDefaults` and `Validate` on types registered as webhook handlers. Fixes: knative#306
mattmoor
added a commit
to mattmoor/pkg
that referenced
this issue
Mar 27, 2019
… context. Clients of webhook can now decorate the request context with additional metadata via: ``` ac := &AdmissionController{ ... // As before WithContext: func(ctx context.Context) context.Context { // logic to attach stuff to ctx } } ``` This metadata can then be accessed off of the context in methods like `SetDefaults` and `Validate` on types registered as webhook handlers. Fixes: knative#306
knative-prow-robot
pushed a commit
that referenced
this issue
Mar 27, 2019
… context. (#342) Clients of webhook can now decorate the request context with additional metadata via: ``` ac := &AdmissionController{ ... // As before WithContext: func(ctx context.Context) context.Context { // logic to attach stuff to ctx } } ``` This metadata can then be accessed off of the context in methods like `SetDefaults` and `Validate` on types registered as webhook handlers. Fixes: #306
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
I would like to be able to use a config map when setting defaults in the webhook.
Actual Behavior
However, because the webhook is common and abstracted, I cannot construct one and get it through to the defaulting function. E.g. I would like to pass in a config map watcher here and have that config map passed to the
SetDefaults
function here.Additional Info
I used a package scoped var to work around this limitation in knative/serving#3103.
The text was updated successfully, but these errors were encountered: