From: Szekeres, Balazs (Nokia - HU/Budapest) Date: Fri, 17 May 2019 09:08:46 +0000 (+0200) Subject: Set time zone X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=1cda6f69a88aa42e2506f6daa333a1ab6d49b110;p=ta%2Fcaas-install.git Set time zone Containers now use the host time zone settings. Change-Id: Ia47ac0f493f89ea8664102c8d447caf3e6f5a748 Signed-off-by: Szekeres, Balazs (Nokia - HU/Budapest) --- diff --git a/infra-charts/templates/cpu-deviceplugin-daemonset.yaml b/infra-charts/templates/cpu-deviceplugin-daemonset.yaml index f150d4d..865c3f4 100644 --- a/infra-charts/templates/cpu-deviceplugin-daemonset.yaml +++ b/infra-charts/templates/cpu-deviceplugin-daemonset.yaml @@ -44,6 +44,9 @@ spec: imagePullPolicy: IfNotPresent command: [ "/cpu-device-plugin", "-logtostderr" ] volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - mountPath: /etc/cpu-pooler name: cpu-pooler-config - mountPath: /var/lib/kubelet/device-plugins/ @@ -55,6 +58,9 @@ spec: fieldRef: fieldPath: spec.nodeName volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: devicesock hostPath: # directory location on host diff --git a/infra-charts/templates/cpu-setter-daemonset.yaml b/infra-charts/templates/cpu-setter-daemonset.yaml index 6348525..f3d02b1 100644 --- a/infra-charts/templates/cpu-setter-daemonset.yaml +++ b/infra-charts/templates/cpu-setter-daemonset.yaml @@ -44,6 +44,9 @@ spec: imagePullPolicy: IfNotPresent command: [ "/cpu-setter", "--poolconfigs=/etc/cpu-pooler", "--cpusetroot=/sys/fs/cgroup/cpuset/kubepods/" ] volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - mountPath: /etc/cpu-pooler name: cpu-pooler-config - mountPath: /var/lib/kubelet/device-plugins/kubelet_internal_checkpoint @@ -55,6 +58,9 @@ spec: fieldRef: fieldPath: spec.nodeName volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: checkpointfile hostPath: path: /var/lib/kubelet/device-plugins/kubelet_internal_checkpoint diff --git a/infra-charts/templates/custom-metrics-apiserver-deployment.yaml b/infra-charts/templates/custom-metrics-apiserver-deployment.yaml index 7fca746..c45db1e 100755 --- a/infra-charts/templates/custom-metrics-apiserver-deployment.yaml +++ b/infra-charts/templates/custom-metrics-apiserver-deployment.yaml @@ -60,6 +60,9 @@ spec: ports: - containerPort: {{ .Values.custom_metrics_api.port }} volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - mountPath: /var/run/serving-cert name: volume-serving-cert readOnly: true @@ -76,6 +79,9 @@ spec: name: config readOnly: true volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: volume-serving-cert secret: secretName: cm-adapter-serving-certs diff --git a/infra-charts/templates/elasticsearch-data-statefulset.yaml b/infra-charts/templates/elasticsearch-data-statefulset.yaml index 13ea626..1343bda 100644 --- a/infra-charts/templates/elasticsearch-data-statefulset.yaml +++ b/infra-charts/templates/elasticsearch-data-statefulset.yaml @@ -82,6 +82,9 @@ spec: port: {{ .Values.elasticsearch.port }} initialDelaySeconds: 5 volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - mountPath: /usr/share/elasticsearch/data name: data - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml @@ -95,6 +98,9 @@ spec: subPath: elasticsearch-logrotate terminationGracePeriodSeconds: {{ .Values.elasticsearch.data.terminationGracePeriodSeconds }} volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: elasticsearch-config configMap: name: elasticsearch diff --git a/infra-charts/templates/elasticsearch-master-statefulset.yaml b/infra-charts/templates/elasticsearch-master-statefulset.yaml index 904f0fc..1f553fa 100644 --- a/infra-charts/templates/elasticsearch-master-statefulset.yaml +++ b/infra-charts/templates/elasticsearch-master-statefulset.yaml @@ -80,6 +80,9 @@ spec: - containerPort: {{ .Values.elasticsearch.port }} name: http volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - mountPath: /usr/share/elasticsearch/data name: data - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml @@ -89,6 +92,9 @@ spec: name: supervisord-config subPath: supervisord.conf volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: elasticsearch-config configMap: name: elasticsearch diff --git a/infra-charts/templates/metrics-server-deployment.yaml b/infra-charts/templates/metrics-server-deployment.yaml index 71d2a0e..f96a75d 100755 --- a/infra-charts/templates/metrics-server-deployment.yaml +++ b/infra-charts/templates/metrics-server-deployment.yaml @@ -51,10 +51,16 @@ spec: - "--tls-cert-file=/etc/metrics-server/ssl/metrics-server.crt" - "--tls-private-key-file=/etc/metrics-server/ssl/metrics-server.key" volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - name: stuffs mountPath: /etc/metrics-server readOnly: true volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: stuffs hostPath: path: /etc/metrics-server diff --git a/infra-charts/templates/netwatcher.yaml b/infra-charts/templates/netwatcher.yaml index 5fa4723..267303e 100644 --- a/infra-charts/templates/netwatcher.yaml +++ b/infra-charts/templates/netwatcher.yaml @@ -40,6 +40,10 @@ spec: - SYS_ADMIN - NET_ADMIN - NET_RAW + volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true tolerations: - effect: NoSchedule operator: Exists @@ -47,3 +51,7 @@ spec: operator: Exists terminationGracePeriodSeconds: 0 serviceAccountName: netwatcher + volumes: + - name: time-mount + hostPath: + path: /etc/localtime diff --git a/infra-charts/templates/prometheus-dep.yaml b/infra-charts/templates/prometheus-dep.yaml index 1d260a3..8bce4ba 100644 --- a/infra-charts/templates/prometheus-dep.yaml +++ b/infra-charts/templates/prometheus-dep.yaml @@ -56,6 +56,9 @@ spec: limits: memory: 2Gi volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - mountPath: /var/run/serving-cert name: prometheus-serving-cert readOnly: true @@ -72,6 +75,9 @@ spec: initialDelaySeconds: 3 timeoutSeconds: 5 volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: prometheus-serving-cert secret: secretName: prometheus-serving-certs diff --git a/infra-charts/templates/sriovdp.yml b/infra-charts/templates/sriovdp.yml index 2a2f164..53956b2 100644 --- a/infra-charts/templates/sriovdp.yml +++ b/infra-charts/templates/sriovdp.yml @@ -48,6 +48,9 @@ spec: - "-v=10" - "-resource-prefix=nokia.k8s.io" volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - mountPath: /var/lib/kubelet/device-plugins/ name: devicesock readOnly: false @@ -58,6 +61,9 @@ spec: mountPath: /etc/pcidp/ readOnly: true volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: devicesock hostPath: path: /var/lib/kubelet/device-plugins/ diff --git a/infra-charts/templates/svcwatcher.yaml b/infra-charts/templates/svcwatcher.yaml index 63676a6..1aec022 100644 --- a/infra-charts/templates/svcwatcher.yaml +++ b/infra-charts/templates/svcwatcher.yaml @@ -44,6 +44,10 @@ spec: image: {{ .Values.registry_url }}/{{ .Values.registry_reponame }}/svcwatcher:{{ .Values.svcwatcher.container_version }} args: - "--logtostderr" + volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true tolerations: - effect: NoSchedule operator: Exists @@ -51,4 +55,8 @@ spec: operator: Exists terminationGracePeriodSeconds: 0 serviceAccountName: svcwatcher + volumes: + - name: time-mount + hostPath: + path: /etc/localtime {{ end }} diff --git a/infra-charts/templates/webhook-deployment.yaml b/infra-charts/templates/webhook-deployment.yaml index 9e72c26..d98ec63 100644 --- a/infra-charts/templates/webhook-deployment.yaml +++ b/infra-charts/templates/webhook-deployment.yaml @@ -47,12 +47,18 @@ spec: command: [ "/cpu-device-webhook", "-tls-cert-file=/etc/webhook/certs/cpuwebhook.crt", "-tls-private-key-file=/etc/webhook/certs/cpuwebhook.key", "-alsologtostderr", "-v=4" ] imagePullPolicy: IfNotPresent volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - name: webhook-certs mountPath: /etc/webhook/certs readOnly: true - name: cpu-pooler-config mountPath: /etc/cpu-pooler volumes: + - name: time-mount + hostPath: + path: /etc/localtime # TODO: make it a secret - name: webhook-certs hostPath: