-
Notifications
You must be signed in to change notification settings - Fork 326
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 support for TransparentProxy.DialedDirectly #533
Conversation
b7dfc08
to
8f0a394
Compare
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 will work once Consul is released that has the MeshServicesOnly
field name changes.
@@ -162,7 +162,7 @@ ifeq (, $(shell which controller-gen)) | |||
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\ | |||
cd $$CONTROLLER_GEN_TMP_DIR ;\ | |||
go mod init tmp ;\ | |||
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.5.0 ;\ | |||
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.0 ;\ |
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 the error I was getting:
make ctrl-manifests
/Users/lkysow/go/bin/controller-gen "crd:trivialVersions=true,allowDangerousTypes=true" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
github.com/hashicorp/consul-k8s/api/v1alpha1:-: conflicting types in allOf branches in schema: string vs object
Error: not all generators ran successfully
run `controller-gen crd:trivialVersions=true,allowDangerousTypes=true rbac:roleName=manager-role webhook paths=./... output:crd:artifacts:config=config/crd/bases -w` to see all available markers, or `controller-gen crd:trivialVersions=true,allowDangerousTypes=true rbac:roleName=manager-role webhook paths=./... output:crd:artifacts:config=config/crd/bases -h` for usage
make: *** [ctrl-manifests] Error 1
input *ProxyDefaults | ||
expectedErrMsg string | ||
}{ | ||
"meshgateway.mode": { |
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.
these cases are copied from servicedefaults where they share the same fields
9818f9d
to
9173c51
Compare
* renamed `types.go` => `shared_type.go` to better reflect what that file contains. * Added `DialedDirectly` field to `TransparentProxy` struct * Renamed `CatalogDestinationsOnly` to `MeshDestinationsOnly` to match Consul renaming (hashicorp/consul#10397) * Added tests to validate for ProxyDefaults since that config entry now has more fields. The validate methods were technically tested through ServiceDefaults tests but I added them to ProxyDefaults since they both rely on that shared validation. * Fixed validation for OutboundListenerPort so that it returned the port as the error rather than the entire TransparentProxy struct. * Updated Consul api package to latest * Updated controller-runtime to 0.6.0 because I was getting an error on 0.5.0. * Regenerated YAML CRDs
e779707
to
72edde4
Compare
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.
NICE!
5c0ebd7
to
b7a7d94
Compare
I did a |
b7a7d94
to
98ca3f1
Compare
…s for the gateway deployment templates (hashicorp#533) * update resource settings for the gateways for lifecycle sidecar and init containers
types.go
=>shared_type.go
to better reflect what thatfile contains.
DialedDirectly
field toTransparentProxy
structCatalogDestinationsOnly
toMeshDestinationsOnly
to matchConsul renaming (Rename CatalogDestinationsOnly consul#10397)
has more fields. The validate methods were technically tested through
ServiceDefaults tests but I added them to ProxyDefaults since they both
rely on that shared validation.
as the error rather than the entire TransparentProxy struct.
0.5.0.
How I've tested this PR:
How I expect reviewers to test this PR:
Checklist: