-
Notifications
You must be signed in to change notification settings - Fork 3
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
bug: istio injected access pods fail to pass istio-validation #27
Labels
bug
Something isn't working
Comments
diranged
added a commit
that referenced
this issue
Nov 28, 2022
Closes #27. The original code would createOrUpdate the `Pod` resource. The problem is that we were then overwriting the `metadata.annotations` field on updates. The issue we ran into was this... 1. Oz creates the Pod 2. Istio's Webhook Endpoint mutates the Pod Labels and Annotations 3. Oz's secondary reconcile loop immediately comes in and replaces the metadata.annotations with the original empty annotations 4. Istio doesn't re-apply the annotations because the metadata.labels were mutated and indicate that the webhook has already happened. 5. Istio-validation container won't start up
diranged
added a commit
that referenced
this issue
Nov 28, 2022
Closes #27. The original code would createOrUpdate the `Pod` resource. The problem is that we were then overwriting the `metadata.annotations` field on updates. The issue we ran into was this... 1. Oz creates the Pod 2. Istio's Webhook Endpoint mutates the Pod Labels and Annotations 3. Oz's secondary reconcile loop immediately comes in and replaces the metadata.annotations with the original empty annotations 4. Istio doesn't re-apply the annotations because the metadata.labels were mutated and indicate that the webhook has already happened. 5. Istio-validation container won't start up
diranged
added a commit
that referenced
this issue
Nov 28, 2022
Closes #27. The original code would createOrUpdate the `Pod` resource. The problem is that we were then overwriting the `metadata.annotations` field on updates. The issue we ran into was this... 1. Oz creates the Pod 2. Istio's Webhook Endpoint mutates the Pod Labels and Annotations 3. Oz's secondary reconcile loop immediately comes in and replaces the metadata.annotations with the original empty annotations 4. Istio doesn't re-apply the annotations because the metadata.labels were mutated and indicate that the webhook has already happened. 5. Istio-validation container won't start up
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://istio.slack.com/archives/C37A4KAAD/p1669246550291849
Hey... We're seeing an odd behavior when we use a custom in-house controller to spin up a Pod in a Namespace that has Istio Injection turned on. Fundamentally, our controller is taking a Deployment that works, copying out the spec.template.spec from it, and launching a fresh Pod with that PodSpec. We aren't setting any labels or annotations on the fresh pod (right now). TThis works totally fine for plain pods ... but when we try this on pods in istio-injection=enabled namespaces, we see the istio-validation container fail to work. The errors we get imply there is something wrong with the node, but we know that isn't the case because we have plenty of other workloads on those nodes working fine:
The istio-cni pod logs look stange too... they claim we don't have the annotation in place, but we have the annotation on the namespace itself:
The text was updated successfully, but these errors were encountered: