-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement list command #2
Conversation
9cf3c38
to
fe67c77
Compare
Signed-off-by: Daichi Sakaue <[email protected]>
Signed-off-by: Daichi Sakaue <[email protected]>
1b951c7
to
d831339
Compare
Signed-off-by: Daichi Sakaue <[email protected]>
Signed-off-by: Daichi Sakaue <[email protected]>
.github/workflows/ci.yaml
Outdated
@@ -5,7 +5,7 @@ on: | |||
branches: | |||
- main | |||
env: | |||
cache-version: 1 | |||
cache-version: "2024-04-05" |
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.
Why do you use date as cache-version?
And also, I wonder if we need cache-version. Are there any cases that hashFiles
is not sufficient?
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.
@chez-shanpu
It is an old practice to allow invalidating caches when it is contaminated by a broken CI workflow.
However I always hesitate to update the version one: it looks like having a special meaning. Using a date looks more meaningless.
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.
@yokaze I see. How about deleting a cache like gh cache delete
when it is contaminated instead of using cache-version
?
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.
@chez-shanpu
It looks reasonable, I removed the cache-version
parameter. Thanks for the info!
Signed-off-by: Daichi Sakaue <[email protected]>
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.
LGTM
This PR contains the following four commits:
1. Respect cached files
Fix Makefile and Helm file cache to make them work properly.
2. Run test pods
Deploy some test pods with L3 policies.
self
: entry pointingress-explicit-allow
: egress fromself
and ingress toingress-explicit-allow
are allowedingress-no-rule
: egress fromself
is allowed and ingress toingress-no-rule
is implicitly allowed (no rule)ingress-explicit-deny
: egress fromself
is allowed but ingress toingress-explicit-deny
is explicitly deniedegress-implicit-deny
: egress fromself
toegress-implicit-deny
is implicitly deniedegress-explicit-deny
: egress fromself
toegress-explicit-deny
is explicitly denied3. Implement list command
Implement
cilium-policy list
that shows the list of NetworkPolicy applied to a specific pod.Currently the available output format is only
json
:simple
will be available in future.Also
cilium-policy dump
is heavily refactored using common helper functions.4. Check go.mod
Just check
go.mod
is up-to-date.Signed-off-by: Daichi Sakaue [email protected]