-
Notifications
You must be signed in to change notification settings - Fork 330
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
Ingress endpoint #1597
Ingress endpoint #1597
Conversation
✅ Deploy Preview for hypershift-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
34b400b
to
4a685f6
Compare
control-plane-operator/hostedclusterconfigoperator/controllers/resources/ingress/params.go
Outdated
Show resolved
Hide resolved
control-plane-operator/hostedclusterconfigoperator/controllers/resources/ingress/params.go
Outdated
Show resolved
Hide resolved
control-plane-operator/hostedclusterconfigoperator/controllers/resources/ingress/params.go
Show resolved
Hide resolved
control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go
Outdated
Show resolved
Hide resolved
control-plane-operator/hostedclusterconfigoperator/controllers/resources/ingress/reconcile.go
Outdated
Show resolved
Hide resolved
control-plane-operator/hostedclusterconfigoperator/controllers/resources/ingress/reconcile.go
Outdated
Show resolved
Hide resolved
Thanks @pcrentsil /hold |
control-plane-operator/hostedclusterconfigoperator/controllers/resources/ingress/params.go
Outdated
Show resolved
Hide resolved
control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go
Outdated
Show resolved
Hide resolved
control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go
Outdated
Show resolved
Hide resolved
@pcrentsil We will also need to adjust |
control-plane-operator/hostedclusterconfigoperator/controllers/resources/ingress/params.go
Outdated
Show resolved
Hide resolved
control-plane-operator/hostedclusterconfigoperator/controllers/resources/ingress/params.go
Outdated
Show resolved
Hide resolved
control-plane-operator/hostedclusterconfigoperator/controllers/resources/ingress/reconcile.go
Outdated
Show resolved
Hide resolved
a1d466b
to
46a353f
Compare
...l-plane-operator/hostedclusterconfigoperator/controllers/resources/ingress/reconcile_test.go
Outdated
Show resolved
Hide resolved
773999d
to
f901129
Compare
This has been updated. |
api/v1alpha1/hostedcluster_types.go
Outdated
@@ -53,6 +53,9 @@ const ( | |||
// (performs container image verification). | |||
PortierisImageAnnotation = "hypershift.openshift.io/portieris-image" | |||
|
|||
//Configure ingress controller with endpoint publishing strategy as Private. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before starting the sentence.
Can we elaborate details and context e.g:
// Configure ingress controller with endpoint publishing strategy as Private.
This overrides any opinionated strategy set by platform in ReconcileDefaultIngressController.
It's used by IBM cloud for...
NOTE: We'll expose this in the API if the use case gets generalised.
@@ -592,7 +592,7 @@ func (r *reconciler) reconcileIngressController(ctx context.Context, hcp *hyperv | |||
p := ingress.NewIngressParams(hcp) | |||
ingressController := manifests.IngressDefaultIngressController() | |||
if _, err := r.CreateOrUpdate(ctx, r.client, ingressController, func() error { | |||
return ingress.ReconcileDefaultIngressController(ingressController, p.IngressSubdomain, p.PlatformType, p.Replicas, (hcp.Spec.Platform.IBMCloud != nil && hcp.Spec.Platform.IBMCloud.ProviderType == configv1.IBMCloudProviderTypeUPI)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we are here, for readability: can we move (hcp.Spec.Platform.IBMCloud != nil && hcp.Spec.Platform.IBMCloud.ProviderType == configv1.IBMCloudProviderTypeUPI)
up into a variable that is passed through the signature?
Thanks! I know we discuss this on sync but could you remind me what's the particular case for IBM? Is there a need to choose isPrivate vs not depending on the cluster or is it always the same? nit: mind using imperative mood in commit, e.g "Private Type for Ingress Endpoints" -> "Add annotation to enable PrivateType for default guest cluster Ingress controller". Also fwiw you can include the PR desc in the commit as well |
Hey @enxebre , thank you for the review! I can provide a bit of context. For our OpenShift on IBM Cloud offering (ROKS), there is a capability where clients are able to toggle to update if they want the ingress controller exposed via LB or not. This enhancement is meant to expose such configuration for HyperShift managed clusters, so that our automation process can wrap around it. |
Thanks @hasueki, makes sense. I think this should be eventually in the API, possibly just not yet. I created https://issues.redhat.com/browse/HOSTEDCP-527 to track and follow up as we see fit when evolving the API. lgtm, pending fixing commits. |
48ca977
to
aee29eb
Compare
@pcrentsil: The following test failed, say
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. |
Hey, @enxebre let me know your comments on any of the changes implemented! |
return &IngressParams{ | ||
IngressSubdomain: globalconfig.IngressDomain(hcp), | ||
Replicas: replicas, | ||
PlatformType: hcp.Spec.Platform.Type, | ||
IsPrivate: isPrivate, | ||
CloudUPI: CloudUPI, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this is IBM specific, should be IBMCloudIBM.
isPrivate := false | ||
CloudUPI := false | ||
if hcp.Spec.Platform.IBMCloud != nil && hcp.Spec.Platform.IBMCloud.ProviderType == configv1.IBMCloudProviderTypeUPI { | ||
CloudUPI = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why is this variable exported? CloudUPI -> cloudUPI or make it ibm specific ibmCloudUPI
Thanks @pcrentsil |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre, pcrentsil 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 |
apart from the nit that @enxebre pointed out (local vars should never be capitalized), this lgtm |
…vate. Expose this configuration setting as an annotation on the HostedCluster/HostedControlPlane CRs. And will be generic to be applicable to any providers. Support ingress endpoint publishing strategy scope like we do today. Support for this was recently added to the IBM ROKS Toolkit and our ROKS 4 ansible code
c1728df
to
3227508
Compare
/lgtm |
/hold cancel |
/cherry-pick release-4.11 |
@pcrentsil: new pull request created: #1667 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 kubernetes/test-infra repository. |
Configure ingress controller with endpoint publishing strategy as Private. Expose this configuration setting as an annotation on the HostedCluster/HostedControlPlane CRs. And will be generic to be applicable to any providers. Support ingress endpoint publishing strategy scope like we do today. Support for this was recently added to the IBM ROKS Toolkit and our ROKS 4 ansible code. (Focus on scoping this up to Hypershift).
Issue: #1599
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