-
Notifications
You must be signed in to change notification settings - Fork 323
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
Add envoyExtensions field to serviceDefaults and proxyDefaults CRDs #1823
Conversation
27254aa
to
0df18ab
Compare
"meshgateway.mode": { | ||
&ProxyDefaults{ | ||
input: &ProxyDefaults{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can ignore most of these, I just autogenerated the field names rather than leaving them blank
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent!! thanks for also adding the terraform linting 🙏
Have a few comments inline but other than that, it looks really good!! great work on the PR!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:chefkiss:
@@ -239,7 +244,7 @@ func (in *ProxyDefaults) validateConfig(path *field.Path) *field.Error { | |||
} | |||
var outConfig map[string]interface{} | |||
if err := json.Unmarshal(in.Spec.Config, &outConfig); err != nil { | |||
return field.Invalid(path, in.Spec.Config, fmt.Sprintf(`must be valid map value: %s`, err)) | |||
return field.Invalid(path, string(in.Spec.Config), fmt.Sprintf(`must be valid map value: %s`, err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
655f93d
to
19f0f6d
Compare
- Added fields to support EnvoyExtensions - Added missing BalanceInboundConnections field
- most of these changes are parallel to what was done in serviceDefaults - proxyDefaults makes use of the envoyExtension(s) definition in serviceDefaults and also makes use of the validation/toConsul logic defined there
- Added tests for proxyDefault - Added tests for serviceDefault EnvoyExtension test cases should be basically the same for both CRDs
19f0f6d
to
26fd456
Compare
…1823) * updated consul api to the latest * added new ServiceDefault fields to the serviceDefaults CRD - Added fields to support EnvoyExtensions - Added missing BalanceInboundConnections field * added EnvoyExtensions to proxyDefaults CRD - most of these changes are parallel to what was done in serviceDefaults - proxyDefaults makes use of the envoyExtension(s) definition in serviceDefaults and also makes use of the validation/toConsul logic defined there * added tests for new fields - Added tests for proxyDefault - Added tests for serviceDefault - EnvoyExtension test cases should be basically the same for both CRDs * generate the manifests and generate deepcopy * updated the changelog * added CI test to catch bad terraform formatting * formatted terraform files * update contributing doc
NOTE TO THE REVIEWER: I organize my commits so that they're meaningful, I suggest reviewing my code commit by commit. There are a lot of files changed, but some of these are generated/fixed terraform formatting.
Changes proposed in this PR:
This PR adds
envoyExtensions
to theserviceDefaults
andproxyDefaults
CRDs. The goal is to create parity with what is already in Consul:serviceDefaults
proxyDefaults
In addition to adding
envoyExtensions
I also added the following:BalanceInboundConnections
field toserviceDefaults
How I've tested this PR:
proxyDefault
andserviceDefault
resources and verified the validation logic and that they synced correctly with ConsulproxyDefault
andserviceDefault
with the new fieldsHow I expect reviewers to test this PR:
👀
Checklist: