From: Szekeres, Balazs (Nokia - HU/Budapest) Date: Fri, 17 May 2019 08:21:42 +0000 (+0200) Subject: Set time zone X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fcaas-kubernetes.git;a=commitdiff_plain;h=ed93069afc19b80dc0cfc8c518a81b022fde71e5 Set time zone Apiserver container now uses the host time zone settings. Controller managercontainer now uses the host time zone settings. Scheduler container now uses the host time zone settings. Proxy container now uses the host time zone settings. Change-Id: Icf102dedbfacf8e64b0f5bcaa2979ec30d4ee1cd Signed-off-by: Szekeres, Balazs (Nokia - HU/Budapest) --- diff --git a/ansible/roles/kube_master/templates/apiserver.yml b/ansible/roles/kube_master/templates/apiserver.yml index d083f1c..69a9bda 100644 --- a/ansible/roles/kube_master/templates/apiserver.yml +++ b/ansible/roles/kube_master/templates/apiserver.yml @@ -30,6 +30,9 @@ spec: - "/kube-apiserver" {{ apiserver_params | to_nice_yaml | indent(8) }} volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - name: secret-kubernetes mountPath: /etc/kubernetes/ssl readOnly: true @@ -46,6 +49,9 @@ spec: mountPath: {{ caas.caas_policy_directory }} readOnly: true volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: secret-kubernetes hostPath: path: /etc/kubernetes/ssl diff --git a/ansible/roles/kube_master/templates/cm.yml b/ansible/roles/kube_master/templates/cm.yml index ddd616a..27d6f26 100644 --- a/ansible/roles/kube_master/templates/cm.yml +++ b/ansible/roles/kube_master/templates/cm.yml @@ -48,6 +48,9 @@ spec: initialDelaySeconds: 15 timeoutSeconds: 1 volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - name: secret-kubernetes mountPath: /etc/kubernetes/ssl readOnly: true @@ -61,6 +64,9 @@ spec: mountPath: /etc/kubernetes/kubeconfig readOnly: true volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: secret-kubernetes hostPath: path: /etc/kubernetes/ssl diff --git a/ansible/roles/kube_master/templates/scheduler.yml b/ansible/roles/kube_master/templates/scheduler.yml index 076b969..f8a9434 100644 --- a/ansible/roles/kube_master/templates/scheduler.yml +++ b/ansible/roles/kube_master/templates/scheduler.yml @@ -42,6 +42,9 @@ spec: initialDelaySeconds: 15 timeoutSeconds: 1 volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - name: secret-kubernetes mountPath: /etc/kubernetes/ssl readOnly: true @@ -52,6 +55,9 @@ spec: mountPath: /etc/kubernetes/kubeconfig readOnly: true volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: secret-kubernetes hostPath: path: /etc/kubernetes/ssl diff --git a/ansible/roles/kube_proxy/templates/kube-proxy.yml b/ansible/roles/kube_proxy/templates/kube-proxy.yml index 5aff9ad..14ccd3f 100644 --- a/ansible/roles/kube_proxy/templates/kube-proxy.yml +++ b/ansible/roles/kube_proxy/templates/kube-proxy.yml @@ -32,6 +32,9 @@ spec: - "--hostname-override={{ ansible_host }}" - "--masquerade-all=true" volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - name: secret-kubernetes mountPath: /etc/kubernetes/ssl readOnly: true @@ -42,6 +45,9 @@ spec: mountPath: /etc/kubernetes/kubeconfig readOnly: true volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: secret-kubernetes hostPath: path: /etc/kubernetes/ssl