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

Bug 1870514: Configuring custom certificate for default console route #459

Merged
merged 1 commit into from Aug 31, 2020

Conversation

jhadvig
Copy link
Member

@jhadvig jhadvig commented Aug 24, 2020

When cluster user wants to define custom TLS secret for the default route he should just define the secret's name in the console-operator config. The issue is that we cannot have two routes(default, custom) with the same hostname.
I thing we should update the API comment with this use-case.

Also we should probably backport this fix to 4.5

/assign @spadgett

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. label Aug 24, 2020
@openshift-ci-robot
Copy link
Contributor

@jhadvig: This pull request references Bugzilla bug 1870514, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

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

In response to this:

Bug 1870514: Configuring custom certificate for default console route

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 added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 24, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 24, 2020
@jhadvig
Copy link
Member Author

jhadvig commented Aug 24, 2020

/test e2e-aws-operator

1 similar comment
@jhadvig
Copy link
Member Author

jhadvig commented Aug 24, 2020

/test e2e-aws-operator

@jhadvig
Copy link
Member Author

jhadvig commented Aug 24, 2020

/test e2e-gcp-upgrade

@jhadvig
Copy link
Member Author

jhadvig commented Aug 26, 2020

/test e2e-gcp-upgrade

@@ -224,6 +233,24 @@ func (c *RouteSyncController) SyncCustomRoute(operatorConfig *operatorsv1.Consol
return customRoute, "", customRouteError
}

func (c *RouteSyncController) ValidateDefaultRouteConfig(operatorConfig *operatorsv1.Console) (*corev1.Secret, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe GetDefaultRouteTLSConfig. This isn't really validating anything just returning config, specifically TLS config.

requiredDefaultRoute := routesub.DefaultRoute(operatorConfig)
customTLSSecret, configErr := c.ValidateDefaultRouteConfig(operatorConfig)
if configErr != nil {
return nil, "InvalidDefaultRouteConfig", configErr
Copy link
Member

Choose a reason for hiding this comment

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

It's not necessarily invalid. It means we couldn't get the secret, right? It be that the name is wrong, but it could be due to other errors as well?

}
return secret, nil
}

func (c *RouteSyncController) ValidateCustomRouteConfig(operatorConfig *operatorsv1.Console) (*corev1.Secret, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Existing code, but this method is overloaded. It both gets and validates, which makes it harder to understand. We can leave this for now, but we might want to break this up into separate methods that each do one thing in the future.

@jhadvig
Copy link
Member Author

jhadvig commented Aug 31, 2020

/test e2e-aws-operator

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 31, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig, spadgett

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

/retest

Please review the full test history for this PR and help us cut down flakes.

4 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit b041510 into openshift:master Aug 31, 2020
@openshift-ci-robot
Copy link
Contributor

@jhadvig: All pull requests linked via external trackers have merged:

Bugzilla bug 1870514 has been moved to the MODIFIED state.

In response to this:

Bug 1870514: Configuring custom certificate for default console route

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.

@jhadvig
Copy link
Member Author

jhadvig commented Sep 1, 2020

/cherry-pick release-4.5

@openshift-cherrypick-robot

@jhadvig: new pull request created: #465

In response to this:

/cherry-pick release-4.5

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.

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. bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants