opensearch-project / opensearch-k8s-operator

OpenSearch Kubernetes Operator
Apache License 2.0
397 stars 215 forks source link

[BUG] missing serviceAccount option in general section in opensearch-cluster-cr.yaml #855

Open KaijiroHyodo opened 4 months ago

KaijiroHyodo commented 4 months ago

What is the bug?

opensearch-cluster-cr.yaml which will process values.yaml is missing in spec.general.serviceAccount.

How can one reproduce the bug?

when you put in values.yaml opensearchCluster.general.serviceAccount, in Manifest does not appear spec.general.serviceAccount

What is the expected behavior?

Update opensearch-cluster-cr.yaml to add below Helm Chart logic

spec: general: {{- if .Values.opensearchCluster.general.serviceAccount }} serviceAccount: {{ .Values.opensearchCluster.general.serviceAccount }} {{- end }}

Do you have any additional context?

I checked in charts/opensearch-operator/files/opensearch.opster.io_opensearchcomponenttemplates.yaml https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/charts/opensearch-operator/files/opensearch.opster.io_opensearchcomponenttemplates.yaml

And I can see that spec.general.serviceAccount is specified there. As test I changed opensearch-cluster-cr.yaml template file and I confirm that now PODs has serviceAccount and serviceAccountName not as default.

dblock commented 3 months ago

[Catch All Triage - 1, 2, 3, 4]