From 79214cb52aba266a439f6857ffd8e26d4fe95893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A5=96=E5=BB=BA?= Date: Mon, 23 Oct 2023 10:36:34 +0800 Subject: [PATCH] kube-ovn-controller: fix ovn ic log directory not mounted to hostpath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张祖建 --- charts/templates/controller-deploy.yaml | 6 ++++++ dist/images/install.sh | 6 ++++++ yamls/kube-ovn-dual-stack.yaml | 24 +++++++++++++++--------- yamls/kube-ovn-ipv6.yaml | 24 +++++++++++++++--------- yamls/kube-ovn.yaml | 6 ++++++ yamls/ovn-dpdk.yaml | 8 ++++---- yamls/ovn-ha.yaml | 8 ++++---- 7 files changed, 56 insertions(+), 26 deletions(-) diff --git a/charts/templates/controller-deploy.yaml b/charts/templates/controller-deploy.yaml index 6ecfb104c33..09cd6d305c9 100644 --- a/charts/templates/controller-deploy.yaml +++ b/charts/templates/controller-deploy.yaml @@ -136,6 +136,9 @@ spec: readOnly: true - mountPath: /var/log/kube-ovn name: kube-ovn-log + # ovn-ic log directory + - mountPath: /var/log/ovn + name: ovn-log - mountPath: /var/run/tls name: kube-ovn-tls readinessProbe: @@ -168,6 +171,9 @@ spec: - name: kube-ovn-log hostPath: path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn + - name: ovn-log + hostPath: + path: {{ .Values.log_conf.LOG_DIR }}/ovn - name: kube-ovn-tls secret: optional: true diff --git a/dist/images/install.sh b/dist/images/install.sh index 42ddeffc534..94ae53db312 100755 --- a/dist/images/install.sh +++ b/dist/images/install.sh @@ -3977,6 +3977,9 @@ spec: readOnly: true - mountPath: /var/log/kube-ovn name: kube-ovn-log + # ovn-ic log directory + - mountPath: /var/log/ovn + name: ovn-log - mountPath: /var/run/tls name: kube-ovn-tls readinessProbe: @@ -4009,6 +4012,9 @@ spec: - name: kube-ovn-log hostPath: path: $LOG_DIR/kube-ovn + - name: ovn-log + hostPath: + path: $LOG_DIR/ovn - name: kube-ovn-tls secret: optional: true diff --git a/yamls/kube-ovn-dual-stack.yaml b/yamls/kube-ovn-dual-stack.yaml index dde6e05e04a..8b81ba7c2d2 100644 --- a/yamls/kube-ovn-dual-stack.yaml +++ b/yamls/kube-ovn-dual-stack.yaml @@ -99,6 +99,9 @@ spec: readOnly: true - mountPath: /var/log/kube-ovn name: kube-ovn-log + # ovn-ic log directory + - mountPath: /var/log/ovn + name: ovn-log - mountPath: /var/run/tls name: kube-ovn-tls readinessProbe: @@ -130,7 +133,10 @@ spec: path: /etc/localtime - name: kube-ovn-log hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn + path: /var/log/kube-ovn + - name: ovn-log + hostPath: + path: /var/log/ovn - name: kube-ovn-tls secret: optional: true @@ -315,13 +321,13 @@ spec: path: /var/run/dbus - name: host-log-ovs hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/openvswitch + path: /var/log/openvswitch - name: kube-ovn-log hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn + path: /var/log/kube-ovn - name: host-log-ovn hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/ovn + path: /var/log/ovn - name: localtime hostPath: path: /etc/localtime @@ -433,13 +439,13 @@ spec: path: /etc/origin/openvswitch - name: host-log-ovs hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/openvswitch + path: /var/log/openvswitch - name: kube-ovn-log hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn + path: /var/log/kube-ovn - name: host-log-ovn hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/ovn + path: /var/log/ovn - name: localtime hostPath: path: /etc/localtime @@ -574,7 +580,7 @@ spec: path: /etc/origin/ovn - name: host-log-ovn hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/ovn + path: /var/log/ovn - name: localtime hostPath: path: /etc/localtime @@ -584,7 +590,7 @@ spec: secretName: kube-ovn-tls - name: kube-ovn-log hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn + path: /var/log/kube-ovn --- kind: Service apiVersion: v1 diff --git a/yamls/kube-ovn-ipv6.yaml b/yamls/kube-ovn-ipv6.yaml index 1ecd23c9cfd..0ba8ca89b12 100644 --- a/yamls/kube-ovn-ipv6.yaml +++ b/yamls/kube-ovn-ipv6.yaml @@ -99,6 +99,9 @@ spec: readOnly: true - mountPath: /var/log/kube-ovn name: kube-ovn-log + # ovn-ic log directory + - mountPath: /var/log/ovn + name: ovn-log - mountPath: /var/run/tls name: kube-ovn-tls readinessProbe: @@ -130,7 +133,10 @@ spec: path: /etc/localtime - name: kube-ovn-log hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn + path: /var/log/kube-ovn + - name: ovn-log + hostPath: + path: /var/log/ovn - name: kube-ovn-tls secret: optional: true @@ -315,13 +321,13 @@ spec: path: /var/run/dbus - name: host-log-ovs hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/openvswitch + path: /var/log/openvswitch - name: kube-ovn-log hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn + path: /var/log/kube-ovn - name: host-log-ovn hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/ovn + path: /var/log/ovn - name: localtime hostPath: path: /etc/localtime @@ -433,13 +439,13 @@ spec: path: /etc/origin/openvswitch - name: host-log-ovs hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/openvswitch + path: /var/log/openvswitch - name: kube-ovn-log hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn + path: /var/log/kube-ovn - name: host-log-ovn hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/ovn + path: /var/log/ovn - name: localtime hostPath: path: /etc/localtime @@ -574,7 +580,7 @@ spec: path: /etc/origin/ovn - name: host-log-ovn hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/ovn + path: /var/log/ovn - name: localtime hostPath: path: /etc/localtime @@ -584,7 +590,7 @@ spec: secretName: kube-ovn-tls - name: kube-ovn-log hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn + path: /var/log/kube-ovn --- kind: Service apiVersion: v1 diff --git a/yamls/kube-ovn.yaml b/yamls/kube-ovn.yaml index dcaab848565..4c9c926a8e1 100644 --- a/yamls/kube-ovn.yaml +++ b/yamls/kube-ovn.yaml @@ -101,6 +101,9 @@ spec: readOnly: true - mountPath: /var/log/kube-ovn name: kube-ovn-log + # ovn-ic log directory + - mountPath: /var/log/ovn + name: ovn-log - mountPath: /var/run/tls name: kube-ovn-tls readinessProbe: @@ -133,6 +136,9 @@ spec: - name: kube-ovn-log hostPath: path: /var/log/kube-ovn + - name: ovn-log + hostPath: + path: /var/log/ovn - name: kube-ovn-tls secret: optional: true diff --git a/yamls/ovn-dpdk.yaml b/yamls/ovn-dpdk.yaml index 1a6e93d9525..bac83e181cb 100644 --- a/yamls/ovn-dpdk.yaml +++ b/yamls/ovn-dpdk.yaml @@ -297,10 +297,10 @@ spec: path: /etc/origin/ovn - name: host-log-ovs hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/openvswitch + path: /var/log/openvswitch - name: host-log-ovn hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/ovn + path: /var/log/ovn - name: kube-ovn-tls secret: optional: true @@ -438,10 +438,10 @@ spec: path: /etc/origin/ovn - name: host-log-ovs hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/openvswitch + path: /var/log/openvswitch - name: host-log-ovn hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/ovn + path: /var/log/ovn - name: host-config-ovs hostPath: path: /opt/ovs-config diff --git a/yamls/ovn-ha.yaml b/yamls/ovn-ha.yaml index 134310df83b..9128008ead4 100644 --- a/yamls/ovn-ha.yaml +++ b/yamls/ovn-ha.yaml @@ -194,10 +194,10 @@ spec: path: /etc/origin/ovn - name: host-log-ovs hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/openvswitch + path: /var/log/openvswitch - name: host-log-ovn hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/ovn + path: /var/log/ovn - name: localtime hostPath: path: /etc/localtime @@ -358,10 +358,10 @@ spec: path: /etc/origin/ovn - name: host-log-ovs hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/openvswitch + path: /var/log/openvswitch - name: host-log-ovn hostPath: - path: {{ .Values.log_conf.LOG_DIR }}/ovn + path: /var/log/ovn - name: localtime hostPath: path: /etc/localtime