Skip to content

OCPBUGS-20161: Remove unncessary kas port exposure on service - #3139

Closed
enxebre wants to merge 1 commit into
openshift:mainfrom
enxebre:port-fix
Closed

OCPBUGS-20161: Remove unncessary kas port exposure on service#3139
enxebre wants to merge 1 commit into
openshift:mainfrom
enxebre:port-fix

Conversation

@enxebre

@enxebre enxebre commented Oct 26, 2023

Copy link
Copy Markdown
Member

What this PR does / why we need it:
This was first introduced here https://github.com/openshift/hypershift/pull/1614/files#diff-62c16653415b8d89921cb26796abc479c31da1654095f7c46b551b470533d66dR368-R372 not sure with which purpose.

With the changes in https://github.com/openshift/hypershift/pull/2964/files#diff-39a001edaf01802e79e43b99b8ce38585ea7079c7253be01fe33a4902a9ca184 we stopped defaulting the kas container port to 443 resulting in this "if" to evaluate as true and exposing a new port https://github.com/openshift/hypershift/pull/2964/files#diff-62c16653415b8d89921cb26796abc479c31da1654095f7c46b551b470533d66dL277

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Oct 26, 2023
@openshift-ci-robot

Copy link
Copy Markdown

@enxebre: This pull request references Jira Issue OCPBUGS-20161, which is invalid:

  • expected the bug to target the "4.15.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@enxebre

enxebre commented Oct 26, 2023

Copy link
Copy Markdown
Member Author

/hold
to make sure of the impact.

@openshift-ci openshift-ci Bot added do-not-merge/needs-area do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 26, 2023
@enxebre

enxebre commented Oct 26, 2023

Copy link
Copy Markdown
Member Author

/cherry-pick release-4.14

@openshift-cherrypick-robot

Copy link
Copy Markdown

@enxebre: once the present PR merges, I will cherry-pick it on top of release-4.14 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.14

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.

@openshift-ci
openshift-ci Bot requested review from csrwng and sjenning October 26, 2023 11:53
@openshift-ci openshift-ci Bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-area labels Oct 26, 2023
@enxebre
enxebre force-pushed the port-fix branch 2 times, most recently from 6bdc992 to 9b91d79 Compare October 26, 2023 12:09
@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Oct 26, 2023
@openshift-ci-robot

Copy link
Copy Markdown

@enxebre: This pull request references Jira Issue OCPBUGS-20161, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (jiezhao@redhat.com), skipping review request.

Details

In response to this:

What this PR does / why we need it:
This was first introduced here https://github.com/openshift/hypershift/pull/1614/files#diff-62c16653415b8d89921cb26796abc479c31da1654095f7c46b551b470533d66dR368-R372 not sure with which purpose.

With the changes in https://github.com/openshift/hypershift/pull/2964/files#diff-39a001edaf01802e79e43b99b8ce38585ea7079c7253be01fe33a4902a9ca184 we stopped defaulting the kas container port to 443 making this if to evaluate as true and exposing a new port https://github.com/openshift/hypershift/pull/2964/files#diff-62c16653415b8d89921cb26796abc479c31da1654095f7c46b551b470533d66dL277

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Oct 26, 2023
@openshift-ci-robot

Copy link
Copy Markdown

@enxebre: This pull request references Jira Issue OCPBUGS-20161, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (jiezhao@redhat.com), skipping review request.

Details

In response to this:

What this PR does / why we need it:
This was first introduced here https://github.com/openshift/hypershift/pull/1614/files#diff-62c16653415b8d89921cb26796abc479c31da1654095f7c46b551b470533d66dR368-R372 not sure with which purpose.

With the changes in https://github.com/openshift/hypershift/pull/2964/files#diff-39a001edaf01802e79e43b99b8ce38585ea7079c7253be01fe33a4902a9ca184 we stopped defaulting the kas container port to 443 resulting in this "if" to evaluate as true and exposing a new port https://github.com/openshift/hypershift/pull/2964/files#diff-62c16653415b8d89921cb26796abc479c31da1654095f7c46b551b470533d66dL277

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@mjlshen mjlshen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci

openshift-ci Bot commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre, mjlshen

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

1 similar comment
@openshift-ci

openshift-ci Bot commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre, mjlshen

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

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2023
Comment on lines -264 to -268
case "kube-apiserver":
svc.Spec.Ports[i].Port = kasPort
svc.Spec.Ports[i].TargetPort = intstr.FromString("https")
svc.Spec.Ports[i].Protocol = corev1.ProtocolTCP
foundKAS = true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think removing this is correct

Comment on lines -250 to -256
foundKAS := false

