update e2e tests and yaml files

pull/6/head
Di Xu 2017-06-18 17:51:10 +08:00
parent 5c45db564f
commit 6f74af94ef
12 changed files with 22 additions and 1 deletions

View File

@ -130,6 +130,8 @@ func (config *KubeletManagedHostConfig) getEtcHostsContent(podName, containerNam
}
func (config *KubeletManagedHostConfig) createPodSpec(podName string) *v1.Pod {
hostPathType := new(v1.HostPathType)
*hostPathType = v1.HostPathType(string(v1.HostPathFileOrCreate))
pod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: podName,
@ -176,6 +178,7 @@ func (config *KubeletManagedHostConfig) createPodSpec(podName string) *v1.Pod {
VolumeSource: v1.VolumeSource{
HostPath: &v1.HostPathVolumeSource{
Path: "/etc/hosts",
Type: hostPathType,
},
},
},

View File

@ -74,6 +74,9 @@ var _ = framework.KubeDescribe("ContainerLogPath", func() {
expectedlogFile := logDir + "/" + logPodName + "_" + ns + "_" + logContName + "-" + logConID.ID + ".log"
hostPathType := new(v1.HostPathType)
*hostPathType = v1.HostPathType(string(v1.HostPathFileOrCreate))
checkPod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: checkPodName,
@ -104,6 +107,7 @@ var _ = framework.KubeDescribe("ContainerLogPath", func() {
VolumeSource: v1.VolumeSource{
HostPath: &v1.HostPathVolumeSource{
Path: expectedlogFile,
Type: hostPathType,
},
},
},

View File

@ -161,6 +161,8 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() {
})
Expect(err).NotTo(HaveOccurred())
By("Create the node problem detector")
hostPathType := new(v1.HostPathType)
*hostPathType = v1.HostPathType(string(v1.HostPathFileOrCreate))
f.PodClient().CreateSync(&v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: name,
@ -186,7 +188,10 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() {
{
Name: localtimeVolume,
VolumeSource: v1.VolumeSource{
HostPath: &v1.HostPathVolumeSource{Path: etcLocaltime},
HostPath: &v1.HostPathVolumeSource{
Path: etcLocaltime,
Type: hostPathType,
},
},
},
},

View File

@ -63,6 +63,7 @@ spec:
name: srvkube
- hostPath:
path: /var/log/kube-apiserver.log
type: FileOrCreate
name: logfile
- hostPath:
path: /etc/ssl

View File

@ -55,6 +55,7 @@ spec:
name: srvkube
- hostPath:
path: /var/log/kube-controller-manager.log
type: FileOrCreate
name: logfile
- hostPath:
path: /etc/ssl

View File

@ -27,4 +27,5 @@ spec:
volumes:
- hostPath:
path: /var/log/kube-scheduler.log
type: FileOrCreate
name: logfile

View File

@ -48,3 +48,4 @@ spec:
- name: varlogetcd
hostPath:
path: /var/log/etcd-events.log
type: FileOrCreate

View File

@ -47,3 +47,4 @@ spec:
- name: varlogetcd
hostPath:
path: /var/log/etcd.log
type: FileOrCreate

View File

@ -31,3 +31,4 @@ spec:
- name: varlog
hostPath:
path: /var/log/kube-addon-manager.log
type: FileOrCreate

View File

@ -56,6 +56,7 @@ spec:
- name: logfile
hostPath:
path: /var/log/kube-apiserver.log
type: FileOrCreate
- name: etcssl
hostPath:
path: /etc/ssl

View File

@ -45,6 +45,7 @@ spec:
- name: logfile
hostPath:
path: /var/log/kube-controller-manager.log
type: FileOrCreate
- name: etcssl
hostPath:
path: /etc/ssl

View File

@ -40,3 +40,4 @@ spec:
- name: logfile
hostPath:
path: /var/log/kube-scheduler.log
type: FileOrCreate