Skip to content

Commit

Permalink
Fix the different time from container and host
Browse files Browse the repository at this point in the history
The kube-ovn containers will use CST time by default, this PS to use
host's localtime instead
  • Loading branch information
caoyingjunz committed May 8, 2021
1 parent 47ef2ec commit a52a38d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions yamls/kube-ovn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ spec:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- mountPath: /etc/localtime
name: localtime
- mountPath: /var/run/tls
name: kube-ovn-tls
readinessProbe:
Expand Down Expand Up @@ -94,6 +96,9 @@ spec:
nodeSelector:
kubernetes.io/os: "linux"
volumes:
- name: localtime
hostPath:
path: /etc/localtime
- name: kube-ovn-tls
secret:
optional: true
Expand Down Expand Up @@ -176,6 +181,8 @@ spec:
- mountPath: /var/run/netns
name: host-ns
mountPropagation: HostToContainer
- mountPath: /etc/localtime
name: localtime
readinessProbe:
exec:
command:
Expand Down Expand Up @@ -224,6 +231,9 @@ spec:
- name: host-ns
hostPath:
path: /var/run/netns
- name: localtime
hostPath:
path: /etc/localtime

---
kind: DaemonSet
Expand Down Expand Up @@ -297,6 +307,8 @@ spec:
name: host-log-ovs
- mountPath: /var/log/ovn
name: host-log-ovn
- mountPath: /etc/localtime
name: localtime
- mountPath: /var/run/tls
name: kube-ovn-tls
resources:
Expand Down Expand Up @@ -330,6 +342,9 @@ spec:
- name: host-log-ovn
hostPath:
path: /var/log/ovn
- name: localtime
hostPath:
path: /etc/localtime
- name: kube-ovn-tls
secret:
optional: true
Expand Down
10 changes: 10 additions & 0 deletions yamls/ovn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ spec:
name: host-log-ovs
- mountPath: /var/log/ovn
name: host-log-ovn
- mountPath: /etc/localtime
name: localtime
- mountPath: /var/run/tls
name: kube-ovn-tls
readinessProbe:
Expand Down Expand Up @@ -311,6 +313,9 @@ spec:
- name: host-log-ovn
hostPath:
path: /var/log/ovn
- name: localtime
hostPath:
path: /etc/localtime
- name: kube-ovn-tls
secret:
optional: true
Expand Down Expand Up @@ -383,6 +388,8 @@ spec:
name: host-log-ovs
- mountPath: /var/log/ovn
name: host-log-ovn
- mountPath: /etc/localtime
name: localtime
- mountPath: /var/run/tls
name: kube-ovn-tls
readinessProbe:
Expand Down Expand Up @@ -435,6 +442,9 @@ spec:
- name: host-log-ovn
hostPath:
path: /var/log/ovn
- name: localtime
hostPath:
path: /etc/localtime
- name: kube-ovn-tls
secret:
optional: true
Expand Down

0 comments on commit a52a38d

Please sign in to comment.