Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Commit 10d4d5f

Browse files
committed
feat: Add nodeSelector support and k8s dhcpdd configuration example
1 parent 9e87de2 commit 10d4d5f

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

charts/dhcpdd/templates/stack.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ spec:
2525
spec:
2626
hostNetwork: true
2727
dnsPolicy: ClusterFirstWithHostNet
28+
{{ if .Values.resources.nodeSelector }}
29+
nodeSelector:
30+
{{ toYaml .Values.resources.nodeSelector }}
31+
{{ end }}
2832
containers:
2933
- name: dhcpdd{{ if .Values.meta.dev }}-dev{{ end }}
3034
image: {{ .Values.meta.image }}

charts/dhcpdd/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ meta:
88
debug: "{{ .DIBS_DEBUG }}"
99

1010
resources:
11+
nodeSelector: {}
1112
memory: "128Mi"
1213
cpu: "256m"
1314
maxReplicas: 10

examples/dhcpd-in-k8s.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Run this on the k8s node you want to test dhcpdd on first (or use a physical network interface):
2+
# ip tuntap add tap0 mode tap
3+
# ip addr add dev tap0 10.0.0/24
4+
# ip link set tap0 up
5+
6+
dhcpd:
7+
device: tap0
8+
subnets:
9+
- netmask: 255.255.255.0
10+
network: 10.0.0.0
11+
range:
12+
start: 10.0.0.1
13+
end: 10.0.0.254

0 commit comments

Comments
 (0)