diff --git a/CHANGELOG.md b/CHANGELOG.md index df35198e..8118bcee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,8 @@ - Change `Redis` field `userConfig.redis_notify_keyspace_events`: pattern ~~`^[KEg\$lshzxeA]*$`~~ → `^[KEg\$lshzxentdmA]*$` - Add `PostgreSQL` field `userConfig.pgaudit`, type `object`: System-wide settings for the pgaudit extension +- Add `ServiceIntegration` field `datadog.opensearch.cluster_stats_enabled`, type `boolean`: Enable Datadog + Opensearch Cluster Monitoring ## v0.17.0 - 2024-02-01 diff --git a/api/v1alpha1/userconfig/integration/datadog/datadog.go b/api/v1alpha1/userconfig/integration/datadog/datadog.go index 66d305b4..7b901437 100644 --- a/api/v1alpha1/userconfig/integration/datadog/datadog.go +++ b/api/v1alpha1/userconfig/integration/datadog/datadog.go @@ -17,6 +17,9 @@ type DatadogTags struct { // Datadog Opensearch Options type Opensearch struct { + // Enable Datadog Opensearch Cluster Monitoring + ClusterStatsEnabled *bool `groups:"create,update" json:"cluster_stats_enabled,omitempty"` + // Enable Datadog Opensearch Index Monitoring IndexStatsEnabled *bool `groups:"create,update" json:"index_stats_enabled,omitempty"` diff --git a/api/v1alpha1/userconfig/integration/datadog/zz_generated.deepcopy.go b/api/v1alpha1/userconfig/integration/datadog/zz_generated.deepcopy.go index 3cf71fd2..fddef24d 100644 --- a/api/v1alpha1/userconfig/integration/datadog/zz_generated.deepcopy.go +++ b/api/v1alpha1/userconfig/integration/datadog/zz_generated.deepcopy.go @@ -101,6 +101,11 @@ func (in *DatadogUserConfig) DeepCopy() *DatadogUserConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Opensearch) DeepCopyInto(out *Opensearch) { *out = *in + if in.ClusterStatsEnabled != nil { + in, out := &in.ClusterStatsEnabled, &out.ClusterStatsEnabled + *out = new(bool) + **out = **in + } if in.IndexStatsEnabled != nil { in, out := &in.IndexStatsEnabled, &out.IndexStatsEnabled *out = new(bool) diff --git a/charts/aiven-operator-crds/templates/aiven.io_serviceintegrations.yaml b/charts/aiven-operator-crds/templates/aiven.io_serviceintegrations.yaml index 7ddcb94b..95d41d19 100644 --- a/charts/aiven-operator-crds/templates/aiven.io_serviceintegrations.yaml +++ b/charts/aiven-operator-crds/templates/aiven.io_serviceintegrations.yaml @@ -297,6 +297,9 @@ spec: opensearch: description: Datadog Opensearch Options properties: + cluster_stats_enabled: + description: Enable Datadog Opensearch Cluster Monitoring + type: boolean index_stats_enabled: description: Enable Datadog Opensearch Index Monitoring type: boolean diff --git a/config/crd/bases/aiven.io_serviceintegrations.yaml b/config/crd/bases/aiven.io_serviceintegrations.yaml index 7ddcb94b..95d41d19 100644 --- a/config/crd/bases/aiven.io_serviceintegrations.yaml +++ b/config/crd/bases/aiven.io_serviceintegrations.yaml @@ -297,6 +297,9 @@ spec: opensearch: description: Datadog Opensearch Options properties: + cluster_stats_enabled: + description: Enable Datadog Opensearch Cluster Monitoring + type: boolean index_stats_enabled: description: Enable Datadog Opensearch Index Monitoring type: boolean diff --git a/docs/docs/api-reference/serviceintegration.md b/docs/docs/api-reference/serviceintegration.md index 77ef05d8..baf349a2 100644 --- a/docs/docs/api-reference/serviceintegration.md +++ b/docs/docs/api-reference/serviceintegration.md @@ -194,6 +194,7 @@ Datadog Opensearch Options. **Optional** +- [`cluster_stats_enabled`](#spec.datadog.opensearch.cluster_stats_enabled-property){: name='spec.datadog.opensearch.cluster_stats_enabled-property'} (boolean). Enable Datadog Opensearch Cluster Monitoring. - [`index_stats_enabled`](#spec.datadog.opensearch.index_stats_enabled-property){: name='spec.datadog.opensearch.index_stats_enabled-property'} (boolean). Enable Datadog Opensearch Index Monitoring. - [`pending_task_stats_enabled`](#spec.datadog.opensearch.pending_task_stats_enabled-property){: name='spec.datadog.opensearch.pending_task_stats_enabled-property'} (boolean). Enable Datadog Opensearch Pending Task Monitoring. - [`pshard_stats_enabled`](#spec.datadog.opensearch.pshard_stats_enabled-property){: name='spec.datadog.opensearch.pshard_stats_enabled-property'} (boolean). Enable Datadog Opensearch Primary Shard Monitoring. diff --git a/go.mod b/go.mod index 0112dbf8..9d76d617 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/aiven/aiven-go-client/v2 v2.14.0 - github.com/aiven/go-api-schemas v1.65.0 + github.com/aiven/go-api-schemas v1.66.0 github.com/aiven/go-client-codegen v0.3.0 github.com/dave/jennifer v1.7.0 github.com/docker/go-units v0.5.0 diff --git a/go.sum b/go.sum index ecb700b5..d6b85ce0 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/aiven/aiven-go-client/v2 v2.14.0 h1:4FEbB3baj+jA3Gd3vXpzoN6Vi9lGLCcIAYo75vSnx4k= github.com/aiven/aiven-go-client/v2 v2.14.0/go.mod h1:x0xhzxWEKAwKv0xY5FvECiI6tesWshcPHvjwl0B/1SU= -github.com/aiven/go-api-schemas v1.65.0 h1:r4ooY83kWwkQQPCq55W4oHitNv+SZ2fzVDxuY3KwU28= -github.com/aiven/go-api-schemas v1.65.0/go.mod h1:/bPxBUHza/2Aeer6hIIdB++GxKiw9K1KCBtRa2rtZ5I= +github.com/aiven/go-api-schemas v1.66.0 h1:Bn7E4CLcV9GMOdwmVtPEPud/9AKh/1fw7qT3epV+LXE= +github.com/aiven/go-api-schemas v1.66.0/go.mod h1:/bPxBUHza/2Aeer6hIIdB++GxKiw9K1KCBtRa2rtZ5I= github.com/aiven/go-client-codegen v0.3.0 h1:RoIHSjMpJ+adYDJPfu9TBHaikQzMPocp1bwD2gqritc= github.com/aiven/go-client-codegen v0.3.0/go.mod h1:qQ5dwRfNnGS4eAYk7JdC5htQI85g7eA/e71ZLyY8pQw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=