Skip to content

fix(schema): remove required apiVersion value - #2380

Closed
baprx wants to merge 3 commits into
open-telemetry:mainfrom
baprx:fix/schema-remove-required-field
Closed

fix(schema): remove required apiVersion value#2380
baprx wants to merge 3 commits into
open-telemetry:mainfrom
baprx:fix/schema-remove-required-field

Conversation

@baprx

@baprx baprx commented Aug 30, 2026

Copy link
Copy Markdown

Description

I've just updated the values schema, I wasn't sure if a Chart bump was required, I can revert it if you prefer.
.Values.apiVersion is set to a default value so the JSON schema should not require it to be set in user configurations.

Authorship

  • I, a human, wrote this pull request description myself.

baprx added 2 commits August 30, 2026 11:14
Signed-off-by: Baptiste ROUX <arte.but.posix@gmail.com>
Signed-off-by: Baptiste ROUX <arte.but.posix@gmail.com>
@baprx
baprx requested review from a team, TylerHelmuth, dmitryax and povilasv as code owners August 30, 2026 09:21
@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 30, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

@JaredTan95

Copy link
Copy Markdown
Member

why we need to remove apiversion from schema?

@baprx

baprx commented Sep 5, 2026

Copy link
Copy Markdown
Author

why we need to remove apiversion from schema?

It's not removed it's still here. I removed it from the required fields because the field is an override and if we're fine with using the default value because of this required field we still have to provide it.

@marcschaeferger marcschaeferger added bug Something isn't working chart:collector Issue related to opentelemetry-collector helm chart and removed bug Something isn't working labels Sep 10, 2026
@TylerHelmuth

Copy link
Copy Markdown
Member

@baprx it would be dangerous to remove apiVersion from the required values because a value is necessary to successfully create the deployment/daemonset/statefulset objects. It has a default value tho so the only way to fail the json schema to to null it. Failing in that scenario is good because the resulting render wouldnt be installable.

What issue are you running into with it being required?

@baprx

baprx commented Sep 11, 2026

Copy link
Copy Markdown
Author

@TylerHelmuth the issue is not blocking on my side, just a bit annoying since the schema validation flags the whole file as errored in my IDE because of this field not being explicitly configured but I can ignore it you don't think merging this is a good idea.

I thought this would be an acceptable change since explicitly setting it to null would likely not happen or lead to an error anyway (either erroring because of the schema or because missing to create the deployment/daemonset/statefulset objects).

@TylerHelmuth

Copy link
Copy Markdown
Member

We like to rely on the json schema whenever possible for validation so keep apiVersion required is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chart:collector Issue related to opentelemetry-collector helm chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants