Skip to content

Commit

Permalink
Increased validating webhook timeout in tests and added note to full …
Browse files Browse the repository at this point in the history
…envoy validation option
  • Loading branch information
ryanrolds committed Nov 14, 2024
1 parent 19c5c4b commit 45ea63b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions projects/gloo/api/v1/settings.proto
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,10 @@ message GatewayOptions {
//
// This feature is disabled by default and is not recommended for production deployments unless
// the performance implications are well understood and acceptable.
//
// Large configurations can take more than 10 seconds to validate, causing the validating webhook to timeout.
// When enabling this feature, consider increasing the timeout for the validating webhook
// (`.Values.gateway.validation.webhook.timeoutSeconds`).
google.protobuf.BoolValue full_envoy_validation = 14;
}

Expand Down
4 changes: 4 additions & 0 deletions projects/gloo/pkg/api/v1/settings.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,13 @@ func (s *testingSuite) TestRejectTransformation() {
// this should be rejected
output, err = s.testInstallation.Actions.Kubectl().ApplyFileWithOutput(s.ctx, validation.VSTransformationExtractors, "-n", s.testInstallation.Metadata.InstallNamespace)
s.Assert().Error(err)
s.Assert().Contains(output, "envoy validation mode output: error initializing configuration '': Failed to parse response template: group 1 requested for regex with only 0 sub groups")
s.Assert().Contains(output, "Failed to parse response template: group 1 requested for regex with only 0 sub groups")

// Single replace mode -- rejects invalid subgroup in transformation
// note that the regex has no subgroups, but we are trying to extract the first subgroup
// this should be rejected
output, err = s.testInstallation.Actions.Kubectl().ApplyFileWithOutput(s.ctx, validation.VSTransformationSingleReplace, "-n", s.testInstallation.Metadata.InstallNamespace)
s.Assert().Error(err)
s.Assert().Contains(output, "envoy validation mode output: error initializing configuration '': Failed to parse response template: group 1 requested for regex with only 0 sub groups")
s.Assert().Contains(output, "Failed to parse response template: group 1 requested for regex with only 0 sub groups")

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ gateway:
allowWarnings: true # These tests to not need to fail on warnings
# transformation validation is disabled because full envoy validation is enabled.
disableTransformationValidation: true
webhook:
timeoutSeconds: 30 # We are seeing Envoy take 10s of seconds to validate some of the larger configurations
fullEnvoyValidation: true

0 comments on commit 45ea63b

Please sign in to comment.