// TODO (alberto): why this criteria?
// Introduced here https://github.com/openshift/hypershift/pull/1614/files#diff-62c16653415b8d89921cb26796abc479c31da1654095f7c46b551b470533d66dR368-R372.
if kasPort == 443 {
foundKAS = true
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not familiar with the use-case, but is this so that someone could separate router/KAS traffic onto different ports? If so, this would just be a guard for the ROSA HCP use-case where we use the same port for both. We would then need the if !foundKas block further down at line 279

Copy link
Copy Markdown
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 familiar with the use-case, but is this so that someone could separate router/KAS traffic onto different ports? If so, this would just be a guard for the ROSA HCP use-case where we use the same port for both. We would then need the if !foundKas block further down at line 279

Might be the original reason, I'm not aware of this use atm.
But also the if kasPort == 443 {foundKAS = true} is not a valid criteria any more for that potential use case.

@mjlshen

mjlshen commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

/hold

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2023
@mjlshen

mjlshen commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

/unhold
/lgtm

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 26, 2023
@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 26, 2023
@enxebre

enxebre commented Oct 26, 2023

Copy link
Copy Markdown
Member Author

/test e2e-aws

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2023
@openshift-ci

openshift-ci Bot commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

Comment thread control-plane-operator/controllers/hostedcontrolplane/kas/params.go Outdated
@sjenning

Copy link
Copy Markdown
Contributor

/test e2e-aws

@enxebre
enxebre force-pushed the port-fix branch 2 times, most recently from 17e7190 to 2c8c633 Compare October 27, 2023 10:42
@openshift-ci openshift-ci Bot added the area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release label Oct 27, 2023
@openshift-ci

openshift-ci Bot commented Oct 27, 2023

Copy link
Copy Markdown
Contributor

@enxebre: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@sjenning

Copy link
Copy Markdown
Contributor

waiting to lgtm until after the weekend just in case 😅

@jasonrhunter

Copy link
Copy Markdown

@sjenning ok to lgtm now?

enxebre added a commit to enxebre/hypershift that referenced this pull request Oct 30, 2023
We want to remove the unncessary exposure of port 6443 externally, as this increases the used SG rules, which decreases our max number of HC per management aws account openshift#3139
We split the PR to roll out the HO first to all envs to make sure the haproxy in dataplane for newly created HCs don't point to a port 6443 that won't be exposed.
@enxebre

enxebre commented Oct 30, 2023

Copy link
Copy Markdown
Member Author

@mjlshen @sjenning this need to be split in two different PRs and 3 steps:

Otherwise environments without this HO, but using the payload with the change might have a data plane haproxy pointing to 6443 which won't be exposed anymore.

enxebre added a commit to enxebre/hypershift that referenced this pull request Oct 31, 2023
We want to remove the unncessary exposure of port 6443 externally, as this increases the used SG rules, which decreases our max number of HC per management aws account openshift#3139 We split the PR to roll out the HO first to all envs to make sure the haproxy in dataplane for newly created HCs don't point to a port 6443 that won't be exposed.
@enxebre enxebre closed this Oct 31, 2023
@openshift-ci-robot

Copy link
Copy Markdown

@enxebre: This pull request references Jira Issue OCPBUGS-20161. The bug has been updated to no longer refer to the pull request using the external bug tracker.

Details

In response to this:

What this PR does / why we need it:
This was first introduced here https://github.com/openshift/hypershift/pull/1614/files#diff-62c16653415b8d89921cb26796abc479c31da1654095f7c46b551b470533d66dR368-R372 not sure with which purpose.

With the changes in https://github.com/openshift/hypershift/pull/2964/files#diff-39a001edaf01802e79e43b99b8ce38585ea7079c7253be01fe33a4902a9ca184 we stopped defaulting the kas container port to 443 resulting in this "if" to evaluate as true and exposing a new port https://github.com/openshift/hypershift/pull/2964/files#diff-62c16653415b8d89921cb26796abc479c31da1654095f7c46b551b470533d66dL277

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

a-dsouza pushed a commit to a-dsouza/hypershift that referenced this pull request Nov 1, 2023
We want to remove the unncessary exposure of port 6443 externally, as this increases the used SG rules, which decreases our max number of HC per management aws account openshift#3139
We split the PR to roll out the HO first to all envs to make sure the haproxy in dataplane for newly created HCs don't point to a port 6443 that won't be exposed.
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/hypershift that referenced this pull request Nov 2, 2023
We want to remove the unncessary exposure of port 6443 externally, as this increases the used SG rules, which decreases our max number of HC per management aws account openshift#3139 We split the PR to roll out the HO first to all envs to make sure the haproxy in dataplane for newly created HCs don't point to a port 6443 that won't be exposed.
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/hypershift that referenced this pull request Nov 3, 2023
We want to remove the unncessary exposure of port 6443 externally, as this increases the used SG rules, which decreases our max number of HC per management aws account openshift#3139
We split the PR to roll out the HO first to all envs to make sure the haproxy in dataplane for newly created HCs don't point to a port 6443 that won't be exposed.
Kyl-Bempah pushed a commit to Kyl-Bempah/hypershift that referenced this pull request Nov 14, 2023
parent a701ee3
author red-hat-trusted-app-pipeline <123456+red-hat-trusted-app-pipeline[bot]@users.noreply.github.com> 1698935322 +0000
committer Kyl-Bempah <24903083+Kyl-Bempah@users.noreply.github.com> 1699984168 -0500

# This is a combination of 2 commits.
# This is the 1st commit message:

chore(deps): update rhtap references

# This is the commit message openshift#2:

Enable multi-arch builds

Signed-off-by: Kyl-Bempah <24903083+Kyl-Bempah@users.noreply.github.com>
# This is the commit message openshift#3:

OCPBUGS-16079: No error for overlapping service network and API IP

Fixes: OCPBUGS-16079

Ensure that the nodeport IP for the API Server does not conflict
with the Service Network CIDR.

# This is the commit message openshift#4:

Stop exposing kas on 6443 private route service load balancer

We want to remove the unncessary exposure of port 6443 externally, as this increases the used SG rules, which decreases our max number of HC per management aws account openshift#3139 We split the PR to roll out the HO first to all envs to make sure the haproxy in dataplane for newly created HCs don't point to a port 6443 that won't be exposed.

# This is the commit message openshift#5:

OCPBUGS-10423: Update regex validation for nodepool.spec.taints.value

# This is the commit message openshift#6:

HOSTEDCP-1278: Adjustment cluster-cidr,service-cidr to support dual-stack

# This is the commit message openshift#7:

KubeVirt: create the etcd encryption key secret, if missing

To allow creating of KubeVirt hosted cluster using the hosted cluster
API (rather than using the cli).

When creating the hosted cluster using the cli, the cli also creates the
secret. But when creating the hosted cluster using the hosted cluster
API, the secret is not created.

This PR changes hypershift so it now creates the etcd
encryption key secret, if it is not already exist.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
Kyl-Bempah added a commit to Kyl-Bempah/hypershift that referenced this pull request Nov 14, 2023
author red-hat-trusted-app-pipeline <123456+red-hat-trusted-app-pipeline[bot]@users.noreply.github.com> 1698935322 +0000
committer Kyl-Bempah <24903083+Kyl-Bempah@users.noreply.github.com> 1699984168 -0500

chore(deps): update rhtap references

Enable multi-arch builds

Signed-off-by: Kyl-Bempah <24903083+Kyl-Bempah@users.noreply.github.com>

OCPBUGS-16079: No error for overlapping service network and API IP

Fixes: OCPBUGS-16079

Ensure that the nodeport IP for the API Server does not conflict
with the Service Network CIDR.

Stop exposing kas on 6443 private route service load balancer

We want to remove the unncessary exposure of port 6443 externally, as this increases the used SG rules, which decreases our max number of HC per management aws account openshift#3139 We split the PR to roll out the HO first to all envs to make sure the haproxy in dataplane for newly created HCs don't point to a port 6443 that won't be exposed.

OCPBUGS-10423: Update regex validation for nodepool.spec.taints.value

HOSTEDCP-1278: Adjustment cluster-cidr,service-cidr to support dual-stack

KubeVirt: create the etcd encryption key secret, if missing

To allow creating of KubeVirt hosted cluster using the hosted cluster
API (rather than using the cli).

When creating the hosted cluster using the cli, the cli also creates the
secret. But when creating the hosted cluster using the hosted cluster
API, the secret is not created.

This PR changes hypershift so it now creates the etcd
encryption key secret, if it is not already exist.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>

Update RHTAP references
parent a701ee3
author red-hat-trusted-app-pipeline <123456+red-hat-trusted-app-pipeline[bot]@users.noreply.github.com> 1698935322 +0000
committer Kyl-Bempah <24903083+Kyl-Bempah@users.noreply.github.com> 1699984168 -0500

chore(deps): update rhtap references

Enable multi-arch builds

Signed-off-by: Kyl-Bempah <24903083+Kyl-Bempah@users.noreply.github.com>

OCPBUGS-16079: No error for overlapping service network and API IP

Fixes: OCPBUGS-16079

Ensure that the nodeport IP for the API Server does not conflict
with the Service Network CIDR.

Stop exposing kas on 6443 private route service load balancer

We want to remove the unncessary exposure of port 6443 externally, as this increases the used SG rules, which decreases our max number of HC per management aws account openshift#3139 We split the PR to roll out the HO first to all envs to make sure the haproxy in dataplane for newly created HCs don't point to a port 6443 that won't be exposed.

OCPBUGS-10423: Update regex validation for nodepool.spec.taints.value

HOSTEDCP-1278: Adjustment cluster-cidr,service-cidr to support dual-stack

KubeVirt: create the etcd encryption key secret, if missing

To allow creating of KubeVirt hosted cluster using the hosted cluster
API (rather than using the cli).

When creating the hosted cluster using the cli, the cli also creates the
secret. But when creating the hosted cluster using the hosted cluster
API, the secret is not created.

This PR changes hypershift so it now creates the etcd
encryption key secret, if it is not already exist.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>

Update RHTAP references
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/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants