Skip to content

update dependencies#11

Merged
aojea merged 1 commit intokubernetes-sigs:mainfrom
aojea:deps_ksigs
Oct 16, 2025
Merged

update dependencies#11
aojea merged 1 commit intokubernetes-sigs:mainfrom
aojea:deps_ksigs

Conversation

@aojea
Copy link
Contributor

@aojea aojea commented Oct 15, 2025

update dependencies

This require additional changes:
- bump golang version on docker image
- remove anp flags to adapt to the
new kube-network-policies architecture

We only use stable Network Policies APIs that can be enabled or disabled
via a flag, so users can deploy kube-network-policies to have the
different Network Policies we are developing in the subproject.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 15, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 15, 2025
flag.BoolVar(&adminNetworkPolicy, "admin-network-policy", false, "If set, enable Admin Network Policies (default false)")
flag.BoolVar(&baselineAdminNetworkPolicy, "baseline-admin-network-policy", false, "If set, enable Baseline Admin Network Policies (default false)")
flag.BoolVar(&disableNRI, "disable-nri", false, "If set, disable the NRI functionality to get Pod IP information from the container runtime directly (default false)")
flag.BoolVar(&networkpolicies, "network-policy", true, "If set, enable Network Policy GA APIs (default true)")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is the idea here that kindnet will not have built-in support for ANP/CNP until it becomes more stable, but people can run kindnetd with --network-policy=false and then run k-n-p separately if they want kindnet+ANP?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah,

I think that kube-network-policies deployed as addon for the bleeding edge and kindnet to be the downstream more stable is a good combo and it seems less disruptive, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be cler, I do not have strong opinion, so feel free to suggest changes, is just that keep adding flags for admin-network-policy and CNP didn't make sense in the update ... removing the flag later is a breaking change

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that makes sense; I just wanted to make sure I understood why you were removing it


// Logging evaluator must go first if enabled.
if klog.V(2).Enabled() {
evaluators = append(evaluators, networkpolicy.NewLoggingPolicy())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be hardcoding the fact that networkpolicy.LoggingPolicy uses V(2). You should either make it so that networkpolicy.LoggingPolicy always logs the packets if you create the policy (so the caller alone decides what verbosity level causes packet logging to be enabled), or else make it so that networkpolicy.NewLoggingPolicy() returns a no-op policy if the verbosity level wasn't high enough (so LoggingPolicy alone decides what verbosity level causes packet logging to be enabled).

(This requires a change to k-n-p so it doesn't have to be fixed in this PR.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be hardcoding the fact that networkpolicy.LoggingPolicy uses V(2)

that is an oversight,

ou should either make it so that networkpolicy.LoggingPolicy always logs the packets

that was the idea, we need to fix it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aojea added a commit to kubernetes-sigs/kube-network-policies that referenced this pull request Oct 15, 2025
The intention is that the consumer uses the logging handler at the log level they please, by inserting it in the pipeline. Hence, the logging handler should not make any assumption about verbosity levels 

Spotted by @danwinship  in kubernetes-sigs/kindnet#11 (comment)
@danwinship
Copy link

/lgtm
but maybe resquash the commits

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 15, 2025
This require additional changes:
- bump golang version on docker image
- remove anp flags to adapt to the
new kube-network-policies architecture

We only use stable Network Policies APIs that can be enabled or disabled
via a flag, so users can deploy kube-network-policies to have the
different Network Policies we are developing in the subproject.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 16, 2025
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@aojea
Copy link
Contributor Author

aojea commented Oct 16, 2025

/lgtm
but maybe resquash the commits

squashed and fixed teh hack/ci/script

@aojea aojea merged commit 22be6ef into kubernetes-sigs:main Oct 16, 2025
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants