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

Duplicate command and args blocks in hubble helm templates #651

Closed
whatnick opened this issue Aug 26, 2024 · 0 comments · Fixed by #652
Closed

Duplicate command and args blocks in hubble helm templates #651

whatnick opened this issue Aug 26, 2024 · 0 comments · Fixed by #652

Comments

@whatnick
Copy link
Contributor

Describe the bug
Hubble helm operator deployment templates have duplicate command and args keys , especially if using the values.yaml where these are defined and the template already contains these.

        - command:
            - /retina-operator
          args:
            - --config-dir=/retina
          image: {{ .Values.operator.repository }}:{{ .Values.operator.tag }}
          imagePullPolicy: {{ .Values.operator.pullPolicy }}
          name: retina-operator
          {{- if .Values.operator.container.command }}
          command:
          {{- range .Values.operator.container.command }}
          - {{ . }}
          {{- end }}
          {{- end }}
          {{- if .Values.operator.container.args}}
          args:
          {{- range $.Values.operator.container.args}}
          - {{ . | quote }}
          {{- end}}
          {{- end}}

To Reproduce
Attempt to deploy the helm chart. The following error is encountered.

Helm upgrade failed for release kube-system/retina with chart [email protected]: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors: line 55: mapping key "command" already defined at line 48 line 57: mapping key "args" already defined at line 50 Last Helm logs: 2024-08-26T07:10:50.827534506Z: preparing upgrade for retina 2024-08-26T07:10:50.836051119Z: resetting values to the chart's original version

Expected behavior
Helm deploys cleanly

Screenshots
If applicable, add screenshots to help explain your problem.

Platform (please complete the following information):

  • OS: Amazon Linux
  • Kubernetes Version: 1.28
  • Host: EKS
  • Retina Version: v0.0.14

Additional context
Happy to provide a small PR removing the duplicated sections and wrapping them in if-else

github-merge-queue bot pushed a commit that referenced this issue Aug 27, 2024
# Description

Closes #651 

## Related Issue

If this pull request is related to any issue, please mention it here.
Additionally, make sure that the issue is assigned to you before
submitting this pull request.

## Checklist

- [x] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [x] I have followed the project's style guidelines.
- [x] I have updated the documentation, if necessary.
- [ ] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes
made.

## Additional Notes

Perhaps it would be a useful CI enhancement to run `helm template . |
kubeconform` or similar against these charts to reduce errors.

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.
@nddq nddq closed this as completed in #652 Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants