Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] OpenSearch chart fails when RBAC is enabled. #105

Closed
mprimeaux opened this issue Oct 21, 2021 · 5 comments · Fixed by #106
Closed

[BUG] OpenSearch chart fails when RBAC is enabled. #105

mprimeaux opened this issue Oct 21, 2021 · 5 comments · Fixed by #106
Assignees
Labels
bug Something isn't working

Comments

@mprimeaux
Copy link
Contributor

mprimeaux commented Oct 21, 2021

Describe the bug
A defect was introduced in release 1.2.0 involving role.yaml with this commit.

When setting rbac.create: true, the following error occurs:

Error: INSTALLATION FAILED: YAML parse error on opensearch/templates/role.yaml: error converting YAML to JSON: yaml: line 4: did not find expected key
make: *** [install] Error 1

I haven't debugged it yet but suspect it has to do with how opensearch.labels is being computed in _helpers.tpl or indented here or both.

To Reproduce
Steps to reproduce the behavior:

  1. Enable RBAC as per above.
  2. Run helm install opensearch opensearch/opensearch
  3. See error

Expected behavior
I expect the chart to be deployed as it does with version 1.1.0.

Chart Name
OpenSearch

Screenshots
N/A (Not Applicable)

Host/Environment (please complete the following information):

  • Helm Version: 3.7.1
  • Kubernetes Version: 1.21

I'll work to debug and issue a PR. For now, we've reverted to the OpenSearch Helm chart 1.1.0.

@mprimeaux mprimeaux added bug Something isn't working untriaged Issues that have not yet been triaged labels Oct 21, 2021
@peterzhuamazon
Copy link
Member

@smlx mind taking a look on this? Thanks.

@mprimeaux
Copy link
Contributor Author

I have narrowed it down to line 7 in role.yaml. I should have a PR today.

@mprimeaux
Copy link
Contributor Author

The metadata stanza was missing the labels:.

metadata:
  name: {{ $fullName | quote }}
+  labels:
  {{- include "opensearch.labels" . | nindent 4 }}

I'm also adding a CI test for it so we don't have to worry about it again.

@mprimeaux
Copy link
Contributor Author

CI tests passed. I'll issue a PR next.

@mprimeaux
Copy link
Contributor Author

mprimeaux commented Oct 21, 2021

Thanks @peterzhuamazon. Appreciate your and the maintainer's support.

@peterzhuamazon peterzhuamazon linked a pull request Oct 21, 2021 that will close this issue
@peterzhuamazon peterzhuamazon removed the untriaged Issues that have not yet been triaged label Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants