diff --git a/CHANGELOG.md b/CHANGELOG.md index adb81e5a..f2a134d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,9 @@ connection information will not be created, defaults to false - Add `ServiceUser` field `connInfoSecretTargetDisabled`, type `boolean`: When true, the secret containing connection information will not be created, defaults to false +- Add `Kafka` field `userConfig.kafka_rest_config.name_strategy`, type `string`: Name strategy to use + when selecting subject for storing schemas +- Add `Redis` field `userConfig.redis_version`, type `string`: Redis major version ## v0.16.1 - 2023-12-15 diff --git a/api/v1alpha1/userconfig/service/cassandra/cassandra.go b/api/v1alpha1/userconfig/service/cassandra/cassandra.go index 736fe4de..e9d85136 100644 --- a/api/v1alpha1/userconfig/service/cassandra/cassandra.go +++ b/api/v1alpha1/userconfig/service/cassandra/cassandra.go @@ -62,7 +62,7 @@ type CassandraUserConfig struct { Cassandra *Cassandra `groups:"create,update" json:"cassandra,omitempty"` // +kubebuilder:validation:Enum="4";"4.1" - // Cassandra major version + // Cassandra version CassandraVersion *string `groups:"create,update" json:"cassandra_version,omitempty"` // +kubebuilder:validation:MaxItems=1024 diff --git a/api/v1alpha1/userconfig/service/kafka/kafka.go b/api/v1alpha1/userconfig/service/kafka/kafka.go index 855a4753..6fec11fc 100644 --- a/api/v1alpha1/userconfig/service/kafka/kafka.go +++ b/api/v1alpha1/userconfig/service/kafka/kafka.go @@ -325,6 +325,10 @@ type KafkaRestConfig struct { // The maximum total time to wait for messages for a request if the maximum number of messages has not yet been reached ConsumerRequestTimeoutMs *int `groups:"create,update" json:"consumer_request_timeout_ms,omitempty"` + // +kubebuilder:validation:Enum="topic_name";"record_name";"topic_record_name" + // Name strategy to use when selecting subject for storing schemas + NameStrategy *string `groups:"create,update" json:"name_strategy,omitempty"` + // If true, validate that given schema is registered under expected subject name by the used name strategy when producing messages. NameStrategyValidation *bool `groups:"create,update" json:"name_strategy_validation,omitempty"` diff --git a/api/v1alpha1/userconfig/service/kafka/zz_generated.deepcopy.go b/api/v1alpha1/userconfig/service/kafka/zz_generated.deepcopy.go index cabbdfe5..9dacbdca 100644 --- a/api/v1alpha1/userconfig/service/kafka/zz_generated.deepcopy.go +++ b/api/v1alpha1/userconfig/service/kafka/zz_generated.deepcopy.go @@ -410,6 +410,11 @@ func (in *KafkaRestConfig) DeepCopyInto(out *KafkaRestConfig) { *out = new(int) **out = **in } + if in.NameStrategy != nil { + in, out := &in.NameStrategy, &out.NameStrategy + *out = new(string) + **out = **in + } if in.NameStrategyValidation != nil { in, out := &in.NameStrategyValidation, &out.NameStrategyValidation *out = new(bool) diff --git a/api/v1alpha1/userconfig/service/redis/redis.go b/api/v1alpha1/userconfig/service/redis/redis.go index 2ee14a52..f9e2a989 100644 --- a/api/v1alpha1/userconfig/service/redis/redis.go +++ b/api/v1alpha1/userconfig/service/redis/redis.go @@ -157,6 +157,10 @@ type RedisUserConfig struct { // Redis idle connection timeout in seconds RedisTimeout *int `groups:"create,update" json:"redis_timeout,omitempty"` + // +kubebuilder:validation:Enum="7.0" + // Redis major version + RedisVersion *string `groups:"create,update" json:"redis_version,omitempty"` + // Store logs for the service so that they are available in the HTTP API and console. ServiceLog *bool `groups:"create,update" json:"service_log,omitempty"` diff --git a/api/v1alpha1/userconfig/service/redis/zz_generated.deepcopy.go b/api/v1alpha1/userconfig/service/redis/zz_generated.deepcopy.go index 65148de8..c9f1373f 100644 --- a/api/v1alpha1/userconfig/service/redis/zz_generated.deepcopy.go +++ b/api/v1alpha1/userconfig/service/redis/zz_generated.deepcopy.go @@ -251,6 +251,11 @@ func (in *RedisUserConfig) DeepCopyInto(out *RedisUserConfig) { *out = new(int) **out = **in } + if in.RedisVersion != nil { + in, out := &in.RedisVersion, &out.RedisVersion + *out = new(string) + **out = **in + } if in.ServiceLog != nil { in, out := &in.ServiceLog, &out.ServiceLog *out = new(bool) diff --git a/charts/aiven-operator-crds/templates/aiven.io_cassandras.yaml b/charts/aiven-operator-crds/templates/aiven.io_cassandras.yaml index 9b527ae2..b2ccc320 100644 --- a/charts/aiven-operator-crds/templates/aiven.io_cassandras.yaml +++ b/charts/aiven-operator-crds/templates/aiven.io_cassandras.yaml @@ -269,7 +269,7 @@ spec: type: string type: object cassandra_version: - description: Cassandra major version + description: Cassandra version enum: - "4" - "4.1" diff --git a/charts/aiven-operator-crds/templates/aiven.io_kafkas.yaml b/charts/aiven-operator-crds/templates/aiven.io_kafkas.yaml index 774886c4..589d8930 100644 --- a/charts/aiven-operator-crds/templates/aiven.io_kafkas.yaml +++ b/charts/aiven-operator-crds/templates/aiven.io_kafkas.yaml @@ -799,6 +799,15 @@ spec: maximum: 30000 minimum: 1000 type: integer + name_strategy: + description: + Name strategy to use when selecting subject for + storing schemas + enum: + - topic_name + - record_name + - topic_record_name + type: string name_strategy_validation: description: If true, validate that given schema is registered diff --git a/charts/aiven-operator-crds/templates/aiven.io_redis.yaml b/charts/aiven-operator-crds/templates/aiven.io_redis.yaml index b2607740..fe95067b 100644 --- a/charts/aiven-operator-crds/templates/aiven.io_redis.yaml +++ b/charts/aiven-operator-crds/templates/aiven.io_redis.yaml @@ -434,6 +434,11 @@ spec: maximum: 31536000 minimum: 0 type: integer + redis_version: + description: Redis major version + enum: + - "7.0" + type: string service_log: description: Store logs for the service so that they are available diff --git a/config/crd/bases/aiven.io_cassandras.yaml b/config/crd/bases/aiven.io_cassandras.yaml index 9b527ae2..b2ccc320 100644 --- a/config/crd/bases/aiven.io_cassandras.yaml +++ b/config/crd/bases/aiven.io_cassandras.yaml @@ -269,7 +269,7 @@ spec: type: string type: object cassandra_version: - description: Cassandra major version + description: Cassandra version enum: - "4" - "4.1" diff --git a/config/crd/bases/aiven.io_kafkas.yaml b/config/crd/bases/aiven.io_kafkas.yaml index 774886c4..589d8930 100644 --- a/config/crd/bases/aiven.io_kafkas.yaml +++ b/config/crd/bases/aiven.io_kafkas.yaml @@ -799,6 +799,15 @@ spec: maximum: 30000 minimum: 1000 type: integer + name_strategy: + description: + Name strategy to use when selecting subject for + storing schemas + enum: + - topic_name + - record_name + - topic_record_name + type: string name_strategy_validation: description: If true, validate that given schema is registered diff --git a/config/crd/bases/aiven.io_redis.yaml b/config/crd/bases/aiven.io_redis.yaml index b2607740..fe95067b 100644 --- a/config/crd/bases/aiven.io_redis.yaml +++ b/config/crd/bases/aiven.io_redis.yaml @@ -434,6 +434,11 @@ spec: maximum: 31536000 minimum: 0 type: integer + redis_version: + description: Redis major version + enum: + - "7.0" + type: string service_log: description: Store logs for the service so that they are available diff --git a/docs/docs/api-reference/cassandra.md b/docs/docs/api-reference/cassandra.md index c4290aa0..1fe72888 100644 --- a/docs/docs/api-reference/cassandra.md +++ b/docs/docs/api-reference/cassandra.md @@ -152,7 +152,7 @@ Cassandra specific user configuration options. - [`backup_hour`](#spec.userConfig.backup_hour-property){: name='spec.userConfig.backup_hour-property'} (integer, Minimum: 0, Maximum: 23). The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed. - [`backup_minute`](#spec.userConfig.backup_minute-property){: name='spec.userConfig.backup_minute-property'} (integer, Minimum: 0, Maximum: 59). The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed. - [`cassandra`](#spec.userConfig.cassandra-property){: name='spec.userConfig.cassandra-property'} (object). cassandra configuration values. See below for [nested schema](#spec.userConfig.cassandra). -- [`cassandra_version`](#spec.userConfig.cassandra_version-property){: name='spec.userConfig.cassandra_version-property'} (string, Enum: `4`, `4.1`). Cassandra major version. +- [`cassandra_version`](#spec.userConfig.cassandra_version-property){: name='spec.userConfig.cassandra_version-property'} (string, Enum: `4`, `4.1`). Cassandra version. - [`ip_filter`](#spec.userConfig.ip_filter-property){: name='spec.userConfig.ip_filter-property'} (array of objects, MaxItems: 1024). Allow incoming connections from CIDR address block, e.g. `10.20.0.0/16`. See below for [nested schema](#spec.userConfig.ip_filter). - [`migrate_sstableloader`](#spec.userConfig.migrate_sstableloader-property){: name='spec.userConfig.migrate_sstableloader-property'} (boolean). Sets the service into migration mode enabling the sstableloader utility to be used to upload Cassandra data files. Available only on service create. - [`private_access`](#spec.userConfig.private_access-property){: name='spec.userConfig.private_access-property'} (object). Allow access to selected service ports from private networks. See below for [nested schema](#spec.userConfig.private_access). diff --git a/docs/docs/api-reference/kafka.md b/docs/docs/api-reference/kafka.md index 1e8b5766..abad7aa9 100644 --- a/docs/docs/api-reference/kafka.md +++ b/docs/docs/api-reference/kafka.md @@ -277,6 +277,7 @@ Kafka REST configuration. - [`consumer_enable_auto_commit`](#spec.userConfig.kafka_rest_config.consumer_enable_auto_commit-property){: name='spec.userConfig.kafka_rest_config.consumer_enable_auto_commit-property'} (boolean). If true the consumer's offset will be periodically committed to Kafka in the background. - [`consumer_request_max_bytes`](#spec.userConfig.kafka_rest_config.consumer_request_max_bytes-property){: name='spec.userConfig.kafka_rest_config.consumer_request_max_bytes-property'} (integer, Minimum: 0, Maximum: 671088640). Maximum number of bytes in unencoded message keys and values by a single request. - [`consumer_request_timeout_ms`](#spec.userConfig.kafka_rest_config.consumer_request_timeout_ms-property){: name='spec.userConfig.kafka_rest_config.consumer_request_timeout_ms-property'} (integer, Enum: `1000`, `15000`, `30000`, Minimum: 1000, Maximum: 30000). The maximum total time to wait for messages for a request if the maximum number of messages has not yet been reached. +- [`name_strategy`](#spec.userConfig.kafka_rest_config.name_strategy-property){: name='spec.userConfig.kafka_rest_config.name_strategy-property'} (string, Enum: `topic_name`, `record_name`, `topic_record_name`). Name strategy to use when selecting subject for storing schemas. - [`name_strategy_validation`](#spec.userConfig.kafka_rest_config.name_strategy_validation-property){: name='spec.userConfig.kafka_rest_config.name_strategy_validation-property'} (boolean). If true, validate that given schema is registered under expected subject name by the used name strategy when producing messages. - [`producer_acks`](#spec.userConfig.kafka_rest_config.producer_acks-property){: name='spec.userConfig.kafka_rest_config.producer_acks-property'} (string, Enum: `all`, `-1`, `0`, `1`). The number of acknowledgments the producer requires the leader to have received before considering a request complete. If set to `all` or `-1`, the leader will wait for the full set of in-sync replicas to acknowledge the record. - [`producer_compression_type`](#spec.userConfig.kafka_rest_config.producer_compression_type-property){: name='spec.userConfig.kafka_rest_config.producer_compression_type-property'} (string, Enum: `gzip`, `snappy`, `lz4`, `zstd`, `none`). Specify the default compression type for producers. This configuration accepts the standard compression codecs (`gzip`, `snappy`, `lz4`, `zstd`). It additionally accepts `none` which is the default and equivalent to no compression. diff --git a/docs/docs/api-reference/redis.md b/docs/docs/api-reference/redis.md index 6de1298a..ed5c4a36 100644 --- a/docs/docs/api-reference/redis.md +++ b/docs/docs/api-reference/redis.md @@ -161,6 +161,7 @@ Redis specific user configuration options. - [`redis_pubsub_client_output_buffer_limit`](#spec.userConfig.redis_pubsub_client_output_buffer_limit-property){: name='spec.userConfig.redis_pubsub_client_output_buffer_limit-property'} (integer, Minimum: 32, Maximum: 512). Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. - [`redis_ssl`](#spec.userConfig.redis_ssl-property){: name='spec.userConfig.redis_ssl-property'} (boolean). Require SSL to access Redis. - [`redis_timeout`](#spec.userConfig.redis_timeout-property){: name='spec.userConfig.redis_timeout-property'} (integer, Minimum: 0, Maximum: 31536000). Redis idle connection timeout in seconds. +- [`redis_version`](#spec.userConfig.redis_version-property){: name='spec.userConfig.redis_version-property'} (string, Enum: `7.0`). Redis major version. - [`service_log`](#spec.userConfig.service_log-property){: name='spec.userConfig.service_log-property'} (boolean). Store logs for the service so that they are available in the HTTP API and console. - [`service_to_fork_from`](#spec.userConfig.service_to_fork_from-property){: name='spec.userConfig.service_to_fork_from-property'} (string, Immutable, MaxLength: 64). Name of another service to fork from. This has effect only when a new service is being created. - [`static_ips`](#spec.userConfig.static_ips-property){: name='spec.userConfig.static_ips-property'} (boolean). Use static public IP addresses.