Skip to content

Commit

Permalink
Merge pull request #266 from 3scale-ops/clenaup/system-sphinx
Browse files Browse the repository at this point in the history
Cleanup/Remove system-sphinx from System API
  • Loading branch information
3scale-robot authored Jul 4, 2023
2 parents f8d510a + f20fde4 commit d6e2664
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 175 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

# 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")
Expand Down
49 changes: 2 additions & 47 deletions api/v1alpha1/system_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,6 @@ var (
MaxThreads: pointer.Int32(15),
}

// Sphinx
systemDefaultSphinxEnabled bool = false

// Searchd
systemDefaultSearchdEnabled bool = true
systemDefaultSearchdImage defaultImageSpec = defaultImageSpec{
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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{}
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand All @@ -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
Expand Down
45 changes: 0 additions & 45 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 4 additions & 13 deletions bundle/manifests/saas-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -627,15 +627,15 @@ metadata:
capabilities: Basic Install
categories: Integration & Delivery
containerImage: quay.io/3scale/saas-operator
createdAt: "2023-07-03T09:28:53Z"
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.
operators.operatorframework.io/builder: operator-sdk-v1.27.0
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
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -4900,4 +4891,4 @@ spec:
provider:
name: Red Hat
url: https://www.3scale.net/
version: 0.19.10
version: 0.19.11
11 changes: 0 additions & 11 deletions bundle/manifests/saas.3scale.net_systems.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 0 additions & 11 deletions config/crd/bases/saas.3scale.net_systems.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ kind: Kustomization
images:
- name: controller
newName: quay.io/3scale/saas-operator
newTag: v0.19.10
newTag: v0.19.11
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 1 addition & 36 deletions docs/api-reference/reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
****
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -1804,31 +1787,13 @@ 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
| *`twemproxy`* __xref:{anchor_prefix}-github-com-3scale-saas-operator-api-v1alpha1-twemproxyspec[$$TwemproxySpec$$]__ | Configures twemproxy
|===


[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"]
Expand Down
2 changes: 1 addition & 1 deletion pkg/version/version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package version

const (
version string = "v0.19.10"
version string = "v0.19.11"
)

// Current returns the current marin3r operator version
Expand Down

0 comments on commit d6e2664

Please sign in to comment.