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

USHIFT-2188: introduce microshift API Custom certs #1541

Merged

Conversation

eslutsky
Copy link
Contributor

No description provided.

@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 18, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 18, 2024

@eslutsky: This pull request references USHIFT-2188 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.16.0" version, but no target version was set.

In response to this:

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 18, 2024
Copy link
Contributor

openshift-ci bot commented Jan 18, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@eslutsky
Copy link
Contributor Author

/test all

@eslutsky eslutsky force-pushed the introduce-custom-api-certs branch from c65464e to b49806d Compare January 18, 2024 14:39
@eslutsky
Copy link
Contributor Author

/test all

@eslutsky eslutsky force-pushed the introduce-custom-api-certs branch 13 times, most recently from fc31772 to ca09369 Compare January 25, 2024 13:48
@eslutsky eslutsky marked this pull request as ready for review January 25, 2024 13:51
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 25, 2024
@openshift-ci openshift-ci bot requested review from joepvd and LorbusChris January 25, 2024 14:02
@eslutsky
Copy link
Contributor Author

/cc @benluddy

@openshift-ci openshift-ci bot requested a review from benluddy January 30, 2024 10:14
@eslutsky
Copy link
Contributor Author

/cc @stlaz

@openshift-ci openshift-ci bot requested a review from stlaz January 30, 2024 10:19
@eslutsky eslutsky force-pushed the introduce-custom-api-certs branch from ca09369 to 052a3c7 Compare January 30, 2024 14:58
@eslutsky eslutsky force-pushed the introduce-custom-api-certs branch from cb7d1c4 to 3124571 Compare March 14, 2024 10:24
@eslutsky eslutsky force-pushed the introduce-custom-api-certs branch from 3124571 to f4257d8 Compare March 14, 2024 10:26
@eslutsky eslutsky requested a review from stlaz March 14, 2024 10:27
@stlaz
Copy link
Contributor

stlaz commented Mar 14, 2024

Seems fine from the auth side of things

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 14, 2024
N/A

### Failure Modes
The provided certs value will be validated before is it passed to the api-server flag

Choose a reason for hiding this comment

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

IIUC, cert and key files passed to --tls-sni-cert-key are watched and reloaded dynamically (via https://github.com/openshift/kubernetes/blob/352677df596e5dab4098898974e36df8bcd067e2/staging/src/k8s.io/apiserver/pkg/server/options/serving.go#L323). Is it worthwhile to perform the proposed validation once at startup?

OCP performs some validation before a configured cert and name reach that flag, but in that case the files being passed to the kube-apiserver process are operator-managed as opposed to being directly managed by the user, as in the Microshift case.

Copy link
Contributor

Choose a reason for hiding this comment

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

That validation to ensure the settings in the cert don't collide with the internal IPs of the cluster look valuable to avoid breaking the ability of pods to talk to the API server. Thanks for pointing those out, we had a hard time finding anything like that!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added table with reserved IP/DNS values which will be cause the certificate to be ignored.

Choose a reason for hiding this comment

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

Do you plan to do anything to prevent the files at certPath/keyPath passing startup-time validation, being modified in such a way that they would fail startup-time validation, and then being dynamically reloaded at runtime? It's potentially surprising that changing namedCertificates in the config file has no effect until the next restart, but changes to the contents of files referenced in the config will be dynamically reloaded (unless I am misunderstanding how the --tls-sni-cert-key option works).

Copy link
Contributor

Choose a reason for hiding this comment

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

That does sound like a potentially bad hole that bypasses important validation.

@eslutsky eslutsky requested a review from dhellmann March 18, 2024 10:55
@dhellmann dhellmann added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Mar 18, 2024
@vrutkovs
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2024
Signed-off-by: Evgeny Slutsky <[email protected]>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2024
Copy link
Contributor

openshift-ci bot commented Mar 25, 2024

@eslutsky: all tests passed!

Full PR test history. Your PR dashboard.

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.

@pmtk
Copy link
Member

pmtk commented Mar 25, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2024
@jerpeter1
Copy link
Member

@benluddy Have your questions/concerns been resolved?

@benluddy
Copy link

@benluddy Have your questions/concerns been resolved?

I added a follow-up question here https://github.com/openshift/enhancements/pull/1541/files#r1537894599 but it seems I am not allowed to mark its thread as unresolved. I'm happy leaving any (or no) resulting changes from that question to the MicroShift team's judgment since they know their users better than me.

/lgtm

@dhellmann
Copy link
Contributor

@benluddy Have your questions/concerns been resolved?

I added a follow-up question here https://github.com/openshift/enhancements/pull/1541/files#r1537894599 but it seems I am not allowed to mark its thread as unresolved. I'm happy leaving any (or no) resulting changes from that question to the MicroShift team's judgment since they know their users better than me.

I unresolved the thread to make sure we don't lose track of it.

@jerpeter1
Copy link
Member

/approve

Copy link
Contributor

openshift-ci bot commented Mar 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerpeter1

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 25, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 25dafcc into openshift:master Mar 25, 2024
2 checks passed
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. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.