[BUG] Missing snapshotRepositories in Helm Chart (opensearch-cluster) Template
kanzalqalandri opened this issue · 1 comments
What is the bug?
The Helm chart for the OpenSearch Cluster is missing the snapshotRepositories configuration in the template file. This is causing issues when trying to configure S3 snapshot repositories through the Helm chart.
How can one reproduce the bug?
1: Configure the values.yaml file with the snapshotRepositories section as shown below:
opensearchCluster:
enabled: true
general:
httpPort: "9200"
version: 2.3.0
serviceName: "my-cluster"
drainDataNodes: true
setVMMaxMapCount: true
pluginsList: ["repository-s3"]
keystore:
- secret:
name: aws-keys
keyMappings:
access: s3.client.default.access_key
secret: s3.client.default.secret_key
snapshotRepositories:
- name: my_s3_repository
type: s3
settings:
bucket: kanzal-test
region: ap-southeast-2
base_path: new-snapshots
dashboards:
enable: true
replicas: 1
version: 2.3.0
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "1Gi"
cpu: "500m"
nodePools:
- component: masters
diskSize: "30Gi"
replicas: 3
roles:
- "master"
- "data"
resources:
requests:
memory: "2Gi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "500m"
security:
tls:
transport:
generate: true
http:
generate: true
2: Run the helm template command.
Actual Result
The output of the helm template command does not include the snapshotRepositories section in the rendered YAML. Below is the rendered YAML:
---
# Source: opensearch-cluster/templates/opensearch-cluster-cr.yaml
apiVersion: opensearch.opster.io/v1
kind: OpenSearchCluster
metadata:
name: release-name
namespace: default
spec:
general:
version: 2.3.0
httpPort: 9200
vendor: opensearch
serviceName: my-cluster
pluginsList:
- repository-s3
keystore:
- keyMappings:
access: s3.client.default.access_key
secret: s3.client.default.secret_key
secret:
name: aws-keys
setVMMaxMapCount: true
drainDataNodes: true
dashboards:
version: 2.3.0
enable: true
replicas: 1
resources:
requests:
memory: 1Gi
cpu: 500m
limits:
memory: 1Gi
cpu: 500m
nodePools:
- component: masters
replicas: 3
diskSize: "30Gi"
resources:
requests:
memory: 2Gi
cpu: 500m
limits:
memory: 2Gi
cpu: 500m
roles:
- master
- data
security:
tls:
transport:
generate: true
http:
generate: true
What is the expected behavior?
The output of the helm template command should include the snapshotRepositories section in the rendered YAML. Below is the expected rendered YAML:
---
# Source: opensearch-cluster/templates/opensearch-cluster-cr.yaml
apiVersion: opensearch.opster.io/v1
kind: OpenSearchCluster
metadata:
name: release-name
namespace: default
spec:
general:
version: 2.3.0
httpPort: 9200
vendor: opensearch
serviceName: my-cluster
pluginsList:
- repository-s3
keystore:
- keyMappings:
access: s3.client.default.access_key
secret: s3.client.default.secret_key
secret:
name: aws-keys
setVMMaxMapCount: true
drainDataNodes: true
snapshotRepositories:
- name: my_s3_repository
settings:
base_path: new-snapshots
bucket: kanzal-test
region: ap-southeast-2
type: s3
dashboards:
version: 2.3.0
enable: true
replicas: 1
resources:
requests:
memory: 1Gi
cpu: 500m
limits:
memory: 1Gi
cpu: 500m
nodePools:
- component: masters
replicas: 3
diskSize: "30Gi"
resources:
requests:
memory: 2Gi
cpu: 500m
limits:
memory: 2Gi
cpu: 500m
roles:
- master
- data
security:
tls:
transport:
generate: true
http:
generate: true
What is your host/environment?
k8s version : 1.26
helm version: 3.15.0
Chart Version: 2.6.0
Please review this PR to solve the issue.
#826