-
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
Backport of [NET-10567] Fix namespace normalization on external registration/ACL Setup for Terminating Gateways into release/1.5.x #4259
Conversation
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes temp seems not to be a GitHub user. Have you signed the CLA already but the status is still pending? Recheck it. |
…Setup for Terminating Gateways (#4224) * fix bug in external service registration ACL creation where namespace is left emtpy in acl policy if not specified in the CRD which results in an invalid acl policy * Remove check for timestamp * update tests! * update to use helper function * all non default working * test cases all working * move wait for it to separate PR * use replace for consul-k8s control-plane * update single namespace test * updated namespaces and destinations test * remove usage of creating terminating gateway config entry creation and external service config entry registration from tests * fix typo * update comment * comment out broken test for the time being * remove unused import and add period to comment * add changelog * fix bug in cache creation for registrations, still debugging issue with termianting gateways and acl roles * fix issue with terminating gateway acl role by moving role modification from registrations controller to terminating gateway controller * appease the linter * add acl status condition to terminating gateways * linter * update config entry terminating gateway tests * Use more robust method of checking if acls are enabled * update config entries controller unit tests to run with acls and without * fix config entries namespaces test setup * fix unused import * fix config entries main test * remove block for deregistering service * fix comment * fix acceptance test registration * handle removing policies when no other gateways reference them * fix terminating gateway configuration for peering connect test * remove unnecessary nodeMeta on fixture, remove unused yaml files from fixtures * fix wildcard service names * use more specific matchers to avoid potential substring collisions * Update .changelog/4224.txt Co-authored-by: Nathan Coleman <[email protected]> * cleaning up from PR review: moving template execution to where it's needed and updating variable names to be more consistent * add comment * fix typo --------- Co-authored-by: Nathan Coleman <[email protected]>
c741fb9
to
7165d48
Compare
} | ||
|
||
mux := http.NewServeMux() | ||
srv := &http.Server{ |
Check warning
Code scanning / Go Modules Scanner
HTTP server insecure configuration Warning
} | ||
|
||
mux := http.NewServeMux() | ||
srv := &http.Server{ |
Check warning
Code scanning / Go Modules Scanner
HTTP server insecure configuration Warning
} | ||
|
||
mux := http.NewServeMux() | ||
srv := &http.Server{ |
Check warning
Code scanning / Go Modules Scanner
HTTP server insecure configuration Warning
} | ||
|
||
mux := http.NewServeMux() | ||
srv := &http.Server{ |
Check warning
Code scanning / Go Modules Scanner
HTTP server insecure configuration Warning
Backport
This PR is auto-generated from #4224 to be assessed for backporting due to the inclusion of the label backport/1.5.x.
🚨
The person who merged in the original PR is:
@jm96441n
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.
The below text is copied from the body of the original PR.
Changes proposed in this PR
How I've tested this PR
How I expect reviewers to test this PR
make docker-dev
CONSUL_K8S_CHART_LOCATION
variable in thestart.sh
file to point to the helm charts in your local version of consul-start.sh
file (this requires you to havekind
andyq
on your machine, and you'll need to runchmod +x ./start.sh
)consul acl role list
and you will see both terminating gateways with the term gateway policy and the zoidberg and nibbler policiesconsul acl policy read -name zoidberg-write-policy
to see the policy include the namespacecurl localhost:1234
to see the request to zoidberg go through, runcurl localhost:5678
to see the request to nibbler go throughtermgw.yaml
file to no longer reference the zoidberg service and apply the fileconsul acl role list
and see the first terminating gateway no longer references the zoidberg policyconsul acl policy list
and you'll see the zoidberg policy still existsconsul acl role list
and see that none of the terminating gateways reference that policyconsul acl policy list
and see that the zoidberg policy no longer exists because no gateway is referencing itChecklist
Overview of commits