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

Chart fails to build if a tag value in controller.extraVolumeTags contains a ":" #1182

Closed
Kaezon opened this issue Mar 3, 2022 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Kaezon
Copy link
Contributor

Kaezon commented Mar 3, 2022

/kind bug

What happened?
Trying to build the Chart with the following values file with this values file:

controller:
  extraVolumeTags:
    my-tag: "me: myself and I"
    my-other-tag: "something else"

Presents the following error:

INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Deployment.spec.template.spec.containers[0].args[2]): invalid type for io.k8s.api.core.v1.Container.args: got "map", expected "string"

What you expected to happen?
I expect the chart to build, and for the controller to be configured with the extra volume tags.

How to reproduce it (as minimally and precisely as possible)?
Add any extra tags which are set with a value containing ":"

Anything else we need to know?:
It seems like the problem is in the processing of extraVolumeTags here:

{{- printf "%s=%s" "- --extra-tags" (join "," $result.pairs) -}}

The arg string is unquoted, so the ":" ends up turning the string into a map after templating.

Changing the line to {{- printf "- \"--extra-tags=%s\"" (join "," $result.pairs) -}} fixed the problem in my experiments.
I'm planning on making a PR with the fix, but I wanted to open this to feedback first.

Environment

  • Kubernetes version (use kubectl version):
    • Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.4", GitCommit:"b695d79d4f967c403a96986f1750a35eb75e75f1", GitTreeState:"clean", BuildDate:"2021-11-17T15:48:33Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}
      Server Version: version.Info{Major:"1", Minor:"23+", GitVersion:"v1.23.3-2+d441060727c463", GitCommit:"d441060727c4632b67d09c9118a36a8590308676", GitTreeState:"clean", BuildDate:"2022-01-26T21:57:05Z", GoVersion:"go1.17.6", Compiler:"gc", Platform:"linux/amd64"}
  • Driver version:
    • master/v1.5.1
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 3, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 6, 2022
@Kaezon
Copy link
Contributor Author

Kaezon commented Jun 7, 2022

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 7, 2022
@Kaezon
Copy link
Contributor Author

Kaezon commented Jun 9, 2022

Fix was merged

@Kaezon Kaezon closed this as completed Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants