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: kubernetes-ingress: Remove unneeded tpl function #243

Closed

Conversation

mecampbellsoup
Copy link
Contributor

Since tpl expects a string, passing an unqouted, fully-numeric image tag value results in a helm templating error, e.g.:

INFO[0000] install.go:214: [debug] Original chart version: ""
install.go:231: [debug] CHART PATH:
/home/mcampbell/github/coreweave/api-gateway/integration_tests

Error: template:
cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml:91:74:
executing
"cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml"
at <.Values.controller.image.tag>: wrong type for value; expected
string; got int64
helm.go:84: [debug] template:
cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml:91:74:
executing
"cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml"
at <.Values.controller.image.tag>: wrong type for value; expected
string; got int64  subtask=0 task=Render
std out err:
%!(EXTRA *errors.errorString=install.go:214: [debug] Original chart
version: ""
install.go:231: [debug] CHART PATH:
/home/mcampbell/github/coreweave/api-gateway/integration_tests

Error: template:
cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml:91:74:
executing
"cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml"
at <.Values.controller.image.tag>: wrong type for value; expected
string; got int64
helm.go:84: [debug] template:
cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml:91:74:
executing
"cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml"
at <.Values.controller.image.tag>: wrong type for value; expected
string; got int64

Since `tpl` expects a string, passing an unqouted, fully-numeric image tag
value results in a helm templating error, e.g.:

```
INFO[0000] install.go:214: [debug] Original chart version: ""
install.go:231: [debug] CHART PATH:
/home/mcampbell/github/coreweave/api-gateway/integration_tests

Error: template:
cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml:91:74:
executing
"cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml"
at <.Values.controller.image.tag>: wrong type for value; expected
string; got int64
helm.go:84: [debug] template:
cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml:91:74:
executing
"cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml"
at <.Values.controller.image.tag>: wrong type for value; expected
string; got int64  subtask=0 task=Render
std out err:
%!(EXTRA *errors.errorString=install.go:214: [debug] Original chart
version: ""
install.go:231: [debug] CHART PATH:
/home/mcampbell/github/coreweave/api-gateway/integration_tests

Error: template:
cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml:91:74:
executing
"cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml"
at <.Values.controller.image.tag>: wrong type for value; expected
string; got int64
helm.go:84: [debug] template:
cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml:91:74:
executing
"cloud-integration-tests/charts/cloud-app/charts/api-gateway/charts/kubernetes-ingress/templates/controller-deployment.yaml"
at <.Values.controller.image.tag>: wrong type for value; expected
string; got int64
```
@dkorunic dkorunic self-assigned this May 23, 2024
@dkorunic dkorunic added the invalid This doesn't seem right label May 23, 2024
@dkorunic
Copy link
Member

This PR is not going to be accepted as it would break things. tpl is intended to render .Chart.AppVersion in controller.image.tag (https://github.com/haproxytech/helm-charts/blob/e1e93595153b326992bd4f2a3d54cb7af48d08aa/kubernetes-ingress/values.yaml#L64C10-L64C35) with a value from Helm that's set in Chart.yaml as appVersion (https://github.com/haproxytech/helm-charts/blob/e1e93595153b326992bd4f2a3d54cb7af48d08aa/kubernetes-ingress/Chart.yaml#L20C1-L20C11) so that we don't hardcode latest version in values.yaml, but in Chart.yaml as it is common practice and a preferred way of doing things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants