Skip to content

Commit

Permalink
Merge pull request #259 from 3scale-ops/feat/system-searchd-updates
Browse files Browse the repository at this point in the history
feat: System Searchd
  • Loading branch information
3scale-robot authored May 9, 2023
2 parents 8f2959a + e11edc5 commit 4b9f6e6
Show file tree
Hide file tree
Showing 58 changed files with 2,740 additions and 793 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.6
VERSION ?= 0.19.7

# 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
58 changes: 29 additions & 29 deletions api/v1alpha1/apicast_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ import (
var (
apicastDefaultReplicas int32 = 2
apicastDefaultImage defaultImageSpec = defaultImageSpec{
Name: pointer.StringPtr("quay.io/3scale/apicast-cloud-hosted"),
Tag: pointer.StringPtr("latest"),
PullPolicy: (*corev1.PullPolicy)(pointer.StringPtr(string(corev1.PullIfNotPresent))),
Name: pointer.String("quay.io/3scale/apicast-cloud-hosted"),
Tag: pointer.String("latest"),
PullPolicy: (*corev1.PullPolicy)(pointer.String(string(corev1.PullIfNotPresent))),
}
apicastDefaultLoadBalancer defaultLoadBalancerSpec = defaultLoadBalancerSpec{
ProxyProtocol: pointer.BoolPtr(true),
CrossZoneLoadBalancingEnabled: pointer.BoolPtr(true),
ConnectionDrainingEnabled: pointer.BoolPtr(true),
ConnectionDrainingTimeout: pointer.Int32Ptr(60),
HealthcheckHealthyThreshold: pointer.Int32Ptr(2),
HealthcheckUnhealthyThreshold: pointer.Int32Ptr(2),
HealthcheckInterval: pointer.Int32Ptr(5),
HealthcheckTimeout: pointer.Int32Ptr(3),
ProxyProtocol: pointer.Bool(true),
CrossZoneLoadBalancingEnabled: pointer.Bool(true),
ConnectionDrainingEnabled: pointer.Bool(true),
ConnectionDrainingTimeout: pointer.Int32(60),
HealthcheckHealthyThreshold: pointer.Int32(2),
HealthcheckUnhealthyThreshold: pointer.Int32(2),
HealthcheckInterval: pointer.Int32(5),
HealthcheckTimeout: pointer.Int32(3),
}
apicastDefaultResources defaultResourceRequirementsSpec = defaultResourceRequirementsSpec{
Requests: corev1.ResourceList{
Expand All @@ -53,31 +53,31 @@ var (
},
}
apicastDefaultHPA defaultHorizontalPodAutoscalerSpec = defaultHorizontalPodAutoscalerSpec{
MinReplicas: pointer.Int32Ptr(2),
MaxReplicas: pointer.Int32Ptr(4),
ResourceUtilization: pointer.Int32Ptr(90),
ResourceName: pointer.StringPtr("cpu"),
MinReplicas: pointer.Int32(2),
MaxReplicas: pointer.Int32(4),
ResourceUtilization: pointer.Int32(90),
ResourceName: pointer.String("cpu"),
}
apicastDefaultLivenessProbe defaultProbeSpec = defaultProbeSpec{
InitialDelaySeconds: pointer.Int32Ptr(5),
TimeoutSeconds: pointer.Int32Ptr(5),
PeriodSeconds: pointer.Int32Ptr(10),
SuccessThreshold: pointer.Int32Ptr(1),
FailureThreshold: pointer.Int32Ptr(3),
InitialDelaySeconds: pointer.Int32(5),
TimeoutSeconds: pointer.Int32(5),
PeriodSeconds: pointer.Int32(10),
SuccessThreshold: pointer.Int32(1),
FailureThreshold: pointer.Int32(3),
}
apicastDefaultReadinessProbe defaultProbeSpec = defaultProbeSpec{
InitialDelaySeconds: pointer.Int32Ptr(5),
TimeoutSeconds: pointer.Int32Ptr(5),
PeriodSeconds: pointer.Int32Ptr(30),
SuccessThreshold: pointer.Int32Ptr(1),
FailureThreshold: pointer.Int32Ptr(3),
InitialDelaySeconds: pointer.Int32(5),
TimeoutSeconds: pointer.Int32(5),
PeriodSeconds: pointer.Int32(30),
SuccessThreshold: pointer.Int32(1),
FailureThreshold: pointer.Int32(3),
}
apicastDefaultPDB defaultPodDisruptionBudgetSpec = defaultPodDisruptionBudgetSpec{
MaxUnavailable: util.IntStrPtr(intstr.FromInt(1)),
}
apicastDefaultGrafanaDashboard defaultGrafanaDashboardSpec = defaultGrafanaDashboardSpec{
SelectorKey: pointer.StringPtr("monitoring-key"),
SelectorValue: pointer.StringPtr("middleware"),
SelectorKey: pointer.String("monitoring-key"),
SelectorValue: pointer.String("middleware"),
}
apicastDefaultMarin3rSpec defaultMarin3rSidecarSpec = defaultMarin3rSidecarSpec{}
apicastDefaultLogLevel string = "warn"
Expand Down Expand Up @@ -227,8 +227,8 @@ type ApicastConfig struct {

// Default sets default values for any value not specifically set in the ApicastConfig struct
func (cfg *ApicastConfig) Default() {
cfg.LogLevel = stringOrDefault(cfg.LogLevel, pointer.StringPtr(apicastDefaultLogLevel))
cfg.OIDCLogLevel = stringOrDefault(cfg.OIDCLogLevel, pointer.StringPtr(apicastDefaultOIDCLogLevel))
cfg.LogLevel = stringOrDefault(cfg.LogLevel, pointer.String(apicastDefaultLogLevel))
cfg.OIDCLogLevel = stringOrDefault(cfg.OIDCLogLevel, pointer.String(apicastDefaultOIDCLogLevel))

}

Expand Down
50 changes: 25 additions & 25 deletions api/v1alpha1/autossl_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ import (
var (
autosslDefaultReplicas int32 = 2
autosslDefaultImage defaultImageSpec = defaultImageSpec{
Name: pointer.StringPtr("quay.io/3scale/autossl"),
Tag: pointer.StringPtr("latest"),
PullPolicy: (*corev1.PullPolicy)(pointer.StringPtr(string(corev1.PullIfNotPresent))),
Name: pointer.String("quay.io/3scale/autossl"),
Tag: pointer.String("latest"),
PullPolicy: (*corev1.PullPolicy)(pointer.String(string(corev1.PullIfNotPresent))),
}
autosslDefaultLoadBalancer defaultLoadBalancerSpec = defaultLoadBalancerSpec{
ProxyProtocol: pointer.BoolPtr(true),
CrossZoneLoadBalancingEnabled: pointer.BoolPtr(true),
ConnectionDrainingEnabled: pointer.BoolPtr(true),
ConnectionDrainingTimeout: pointer.Int32Ptr(60),
HealthcheckHealthyThreshold: pointer.Int32Ptr(2),
HealthcheckUnhealthyThreshold: pointer.Int32Ptr(2),
HealthcheckInterval: pointer.Int32Ptr(5),
HealthcheckTimeout: pointer.Int32Ptr(3),
ProxyProtocol: pointer.Bool(true),
CrossZoneLoadBalancingEnabled: pointer.Bool(true),
ConnectionDrainingEnabled: pointer.Bool(true),
ConnectionDrainingTimeout: pointer.Int32(60),
HealthcheckHealthyThreshold: pointer.Int32(2),
HealthcheckUnhealthyThreshold: pointer.Int32(2),
HealthcheckInterval: pointer.Int32(5),
HealthcheckTimeout: pointer.Int32(3),
}
autosslDefaultResources defaultResourceRequirementsSpec = defaultResourceRequirementsSpec{
Requests: corev1.ResourceList{
Expand All @@ -53,25 +53,25 @@ var (
},
}
autosslDefaultHPA defaultHorizontalPodAutoscalerSpec = defaultHorizontalPodAutoscalerSpec{
MinReplicas: pointer.Int32Ptr(2),
MaxReplicas: pointer.Int32Ptr(4),
ResourceUtilization: pointer.Int32Ptr(90),
ResourceName: pointer.StringPtr("cpu"),
MinReplicas: pointer.Int32(2),
MaxReplicas: pointer.Int32(4),
ResourceUtilization: pointer.Int32(90),
ResourceName: pointer.String("cpu"),
}
autosslDefaultProbe defaultProbeSpec = defaultProbeSpec{
InitialDelaySeconds: pointer.Int32Ptr(25),
TimeoutSeconds: pointer.Int32Ptr(1),
PeriodSeconds: pointer.Int32Ptr(10),
SuccessThreshold: pointer.Int32Ptr(1),
FailureThreshold: pointer.Int32Ptr(3),
InitialDelaySeconds: pointer.Int32(25),
TimeoutSeconds: pointer.Int32(1),
PeriodSeconds: pointer.Int32(10),
SuccessThreshold: pointer.Int32(1),
FailureThreshold: pointer.Int32(3),
}
autosslDefaultPDB defaultPodDisruptionBudgetSpec = defaultPodDisruptionBudgetSpec{
MaxUnavailable: util.IntStrPtr(intstr.FromInt(1)),
}

autosslDefaultGrafanaDashboard defaultGrafanaDashboardSpec = defaultGrafanaDashboardSpec{
SelectorKey: pointer.StringPtr("monitoring-key"),
SelectorValue: pointer.StringPtr("middleware"),
SelectorKey: pointer.String("monitoring-key"),
SelectorValue: pointer.String("middleware"),
}
autosslDefaultACMEStaging bool = false
autosslDefaultRedisPort int32 = 6379
Expand Down Expand Up @@ -208,9 +208,9 @@ type AutoSSLConfig struct {

// Default sets default values for any value not specifically set in the AutoSSLConfig struct
func (cfg *AutoSSLConfig) Default() {
cfg.ACMEStaging = boolOrDefault(cfg.ACMEStaging, pointer.BoolPtr(autosslDefaultACMEStaging))
cfg.RedisPort = intOrDefault(cfg.RedisPort, pointer.Int32Ptr(autosslDefaultRedisPort))
cfg.LogLevel = stringOrDefault(cfg.LogLevel, pointer.StringPtr(autosslDefaultLogLevel))
cfg.ACMEStaging = boolOrDefault(cfg.ACMEStaging, pointer.Bool(autosslDefaultACMEStaging))
cfg.RedisPort = intOrDefault(cfg.RedisPort, pointer.Int32(autosslDefaultRedisPort))
cfg.LogLevel = stringOrDefault(cfg.LogLevel, pointer.String(autosslDefaultLogLevel))
if cfg.DomainWhitelist == nil {
cfg.DomainWhitelist = []string{}
}
Expand Down
86 changes: 43 additions & 43 deletions api/v1alpha1/backend_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,28 @@ import (

var (
backendDefaultImage defaultImageSpec = defaultImageSpec{
Name: pointer.StringPtr("quay.io/3scale/apisonator"),
Tag: pointer.StringPtr("nightly"),
PullPolicy: (*corev1.PullPolicy)(pointer.StringPtr(string(corev1.PullIfNotPresent))),
Name: pointer.String("quay.io/3scale/apisonator"),
Tag: pointer.String("nightly"),
PullPolicy: (*corev1.PullPolicy)(pointer.String(string(corev1.PullIfNotPresent))),
}
backendDefaultGrafanaDashboard defaultGrafanaDashboardSpec = defaultGrafanaDashboardSpec{
SelectorKey: pointer.StringPtr("monitoring-key"),
SelectorValue: pointer.StringPtr("middleware"),
SelectorKey: pointer.String("monitoring-key"),
SelectorValue: pointer.String("middleware"),
}
backendDefaultConfigRackEnv string = "dev"
backendDefaultConfigMasterServiceID int32 = 6
backendDefaultListenerHPA defaultHorizontalPodAutoscalerSpec = defaultHorizontalPodAutoscalerSpec{
MinReplicas: pointer.Int32Ptr(2),
MaxReplicas: pointer.Int32Ptr(4),
ResourceUtilization: pointer.Int32Ptr(90),
ResourceName: pointer.StringPtr("cpu"),
MinReplicas: pointer.Int32(2),
MaxReplicas: pointer.Int32(4),
ResourceUtilization: pointer.Int32(90),
ResourceName: pointer.String("cpu"),
}
backendDefaultListenerPDB defaultPodDisruptionBudgetSpec = defaultPodDisruptionBudgetSpec{
MaxUnavailable: util.IntStrPtr(intstr.FromInt(1)),
}
backendDefaultListenerNLBLoadBalancer defaultNLBLoadBalancerSpec = defaultNLBLoadBalancerSpec{
ProxyProtocol: pointer.BoolPtr(true),
CrossZoneLoadBalancingEnabled: pointer.BoolPtr(true),
ProxyProtocol: pointer.Bool(true),
CrossZoneLoadBalancingEnabled: pointer.Bool(true),
}
backendDefaultListenerReplicas int32 = 2
backendDefaultListenerResources defaultResourceRequirementsSpec = defaultResourceRequirementsSpec{
Expand All @@ -62,29 +62,29 @@ var (
},
}
backendDefaultListenerLivenessProbe defaultProbeSpec = defaultProbeSpec{
InitialDelaySeconds: pointer.Int32Ptr(30),
TimeoutSeconds: pointer.Int32Ptr(1),
PeriodSeconds: pointer.Int32Ptr(10),
SuccessThreshold: pointer.Int32Ptr(1),
FailureThreshold: pointer.Int32Ptr(3),
InitialDelaySeconds: pointer.Int32(30),
TimeoutSeconds: pointer.Int32(1),
PeriodSeconds: pointer.Int32(10),
SuccessThreshold: pointer.Int32(1),
FailureThreshold: pointer.Int32(3),
}
backendDefaultListenerReadinessProbe defaultProbeSpec = defaultProbeSpec{
InitialDelaySeconds: pointer.Int32Ptr(30),
TimeoutSeconds: pointer.Int32Ptr(5),
PeriodSeconds: pointer.Int32Ptr(10),
SuccessThreshold: pointer.Int32Ptr(1),
FailureThreshold: pointer.Int32Ptr(3),
InitialDelaySeconds: pointer.Int32(30),
TimeoutSeconds: pointer.Int32(5),
PeriodSeconds: pointer.Int32(10),
SuccessThreshold: pointer.Int32(1),
FailureThreshold: pointer.Int32(3),
}
backendDefaultListenerMarin3rSpec defaultMarin3rSidecarSpec = defaultMarin3rSidecarSpec{}
backendDefaultListenerConfigLogFormat string = "json"
backendDefaultListenerConfigRedisAsync bool = false
backendDefaultListenerConfigListenerWorkers int32 = 16
backendDefaultListenerConfigLegacyReferrerFilters bool = true
backendDefaultWorkerHPA defaultHorizontalPodAutoscalerSpec = defaultHorizontalPodAutoscalerSpec{
MinReplicas: pointer.Int32Ptr(2),
MaxReplicas: pointer.Int32Ptr(4),
ResourceUtilization: pointer.Int32Ptr(90),
ResourceName: pointer.StringPtr("cpu"),
MinReplicas: pointer.Int32(2),
MaxReplicas: pointer.Int32(4),
ResourceUtilization: pointer.Int32(90),
ResourceName: pointer.String("cpu"),
}
backendDefaultWorkerPDB defaultPodDisruptionBudgetSpec = defaultPodDisruptionBudgetSpec{
MaxUnavailable: util.IntStrPtr(intstr.FromInt(1)),
Expand All @@ -101,18 +101,18 @@ var (
},
}
backendDefaultWorkerLivenessProbe defaultProbeSpec = defaultProbeSpec{
InitialDelaySeconds: pointer.Int32Ptr(10),
TimeoutSeconds: pointer.Int32Ptr(3),
PeriodSeconds: pointer.Int32Ptr(15),
SuccessThreshold: pointer.Int32Ptr(1),
FailureThreshold: pointer.Int32Ptr(3),
InitialDelaySeconds: pointer.Int32(10),
TimeoutSeconds: pointer.Int32(3),
PeriodSeconds: pointer.Int32(15),
SuccessThreshold: pointer.Int32(1),
FailureThreshold: pointer.Int32(3),
}
backendDefaultWorkerReadinessProbe defaultProbeSpec = defaultProbeSpec{
InitialDelaySeconds: pointer.Int32Ptr(10),
TimeoutSeconds: pointer.Int32Ptr(5),
PeriodSeconds: pointer.Int32Ptr(30),
SuccessThreshold: pointer.Int32Ptr(1),
FailureThreshold: pointer.Int32Ptr(3),
InitialDelaySeconds: pointer.Int32(10),
TimeoutSeconds: pointer.Int32(5),
PeriodSeconds: pointer.Int32(30),
SuccessThreshold: pointer.Int32(1),
FailureThreshold: pointer.Int32(3),
}
backendDefaultWorkerConfigLogFormat string = "json"
backendDefaultWorkerConfigRedisAsync bool = false
Expand Down Expand Up @@ -407,8 +407,8 @@ type BackendConfig struct {

// Default sets default values for any value not specifically set in the BackendConfig struct
func (cfg *BackendConfig) Default() {
cfg.RackEnv = stringOrDefault(cfg.RackEnv, pointer.StringPtr(backendDefaultConfigRackEnv))
cfg.MasterServiceID = intOrDefault(cfg.MasterServiceID, pointer.Int32Ptr(backendDefaultConfigMasterServiceID))
cfg.RackEnv = stringOrDefault(cfg.RackEnv, pointer.String(backendDefaultConfigRackEnv))
cfg.MasterServiceID = intOrDefault(cfg.MasterServiceID, pointer.Int32(backendDefaultConfigMasterServiceID))
cfg.ExternalSecret.SecretStoreRef = InitializeExternalSecretSecretStoreReferenceSpec(cfg.ExternalSecret.SecretStoreRef, defaultExternalSecretSecretStoreReference)
cfg.ExternalSecret.RefreshInterval = durationOrDefault(cfg.ExternalSecret.RefreshInterval, &defaultExternalSecretRefreshInterval)
}
Expand Down Expand Up @@ -436,10 +436,10 @@ type ListenerConfig struct {

// Default sets default values for any value not specifically set in the ListenerConfig struct
func (cfg *ListenerConfig) Default() {
cfg.LogFormat = stringOrDefault(cfg.LogFormat, pointer.StringPtr(backendDefaultListenerConfigLogFormat))
cfg.RedisAsync = boolOrDefault(cfg.RedisAsync, pointer.BoolPtr(backendDefaultListenerConfigRedisAsync))
cfg.ListenerWorkers = intOrDefault(cfg.ListenerWorkers, pointer.Int32Ptr(backendDefaultListenerConfigListenerWorkers))
cfg.LegacyReferrerFilters = boolOrDefault(cfg.LegacyReferrerFilters, pointer.BoolPtr(backendDefaultListenerConfigLegacyReferrerFilters))
cfg.LogFormat = stringOrDefault(cfg.LogFormat, pointer.String(backendDefaultListenerConfigLogFormat))
cfg.RedisAsync = boolOrDefault(cfg.RedisAsync, pointer.Bool(backendDefaultListenerConfigRedisAsync))
cfg.ListenerWorkers = intOrDefault(cfg.ListenerWorkers, pointer.Int32(backendDefaultListenerConfigListenerWorkers))
cfg.LegacyReferrerFilters = boolOrDefault(cfg.LegacyReferrerFilters, pointer.Bool(backendDefaultListenerConfigLegacyReferrerFilters))
}

// WorkerConfig configures app behavior for Backend Worker
Expand All @@ -457,8 +457,8 @@ type WorkerConfig struct {

// Default sets default values for any value not specifically set in the WorkerConfig struct
func (cfg *WorkerConfig) Default() {
cfg.LogFormat = stringOrDefault(cfg.LogFormat, pointer.StringPtr(backendDefaultWorkerConfigLogFormat))
cfg.RedisAsync = boolOrDefault(cfg.RedisAsync, pointer.BoolPtr(backendDefaultWorkerConfigRedisAsync))
cfg.LogFormat = stringOrDefault(cfg.LogFormat, pointer.String(backendDefaultWorkerConfigLogFormat))
cfg.RedisAsync = boolOrDefault(cfg.RedisAsync, pointer.Bool(backendDefaultWorkerConfigRedisAsync))
}

// BackendStatus defines the observed state of Backend
Expand Down
16 changes: 14 additions & 2 deletions api/v1alpha1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ const (
var (
defaultExternalSecretRefreshInterval metav1.Duration = metav1.Duration{Duration: 60 * time.Second}
defaultExternalSecretSecretStoreReference defaultExternalSecretSecretStoreReferenceSpec = defaultExternalSecretSecretStoreReferenceSpec{
Name: pointer.StringPtr("vault-mgmt"),
Kind: pointer.StringPtr("ClusterSecretStore"),
Name: pointer.String("vault-mgmt"),
Kind: pointer.String("ClusterSecretStore"),
}
)

Expand Down Expand Up @@ -634,6 +634,18 @@ func (bs *BugsnagSpec) Enabled() bool {
return !reflect.DeepEqual(bs, &BugsnagSpec{})
}

// AddressSpec allows the definition of an address
type AddressSpec struct {
// Defines the address host
// +operator-sdk:csv:customresourcedefinitions:type=spec
// +optional
Host *string `json:"host,omitempty"`
// Defines the address port
// +operator-sdk:csv:customresourcedefinitions:type=spec
// +optional
Port *int32 `json:"port,omitempty"`
}

// Canary allows the definition of a canary Deployment
type Canary struct {
// SendTraffic controls if traffic is sent to the canary
Expand Down
Loading

0 comments on commit 4b9f6e6

Please sign in to comment.