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

Bump to OSSM 3.0 for Gateway API support #1152

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Miciah
Copy link
Contributor

@Miciah Miciah commented Oct 4, 2024

OSSM 3.0 replaces the OpenShift Service Mesh Operator with Sail Operator, and the ServiceMeshControlPlane CRD is replaced by the Istio CRD. Vendor the sail-operator API:

go mod edit -replace github.com/imdario/mergo=github.com/imdario/[email protected]
go get github.com/istio-ecosystem/sail-operator/api/v1alpha1
go mod tidy
go mod vendor

Note that vendoring Sail Operator requires the mergo override.

Update the gatewayclass controller to create a subscription for Sail Operator instead of the Service Mesh Operator, and to create an Istio CR instead of a ServiceMeshControlPlane CR.

Currently, OSSM 3.0 is Tech Preview, so we must configure the subscription accordingly.

@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 Oct 4, 2024
Copy link
Contributor

openshift-ci bot commented Oct 4, 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

Copy link
Contributor

openshift-ci bot commented Oct 4, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from miciah. 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

@Miciah
Copy link
Contributor Author

Miciah commented Oct 4, 2024

/test e2e-aws-gatewayapi
/test e2e-aws-operator

@Miciah Miciah force-pushed the bump-to-OSSM-3.0-for-Gateway-API-support branch 2 times, most recently from 9af78a0 to 1ceec30 Compare October 4, 2024 21:18
@Miciah
Copy link
Contributor Author

Miciah commented Oct 4, 2024

/test e2e-aws-gatewayapi

OSSM 3.0 replaces the OpenShift Service Mesh Operator with Sail Operator, and
the ServiceMeshControlPlane CRD is replaced by the Istio CRD.  Vendor the
sail-operator API:

    go mod edit -replace github.com/imdario/mergo=github.com/imdario/[email protected]
    go get github.com/istio-ecosystem/sail-operator/api/v1alpha1
    go mod tidy
    go mod vendor

Note that vendoring Sail Operator requires the mergo override.

Update the gatewayclass controller to create a subscription for Sail Operator
instead of the Service Mesh Operator, and to create an Istio CR instead of a
ServiceMeshControlPlane CR.

Currently, OSSM 3.0 is Tech Preview, so we must configure the subscription
accordingly.

* go.mod: Vendor the sail-operator API.
* go.sum:
* vendor/*: Regenerate.
* manifests/00-cluster-role.yaml: Allow access to the Sail API instead of the
Maistra APIs.
* pkg/operator/client/client.go (init): Register the Sail API instead of the
Maistra APIs.
* pkg/operator/controller/gateway-service-dns/controller.go (Reconcile): Use the
service's labels instead of the service's label selectors.  OSSM 3.0 seems to
set the label whereas OSSM 2.y set the label selector.
* pkg/operator/controller/gateway-service-dns/controller_test.go
(Test_Reconcile): Update expectations for service labels and selectors.
* pkg/operator/controller/gatewayclass/servicemeshcontrolplane.go: Rename...
* pkg/operator/controller/gatewayclass/istio.go: ...to this.
(ensureServiceMeshControlPlane): Rename...
(ensureIstio): To this.
(desiredServiceMeshControlPlane): Rename...
(desiredIstio): ...to this.
(currentServiceMeshControlPlane): Rename...
(currentIstio): ...to this.
(createServiceMeshControlPlane): Rename...
(createIstio): ...to this.
(smcpCmpOpts): Rename...
(istioCmpOpts): ...to this.  Remove unneeded AllowUnexported rule.
(updateServiceMeshControlPlane): Rename...
(updateIstio): ...to this.
(serviceMeshControlPlaneChanged): Rename...
(istioChanged): ...to this.
* pkg/operator/controller/names.go (ServiceMeshControlPlaneName): Rename...
(IstioName): ...to this.  Remove the namespace as the Istio CR is
cluster-scoped.
(ServiceMeshSubscriptionName): Rename...
(SailOperatorSubscriptionName): ...to this.  Update the name.
* pkg/operator/controller/gatewayclass/controller.go (Reconcile): Use
ensureIstio instead of ensureServiceMeshControlPlane.
* pkg/operator/controller/gatewayclass/subscription.go
(ensureServiceMeshOperatorSubscription): Use SailOperatorSubscriptionName
instead of ServiceMeshSubscriptionName.
(desiredSubscription): Change the subscription from OSSM to Sail Operator.
For now, install the Tech Preview release.
* test/e2e/gateway_api_test.go (expectedSubscriptionName)
(expectedCatalogSourceName): Update consts to reference the Sail subscription.
* test/e2e/gateway_api_test.go (testGatewayAPIIstioInstallation): Delete call to
assertSMCP.  OSSM 3.y no longer uses the ServiceMeshControlPlane API, and the
E2E test does not need to be checking this sort of implementation detail.
* test/e2e/util_gatewayapi_test.go (openshiftIstioOperatorDeploymentName):
Update to reference the Sail operator deployment.
(openshiftSMCPName): Delete const.
(updateIngressOperatorRole):
(assertSMCP): Delete unused functions.
@Miciah Miciah force-pushed the bump-to-OSSM-3.0-for-Gateway-API-support branch from 1ceec30 to 53ec66e Compare October 14, 2024 04:30
@Miciah
Copy link
Contributor Author

Miciah commented Oct 14, 2024

/test e2e-aws-gatewayapi

Copy link
Contributor

openshift-ci bot commented Oct 14, 2024

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

@candita
Copy link
Contributor

candita commented Oct 25, 2024

@Miciah Just fyi - this PR doesn't update the CRDs so this is still running v1beta1 Gateway API CRDs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants