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

coredns.containerPorts template helper does not properly handle missing ports #67

Open
jmmk opened this issue May 25, 2022 · 1 comment
Assignees

Comments

@jmmk
Copy link

jmmk commented May 25, 2022

In charts/coredns/templates/configmap.yaml, port is allowed to be missing:

{{- if .port }}:{{ .port }} {{ end -}}

However, in charts/coredns/templates/_helpers.tpl, there is no check if the port is missing, only a call to toString:

{{- $port := toString .port -}}

When templated, this produces containerPorts like this:

- containerPort: <nil>
  name: udp-<nil>
  protocol: UDP
- containerPort: <nil>
  name: tcp-<nil>
  protocol: TCP

The workaround is to explicitly specify the default port 53

@shubham-cmyk
Copy link
Collaborator

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants