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

Allow unstructured schema for the ProxyDefaults CRD #495

Merged
merged 2 commits into from
Apr 20, 2021

Conversation

ishustava
Copy link
Contributor

@ishustava ishustava commented Apr 20, 2021

Prior to apiextensions.k8s.io/v1, structured schema was optional for CRD spec, but now it is required. Since config field can have arbitrary keys, we need to tell Kubernetes to allow that explicitly now that we've upgraded from v1beta1 to v1.

Changes proposed in this PR:

  • Set x-kubernetes-preserve-unknown-fields to true for the config field in ProxyDefaults

How I've tested this PR:
by running acceptance tests

How I expect reviewers to test this PR:
code review (acceptance tests in hashicorp/consul-helm#921)

Checklist:

  • Tests added
  • CHANGELOG entry added (HashiCorp engineers only, community PRs should not add a changelog entry)

Copy link
Contributor

@thisisnotashwin thisisnotashwin left a comment

Choose a reason for hiding this comment

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

🙏 thanks so much!!

@ishustava ishustava requested review from a team, lkysow and kschoche and removed request for a team and kschoche April 20, 2021 21:55
Copy link
Member

@lkysow lkysow left a comment

Choose a reason for hiding this comment

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

🚀

@ishustava ishustava merged commit 896c96b into master Apr 20, 2021
@ishustava ishustava deleted the allow-unstructured-schema branch April 20, 2021 22:38
ishustava added a commit to hashicorp/consul-helm that referenced this pull request Apr 20, 2021
Prior to apiextensions.k8s.io/v1, structured schema was optional for CRD spec, but now it is required. Since config field can have arbitrary keys, we need to tell Kubernetes to allow that explicitly now that we've upgraded from v1beta1 to v1.

* Update CRD schema for ProxyDefaults based on new generated code from hashicorp/consul-k8s#495
 * Update acceptance test for proxy defaults to set all possible fields. For the config field, we're not setting all acceptable values but I think it's OK since we're trying to check that at least one is accepted by Consul.
ndhanushkodi pushed a commit to ndhanushkodi/consul-k8s that referenced this pull request Jul 9, 2021
…ork-with-acls

Update helm test to validate successful installation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/crds type/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants