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 optional dhcp daemonset to rke2-multus #386

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/rke2-multus/charts/templates/daemonSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ .Release.Name }}-ds
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "multus.labels" . | indent 4 }}
Expand Down
61 changes: 61 additions & 0 deletions packages/rke2-multus/charts/templates/dhcp-daemonSet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{{- if .Values.manifests.dhcpDaemonSet }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ .Release.Name }}-dhcp
namespace: {{ .Release.Namespace }}
labels:
{{- include "multus.labels" . | indent 4 }}
spec:
selector:
matchLabels:
app: {{ .Chart.Name }}
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
template:
metadata:
labels:
{{- include "multus.labels" . | indent 8 }}
spec:
hostNetwork: true
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
nodeSelector: {{- toYaml .Values.labels.nodeSelector | nindent 8 }}
initContainers:
- name: kube-{{ .Chart.Name }}-dhcp-cleanup
image: busybox
command: ["rm", "-f", "/run/cni/dhcp.sock"]
securityContext:
privileged: true
volumeMounts:
- name: socketpath
mountPath: /host/run/cni
containers:
- name: kube-{{ .Chart.Name }}-dhcp
image: busybox
command: ["/opt/cni/bin/dhcp", "daemon"]
securityContext:
privileged: true
volumeMounts:
- name: binpath
mountPath: /opt/cni
- name: socketpath
mountPath: /run/cni
- name: netnspath
mountPath: /var/run/netns
mountPropagation: HostToContainer
volumes:
- name: binpath
hostPath:
path: /opt/cni
- name: socketpath
hostPath:
path: /run/cni
- name: netnspath
hostPath:
path: /run/netns
{{- end }}
1 change: 1 addition & 0 deletions packages/rke2-multus/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ manifests:
configMap: false
daemonSet: true
customResourceDefinition: true
dhcpDaemonSet: false

#tolerations: []

Expand Down
2 changes: 1 addition & 1 deletion packages/rke2-multus/package.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
url: local
workingDir: charts
packageVersion: 03
packageVersion: 04