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

add dynamic configmap-nodelocal #474

Open
wants to merge 3 commits into
base: main-source
Choose a base branch
from

Conversation

letnab
Copy link

@letnab letnab commented Jun 7, 2024

add dynamic to configmap node-local-dns

add dynamic to configmap node-local-dns
@letnab letnab requested a review from a team as a code owner June 7, 2024 21:26
Copy link
Member

@brandond brandond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to bump the packageVersion when changing the chart patches, if you are not also pulling in a new chart version from upstream:

update packageVersion
Copy link
Member

@brandond brandond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. One nit on the whitespace.

Can you please open an issue at https://github.com/rancher/rke2/issues describing your use case, and provide example chart values to allow our QA team to test this change?

@brandond
Copy link
Member

brandond commented Jun 10, 2024

Can you show example values for how to use this?

You should also patch the values.yaml to show where in the nodelocal section the new values to configure this should be set:

nodelocal:
enabled: false
ip_address: "169.254.20.10"
ipvs: false
image:
repository: rancher/hardened-dns-node-cache
tag: "1.22.28-build20240125"
initimage:
repository: rancher/hardened-dns-node-cache
tag: "1.22.28-build20240125"
nodeSelector:
kubernetes.io/os: linux

If the section shouldn't be present by default, add it commented out - for example:

# optional array of sidecar containers
extraContainers: []
# - name: some-container-name
# image: some-image:latest
# imagePullPolicy: Always

@brandond
Copy link
Member

I tried just copying the default servers value under the nodelocal section, and it does not appear to actually work:

nodelocal:
  enabled: true
  servers:
  - plugins:
    - name: errors
    - configBlock: lameduck 5s
      name: health
    - name: ready
    - configBlock: |-
        pods insecure
        fallthrough in-addr.arpa ip6.arpa
        ttl 30
      name: kubernetes
      parameters: cluster.local in-addr.arpa ip6.arpa
    - name: prometheus
      parameters: 0.0.0.0:9153
    - name: forward
      parameters: . /etc/resolv.conf
    - name: cache
      parameters: 30
    - name: loop
    - name: reload
    - name: loadbalance
    port: 53
    zones:
    - zone: .

Error: UPGRADE FAILED: template: rke2-coredns/templates/_helpers.tpl:260:5: executing "nodelocalUpstreamDNSServerIP" at <include "clusterDNSServerIP" .>: error calling include: template: rke2-coredns/templates/_helpers.tpl:239:36: executing "clusterDNSServerIP" at <.Values.global.clusterDNS>: invalid value; expected string

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

Successfully merging this pull request may close these issues.

2 participants