Fixed adding additional RBAC rules. #42
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
⚙️ Issue
When adding additional role rules or logging role rules, the manifest it renders ends up missing a newline and always returning an error.
Error: YAML parse error on container-agent/templates/role.yaml: error converting YAML to JSON: yaml: line 15: did not find expected key helm.go:84: [debug] error converting YAML to JSON: yaml: line 15: did not find expected key
⚙️ Change
Altered the toYaml section for the extra rules to use 'nindent' instead of 'indent' to introduce a newline in order to fix the formatting.
AC:
✅ Fix
When providing additional rules, the manifest now renders as valid YAML.
❓ Tests
Ran helm template command locally and before the change it rendered and errored:
After the change it rendered and ran correctly:
🗒️ Documentation
N/A -- Just a bug fix