Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump to OSSM 3.0 for Gateway API support
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 gatwayclass 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. * 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.
- Loading branch information