Skip to content

Commit

Permalink
Mount systemd/private to the ovnkube containers.
Browse files Browse the repository at this point in the history
It allows listening for systemd events, we use it to track kubelet
restarts.

Signed-off-by: Nadia Pinaeva <[email protected]>
  • Loading branch information
npinaeva committed Nov 28, 2024
1 parent 070f311 commit 6d091b9
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dist/templates/ovnkube-node.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ spec:
- mountPath: /var/run/netns
name: host-netns
mountPropagation: Bidirectional
- mountPath: /run/systemd/private
name: run-systemd
subPath: private
readOnly: true
{%- if ovnkube_app_name!="ovnkube-node-dpu-host" %}
# ovnkube-node only mounts (non dpu related)
- mountPath: /var/run/openvswitch/
Expand Down Expand Up @@ -426,6 +430,9 @@ spec:
- name: host-netns
hostPath:
path: /var/run/netns
- name: run-systemd
hostPath:
path: /run/systemd
{%- if ovnkube_app_name!="ovnkube-node-dpu-host" %}
# non DPU related volumes
- name: host-var-log-ovs
Expand Down
7 changes: 7 additions & 0 deletions dist/templates/ovnkube-single-node-zone.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ spec:
- mountPath: /etc/ovn/
name: host-var-lib-ovs
readOnly: true
- mountPath: /run/systemd/private
name: run-systemd
subPath: private
readOnly: true

resources:
requests:
Expand Down Expand Up @@ -622,6 +626,9 @@ spec:
- name: host-var-lib-ovs
hostPath:
path: /var/lib/openvswitch
- name: run-systemd
hostPath:
path: /run/systemd

tolerations:
- operator: "Exists"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ spec:
- mountPath: /var/run/netns
name: host-netns
mountPropagation: Bidirectional
- mountPath: /run/systemd/private
name: run-systemd
subPath: private
readOnly: true
# ovnkube-node dpu-host mounts
- mountPath: /var/run/ovn
name: var-run-ovn
Expand Down Expand Up @@ -244,6 +248,9 @@ spec:
- name: host-netns
hostPath:
path: /var/run/netns
- name: run-systemd
hostPath:
path: /run/systemd
- name: var-run-ovn
emptyDir: {}
tolerations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ spec:
- mountPath: /etc/ovn/
name: host-var-lib-ovs
readOnly: true
- mountPath: /run/systemd/private
name: run-systemd
subPath: private
readOnly: true
resources:
requests:
cpu: 100m
Expand Down Expand Up @@ -382,5 +386,8 @@ spec:
- name: host-etc-ovs
hostPath:
path: /etc/openvswitch
- name: run-systemd
hostPath:
path: /run/systemd
tolerations:
- operator: "Exists"
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ spec:
- mountPath: /etc/ovn/
name: host-var-lib-ovs
readOnly: true
- mountPath: /run/systemd/private
name: run-systemd
subPath: private
readOnly: true
resources:
requests:
cpu: 100m
Expand Down Expand Up @@ -388,5 +392,8 @@ spec:
- name: host-etc-ovs
hostPath:
path: /etc/openvswitch
- name: run-systemd
hostPath:
path: /run/systemd
tolerations:
- operator: "Exists"
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ spec:
- mountPath: /etc/ovn/
name: host-var-lib-ovs
readOnly: true
- mountPath: /run/systemd/private
name: run-systemd
subPath: private
readOnly: true
resources:
requests:
cpu: 100m
Expand Down Expand Up @@ -587,5 +591,8 @@ spec:
- name: host-var-lib-ovs
hostPath:
path: /var/lib/openvswitch
- name: run-systemd
hostPath:
path: /run/systemd
tolerations:
- operator: "Exists"

0 comments on commit 6d091b9

Please sign in to comment.