Skip to content

Commit

Permalink
Bump to OSSM 3.0 for Gateway API support
Browse files Browse the repository at this point in the history
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
Miciah committed Oct 4, 2024
1 parent 871b2b2 commit 9af78a0
Show file tree
Hide file tree
Showing 473 changed files with 25,952 additions and 15,217 deletions.
93 changes: 47 additions & 46 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,45 @@ require (
github.com/IBM/networking-go-sdk v0.26.0
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1286
github.com/aws/aws-sdk-go v1.38.49
github.com/davecgh/go-spew v1.1.1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/florianl/go-nfqueue v1.3.2
github.com/go-logr/logr v1.4.1
github.com/go-logr/logr v1.4.2
github.com/go-logr/zapr v1.3.0
github.com/google/go-cmp v0.6.0
github.com/google/gopacket v1.1.19
github.com/istio-ecosystem/sail-operator v0.0.0-20241001175228-c7164d4a99dd
github.com/jongio/azidext/go/azidext v0.4.0
github.com/maistra/istio-operator v0.0.0-20240712143246-fd7dfc8af831
github.com/openshift/api v3.9.1-0.20190924102528-32369d4db2ad+incompatible
github.com/openshift/client-go v0.0.0-20240405120947-c67c8325cdd8
github.com/openshift/library-go v0.0.0-20240419113445-f1541d628746
github.com/operator-framework/api v0.15.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.18.0
github.com/prometheus/common v0.45.0
github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.4
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/common v0.55.0
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.9.0
github.com/summerwind/h2spec v0.0.0-20200804131034-70ac22940108
github.com/tcnksm/go-httpstat v0.2.1-0.20191008022543-e866bb274419
go.uber.org/zap v1.26.0
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91
golang.org/x/time v0.3.0
go.uber.org/zap v1.27.0
golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7
golang.org/x/time v0.5.0
google.golang.org/api v0.126.0
google.golang.org/grpc v1.58.3
google.golang.org/grpc v1.65.0
gopkg.in/fsnotify.v1 v1.4.7
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.30.2
k8s.io/apiextensions-apiserver v0.30.2
k8s.io/apimachinery v0.30.2
k8s.io/apiserver v0.30.2
k8s.io/api v0.30.3
k8s.io/apiextensions-apiserver v0.30.3
k8s.io/apimachinery v0.30.3
k8s.io/apiserver v0.30.3
k8s.io/client-go v12.0.0+incompatible
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
sigs.k8s.io/controller-runtime v0.18.4
sigs.k8s.io/gateway-api v0.5.1-0.20220921185115-ee7a83814203
)

require (
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/compute/metadata v0.3.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect
Expand All @@ -64,24 +64,24 @@ require (
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b // indirect
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/go-openapi/errors v0.21.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/strfmt v0.22.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.19.0 // indirect
github.com/goccy/go-yaml v1.8.8 // indirect
github.com/goccy/go-yaml v1.12.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
Expand All @@ -92,10 +92,10 @@ require (
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.11.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/imdario/mergo v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand All @@ -106,7 +106,6 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mdlayher/netlink v1.6.0 // indirect
github.com/mdlayher/socket v0.1.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
Expand All @@ -119,33 +118,33 @@ require (
github.com/operator-framework/operator-sdk v0.18.0 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/robfig/cron v1.2.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/component-base v0.30.2 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/component-base v0.30.3 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-aggregator v0.29.0 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
Expand All @@ -159,3 +158,5 @@ replace (
github.com/openshift/api => github.com/openshift/api v0.0.0-20240806152114-6b4a57ec20b0
k8s.io/client-go => k8s.io/client-go v0.30.2
)

replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.5
Loading

0 comments on commit 9af78a0

Please sign in to comment.