mirror of https://github.com/k3s-io/k3s
update e2e tests and yaml files
parent
5c45db564f
commit
6f74af94ef
|
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -63,6 +63,7 @@ spec:
|
|||
name: srvkube
|
||||
- hostPath:
|
||||
path: /var/log/kube-apiserver.log
|
||||
type: FileOrCreate
|
||||
name: logfile
|
||||
- hostPath:
|
||||
path: /etc/ssl
|
||||
|
|
|
@ -55,6 +55,7 @@ spec:
|
|||
name: srvkube
|
||||
- hostPath:
|
||||
path: /var/log/kube-controller-manager.log
|
||||
type: FileOrCreate
|
||||
name: logfile
|
||||
- hostPath:
|
||||
path: /etc/ssl
|
||||
|
|
|
@ -27,4 +27,5 @@ spec:
|
|||
volumes:
|
||||
- hostPath:
|
||||
path: /var/log/kube-scheduler.log
|
||||
type: FileOrCreate
|
||||
name: logfile
|
||||
|
|
|
@ -48,3 +48,4 @@ spec:
|
|||
- name: varlogetcd
|
||||
hostPath:
|
||||
path: /var/log/etcd-events.log
|
||||
type: FileOrCreate
|
||||
|
|
|
@ -47,3 +47,4 @@ spec:
|
|||
- name: varlogetcd
|
||||
hostPath:
|
||||
path: /var/log/etcd.log
|
||||
type: FileOrCreate
|
||||
|
|
|
@ -31,3 +31,4 @@ spec:
|
|||
- name: varlog
|
||||
hostPath:
|
||||
path: /var/log/kube-addon-manager.log
|
||||
type: FileOrCreate
|
||||
|
|
|
@ -56,6 +56,7 @@ spec:
|
|||
- name: logfile
|
||||
hostPath:
|
||||
path: /var/log/kube-apiserver.log
|
||||
type: FileOrCreate
|
||||
- name: etcssl
|
||||
hostPath:
|
||||
path: /etc/ssl
|
||||
|
|
|
@ -45,6 +45,7 @@ spec:
|
|||
- name: logfile
|
||||
hostPath:
|
||||
path: /var/log/kube-controller-manager.log
|
||||
type: FileOrCreate
|
||||
- name: etcssl
|
||||
hostPath:
|
||||
path: /etc/ssl
|
||||
|
|
|
@ -40,3 +40,4 @@ spec:
|
|||
- name: logfile
|
||||
hostPath:
|
||||
path: /var/log/kube-scheduler.log
|
||||
type: FileOrCreate
|
||||
|
|
Loading…
Reference in New Issue