Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
2.6.0
Describe the issue:
Failed to create OpensearchIndexTemplate and OpensearchComponentTemplate using helm with OpenSearch K8s Operator cluster.
Configuration:
apiVersion: opensearch.opster.io/v1
kind: OpensearchComponentTemplate
metadata:
name: sample-component-template
spec:
opensearchCluster:
name: {{ .Values.clusterName | default .Release.Name}}
template: # required
aliases: # optional
my_alias:
isWriteIndex: false
index:
settings: # optional
number_of_shards: 2
number_of_replicas: 1
mappings: # optional
properties:
timestamp:
type: date
format: yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis
value:
type: double
version: 1 # optional
_meta: # optional
description: example description
apiVersion: opensearch.opster.io/v1
kind: OpensearchIndexTemplate
metadata:
name: sample-index-template
spec:
opensearchCluster:
name: {{ .Values.clusterName | default .Release.Name}}
name: logs_template # name of the index template - defaults to metadata.name
indexPatterns: # required index patterns
- "logs-2020-01-*"
composedOf: # optional
- sample-component-template
priority: 100 # optional
template: {} # optional
version: 1 # optional
_meta: {} # optional
Relevant Logs or Screenshots:
k describe OpensearchComponentTemplate -n opensearch
Name: sample-component-template
Namespace: opensearch
Labels: app.kubernetes.io/managed-by=Helm
Annotations: meta.helm.sh/release-name: opensearch-cr
meta.helm.sh/release-namespace: opensearch
API Version: opensearch.opster.io/v1
Kind: OpensearchComponentTemplate
Metadata:
Creation Timestamp: 2024-06-23T06:34:44Z
Finalizers:
opster.io/opensearch-data
Generation: 2
Resource Version: 36960783
UID: 03fe31db-74ff-4e4b-8df3-4d48c2d49728
Spec:
_meta:
Description: example description
Opensearch Cluster:
Name: opensearch-cr
Template:
Aliases:
my_alias:
Mappings:
Properties:
Timestamp:
Format: yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis
Type: date
Value:
Type: double
Settings:
number_of_replicas: 1
number_of_shards: 2
Version: 1
Status:
Managed Cluster: 314810b9-d1a0-4861-a29c-58ed7e8a2404
Reason: failed to get component template status from OpenSearch API
State: ERROR
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning OpensearchAPIError 20m (x51 over 9h) componenttemplate-controller failed to get component template status from OpenSearch API
Warning OpensearchAPIError 2m23s (x16 over 5m38s) componenttemplate-controller failed to get component template status from OpenSearch API