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

support user custom log location #3186

Merged
merged 1 commit into from
Sep 8, 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
4 changes: 2 additions & 2 deletions charts/templates/central-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ spec:
path: /etc/origin/ovn
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: {{ .Values.log_conf.LOG_DIR }}/openvswitch
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: {{ .Values.log_conf.LOG_DIR }}/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down
2 changes: 1 addition & 1 deletion charts/templates/controller-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ spec:
path: /etc/localtime
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
- name: kube-ovn-tls
secret:
optional: true
Expand Down
4 changes: 2 additions & 2 deletions charts/templates/monitor-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ spec:
path: /etc/origin/ovn
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: {{ .Values.log_conf.LOG_DIR }}/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand All @@ -134,4 +134,4 @@ spec:
secretName: kube-ovn-tls
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
4 changes: 2 additions & 2 deletions charts/templates/ovn-dpdk-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ spec:
path: /etc/origin/ovn
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: {{ .Values.log_conf.LOG_DIR }}/openvswitch
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: {{ .Values.log_conf.LOG_DIR }}/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down
6 changes: 3 additions & 3 deletions charts/templates/ovncni-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,16 @@ spec:
path: /var/run/dbus
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
- name: localtime
hostPath:
path: /etc/localtime
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: {{ .Values.log_conf.LOG_DIR }}/openvswitch
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: {{ .Values.log_conf.LOG_DIR }}/ovn
- name: tmp
hostPath:
path: /tmp
Expand Down
4 changes: 2 additions & 2 deletions charts/templates/ovsovn-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ spec:
path: /etc/origin/ovn
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: {{ .Values.log_conf.LOG_DIR }}/openvswitch
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: {{ .Values.log_conf.LOG_DIR }}/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down
6 changes: 3 additions & 3 deletions charts/templates/pinger-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ spec:
path: /etc/origin/openvswitch
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: {{ .Values.log_conf.LOG_DIR }}/openvswitch
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: {{ .Values.log_conf.LOG_DIR }}/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down
2 changes: 1 addition & 1 deletion charts/templates/upgrade-ovs-ovn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,6 @@ spec:
volumes:
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
{{ end }}
{{ end }}
3 changes: 3 additions & 0 deletions charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ cni_conf:

kubelet_conf:
KUBELET_DIR: "/var/lib/kubelet"

log_conf:
LOG_DIR: "/var/log"

imagePullSecrets: []
nameOverride: ""
Expand Down
39 changes: 20 additions & 19 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ ENABLE_TPROXY=${ENABLE_TPROXY:-false}
DEBUG_WRAPPER=${DEBUG_WRAPPER:-}

KUBELET_DIR=${KUBELET_DIR:-/var/lib/kubelet}
LOG_DIR=${LOG_DIR:-/var/log}

CNI_CONF_DIR="/etc/cni/net.d"
CNI_BIN_DIR="/opt/cni/bin"
Expand Down Expand Up @@ -3305,10 +3306,10 @@ spec:
path: /etc/origin/ovn
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: $LOG_DIR/openvswitch
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: $LOG_DIR/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down Expand Up @@ -3464,10 +3465,10 @@ spec:
path: /etc/origin/ovn
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: $LOG_DIR/openvswitch
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: $LOG_DIR/ovn
- name: host-config-ovs
hostPath:
path: /opt/ovs-config
Expand Down Expand Up @@ -3643,10 +3644,10 @@ spec:
path: /etc/origin/ovn
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: $LOG_DIR/openvswitch
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: $LOG_DIR/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down Expand Up @@ -3740,9 +3741,9 @@ spec:
name: host-config-openvswitch
- mountPath: /etc/ovn
name: host-config-ovn
- mountPath: /var/log/openvswitch
- mountPath: $LOG_DIR/openvswitch
name: host-log-ovs
- mountPath: /var/log/ovn
- mountPath: $LOG_DIR/ovn
name: host-log-ovn
- mountPath: /etc/localtime
name: localtime
Expand Down Expand Up @@ -3810,10 +3811,10 @@ spec:
path: /etc/origin/ovn
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: $LOG_DIR/openvswitch
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: $LOG_DIR/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down Expand Up @@ -3986,7 +3987,7 @@ spec:
path: /etc/localtime
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: $LOG_DIR/kube-ovn
- name: kube-ovn-tls
secret:
optional: true
Expand Down Expand Up @@ -4172,13 +4173,13 @@ spec:
path: /var/run/dbus
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: $LOG_DIR/openvswitch
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: $LOG_DIR/kube-ovn
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: $LOG_DIR/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down Expand Up @@ -4290,13 +4291,13 @@ spec:
path: /etc/origin/openvswitch
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: $LOG_DIR/openvswitch
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: $LOG_DIR/kube-ovn
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: $LOG_DIR/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down Expand Up @@ -4431,7 +4432,7 @@ spec:
path: /etc/origin/ovn
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: $LOG_DIR/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand All @@ -4441,7 +4442,7 @@ spec:
secretName: kube-ovn-tls
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: $LOG_DIR/kube-ovn
---
kind: Service
apiVersion: v1
Expand Down
18 changes: 9 additions & 9 deletions yamls/kube-ovn-dual-stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ spec:
path: /etc/localtime
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
- name: kube-ovn-tls
secret:
optional: true
Expand Down Expand Up @@ -314,13 +314,13 @@ spec:
path: /var/run/dbus
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: {{ .Values.log_conf.LOG_DIR }}/openvswitch
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: {{ .Values.log_conf.LOG_DIR }}/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down Expand Up @@ -432,13 +432,13 @@ spec:
path: /etc/origin/openvswitch
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: {{ .Values.log_conf.LOG_DIR }}/openvswitch
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: {{ .Values.log_conf.LOG_DIR }}/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down Expand Up @@ -573,7 +573,7 @@ spec:
path: /etc/origin/ovn
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: {{ .Values.log_conf.LOG_DIR }}/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand All @@ -583,7 +583,7 @@ spec:
secretName: kube-ovn-tls
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
---
kind: Service
apiVersion: v1
Expand Down
18 changes: 9 additions & 9 deletions yamls/kube-ovn-ipv6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ spec:
path: /etc/localtime
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
- name: kube-ovn-tls
secret:
optional: true
Expand Down Expand Up @@ -314,13 +314,13 @@ spec:
path: /var/run/dbus
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: {{ .Values.log_conf.LOG_DIR }}/openvswitch
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: {{ .Values.log_conf.LOG_DIR }}/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down Expand Up @@ -432,13 +432,13 @@ spec:
path: /etc/origin/openvswitch
- name: host-log-ovs
hostPath:
path: /var/log/openvswitch
path: {{ .Values.log_conf.LOG_DIR }}/openvswitch
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: {{ .Values.log_conf.LOG_DIR }}/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand Down Expand Up @@ -573,7 +573,7 @@ spec:
path: /etc/origin/ovn
- name: host-log-ovn
hostPath:
path: /var/log/ovn
path: {{ .Values.log_conf.LOG_DIR }}/ovn
- name: localtime
hostPath:
path: /etc/localtime
Expand All @@ -583,7 +583,7 @@ spec:
secretName: kube-ovn-tls
- name: kube-ovn-log
hostPath:
path: /var/log/kube-ovn
path: {{ .Values.log_conf.LOG_DIR }}/kube-ovn
---
kind: Service
apiVersion: v1
Expand Down
Loading