From feaefab193cda939c49aecad517eb1a7fb8bcee0 Mon Sep 17 00:00:00 2001 From: hanguobiao Date: Tue, 24 Oct 2023 15:23:27 +0800 Subject: [PATCH] chore: make manifests --- apis/monitor/v1alpha1/appdatasource_types.go | 2 +- .../monitor.kubeblocks.io_appdatasources.yaml | 16 +++++++--------- .../crd/bases/monitor.kubeblocks.io_otelds.yaml | 5 +++++ .../monitor.kubeblocks.io_appdatasources.yaml | 16 +++++++--------- .../helm/crds/monitor.kubeblocks.io_otelds.yaml | 5 +++++ 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/apis/monitor/v1alpha1/appdatasource_types.go b/apis/monitor/v1alpha1/appdatasource_types.go index 54eaf4f002fd..ea62d8d891a6 100644 --- a/apis/monitor/v1alpha1/appdatasource_types.go +++ b/apis/monitor/v1alpha1/appdatasource_types.go @@ -35,7 +35,7 @@ type MetricsConfig struct { type MetricsDataSource struct { Enable bool `json:"enable,omitempty"` - MetricsCollector *MetricsConfig `json:"metricsCollector,omitempty"` + MetricsCollector *MetricsConfig `json:",inline"` } type InputConfig struct { diff --git a/config/crd/bases/monitor.kubeblocks.io_appdatasources.yaml b/config/crd/bases/monitor.kubeblocks.io_appdatasources.yaml index e78f6d58a41a..13bfc5544a40 100644 --- a/config/crd/bases/monitor.kubeblocks.io_appdatasources.yaml +++ b/config/crd/bases/monitor.kubeblocks.io_appdatasources.yaml @@ -67,17 +67,14 @@ spec: metrics: description: MetricsConfig is the metrics config properties: + collectionInterval: + type: string enable: type: boolean - metricsCollector: - properties: - collectionInterval: - type: string - enabledMetrics: - items: - type: string - type: array - type: object + enabledMetrics: + items: + type: string + type: array type: object mode: description: Mode represents how the OTeld should be deployed (deployment, @@ -90,6 +87,7 @@ spec: type: string nodeSelector: description: NodeSelector is the node selector of the data source + only used when mode is deployment properties: nodeSelectorTerms: description: Required. A list of node selector terms. The terms diff --git a/config/crd/bases/monitor.kubeblocks.io_otelds.yaml b/config/crd/bases/monitor.kubeblocks.io_otelds.yaml index c0370ea29785..ec7cb86ca49c 100644 --- a/config/crd/bases/monitor.kubeblocks.io_otelds.yaml +++ b/config/crd/bases/monitor.kubeblocks.io_otelds.yaml @@ -35,6 +35,10 @@ spec: spec: description: OTeldSpec defines the desired state of CollectorDataSource properties: + collectionInterval: + description: CollectionInterval is the default collect interval of + the oteld collection + type: string env: description: ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for @@ -2249,6 +2253,7 @@ spec: type: array x-kubernetes-list-type: atomic required: + - collectionInterval - useConfigMap type: object status: diff --git a/deploy/helm/crds/monitor.kubeblocks.io_appdatasources.yaml b/deploy/helm/crds/monitor.kubeblocks.io_appdatasources.yaml index e78f6d58a41a..13bfc5544a40 100644 --- a/deploy/helm/crds/monitor.kubeblocks.io_appdatasources.yaml +++ b/deploy/helm/crds/monitor.kubeblocks.io_appdatasources.yaml @@ -67,17 +67,14 @@ spec: metrics: description: MetricsConfig is the metrics config properties: + collectionInterval: + type: string enable: type: boolean - metricsCollector: - properties: - collectionInterval: - type: string - enabledMetrics: - items: - type: string - type: array - type: object + enabledMetrics: + items: + type: string + type: array type: object mode: description: Mode represents how the OTeld should be deployed (deployment, @@ -90,6 +87,7 @@ spec: type: string nodeSelector: description: NodeSelector is the node selector of the data source + only used when mode is deployment properties: nodeSelectorTerms: description: Required. A list of node selector terms. The terms diff --git a/deploy/helm/crds/monitor.kubeblocks.io_otelds.yaml b/deploy/helm/crds/monitor.kubeblocks.io_otelds.yaml index c0370ea29785..ec7cb86ca49c 100644 --- a/deploy/helm/crds/monitor.kubeblocks.io_otelds.yaml +++ b/deploy/helm/crds/monitor.kubeblocks.io_otelds.yaml @@ -35,6 +35,10 @@ spec: spec: description: OTeldSpec defines the desired state of CollectorDataSource properties: + collectionInterval: + description: CollectionInterval is the default collect interval of + the oteld collection + type: string env: description: ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for @@ -2249,6 +2253,7 @@ spec: type: array x-kubernetes-list-type: atomic required: + - collectionInterval - useConfigMap type: object status: