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

skip checking nodeport on external addrs in conformance tests #98791

Merged
merged 1 commit into from Mar 9, 2021

Conversation

pacoxu
Copy link
Member

@pacoxu pacoxu commented Feb 5, 2021

What type of PR is this?
/kind bug
/sig testing
/sig network

What this PR does / why we need it:
In some user scenarios, the external IP nodeport is for access from APPs outside this cluster/zone.

  • However, in most scenarios, external IP is just for SSH or special use(Ingress Gateway, etc.)

Different users have different proposals.

most of the network tests now run from the cluster, no need to reach externalIPs.

Per #90764 (comment), I prefer to remove it before a clear definition for the external IPs.

move ExternalIP from Conformance entirely until it has a clear definition

Which issue(s) this PR fixes:
Fixes #90764

Special notes for your reviewer:
And @BenTheElder suggestion is like adding a feature filter. I will work on it if this is needed.

Per #98791 (comment), I will add new test with [Feature:ExternalNodeAccess] and remove current case. [WIP]

Does this PR introduce a user-facing change?:

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. sig/network Categorizes an issue or PR as relevant to SIG Network. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 5, 2021
@k8s-ci-robot
Copy link
Contributor

@pacoxu: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 5, 2021
@k8s-ci-robot k8s-ci-robot added area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test labels Feb 5, 2021
@pacoxu
Copy link
Member Author

pacoxu commented Feb 5, 2021

/cc aojea

return err

// By default, skip node port checking with node external ips
if os.Getenv("CHECK_NODEPORT_WITH_EXTERNALADDR") == "true" {
Copy link
Member

Choose a reason for hiding this comment

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

let me ask about this, I´m not sure how @BenTheElder @spiffxp prefer to parameterise these things?

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'm not sure whether it is rude to remove this directly.

BTW, we should decide the default behavior: skip or check?

Copy link
Member

Choose a reason for hiding this comment

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

ah yeah, but there is a miriad of flags, skips, checks, ... just what I prefer to wait for them so we can align all the test to behave the same

Copy link
Member

Choose a reason for hiding this comment

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

I think this (parameters) are usually done with a flag? though this seems awfully specific and more like a different test entirely.

Also conformance tests should not have variable behavior, so IMO the correct answer is actually to split this out into another test and give it tag to filter on if we're keeping this test.

Changes to conformance tests behavior should also be approved by the conformance subproject.

Copy link
Member

Choose a reason for hiding this comment

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

so like [Feature:ExternalNodeAccess] on the new tests or something.

But also why are we changing this? commenting back on the issue.
Just because some clusters can fail it doesn't necessarily mean we change conformance 😕

Copy link
Member Author

Choose a reason for hiding this comment

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

for the PR, I will update as you suggest later after the holiday(maybe a week later😄)

for the issue, we can disscuss it in #90764.

@fejta
Copy link
Contributor

fejta commented Feb 8, 2021

/uncc

@k8s-ci-robot k8s-ci-robot removed the request for review from fejta February 8, 2021 19:41
@pacoxu pacoxu changed the title skip checking nodeport on external addrs in conformance tests [WIP]skip checking nodeport on external addrs in conformance tests Feb 19, 2021
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 19, 2021
@pacoxu
Copy link
Member Author

pacoxu commented Mar 3, 2021

I updated the PR. We may remove it as this is not clear.( It should be removed for "secured clusters" )

no need to reach externalIPs.

Per #90764 (comment), I prefer to remove it before a clear definition for the external IPs.

@pacoxu pacoxu requested review from aojea and BenTheElder March 3, 2021 06:50
@pacoxu pacoxu changed the title [WIP]skip checking nodeport on external addrs in conformance tests skip checking nodeport on external addrs in conformance tests Mar 3, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 3, 2021
@aojea
Copy link
Member

aojea commented Mar 3, 2021

I prefer to remove it before a clear definition for the external IPs.

I personally, would move ExternalIP from Conformance entirely until it has a clear definition

from conformance, not from sig-network tests 😄

but that is a call that conformance people has to do, my point is that verifying in Conformance something that is not well-defined is not very conformant 🙃

@pacoxu
Copy link
Member Author

pacoxu commented Mar 3, 2021

I prefer to remove it before a clear definition for the external IPs.

I personally, would move ExternalIP from Conformance entirely until it has a clear definition

from conformance, not from sig-network tests 😄

but that is a call that conformance people has to do, my point is that verifying in Conformance something that is not well-defined is not very conformant 🙃

I think that I got it. Sorry for misunderstanding. 😂

  • test case with framework.ConformanceIt() will be included in conformance test.
  • test case with framework.It() will not be included

What we should do is removing it from Conformance test cases and check it in other cases.

@aojea
Copy link
Member

aojea commented Mar 3, 2021

let's hold until the discussion ends, Conformance has to make the call, and then we'll talk with sig-testing to see what is the best way to implement it

@pacoxu pacoxu changed the title skip checking nodeport on external addrs in conformance tests [WIP]skip checking nodeport on external addrs in conformance tests Mar 3, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 3, 2021
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 3, 2021
@pacoxu pacoxu marked this pull request as draft March 3, 2021 11:27
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 3, 2021
@pacoxu pacoxu marked this pull request as ready for review March 4, 2021 08:58
@pacoxu pacoxu changed the title [WIP]skip checking nodeport on external addrs in conformance tests skip checking nodeport on external addrs in conformance tests Mar 4, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 4, 2021
@aojea
Copy link
Member

aojea commented Mar 5, 2021

I think that this makes it, but I think that it will be better to add it as a new field part of the TestJig

// TestJig is a test jig to help service testing.
type TestJig struct {
	Client    clientset.Interface
	Namespace string
	Name      string
	ID        string
	Labels    map[string]string
        ExternalIPs bool
}

something like TestJig.ExternalIPs=true or TestJig.Conformance=true, so consumers of the TestJig can define it's behaviour in the object.

It sounds more scalable and intuitive to me, what do you think?

@spiffxp
Copy link
Member

spiffxp commented Mar 5, 2021

Yeah I like that approach. I prefer ExternalIPs as the field name, it's more explicit about what's being enabled or disabled.

@aojea
Copy link
Member

aojea commented Mar 8, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 8, 2021
Copy link
Member

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm
/milestone v1.21

@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Mar 8, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pacoxu, spiffxp

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:

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 9, 2021
@k8s-ci-robot k8s-ci-robot merged commit 5f0b88b into kubernetes:master Mar 9, 2021
@pacoxu pacoxu deleted the kubetest/external-ips branch June 23, 2021 05:37
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. area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NodePort service creation e2e test relies on insecure cluster configuration
6 participants