From c64ba05e1b0225017213b7125b8f32fb193e5aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20L=C3=B3pez?= Date: Mon, 3 Jul 2023 17:04:41 +0200 Subject: [PATCH 1/4] Remove completely system-sphinx from System API --- api/v1alpha1/system_types.go | 49 +------------------ api/v1alpha1/zz_generated.deepcopy.go | 45 ----------------- config/crd/bases/saas.3scale.net_systems.yaml | 11 ----- 3 files changed, 2 insertions(+), 103 deletions(-) diff --git a/api/v1alpha1/system_types.go b/api/v1alpha1/system_types.go index 03ce2cb4..2a454067 100644 --- a/api/v1alpha1/system_types.go +++ b/api/v1alpha1/system_types.go @@ -163,9 +163,6 @@ var ( MaxThreads: pointer.Int32(15), } - // Sphinx - systemDefaultSphinxEnabled bool = false - // Searchd systemDefaultSearchdEnabled bool = true systemDefaultSearchdImage defaultImageSpec = defaultImageSpec{ @@ -238,10 +235,6 @@ type SystemSpec struct { // +operator-sdk:csv:customresourcedefinitions:type=spec // +optional SidekiqLow *SystemSidekiqSpec `json:"sidekiqLow,omitempty"` - // DEPRECATED Sphinx specific configuration options - // +operator-sdk:csv:customresourcedefinitions:type=spec - // +optional - Sphinx *SystemSphinxSpec `json:"sphinx,omitempty"` // Searchd specific configuration options // +operator-sdk:csv:customresourcedefinitions:type=spec // +optional @@ -291,11 +284,6 @@ func (spec *SystemSpec) Default() { } spec.Searchd.Default() - if spec.Sphinx == nil { - spec.Sphinx = &SystemSphinxSpec{} - } - spec.Sphinx.Default(spec.Image) - if spec.Console == nil { spec.Console = &SystemRailsConsoleSpec{} } @@ -786,39 +774,6 @@ func (spec *SystemSidekiqSpec) Default(sidekiqType systemSidekiqType) { } } -// SystemSphinxSpec configures the App component of System -type SystemSphinxSpec struct { - // Configuration options for System's sphinx - // +operator-sdk:csv:customresourcedefinitions:type=spec - // +optional - Config *SphinxConfig `json:"config,omitempty"` -} - -// Default implements defaulting for the system sphinx component -func (spec *SystemSphinxSpec) Default(systemDefaultImage *ImageSpec) { - - if spec.Config == nil { - spec.Config = &SphinxConfig{} - } - spec.Config.Default() -} - -// SphinxConfig has configuration options for System's sphinx -type SphinxConfig struct { - // Deploy Sphinx instance - // +operator-sdk:csv:customresourcedefinitions:type=spec - // +optional - Enabled *bool `json:"enabled,omitempty"` -} - -// Default implements defaulting for SphinxConfig -func (sc *SphinxConfig) Default() { - - sc.Enabled = boolOrDefault( - sc.Enabled, pointer.Bool(systemDefaultSphinxEnabled), - ) -} - // SystemSearchdSpec configures the App component of System type SystemSearchdSpec struct { // Deploy searchd instance @@ -858,7 +813,7 @@ type SystemSearchdSpec struct { TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` } -// Default implements defaulting for the system sphinx component +// Default implements defaulting for the system searchd component func (spec *SystemSearchdSpec) Default() { spec.Enabled = boolOrDefault(spec.Enabled, pointer.Bool(systemDefaultSearchdEnabled)) spec.Image = InitializeImageSpec(spec.Image, defaultImageSpec(systemDefaultSearchdImage)) @@ -874,7 +829,7 @@ func (spec *SystemSearchdSpec) Default() { ) } -// SearchdConfig has configuration options for System's sphinx +// SearchdConfig has configuration options for System's searchd type SearchdConfig struct { // Allows setting the service name for Searchd // +operator-sdk:csv:customresourcedefinitions:type=spec diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 4ed083a7..65155372 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -2721,26 +2721,6 @@ func (in *SidekiqConfig) DeepCopy() *SidekiqConfig { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SphinxConfig) DeepCopyInto(out *SphinxConfig) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SphinxConfig. -func (in *SphinxConfig) DeepCopy() *SphinxConfig { - if in == nil { - return nil - } - out := new(SphinxConfig) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *System) DeepCopyInto(out *System) { *out = *in @@ -3226,11 +3206,6 @@ func (in *SystemSpec) DeepCopyInto(out *SystemSpec) { *out = new(SystemSidekiqSpec) (*in).DeepCopyInto(*out) } - if in.Sphinx != nil { - in, out := &in.Sphinx, &out.Sphinx - *out = new(SystemSphinxSpec) - (*in).DeepCopyInto(*out) - } if in.Searchd != nil { in, out := &in.Searchd, &out.Searchd *out = new(SystemSearchdSpec) @@ -3263,26 +3238,6 @@ func (in *SystemSpec) DeepCopy() *SystemSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SystemSphinxSpec) DeepCopyInto(out *SystemSphinxSpec) { - *out = *in - if in.Config != nil { - in, out := &in.Config, &out.Config - *out = new(SphinxConfig) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemSphinxSpec. -func (in *SystemSphinxSpec) DeepCopy() *SystemSphinxSpec { - if in == nil { - return nil - } - out := new(SystemSphinxSpec) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SystemStatus) DeepCopyInto(out *SystemStatus) { *out = *in diff --git a/config/crd/bases/saas.3scale.net_systems.yaml b/config/crd/bases/saas.3scale.net_systems.yaml index b8f61382..af487dea 100644 --- a/config/crd/bases/saas.3scale.net_systems.yaml +++ b/config/crd/bases/saas.3scale.net_systems.yaml @@ -4027,17 +4027,6 @@ spec: type: object type: array type: object - sphinx: - description: DEPRECATED Sphinx specific configuration options - properties: - config: - description: Configuration options for System's sphinx - properties: - enabled: - description: Deploy Sphinx instance - type: boolean - type: object - type: object twemproxy: description: Configures twemproxy properties: From e4ab7a91ee749ecfb460dbeb9db8dfe1ef31bf23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20L=C3=B3pez?= Date: Mon, 3 Jul 2023 17:05:33 +0200 Subject: [PATCH 2/4] Update documentation with system sphinx removal --- docs/api-reference/reference.asciidoc | 37 +-------------------------- 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/docs/api-reference/reference.asciidoc b/docs/api-reference/reference.asciidoc index 89233061..d1ecb954 100644 --- a/docs/api-reference/reference.asciidoc +++ b/docs/api-reference/reference.asciidoc @@ -1343,7 +1343,7 @@ SMTPSpec has options to configure system's SMTP [id="{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-searchdconfig"] ==== SearchdConfig -SearchdConfig has configuration options for System's sphinx +SearchdConfig has configuration options for System's searchd .Appears In: **** @@ -1548,23 +1548,6 @@ SidekiqConfig configures app behavior for System Sidekiq |=== -[id="{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-sphinxconfig"] -==== SphinxConfig - -SphinxConfig has configuration options for System's sphinx - -.Appears In: -**** -- xref:{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-systemsphinxspec[$$SystemSphinxSpec$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`enabled`* __boolean__ | Deploy Sphinx instance -|=== - - [id="{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-system"] ==== System @@ -1804,7 +1787,6 @@ SystemSpec defines the desired state of System | *`sidekiqDefault`* __xref:{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-systemsidekiqspec[$$SystemSidekiqSpec$$]__ | Sidekiq Default specific configuration options | *`sidekiqBilling`* __xref:{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-systemsidekiqspec[$$SystemSidekiqSpec$$]__ | Sidekiq Billing specific configuration options | *`sidekiqLow`* __xref:{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-systemsidekiqspec[$$SystemSidekiqSpec$$]__ | Sidekiq Low specific configuration options -| *`sphinx`* __xref:{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-systemsphinxspec[$$SystemSphinxSpec$$]__ | DEPRECATED Sphinx specific configuration options | *`searchd`* __xref:{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-systemsearchdspec[$$SystemSearchdSpec$$]__ | Searchd specific configuration options | *`console`* __xref:{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-systemrailsconsolespec[$$SystemRailsConsoleSpec$$]__ | Console specific configuration options | *`grafanaDashboard`* __xref:{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-grafanadashboardspec[$$GrafanaDashboardSpec$$]__ | Configures the Grafana Dashboard for the component @@ -1812,23 +1794,6 @@ SystemSpec defines the desired state of System |=== -[id="{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-systemsphinxspec"] -==== SystemSphinxSpec - -SystemSphinxSpec configures the App component of System - -.Appears In: -**** -- xref:{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-systemspec[$$SystemSpec$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`config`* __xref:{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-sphinxconfig[$$SphinxConfig$$]__ | Configuration options for System's sphinx -|=== - - [id="{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-systemzyncspec"] From 2eea019ac332d94cc183ef4db9978d7c57c2446e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20L=C3=B3pez?= Date: Mon, 3 Jul 2023 17:12:36 +0200 Subject: [PATCH 3/4] Alpha release v0.19.11-alpha.1 --- Makefile | 2 +- bundle.Dockerfile | 3 +-- .../saas-operator.clusterserviceversion.yaml | 17 ++++------------- bundle/manifests/saas.3scale.net_systems.yaml | 11 ----------- bundle/metadata/annotations.yaml | 3 +-- config/manager/kustomization.yaml | 2 +- .../saas-operator.clusterserviceversion.yaml | 9 --------- pkg/version/version.go | 2 +- 8 files changed, 9 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index a01d1a4d..a96ff3ac 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.19.10 +VERSION ?= 0.19.11-alpha.1 # 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") diff --git a/bundle.Dockerfile b/bundle.Dockerfile index e44312a4..b80837a0 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -5,8 +5,7 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=saas-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,stable -LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha +LABEL operators.operatorframework.io.bundle.channels.v1=alpha LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.27.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/bundle/manifests/saas-operator.clusterserviceversion.yaml b/bundle/manifests/saas-operator.clusterserviceversion.yaml index 46387321..1ebd9493 100644 --- a/bundle/manifests/saas-operator.clusterserviceversion.yaml +++ b/bundle/manifests/saas-operator.clusterserviceversion.yaml @@ -627,7 +627,7 @@ metadata: capabilities: Basic Install categories: Integration & Delivery containerImage: quay.io/3scale/saas-operator - createdAt: "2023-07-03T09:28:53Z" + createdAt: "2023-07-03T15:07:19Z" description: |- The 3scale SaaS Operator creates and maintains a SaaS-ready deployment of the Red Hat 3scale API Management on OpenShift. @@ -635,7 +635,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/3scale/saas-operator support: Red Hat - name: saas-operator.v0.19.10 + name: saas-operator.v0.19.11-alpha.1 namespace: placeholder spec: apiservicedefinitions: {} @@ -3803,15 +3803,6 @@ spec: - description: Configures the TerminationGracePeriodSeconds displayName: Termination Grace Period Seconds path: sidekiqLow.terminationGracePeriodSeconds - - description: DEPRECATED Sphinx specific configuration options - displayName: Sphinx - path: sphinx - - description: Configuration options for System's sphinx - displayName: Config - path: sphinx.config - - description: Deploy Sphinx instance - displayName: Enabled - path: sphinx.config.enabled - description: Configures twemproxy displayName: Twemproxy path: twemproxy @@ -4386,7 +4377,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/3scale/saas-operator:v0.19.10 + image: quay.io/3scale/saas-operator:v0.19.11-alpha.1 livenessProbe: httpGet: path: /healthz @@ -4900,4 +4891,4 @@ spec: provider: name: Red Hat url: https://www.3scale.net/ - version: 0.19.10 + version: 0.19.11-alpha.1 diff --git a/bundle/manifests/saas.3scale.net_systems.yaml b/bundle/manifests/saas.3scale.net_systems.yaml index d0f8d8ca..271da1f3 100644 --- a/bundle/manifests/saas.3scale.net_systems.yaml +++ b/bundle/manifests/saas.3scale.net_systems.yaml @@ -4026,17 +4026,6 @@ spec: type: object type: array type: object - sphinx: - description: DEPRECATED Sphinx specific configuration options - properties: - config: - description: Configuration options for System's sphinx - properties: - enabled: - description: Deploy Sphinx instance - type: boolean - type: object - type: object twemproxy: description: Configures twemproxy properties: diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 5d8597be..77fadbff 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -4,8 +4,7 @@ annotations: operators.operatorframework.io.bundle.manifests.v1: manifests/ operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: saas-operator - operators.operatorframework.io.bundle.channels.v1: alpha,stable - operators.operatorframework.io.bundle.channel.default.v1: alpha + operators.operatorframework.io.bundle.channels.v1: alpha operators.operatorframework.io.metrics.builder: operator-sdk-v1.27.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 033c782e..48af4cfd 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.19.10 + newTag: v0.19.11-alpha.1 diff --git a/config/manifests/bases/saas-operator.clusterserviceversion.yaml b/config/manifests/bases/saas-operator.clusterserviceversion.yaml index af99eb0c..3dc2b5ae 100644 --- a/config/manifests/bases/saas-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/saas-operator.clusterserviceversion.yaml @@ -3315,15 +3315,6 @@ spec: - description: Configures the TerminationGracePeriodSeconds displayName: Termination Grace Period Seconds path: sidekiqLow.terminationGracePeriodSeconds - - description: DEPRECATED Sphinx specific configuration options - displayName: Sphinx - path: sphinx - - description: Configuration options for System's sphinx - displayName: Config - path: sphinx.config - - description: Deploy Sphinx instance - displayName: Enabled - path: sphinx.config.enabled - description: Configures twemproxy displayName: Twemproxy path: twemproxy diff --git a/pkg/version/version.go b/pkg/version/version.go index a27e8812..e2655bc3 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,7 +1,7 @@ package version const ( - version string = "v0.19.10" + version string = "v0.19.11-alpha.1" ) // Current returns the current marin3r operator version From f20fde49fba09f7ea1785321a38044ec19633c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20L=C3=B3pez?= Date: Tue, 4 Jul 2023 11:40:31 +0200 Subject: [PATCH 4/4] Stable release v0.19.11 --- Makefile | 2 +- bundle.Dockerfile | 3 ++- bundle/manifests/saas-operator.clusterserviceversion.yaml | 8 ++++---- bundle/metadata/annotations.yaml | 3 ++- config/manager/kustomization.yaml | 2 +- pkg/version/version.go | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index a96ff3ac..b1a458f7 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.19.11-alpha.1 +VERSION ?= 0.19.11 # 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") diff --git a/bundle.Dockerfile b/bundle.Dockerfile index b80837a0..e44312a4 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -5,7 +5,8 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=saas-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha +LABEL operators.operatorframework.io.bundle.channels.v1=alpha,stable +LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.27.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/bundle/manifests/saas-operator.clusterserviceversion.yaml b/bundle/manifests/saas-operator.clusterserviceversion.yaml index 1ebd9493..ec4c460e 100644 --- a/bundle/manifests/saas-operator.clusterserviceversion.yaml +++ b/bundle/manifests/saas-operator.clusterserviceversion.yaml @@ -627,7 +627,7 @@ metadata: capabilities: Basic Install categories: Integration & Delivery containerImage: quay.io/3scale/saas-operator - createdAt: "2023-07-03T15:07:19Z" + createdAt: "2023-07-03T15:19:09Z" description: |- The 3scale SaaS Operator creates and maintains a SaaS-ready deployment of the Red Hat 3scale API Management on OpenShift. @@ -635,7 +635,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/3scale/saas-operator support: Red Hat - name: saas-operator.v0.19.11-alpha.1 + name: saas-operator.v0.19.11 namespace: placeholder spec: apiservicedefinitions: {} @@ -4377,7 +4377,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/3scale/saas-operator:v0.19.11-alpha.1 + image: quay.io/3scale/saas-operator:v0.19.11 livenessProbe: httpGet: path: /healthz @@ -4891,4 +4891,4 @@ spec: provider: name: Red Hat url: https://www.3scale.net/ - version: 0.19.11-alpha.1 + version: 0.19.11 diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 77fadbff..5d8597be 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -4,7 +4,8 @@ annotations: operators.operatorframework.io.bundle.manifests.v1: manifests/ operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: saas-operator - operators.operatorframework.io.bundle.channels.v1: alpha + operators.operatorframework.io.bundle.channels.v1: alpha,stable + operators.operatorframework.io.bundle.channel.default.v1: alpha operators.operatorframework.io.metrics.builder: operator-sdk-v1.27.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 48af4cfd..6d4f0529 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.19.11-alpha.1 + newTag: v0.19.11 diff --git a/pkg/version/version.go b/pkg/version/version.go index e2655bc3..945fcca4 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,7 +1,7 @@ package version const ( - version string = "v0.19.11-alpha.1" + version string = "v0.19.11" ) // Current returns the current marin3r operator version