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

Use additionalProperties instead of x-kubernetes-preserve-unknown-fields for Map<String, String> fields #9508

Conversation

scholzj
Copy link
Member

@scholzj scholzj commented Jan 5, 2024

Type of change

  • Enhancement / new feature

Description

This PR changes how we generate the CRD schema for fields with type Map<String, String> where this PR uses the additionalProeprties field instead of x-kubernetes-preserve-unknown-fields. That should help users using toosl such as Terraform that seem to have some weird behavior when dealing with the x-kubernetes-preserve-unknown-fields flag. However, this can be applied only to Map<String, String> and not to Map<String, Object>, so it is not completely clear how much it will help.

This should resolve #7985.

Checklist

  • Write tests
  • Make sure all tests pass
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
  • Reference relevant issue(s) and close them after merging

…lds for Map<String, String> fields - Closes strimzi#7985

Signed-off-by: Jakub Scholz <www@scholzj.com>
@scholzj scholzj added this to the 0.40.0 milestone Jan 5, 2024
@scholzj
Copy link
Member Author

scholzj commented Jan 5, 2024

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@scholzj
Copy link
Member Author

scholzj commented Jan 5, 2024

/azp run upgrade

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@scholzj scholzj marked this pull request as ready for review January 6, 2024 12:45
@scholzj scholzj requested a review from ppatierno January 6, 2024 12:45
@scholzj
Copy link
Member Author

scholzj commented Jan 6, 2024

/azp run kraft-regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@ppatierno ppatierno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scholzj scholzj merged commit 44de3e0 into strimzi:main Jan 6, 2024
33 checks passed
@scholzj scholzj deleted the use-additional-properties-instead-of-preserve-unknown-fields-for-string-maps branch January 6, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants