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

Conversion webhook namespace is not updated #3110

Open
aelmekeev opened this issue Jul 8, 2024 · 3 comments
Open

Conversion webhook namespace is not updated #3110

aelmekeev opened this issue Jul 8, 2024 · 3 comments
Labels
area:collector Issues for deploying collector bug Something isn't working

Comments

@aelmekeev
Copy link

aelmekeev commented Jul 8, 2024

Component(s)

No response

What happened?

Description

An attempt to upgrade from 0.96 to 0.102 has failed for us with:

or: "kubernetes/opentelemetry-operator": error when patching "kubernetes/opentelemetry-operator": conversion webhook for opentelemetry.io/v1alpha1, Kind=OpenTelemetryCollector failed: Post "[https://opentelemetry-operator-webhook-service.system.svc:443/convert?timeout=30s](https://opentelemetry-operator-webhook-service.system.svc/convert?timeout=30s)": service "opentelemetry-operator-webhook-service" not found

The issue is in fact that opentelemetry-operator-webhook-service is deployed in the opentelemetry-operator-system namespace rather than system .

My guess is that it's because of incorrect path here which should be /spec/conversion/webhook/clientConfig/service/namespace and indeed this custom patch resolved an issue for us:

  - target:
      kind: CustomResourceDefinition
      name: opentelemetrycollectors.opentelemetry.io
    patch: |-
      - op: replace
        path: /spec/conversion/webhook/clientConfig/service/namespace
        value: opentelemetry-operator-system

Steps to Reproduce

Upgrade otel collector operator from 0.96 to 0.102. Although I don't quite understand yet why others did not complain.

Expected Result

Successul upgrade.

Actual Result

Kube apply fails with conversion webhook for opentelemetry.io/v1alpha1, Kind=OpenTelemetryCollector failed

Kubernetes Version

1.29.4

Operator version

0.102.0

Collector version

0.102.0

@aelmekeev aelmekeev added bug Something isn't working needs triage labels Jul 8, 2024
@jaronoff97 jaronoff97 added area:collector Issues for deploying collector and removed needs triage labels Jul 8, 2024
@pavolloffay
Copy link
Member

@aelmekeev how did you install the operator?

@aelmekeev
Copy link
Author

@pavolloffay we are doing something like this:

crds

commonLabels:
  app.kubernetes.io/name: opentelemetry-operator

resources:
  - https://github.com/open-telemetry/opentelemetry-operator//config/crd?ref=v0.102.0

operator itself applied after crds

namespace: opentelemetry-operator-system

resources:
  - https://github.com/open-telemetry/opentelemetry-operator/releases/download/v0.102.0/opentelemetry-operator.yaml

@pavolloffay
Copy link
Member

Did you previously install the operator in a different namespace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:collector Issues for deploying collector bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants