Skip to content

Commit

Permalink
adding node-local-dns from deliveryhero (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: Federico Silvestre <federico@ip-192-168-1-107.ec2.internal>
  • Loading branch information
narfeta and Federico Silvestre authored Jan 15, 2025
1 parent bf9f2fb commit 4ce54ff
Show file tree
Hide file tree
Showing 13 changed files with 2,192 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/node-local-dns/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
18 changes: 18 additions & 0 deletions charts/node-local-dns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v2
appVersion: 1.22.23
description: 'A chart to install node-local-dns. NodeLocal DNSCache improves Cluster
DNS performance by running a DNS caching agent on cluster nodes as a DaemonSet. In
today''s architecture, Pods in ''ClusterFirst'' DNS mode reach out to a kube-dns
serviceIP for DNS queries. This is translated to a kube-dns/CoreDNS endpoint via
iptables rules added by kube-proxy. With this new architecture, Pods will reach
out to the DNS caching agent running on the same node, thereby avoiding iptables
DNAT rules and connection tracking. The local caching agent will query kube-dns
service for cache misses of cluster hostnames ("cluster.local" suffix by default). Further
documentation is [here](https://kubernetes.io/docs/tasks/administer-cluster/nodelocaldns/) This
helm chart works for both kube-proxy setups (iptables or ipvs). '
icon: https://miro.medium.com/max/641/1*q3vcbyVXcvaRnFLEQEHrXw.png
maintainers:
- email: no-reply@deliveryhero.com
name: gabrieladt
name: node-local-dns
version: 2.0.4
89 changes: 89 additions & 0 deletions charts/node-local-dns/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# node-local-dns

![Version: 2.0.4](https://img.shields.io/badge/Version-2.0.4-informational?style=flat-square) ![AppVersion: 1.22.23](https://img.shields.io/badge/AppVersion-1.22.23-informational?style=flat-square)

A chart to install node-local-dns.

NodeLocal DNSCache improves Cluster DNS performance by running a DNS caching agent on cluster nodes as a DaemonSet.

In today's architecture, Pods in 'ClusterFirst' DNS mode reach out to a kube-dns serviceIP for DNS queries. This is translated to a kube-dns/CoreDNS endpoint via iptables rules added by kube-proxy. With this new architecture, Pods will reach out to the DNS caching agent running on the same node, thereby avoiding iptables DNAT rules and connection tracking. The local caching agent will query kube-dns service for cache misses of cluster hostnames ("cluster.local" suffix by default).

Further documentation is [here](https://kubernetes.io/docs/tasks/administer-cluster/nodelocaldns/)

This helm chart works for both kube-proxy setups (iptables or ipvs).

## How to install this chart

Add Delivery Hero public chart repo:

```console
helm repo add deliveryhero https://charts.deliveryhero.io/
```

A simple install with default values:

```console
helm install deliveryhero/node-local-dns
```

To install the chart with the release name `my-release`:

```console
helm install my-release deliveryhero/node-local-dns
```

To install with some set values:

```console
helm install my-release deliveryhero/node-local-dns --set values_key1=value1 --set values_key2=value2
```

To install with custom values file:

```console
helm install my-release deliveryhero/node-local-dns -f values.yaml
```

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| config.commProtocol | string | `"force_tcp"` | |
| config.customConfig | string | `""` | |
| config.dnsDomain | string | `"cluster.local"` | |
| config.dnsServer | string | `"172.20.0.10"` | |
| config.healthPort | int | `8080` | |
| config.localDns | string | `"169.254.20.25"` | |
| config.setupInterface | bool | `true` | |
| config.setupIptables | bool | `true` | |
| config.skipTeardown | bool | `false` | |
| daemonsetAnnotations | object | `{}` | |
| daemonsetLabels | object | `{}` | |
| dashboard.annotations | object | `{}` | |
| dashboard.enabled | bool | `false` | |
| dashboard.label | string | `"grafana_dashboard"` | |
| dashboard.namespace | string | `"kube-system"` | |
| fullnameOverride | string | `""` | |
| image.repository | string | `"registry.k8s.io/dns/k8s-dns-node-cache"` | |
| image.tag | string | `""` | |
| imagePullSecrets | list | `[]` | |
| nameOverride | string | `""` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| prometheusScraping.enabled | bool | `true` | |
| resources.limits.memory | string | `"128Mi"` | |
| resources.requests.cpu | string | `"25m"` | |
| resources.requests.memory | string | `"128Mi"` | |
| securityContext.capabilities.add[0] | string | `"NET_ADMIN"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| serviceMonitor.enabled | bool | `false` | |
| serviceMonitor.labels | object | `{}` | |

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| gabrieladt | <no-reply@deliveryhero.com> | |
Loading

0 comments on commit 4ce54ff

Please sign in to comment.