Skip to content

Commit

Permalink
update e2e tests and yaml files
Browse files Browse the repository at this point in the history
  • Loading branch information
dixudx committed Aug 23, 2017
1 parent 5c45db5 commit 6f74af9
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions test/e2e/common/kubelet_etc_hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -176,6 +178,7 @@ func (config *KubeletManagedHostConfig) createPodSpec(podName string) *v1.Pod {
VolumeSource: v1.VolumeSource{
HostPath: &v1.HostPathVolumeSource{
Path: "/etc/hosts",
Type: hostPathType,
},
},
},
Expand Down
4 changes: 4 additions & 0 deletions test/e2e_node/log_path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -104,6 +107,7 @@ var _ = framework.KubeDescribe("ContainerLogPath", func() {
VolumeSource: v1.VolumeSource{
HostPath: &v1.HostPathVolumeSource{
Path: expectedlogFile,
Type: hostPathType,
},
},
},
Expand Down
7 changes: 6 additions & 1 deletion test/e2e_node/node_problem_detector_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
},
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ spec:
name: srvkube
- hostPath:
path: /var/log/kube-apiserver.log
type: FileOrCreate
name: logfile
- hostPath:
path: /etc/ssl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ spec:
name: srvkube
- hostPath:
path: /var/log/kube-controller-manager.log
type: FileOrCreate
name: logfile
- hostPath:
path: /etc/ssl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ spec:
volumes:
- hostPath:
path: /var/log/kube-scheduler.log
type: FileOrCreate
name: logfile
1 change: 1 addition & 0 deletions test/kubemark/resources/manifests/etcd-events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ spec:
- name: varlogetcd
hostPath:
path: /var/log/etcd-events.log
type: FileOrCreate
1 change: 1 addition & 0 deletions test/kubemark/resources/manifests/etcd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ spec:
- name: varlogetcd
hostPath:
path: /var/log/etcd.log
type: FileOrCreate
1 change: 1 addition & 0 deletions test/kubemark/resources/manifests/kube-addon-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ spec:
- name: varlog
hostPath:
path: /var/log/kube-addon-manager.log
type: FileOrCreate
1 change: 1 addition & 0 deletions test/kubemark/resources/manifests/kube-apiserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ spec:
- name: logfile
hostPath:
path: /var/log/kube-apiserver.log
type: FileOrCreate
- name: etcssl
hostPath:
path: /etc/ssl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
- name: logfile
hostPath:
path: /var/log/kube-controller-manager.log
type: FileOrCreate
- name: etcssl
hostPath:
path: /etc/ssl
Expand Down
1 change: 1 addition & 0 deletions test/kubemark/resources/manifests/kube-scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ spec:
- name: logfile
hostPath:
path: /var/log/kube-scheduler.log
type: FileOrCreate

0 comments on commit 6f74af9

Please sign in to comment.