diff --git a/manifests/5.1/logging.openshift.io_clusterlogforwarders_crd.yaml b/manifests/5.1/logging.openshift.io_clusterlogforwarders_crd.yaml index ed0d39b3a8..de0b43d689 100644 --- a/manifests/5.1/logging.openshift.io_clusterlogforwarders_crd.yaml +++ b/manifests/5.1/logging.openshift.io_clusterlogforwarders_crd.yaml @@ -100,11 +100,11 @@ spec: properties: elasticsearch: properties: - indexKey: - description: IndexKey specifies the metadata key to be used as name of elasticsearch index It takes precedence over IndexName + structuredIndexKey: + description: StructuredIndexKey specifies the metadata key to be used as name of elasticsearch index It takes precedence over StructuredIndexName type: string - indexName: - description: IndexName specifies the name of elasticsearch schema + structuredIndexName: + description: StructuredIndexName specifies the name of elasticsearch schema type: string type: object fluentdForward: diff --git a/pkg/apis/logging/v1/output_types.go b/pkg/apis/logging/v1/output_types.go index b4c18e5f64..c25ac4c692 100644 --- a/pkg/apis/logging/v1/output_types.go +++ b/pkg/apis/logging/v1/output_types.go @@ -125,14 +125,14 @@ type Kafka struct { type FluentdForward struct{} type Elasticsearch struct { - // IndexKey specifies the metadata key to be used as name of elasticsearch index - // It takes precedence over IndexName + // StructuredIndexKey specifies the metadata key to be used as name of elasticsearch index + // It takes precedence over StructuredIndexName // // +optional - IndexKey string `json:"indexKey,omitempty"` + StructuredIndexKey string `json:"structuredIndexKey,omitempty"` - // IndexName specifies the name of elasticsearch schema + // StructuredIndexName specifies the name of elasticsearch schema // // +optional - IndexName string `json:"indexName,omitempty"` + StructuredIndexName string `json:"structuredIndexName,omitempty"` } diff --git a/pkg/generators/forwarding/fluentd/fluent_conf.go b/pkg/generators/forwarding/fluentd/fluent_conf.go index 8a9c252525..3e76b38d60 100644 --- a/pkg/generators/forwarding/fluentd/fluent_conf.go +++ b/pkg/generators/forwarding/fluentd/fluent_conf.go @@ -163,10 +163,10 @@ func (conf *outputLabelConf) IsElasticSearchOutput() bool { return conf.Target.Type == logging.OutputTypeElasticsearch } -func (conf *outputLabelConf) NeedChangeElasticsearchIndexName() bool { +func (conf *outputLabelConf) NeedChangeElasticsearchStructuredIndexName() bool { return conf.Target.Type == logging.OutputTypeElasticsearch && conf.Target.OutputTypeSpec.Elasticsearch != nil && - (conf.Target.OutputTypeSpec.Elasticsearch.IndexKey != "" || conf.Target.OutputTypeSpec.Elasticsearch.IndexName != "") + (conf.Target.OutputTypeSpec.Elasticsearch.StructuredIndexKey != "" || conf.Target.OutputTypeSpec.Elasticsearch.StructuredIndexName != "") } func generateRubyDigArgs(path string) string { diff --git a/pkg/generators/forwarding/fluentd/templates.go b/pkg/generators/forwarding/fluentd/templates.go index bb2e9bc9cc..a9fa7803e8 100644 --- a/pkg/generators/forwarding/fluentd/templates.go +++ b/pkg/generators/forwarding/fluentd/templates.go @@ -613,15 +613,15 @@ const pipelineToOutputCopyTemplate = `{{- define "pipelineToOutputCopyTemplate" const outputLabelConfTemplate = `{{- define "outputLabelConf" -}}