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

WIP: AUTH-543: OIDC/OAuth resource configuration #740

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

liouk
Copy link
Member

@liouk liouk commented Nov 14, 2024

This PR adjusts all OAuth related controllers to remove (or not) their operands depending on whether authentication is external OIDC or not.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 14, 2024

@liouk: This pull request references AUTH-543 which is a valid jira issue.

In response to this:

This PR adjusts all OAuth related controllers to remove (or not) their operands depending on whether authentication is external OIDC or not.

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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 14, 2024
@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 Nov 14, 2024
@openshift-ci openshift-ci bot requested review from frobware and ibihim November 14, 2024 16:54
Copy link
Contributor

openshift-ci bot commented Nov 14, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: liouk
Once this PR has been reviewed and has the lgtm label, please assign deads2k for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@liouk liouk force-pushed the oidc-oauth-cleanup branch 22 times, most recently from e99d56a to 46287b6 Compare November 21, 2024 14:59
@liouk liouk force-pushed the oidc-oauth-cleanup branch from 46287b6 to ae635c0 Compare November 22, 2024 11:03
@liouk liouk changed the title WIP: AUTH-543: OIDC/OAuth resource configuration AUTH-543: OIDC/OAuth resource configuration Nov 22, 2024
liouk added 17 commits November 26, 2024 17:50
If OIDC is available then set replicas to 0, otherwise fall back
to the default behaviour of counting nodes.
This allows the controller to proceed with the sync and
eventually scale down the deployment to 0 replicas.
So that it can be stopped when auth type is OIDC.
@liouk liouk force-pushed the oidc-oauth-cleanup branch from ae635c0 to 5198aea Compare November 26, 2024 16:50
return false, err
} else if oidcAvailable {
// the route is no longer a pre-requisite
return true, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

The route is gone. But we can still fulfill the precondition without the need for a deployment of the oauth-server?

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 am currently reworking the way the workload/deployment controllers clean up the deployment, so this will likely change. I'll report back to this thread once this is done.

} else if oidcAvailable {
return common.ApplyControllerConditions(ctx, c.operatorClient, c.controllerInstanceName, knownConditionNames, nil)
}

foundConditions := []operatorv1.OperatorCondition{}

workers, err := c.nodeLister.List(labels.SelectorFromSet(labels.Set{"node-role.kubernetes.io/worker": ""}))
Copy link
Contributor

@ibihim ibihim Nov 27, 2024

Choose a reason for hiding this comment

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

Isn't it odd, that we check pod availability for the ingress pods primarily on worker nodes, while the oauth-servers are on the master node?

If the ingress dies, the oauth-server becomes unreachable, no?

@liouk
Copy link
Member Author

liouk commented Dec 5, 2024

Pre-merge testing has revealed some issues with this PR; turning this into WIP until fixed.

/retitle WIP: AUTH-543: OIDC/OAuth resource configuration

@openshift-ci openshift-ci bot changed the title AUTH-543: OIDC/OAuth resource configuration WIP: AUTH-543: OIDC/OAuth resource configuration Dec 5, 2024
@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 Dec 5, 2024
Copy link
Contributor

openshift-ci bot commented Dec 10, 2024

@liouk: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/unit a1cf995 link true /test unit
ci/prow/okd-scos-e2e-aws-ovn a1cf995 link false /test okd-scos-e2e-aws-ovn
ci/prow/verify a1cf995 link true /test verify
ci/prow/e2e-operator a1cf995 link true /test e2e-operator
ci/prow/test-operator-integration a1cf995 link false /test test-operator-integration

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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.

3 participants