-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
injector: add new injectedAnnotations to support PSP #17334
injector: add new injectedAnnotations to support PSP #17334
Conversation
Add a new injectedAnnotations setting for the injector. Any annotations here will be added to the final pod spec. This is required for PSPs to work. See istio#17331 for details. Note - a lot of changes here are to existing tests just to allow setting all config options on the webhook rather than just the template.
pkg/kube/inject/webhook.go
Outdated
@@ -460,7 +461,16 @@ func addLabels(target map[string]string, added map[string]string) []rfc6902Patch | |||
} | |||
|
|||
func updateAnnotation(target map[string]string, added map[string]string) (patch []rfc6902PatchOperation) { | |||
for key, value := range added { | |||
log.Errorf("howardjohn: added %v", added) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this debugging message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is his secret plan for becoming famous and getting his name printed on all the elasticsearches and splunks in the planet :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You caught me... just reverted
/retest |
@rshriram mind approving the changes to injector? (we should probably add an owner to this) |
/test gencheck_istio |
/retest |
I can't for the life of me figure out the syntax for passing in values to the sidecarInjectorWebhook.injectedAnnotations parameter, to set the apparmor annotation 🙂My issue is that the "key" part contains dot-notation so it attempts to split it up no matter how I try to encapsulate it Using Helm I think the proper way is to encapsulate it in quotes and escape dots
However this results in a mess in the actual manifest
Doesn't matter if I try to escape the dots or not Thanks! |
@thecodejunkie adding complex stuff like this is really painful with
@richardwxn is this the expected behavior? |
@howardjohn thanks for the update! I believe setting it with |
Yeah the istioctl set is not as complete as helm, might not be supported. Let me open an issue for this so we don't loose the info here |
@howardjohn awesome! Thanks What would be the proper way to move the
|
@thecodejunkie youll want to do
The --set path is basically just a flattened version of the ICP CRD. It is admittedly a bit confusing where things should be under |
Thanks! I guess one way to think about it is if it's in a "sub-chart" then it goes under |
* istio#16223 * istio#16272 * istio#16187 * istio#16466 * istio#16634 * istio#16594 * istio#16666 * istio#16483 * istio#16820 * istio#16842 * istio#16852 * istio#16835 * istio#16863 * istio#16892 * istio#16991 * istio#16957 * istio#17013 * istio#17134 * istio#17155 * istio#17235 * istio#17342 * istio#17477 * istio#17615 * istio#17334 * istio#17708 * istio#17737 * Fix injection template * Fix quoting * Fix test values * Add accidentally deleted affinity
Add a new injectedAnnotations setting for the injector. Any annotations
here will be added to the final pod spec. This is required for PSPs to
work. See #17331 for details.
Note - a lot of changes here are to existing tests just to allow setting
all config options on the webhook rather than just the template.
Fixes #17331