diff --git a/CHANGELOG.md b/CHANGELOG.md index de774d33..7c110539 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,8 @@ aliases alongside their associated indexes. Default is true - Add `OpenSearch` field `userConfig.s3_migration.include_aliases`, type `boolean`: Whether to restore aliases alongside their associated indexes. Default is true +- Add `ServiceIntegration` field `autoscaler`, type `object`: Autoscaler specific user configuration options +- Add `ServiceIntegrationEndpoint` field `autoscaler`, type `object`: Autoscaler configuration values ## v0.25.0 - 2024-09-19 diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 4f9480b4..bea6ad57 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -10,6 +10,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + autoscaler "github.com/aiven/aiven-operator/api/v1alpha1/userconfig/integration/autoscaler" clickhouse_kafka "github.com/aiven/aiven-operator/api/v1alpha1/userconfig/integration/clickhouse_kafka" clickhouse_postgresql "github.com/aiven/aiven-operator/api/v1alpha1/userconfig/integration/clickhouse_postgresql" datadog "github.com/aiven/aiven-operator/api/v1alpha1/userconfig/integration/datadog" @@ -19,6 +20,7 @@ import ( kafka_mirrormaker "github.com/aiven/aiven-operator/api/v1alpha1/userconfig/integration/kafka_mirrormaker" logs "github.com/aiven/aiven-operator/api/v1alpha1/userconfig/integration/logs" metrics "github.com/aiven/aiven-operator/api/v1alpha1/userconfig/integration/metrics" + integrationendpointsautoscaler "github.com/aiven/aiven-operator/api/v1alpha1/userconfig/integrationendpoints/autoscaler" integrationendpointsdatadog "github.com/aiven/aiven-operator/api/v1alpha1/userconfig/integrationendpoints/datadog" external_aws_cloudwatch_logs "github.com/aiven/aiven-operator/api/v1alpha1/userconfig/integrationendpoints/external_aws_cloudwatch_logs" integrationendpointsexternal_aws_cloudwatch_metrics "github.com/aiven/aiven-operator/api/v1alpha1/userconfig/integrationendpoints/external_aws_cloudwatch_metrics" @@ -2686,6 +2688,11 @@ func (in *ServiceIntegrationEndpointList) DeepCopyObject() runtime.Object { func (in *ServiceIntegrationEndpointSpec) DeepCopyInto(out *ServiceIntegrationEndpointSpec) { *out = *in in.ProjectDependant.DeepCopyInto(&out.ProjectDependant) + if in.Autoscaler != nil { + in, out := &in.Autoscaler, &out.Autoscaler + *out = new(integrationendpointsautoscaler.AutoscalerUserConfig) + (*in).DeepCopyInto(*out) + } if in.Datadog != nil { in, out := &in.Datadog, &out.Datadog *out = new(integrationendpointsdatadog.DatadogUserConfig) @@ -2836,6 +2843,11 @@ func (in *ServiceIntegrationList) DeepCopyObject() runtime.Object { func (in *ServiceIntegrationSpec) DeepCopyInto(out *ServiceIntegrationSpec) { *out = *in in.ProjectDependant.DeepCopyInto(&out.ProjectDependant) + if in.AutoscalerUserConfig != nil { + in, out := &in.AutoscalerUserConfig, &out.AutoscalerUserConfig + *out = new(autoscaler.AutoscalerUserConfig) + **out = **in + } if in.DatadogUserConfig != nil { in, out := &in.DatadogUserConfig, &out.DatadogUserConfig *out = new(datadog.DatadogUserConfig) diff --git a/charts/aiven-operator-crds/templates/aiven.io_serviceintegrationendpoints.yaml b/charts/aiven-operator-crds/templates/aiven.io_serviceintegrationendpoints.yaml index 2893db2a..679f0033 100644 --- a/charts/aiven-operator-crds/templates/aiven.io_serviceintegrationendpoints.yaml +++ b/charts/aiven-operator-crds/templates/aiven.io_serviceintegrationendpoints.yaml @@ -69,6 +69,35 @@ spec: - key - name type: object + autoscaler: + description: Autoscaler configuration values + properties: + autoscaling: + description: Configure autoscaling thresholds for a service + items: + description: AutoscalingProperties + properties: + cap_gb: + description: + The maximum total disk size (in gb) to allow + autoscaler to scale up to + maximum: 10000 + minimum: 50 + type: integer + type: + description: Type of autoscale event + enum: + - autoscale_disk + type: string + required: + - cap_gb + - type + type: object + maxItems: 64 + type: array + required: + - autoscaling + type: object datadog: description: Datadog configuration values properties: diff --git a/charts/aiven-operator-crds/templates/aiven.io_serviceintegrations.yaml b/charts/aiven-operator-crds/templates/aiven.io_serviceintegrations.yaml index 825f7270..5b48e66d 100644 --- a/charts/aiven-operator-crds/templates/aiven.io_serviceintegrations.yaml +++ b/charts/aiven-operator-crds/templates/aiven.io_serviceintegrations.yaml @@ -73,6 +73,9 @@ spec: - key - name type: object + autoscaler: + description: Autoscaler specific user configuration options + type: object clickhouseKafka: description: Clickhouse Kafka configuration values properties: diff --git a/config/crd/bases/aiven.io_serviceintegrationendpoints.yaml b/config/crd/bases/aiven.io_serviceintegrationendpoints.yaml index 2893db2a..679f0033 100644 --- a/config/crd/bases/aiven.io_serviceintegrationendpoints.yaml +++ b/config/crd/bases/aiven.io_serviceintegrationendpoints.yaml @@ -69,6 +69,35 @@ spec: - key - name type: object + autoscaler: + description: Autoscaler configuration values + properties: + autoscaling: + description: Configure autoscaling thresholds for a service + items: + description: AutoscalingProperties + properties: + cap_gb: + description: + The maximum total disk size (in gb) to allow + autoscaler to scale up to + maximum: 10000 + minimum: 50 + type: integer + type: + description: Type of autoscale event + enum: + - autoscale_disk + type: string + required: + - cap_gb + - type + type: object + maxItems: 64 + type: array + required: + - autoscaling + type: object datadog: description: Datadog configuration values properties: diff --git a/config/crd/bases/aiven.io_serviceintegrations.yaml b/config/crd/bases/aiven.io_serviceintegrations.yaml index 825f7270..5b48e66d 100644 --- a/config/crd/bases/aiven.io_serviceintegrations.yaml +++ b/config/crd/bases/aiven.io_serviceintegrations.yaml @@ -73,6 +73,9 @@ spec: - key - name type: object + autoscaler: + description: Autoscaler specific user configuration options + type: object clickhouseKafka: description: Clickhouse Kafka configuration values properties: diff --git a/docs/docs/api-reference/serviceintegration.md b/docs/docs/api-reference/serviceintegration.md index 1a0ed1cf..8f37c469 100644 --- a/docs/docs/api-reference/serviceintegration.md +++ b/docs/docs/api-reference/serviceintegration.md @@ -254,6 +254,7 @@ ServiceIntegrationSpec defines the desired state of ServiceIntegration. **Optional** - [`authSecretRef`](#spec.authSecretRef-property){: name='spec.authSecretRef-property'} (object). Authentication reference to Aiven token in a secret. See below for [nested schema](#spec.authSecretRef). +- [`autoscaler`](#spec.autoscaler-property){: name='spec.autoscaler-property'} (object). Autoscaler specific user configuration options. - [`clickhouseKafka`](#spec.clickhouseKafka-property){: name='spec.clickhouseKafka-property'} (object). Clickhouse Kafka configuration values. See below for [nested schema](#spec.clickhouseKafka). - [`clickhousePostgresql`](#spec.clickhousePostgresql-property){: name='spec.clickhousePostgresql-property'} (object). Clickhouse PostgreSQL configuration values. See below for [nested schema](#spec.clickhousePostgresql). - [`datadog`](#spec.datadog-property){: name='spec.datadog-property'} (object). Datadog specific user configuration options. See below for [nested schema](#spec.datadog). diff --git a/docs/docs/api-reference/serviceintegrationendpoint.md b/docs/docs/api-reference/serviceintegrationendpoint.md index ce48b8a7..10144680 100644 --- a/docs/docs/api-reference/serviceintegrationendpoint.md +++ b/docs/docs/api-reference/serviceintegrationendpoint.md @@ -95,6 +95,7 @@ ServiceIntegrationEndpointSpec defines the desired state of ServiceIntegrationEn **Optional** - [`authSecretRef`](#spec.authSecretRef-property){: name='spec.authSecretRef-property'} (object). Authentication reference to Aiven token in a secret. See below for [nested schema](#spec.authSecretRef). +- [`autoscaler`](#spec.autoscaler-property){: name='spec.autoscaler-property'} (object). Autoscaler configuration values. See below for [nested schema](#spec.autoscaler). - [`datadog`](#spec.datadog-property){: name='spec.datadog-property'} (object). Datadog configuration values. See below for [nested schema](#spec.datadog). - [`endpointName`](#spec.endpointName-property){: name='spec.endpointName-property'} (string, Immutable, MaxLength: 36). Source endpoint for the integration (if any). - [`externalAWSCloudwatchLogs`](#spec.externalAWSCloudwatchLogs-property){: name='spec.externalAWSCloudwatchLogs-property'} (object). ExternalAwsCloudwatchLogs configuration values. See below for [nested schema](#spec.externalAWSCloudwatchLogs). @@ -121,6 +122,27 @@ Authentication reference to Aiven token in a secret. - [`key`](#spec.authSecretRef.key-property){: name='spec.authSecretRef.key-property'} (string, MinLength: 1). - [`name`](#spec.authSecretRef.name-property){: name='spec.authSecretRef.name-property'} (string, MinLength: 1). +## autoscaler {: #spec.autoscaler } + +_Appears on [`spec`](#spec)._ + +Autoscaler configuration values. + +**Required** + +- [`autoscaling`](#spec.autoscaler.autoscaling-property){: name='spec.autoscaler.autoscaling-property'} (array of objects, MaxItems: 64). Configure autoscaling thresholds for a service. See below for [nested schema](#spec.autoscaler.autoscaling). + +### autoscaling {: #spec.autoscaler.autoscaling } + +_Appears on [`spec.autoscaler`](#spec.autoscaler)._ + +AutoscalingProperties. + +**Required** + +- [`cap_gb`](#spec.autoscaler.autoscaling.cap_gb-property){: name='spec.autoscaler.autoscaling.cap_gb-property'} (integer, Minimum: 50, Maximum: 10000). The maximum total disk size (in gb) to allow autoscaler to scale up to. +- [`type`](#spec.autoscaler.autoscaling.type-property){: name='spec.autoscaler.autoscaling.type-property'} (string, Enum: `autoscale_disk`). Type of autoscale event. + ## datadog {: #spec.datadog } _Appears on [`spec`](#spec)._