Skip to content
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

Allow Node access all local Pods to perform probes #104

Merged
merged 1 commit into from
Nov 18, 2019

Conversation

tnqn
Copy link
Member

@tnqn tnqn commented Nov 18, 2019

Kubernetes Nodes need to perform liveness and readiness probes which
might be an HTTP and TCP request, it requires NetworkPolicy
implementation always allow a Node access all its local Pods.

This patch appends the Node gateway IP which will be used when a Node
accesses Pods to the FromAddresses of the CompletedRule to achieve it.

Related to #52

Kubernetes Nodes need to perform liveness and readiness probes which
might be an HTTP and TCP request, it requires NetworkPolicy
implementation always allow a Node access all its local Pods.

This patch appends the Node gateway IP which will be used when a Node
accesses Pods to the FromAddresses of the CompletedRule to achieve it.
@antrea-bot
Copy link
Collaborator

Thanks for your PR.
Unit tests and code linters are run automatically every time the PR is updated.
E2e tests can only be triggered by a member of the vmware-tanzu organization. Regular contributors to the project should join the org.

The following commands are available:

  • /test-e2e: to trigger e2e tests. This command can only be run by members of the vmware-tanzu organization
  • /skip-e2e: to skip e2e tests. This command can only be run by members of the vmware-tanzu organization

@tnqn
Copy link
Member Author

tnqn commented Nov 18, 2019

/test-e2e

Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -170,7 +170,7 @@ func TestRuleCacheAddAddressGroup(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
recorder := newDirtyRuleRecorder()
c := newRuleCache(recorder.Record)
c := newRuleCache(recorder.Record, []string{"192.168.1.1"})
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe you can use a constant for the dummy address in this test as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

I did think about it, but it's in the same package as networkpolicy_controller_test.go, so need to think a new name as I want to avoid using constants from another test file, then I realized the cases in cache_test declares the IP and verifies it in a function scope, and I already declare many other strings there, maybe it's different from the other file declaring the string in one place and not directly in the test function.

Copy link
Contributor

Choose a reason for hiding this comment

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

it was a pretty minor comment, let's merge this as it is

@tnqn tnqn merged commit fe07367 into antrea-io:master Nov 18, 2019
@tnqn tnqn deleted the networkpolicy-nodeIP branch November 18, 2019 09:07
antoninbas added a commit to antoninbas/antrea that referenced this pull request Dec 6, 2019
…#104)"

I ran into this issue while writing documentation for the OVS pipeline
so I thought I would take care of it.

Had to revert manually because of a conflict.

This reverts commit fe07367.
antoninbas added a commit that referenced this pull request Dec 6, 2019
I ran into this issue while writing documentation for the OVS pipeline
so I thought I would take care of it.

Had to revert manually because of a conflict.

This reverts commit fe07367.
zyiou added a commit to zyiou/antrea that referenced this pull request Jul 2, 2021
…io#104)

(cherry picked from commit 278c26c6d7dc85e4502c6bef5c8ef19f0f47bbb8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants