-
Notifications
You must be signed in to change notification settings - Fork 317
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
[NET-9420] clean up acl role policy for apigw #4060
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jm96441n
commented
May 30, 2024
jm96441n
changed the title
Net 9420 clean up acl role policy for apigw
[NET-9420] clean up acl role policy for apigw
May 31, 2024
jm96441n
added
backport/1.2.x
This release branch is no longer active.
backport/1.3.x
backport/1.4.x
labels
Jun 3, 2024
jm96441n
requested review from
a team,
nathancoleman and
missylbytes
and removed request for
a team
June 3, 2024 16:38
sarahalsmiller
approved these changes
Jun 4, 2024
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.
Thanks for grabbing that
This was referenced Jun 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/1.2.x
This release branch is no longer active.
backport/1.3.x
backport/1.4.x
backport/1.5.x
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this PR
previously all gateways shared the same acl role and policy so when deleting a gateway the policy/role did not need to be removed. With the changes to reduce the scope of gateway acls and make them a 1:1 mapping from role/policy to gateway we now need to clean up the role/policy when a gateway is removed.
How I've tested this PR
Repro Steps:
make dev-docker
and for consul pull latestmain
and runmake dev-docker
to generate the images we'll be testing withstart.sh
file of the gist update theCONSUL_K8S_CHART_LOCATION
variable on line 5 to point to the location of the charts directory in consul-k8s on your machinestart.sh
script, this creates your kind cluster, loads the consul-k8s and consul images into the cluster, installs consul, and sets up 2 api-gatewayskubectl port-forward service/consul-consul-ui 8501:443 -n consul
in a separate terminal window to port forward to consulpolicies
page and you should see an entry for each of the api-gatewayskubectl delete -f gw2.yaml
and see the policy get removed (the same will happen for roles)kubectl apply -f gw2.yaml
and see the policy come backHow I expect reviewers to test this PR
read the code
run the above steps
To run the acceptance test:
kind create cluster
make dev-docker
kind load docker-image consul-k8s-control-plane:local
api-gateway
directorycd ./acceptance/tests/api-gateway
go test -consul-k8s-image=consul-k8s-control-plane:local -run TestAPIGateway_Lifecycle -v ./...
to run the test using the changes from this branchChecklist