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

Auto-instrumentation - never ending pod mutation #940

Closed
mat-rumian opened this issue Jun 22, 2022 · 1 comment · Fixed by #953
Closed

Auto-instrumentation - never ending pod mutation #940

mat-rumian opened this issue Jun 22, 2022 · 1 comment · Fixed by #953
Labels
area:auto-instrumentation Issues for auto-instrumentation

Comments

@mat-rumian
Copy link
Contributor

mat-rumian commented Jun 22, 2022

Environment:

  • OpenTelemetry-Operator deployed 0.52.0
  • some other operator which is modifying environment variables of the pod container

Error Flow:

  1. OT Operator adds environment variables, volume and init container with auto-instrumentation
  2. other operator takes the same pod and adds some other environment variables
  3. OT Operator detects changes in the pod and try to update it (env vars)
  4. other operator again detect changes and change env vars
  5. and so on...

Final error log from k8s:

Failed to annotate pod with branch ENI details: Pod "test-pod-64cf7b8d5b-j8zbv" is invalid: spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlineSeconds` or `spec.tolerations` (only additions to existing tolerations) 

Expected flow for OT Operator:

  1. OT Operator checks (before pod mutation) if instrumentation is configured for pod
  2. OT Operator adds environment variables, volume and init container with auto-instrumentation
  3. other operator add applies his stuff
  4. OT Operator doesn't make any other changes as pod is already instrumented
@mat-rumian
Copy link
Contributor Author

@pavolloffay I will be happy to help with this as already investigated the issue. I'm not sure about solution, how should we check if pod is already mutated by OT Operator:

  1. check if env vars are already configured?
  2. check if init container is already configured?
  3. introduce additional annotation to the pod and check if exists (add annotation to the pod after instrumentation configuration part)
  4. something else?

@pavolloffay pavolloffay added the area:auto-instrumentation Issues for auto-instrumentation label Jun 29, 2022
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants