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

How should extraLabels work? #135

Closed
rootshellz opened this issue Nov 7, 2022 · 3 comments
Closed

How should extraLabels work? #135

rootshellz opened this issue Nov 7, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@rootshellz
Copy link
Contributor

Describe the Bug

I am attempting to use extraLabels, as implemented in #116, to supply custom labels to be appended to relevant resources (e.g. to the puppetserver master deployment. However, I cannot get this working.

Expected Behavior

I would expect that I can populate extraLabels as a map like:

puppetserver:
  ...
  masters:
    ...
    extraLabels:
      keyA: valueA
      keyB: valueB

and have the labels appended to the generated labels section:

kind: Deployment
metadata:
  name: puppetserver-puppetserver-master
  labels:
    app.kubernetes.io/component: puppetserver
    app.kubernetes.io/name: puppetserver
    ...
    keyA: valueA
    keyB: valueB

Steps to Reproduce

When I attempt to render or install with the above, I receive:

Error: YAML parse error on puppetserver/charts/puppetserver/templates/puppetserver-deployment-masters.yaml: error converting YAML to JSON: yaml: line 12: mapping values are not allowed in this context
helm.go:84: [debug] error converting YAML to JSON: yaml: line 12: mapping values are not allowed in this context
YAML parse error on puppetserver/charts/puppetserver/templates/puppetserver-deployment-masters.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
	helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:146
helm.sh/helm/v3/pkg/releaseutil.SortManifests
	helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:106
helm.sh/helm/v3/pkg/action.(*Configuration).renderResources
	helm.sh/helm/v3/pkg/action/action.go:165
helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
	helm.sh/helm/v3/pkg/action/install.go:259
main.runInstall
	helm.sh/helm/v3/cmd/helm/install.go:264
main.newTemplateCmd.func2
	helm.sh/helm/v3/cmd/helm/template.go:82
github.com/spf13/cobra.(*Command).execute
	github.com/spf13/cobra@v1.3.0/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
	github.com/spf13/cobra@v1.3.0/command.go:974
github.com/spf13/cobra.(*Command).Execute
	github.com/spf13/cobra@v1.3.0/command.go:902
main.main
	helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
	runtime/proc.go:255
runtime.goexit
	runtime/asm_amd64.s:1581

Environment

  • puppetserver-helm-chart Version 6.7.0
  • Helm Version 3.8.1
  • Platform Ubuntu 18.04

Additional Context

It's possible I am using this wrong, but the documentation doesn't provide further details or usage examples.

@rootshellz rootshellz added the bug Something isn't working label Nov 7, 2022
@rootshellz
Copy link
Contributor Author

See #137

@davidphay davidphay self-assigned this Jan 11, 2023
@davidphay
Copy link
Collaborator

I currently work implement your PR

@davidphay
Copy link
Collaborator

I close the issue since I added the change in the release 7.0.0 (and fixed in 7.1.0)

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

No branches or pull requests

2 participants