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

Error of admission webhook prevents scaling of deployment despite falurePolicy: Ignore #802

Closed
trutty opened this issue Mar 31, 2022 · 2 comments · Fixed by #811
Closed
Labels
area:auto-instrumentation Issues for auto-instrumentation area:collector Issues for deploying collector

Comments

@trutty
Copy link

trutty commented Mar 31, 2022

We use auto-instrumentation via annotation with our pods. For that, there has to be an Instrumentation CRD in the same namespace as the pod. If this is not the case the following error occurs in the opentelemetry-operator:

msg":"failed to select an OpenTelemetry Instrumentation instance for this pod","namespace":"","name":"","error":"no OpenTelemetry Instrumentation instances available"

The error message is fine, but what happens is that the pod/deployment does not get scaled up because the addmission webhook denies the request with the event:

message: 'Error creating: admission webhook "mpod.kb.io" denied the request: no OpenTelemetry Instrumentation instances available'

because of

pod, err = m.Mutate(ctx, ns, pod)
if err != nil {
return admission.Errored(http.StatusInternalServerError, err)
}

From my understanding, this error should be ignored and the respective deployment/pod (which has the auto-instumentation annotation) should be scaled up nevertheless, albeit without the mutation, because the admission webhook has failurePolicy: Ignore. Am I missing something?

The instrumentation feature is not critical for the deployment (at least in my context), so I would rather have a running pod without instrumentation than no pod at all.

@pavolloffay
Copy link
Member

You are right, we shouldn't be blocking the deployment I think that should be the default behavior.

If there are folks that would like to fail the deployment we could add it as a config on the operator.

@pavolloffay pavolloffay added the area:auto-instrumentation Issues for auto-instrumentation label Mar 31, 2022
@pavolloffay pavolloffay added the area:collector Issues for deploying collector label Apr 14, 2022
@pavolloffay
Copy link
Member

Adding collector label as the issue should be present for the collector as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:auto-instrumentation Issues for auto-instrumentation area:collector Issues for deploying collector
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants