Skip to content

USHIFT-716: add configurable KAS advertise address#1298

Merged
openshift-merge-robot merged 5 commits intoopenshift:mainfrom
pacevedom:USHIFT-716
Feb 13, 2023
Merged

USHIFT-716: add configurable KAS advertise address#1298
openshift-merge-robot merged 5 commits intoopenshift:mainfrom
pacevedom:USHIFT-716

Conversation

@pacevedom
Copy link
Contributor

Which issue(s) this PR addresses:

Closes #

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 27, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 27, 2023

@pacevedom: This pull request references USHIFT-716 which is a valid jira issue.

Details

In response to this:

Which issue(s) this PR addresses:

Closes #

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 benluddy and ggiguash January 27, 2023 10:55
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 27, 2023
@pacevedom
Copy link
Contributor Author

/cc @dhellmann @mangelajo @fzdarsky

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 is exposed so as to enable CNCF certification tests where we need more than one node. Users shouldnt use it, as it defaults to the api server service IP internally.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we put this in the documentation, someone is going to use it. Do we need to include it in this document?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I included it here just in case. Are we allowed to include undocumented parameters/options in CNCF certification instructions?
I was thinking about making it public here but not in customer docs. Adding a "dev only" tag/disclaimer should also help.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a good question. @jerpeter1 has been looking at the certification rules, maybe he came across something that would help answer it?

@pacevedom
Copy link
Contributor Author

/hold until enhancement is merged.

@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 Jan 30, 2023
Adds an internal IP to kubernetes service. Pods will use an internal
IP to connect to KAS, while external clients will use the node IP.
Solves ambiguity problem when selecting which certificate to return
to a client, based on the destination IP (KAS).
Configures the service IP to the loopback interface so that the
endpoint slice for kubernetes service matches the same IP.
@pacevedom
Copy link
Contributor Author

/retest

Copy link
Contributor

Choose a reason for hiding this comment

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

If we put this in the documentation, someone is going to use it. Do we need to include it in this document?

@dhellmann
Copy link
Contributor

Is there a way to add a test case to verify that this solves the problem and so we do not regress with future changes?

@pacevedom pacevedom force-pushed the USHIFT-716 branch 3 times, most recently from e86b2ba to 68c6554 Compare February 3, 2023 10:12
@pacevedom
Copy link
Contributor Author

/retest
/unhold

@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 Feb 3, 2023
@pacevedom
Copy link
Contributor Author

/retest

To follow service CIDR configuration options, and to allow forcing
a different IP, a new configuration parameter is introduced. This
will come in handy when setting extra nodes.
Also excludes the node IP in the external serving certificate if
the KAS advertise address matches the node IP.
Defaults KAS advertise address to always follow the service CIDR from
configuration. If this CIDR is changed before starting MicroShift, the
KAS advertise address (and therefore the secondary IP to lo interface)
will be in that range.
Avoid adding the secondary IP to lo interface when KAS advertise
address has been forced to an IP in a different range than service
network CIDR.
Use a new service to configure loopback interface in the node if
required by the KAS advertise address. Kube apiserver service will
depend on this one before starting.
@dhellmann
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 8, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 8, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, pacevedom

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:
  • OWNERS [dhellmann,pacevedom]

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

@dhellmann
Copy link
Contributor

/cherry-pick release-4.12

@openshift-cherrypick-robot

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

Details

In response to this:

/cherry-pick release-4.12

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
Copy link

/retest-required

Remaining retests: 0 against base HEAD 9664401 and 2 for PR HEAD c4c11cc in total

@copejon
Copy link
Contributor

copejon commented Feb 8, 2023

/retest

1 similar comment
@pmtk
Copy link
Member

pmtk commented Feb 9, 2023

/retest

@pacevedom
Copy link
Contributor Author

/retest-required

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 656ce94 and 1 for PR HEAD c4c11cc in total

@pacevedom
Copy link
Contributor Author

/override ci/prow/e2e-openshift-conformance-sig-scheduling ci/prow/e2e-openshift-conformance-sig-instrumentation ci/prow/e2e-openshift-conformance-sig-api-machinery

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 9, 2023

@pacevedom: Overrode contexts on behalf of pacevedom: ci/prow/e2e-openshift-conformance-sig-api-machinery, ci/prow/e2e-openshift-conformance-sig-instrumentation, ci/prow/e2e-openshift-conformance-sig-scheduling

Details

In response to this:

/override ci/prow/e2e-openshift-conformance-sig-scheduling ci/prow/e2e-openshift-conformance-sig-instrumentation ci/prow/e2e-openshift-conformance-sig-api-machinery

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.

@pacevedom
Copy link
Contributor Author

/hold

@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 Feb 9, 2023
@pacevedom
Copy link
Contributor Author

/unhold

@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 Feb 13, 2023
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 5eabbe5 and 0 for PR HEAD c4c11cc in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 13, 2023

@pacevedom: 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.

@openshift-cherrypick-robot

@dhellmann: new pull request created: #1360

Details

In response to this:

/cherry-pick release-4.12

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.

pacevedom added a commit to pacevedom/microshift that referenced this pull request Mar 9, 2023
Due to the support for IPs in certificates introduced in openshift#1298, the
apiserver IP is configured as a secondary address in the lo interface.
A VIP is configured by ovnk redirecting 10.43.0.1:443 to 10.43.0.1:6443.
6443 is the port where apiserver listens in the host.
10.43.0.1:443 is used by all pods using client go, as it is computed
from the env vars we can find in any pod.
If a host network pod or any other tool in the host tries to reach the
apiserver by using 10.43.0.1:443 the address is not translated to the
endpoint, it tries to contact 10.43.0.1:443 which is not the apiserver
but the router. This change computes a new IP endpoint in the next
available /32 subnet from the service IP to ensure ovnk does not
interfere.
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/microshift that referenced this pull request Mar 14, 2023
Due to the support for IPs in certificates introduced in openshift#1298, the
apiserver IP is configured as a secondary address in the lo interface.
A VIP is configured by ovnk redirecting 10.43.0.1:443 to 10.43.0.1:6443.
6443 is the port where apiserver listens in the host.
10.43.0.1:443 is used by all pods using client go, as it is computed
from the env vars we can find in any pod.
If a host network pod or any other tool in the host tries to reach the
apiserver by using 10.43.0.1:443 the address is not translated to the
endpoint, it tries to contact 10.43.0.1:443 which is not the apiserver
but the router. This change computes a new IP endpoint in the next
available /32 subnet from the service IP to ensure ovnk does not
interfere.
@pacevedom pacevedom deleted the USHIFT-716 branch December 18, 2023 22:28
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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants