diff --git a/Makefile b/Makefile index 6aa8f556..7e8d523b 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # To re-generate a bundle for another specific version without changing the standard setup, you can: # - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) -VERSION ?= 0.25.0-alpha.3 +VERSION ?= 0.25.0-alpha.4 # CHANNELS define the bundle channels used in the bundle. # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") # To re-generate a bundle for other specific channels without changing the standard setup, you can: diff --git a/api/v1alpha1/publishing_strategy_types.go b/api/v1alpha1/publishing_strategy_types.go index d9463f14..666a2be4 100644 --- a/api/v1alpha1/publishing_strategy_types.go +++ b/api/v1alpha1/publishing_strategy_types.go @@ -479,8 +479,9 @@ func (gen WorkloadPublishingStrategyUpgrader) Build(ctx context.Context, cl clie } } else { service = &Simple{ - ServiceNameOverride: &gen.ServiceName, - ServiceType: &gen.ServiceType, + ServiceNameOverride: &gen.ServiceName, + ServiceType: &gen.ServiceType, + ServicePortsOverride: gen.ServicePortOverrides, } } @@ -497,10 +498,6 @@ func (gen WorkloadPublishingStrategyUpgrader) Build(ctx context.Context, cl clie service.NetworkLoadBalancerConfig = gen.NLBSpec } - if len(gen.ServicePortOverrides) > 0 { - service.ServicePortsOverride = gen.ServicePortOverrides - } - // STEP3: create appropriate strategy if required if gen.Marin3r != nil { out = &PublishingStrategy{ diff --git a/api/v1alpha1/publishing_strategy_types_test.go b/api/v1alpha1/publishing_strategy_types_test.go index 4c24933a..6a1a2773 100644 --- a/api/v1alpha1/publishing_strategy_types_test.go +++ b/api/v1alpha1/publishing_strategy_types_test.go @@ -270,7 +270,7 @@ func TestMapOfEnvoyDynamicConfig_AsList(t *testing.T) { } } -func TestWorkloadPublishingStrategyBuilder_Build(t *testing.T) { +func TestWorkloadPublishingStrategyUpgrader_Build(t *testing.T) { type fields struct { EndpointName string ServiceName string @@ -379,10 +379,6 @@ func TestWorkloadPublishingStrategyBuilder_Build(t *testing.T) { Marin3rSidecar: &Marin3rSidecarSpec{ Simple: &Simple{ ServiceType: util.Pointer(ServiceTypeNLB), - ServicePortsOverride: []corev1.ServicePort{ - {Name: "port1", Port: 1111, TargetPort: intstr.FromString("port1")}, - {Name: "port1", Port: 2222, TargetPort: intstr.FromString("port2")}, - }, }, Ports: []SidecarPort{{Name: "port1", Port: 1111}, {Name: "port2", Port: 2222}}, EnvoyDynamicConfig: map[string]EnvoyDynamicConfig{}, @@ -488,11 +484,11 @@ func TestWorkloadPublishingStrategyBuilder_Build(t *testing.T) { } got, err := gen.Build(tt.args.ctx, tt.args.cl) if (err != nil) != tt.wantErr { - t.Errorf("WorkloadPublishingStrategyBuilder.Build() error = %v, wantErr %v", err, tt.wantErr) + t.Errorf("WorkloadPublishingStrategyUpgrader.Build() error = %v, wantErr %v", err, tt.wantErr) return } if diff := cmp.Diff(got, tt.want); len(diff) > 0 { - t.Errorf("WorkloadPublishingStrategyBuilder.Build() = diff %v", diff) + t.Errorf("WorkloadPublishingStrategyUpgrader.Build() = diff %v", diff) } }) } diff --git a/bundle/manifests/saas-operator.clusterserviceversion.yaml b/bundle/manifests/saas-operator.clusterserviceversion.yaml index 17185ff9..22fd2cc8 100644 --- a/bundle/manifests/saas-operator.clusterserviceversion.yaml +++ b/bundle/manifests/saas-operator.clusterserviceversion.yaml @@ -849,7 +849,7 @@ metadata: capabilities: Basic Install categories: Integration & Delivery containerImage: quay.io/3scale/saas-operator - createdAt: "2024-07-08T15:35:34Z" + createdAt: "2024-07-11T15:55:54Z" description: |- The 3scale SaaS Operator creates and maintains a SaaS-ready deployment of the Red Hat 3scale API Management on OpenShift. @@ -857,7 +857,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/3scale-ops/saas-operator support: Red Hat - name: saas-operator.v0.25.0-alpha.3 + name: saas-operator.v0.25.0-alpha.4 namespace: placeholder spec: apiservicedefinitions: {} @@ -4878,6 +4878,12 @@ spec: - description: Override allows to directly specify a string value. displayName: Override path: config.accessCode.override + - description: Apicast can be used to pass down apicast endpoints configuration + displayName: Apicast + path: config.apicast + - description: Assets has configuration to access assets in AWS s3 + displayName: Assets + path: config.assets - description: AWS access key displayName: Access Key path: config.assets.accessKey @@ -6838,7 +6844,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/3scale/saas-operator:v0.25.0-alpha.3 + image: quay.io/3scale/saas-operator:v0.25.0-alpha.4 livenessProbe: httpGet: path: /healthz @@ -7402,4 +7408,4 @@ spec: provider: name: Red Hat url: https://www.3scale.net/ - version: 0.25.0-alpha.3 + version: 0.25.0-alpha.4 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 1a73b5d3..a4787f06 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -13,4 +13,4 @@ kind: Kustomization images: - name: controller newName: quay.io/3scale/saas-operator - newTag: v0.25.0-alpha.3 + newTag: v0.25.0-alpha.4 diff --git a/config/manifests/bases/saas-operator.clusterserviceversion.yaml b/config/manifests/bases/saas-operator.clusterserviceversion.yaml index d597d343..c042fa20 100644 --- a/config/manifests/bases/saas-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/saas-operator.clusterserviceversion.yaml @@ -4168,6 +4168,12 @@ spec: - description: Override allows to directly specify a string value. displayName: Override path: config.accessCode.override + - description: Apicast can be used to pass down apicast endpoints configuration + displayName: Apicast + path: config.apicast + - description: Assets has configuration to access assets in AWS s3 + displayName: Assets + path: config.assets - description: AWS access key displayName: Access Key path: config.assets.accessKey diff --git a/pkg/resource_builders/service/descriptor.go b/pkg/resource_builders/service/descriptor.go index a4ae0246..8115e11c 100644 --- a/pkg/resource_builders/service/descriptor.go +++ b/pkg/resource_builders/service/descriptor.go @@ -55,7 +55,7 @@ func (sd *ServiceDescriptor) Service(prefix, suffix string) *corev1.Service { } // Add service ports - if spec.ServicePortsOverride != nil { + if len(spec.ServicePortsOverride) > 0 { opts.Ports = spec.ServicePortsOverride } else { opts.Ports = sd.PortDefinitions diff --git a/pkg/version/version.go b/pkg/version/version.go index cbaac5c1..fa2814a7 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,7 +1,7 @@ package version const ( - version string = "v0.25.0-alpha.3" + version string = "v0.25.0-alpha.4" ) // Current returns the current marin3r operator version