openshift / kuryr-kubernetes

kuryr-kubernetes - CNI plugin using OpenStack Neutron and Octavia to provide networking for pods and services.
Apache License 2.0
21 stars 23 forks source link

Avoid updates on same pod #749

Closed MaysaMacedo closed 4 months ago

MaysaMacedo commented 4 months ago

It's possible the list of Pods to update the security groups contains repeated Pods. Let's avoid update of security group for the Port of a Pod is the security groups were already updated.

openshift-ci[bot] commented 4 months ago

@MaysaMacedo: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
MaysaMacedo commented 4 months ago

/hold

gryf commented 4 months ago

/label backport-risk-assesed /lgtm

good job @MaysaMacedo!

openshift-ci[bot] commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gryf, MaysaMacedo

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/kuryr-kubernetes/blob/release-4.8/OWNERS)~~ [MaysaMacedo,gryf] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
gryf commented 4 months ago

/label backport-risk-assesed

openshift-ci[bot] commented 4 months ago

@gryf: The label(s) /label backport-risk-assesed cannot be applied. These labels are supported: acknowledge-critical-fixes-only, platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, no-qe, downstream-change-needed, rebase/manual, cluster-config-api-changed, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to [this](https://github.com/openshift/kuryr-kubernetes/pull/749#issuecomment-2101061099): >/label backport-risk-assesed Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
gryf commented 4 months ago

/label backport-risk-assessed

openshift-ci[bot] commented 4 months ago

@gryf: Can not set label backport-risk-assessed: Must be member in one of these teams: [kuryr-kubernetes]

In response to [this](https://github.com/openshift/kuryr-kubernetes/pull/749#issuecomment-2101063472): >/label backport-risk-assessed Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
MaysaMacedo commented 4 months ago

I tested this with the following network policy, which defines this podSelector: {}

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-deny
  namespace: test
spec:
  podSelector: {}
  policyTypes:
  - Ingress

with the fix the number of selected pods that has the sg reduces in half in every reconciliation is reduced to half.