add host local time to kubectl from toolbox

Signed-off-by: wanjunlei <wanjunlei@yunify.com>
This commit is contained in:
wanjunlei
2020-07-25 13:44:40 +08:00
parent b814c5ba4f
commit 31d615fa84

View File

@@ -138,11 +138,28 @@ func (o *operator) CreateKubectlDeploy(username string) error {
},
Spec: v1.PodSpec{
Containers: []v1.Container{
{Name: "kubectl",
{
Name: "kubectl",
Image: o.kubectlImage,
VolumeMounts: []v1.VolumeMount{
{
Name: "host-time",
MountPath: "/etc/localtime",
},
},
},
},
ServiceAccountName: "kubesphere-cluster-admin",
Volumes: []v1.Volume{
{
Name: "host-time",
VolumeSource: v1.VolumeSource{
HostPath: &v1.HostPathVolumeSource{
Path: "/etc/localtime",
},
},
},
},
},
},
},