podsecurity: add baseline hostNamespace check

less repetitive detail

dont ensure security context

minor doc fix

fixing keys
This commit is contained in:
Samuel Roth
2021-06-29 20:58:12 -04:00
parent 7eaf2ebab2
commit 71cb2d71a8
186 changed files with 2723 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
/*
Copyright 2021 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package policy
import (
"strings"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/pod-security-admission/api"
)
/*
Sharing the host namespaces must be disallowed.
**Restricted Fields:**
spec.hostNetwork
spec.hostPID
spec.hostIPC
**Allowed Values:** false
*/
func init() {
addCheck(CheckHostNamespaces)
}
// CheckHostNamespaces returns a baseline level check
// that prohibits host namespaces in 1.0+
func CheckHostNamespaces() Check {
return Check{
ID: "hostNamespaces",
Level: api.LevelBaseline,
Versions: []VersionedCheck{
{
MinimumVersion: api.MajorMinorVersion(1, 0),
CheckPod: hostNamespaces_1_0,
},
},
}
}
func hostNamespaces_1_0(podMetadata *metav1.ObjectMeta, podSpec *corev1.PodSpec) CheckResult {
hostNamespaces := sets.NewString()
if podSpec.HostNetwork {
hostNamespaces.Insert("hostNetwork")
}
if podSpec.HostPID {
hostNamespaces.Insert("hostPID")
}
if podSpec.HostIPC {
hostNamespaces.Insert("hostIPC")
}
if len(hostNamespaces) > 0 {
return CheckResult{
Allowed: false,
ForbiddenReason: "host namespaces",
ForbiddenDetail: strings.Join(hostNamespaces.List(), ", "),
}
}
return CheckResult{Allowed: true}
}

View File

@@ -0,0 +1,54 @@
/*
Copyright 2021 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package test
import (
corev1 "k8s.io/api/core/v1"
"k8s.io/pod-security-admission/api"
)
/*
TODO: include field paths in reflect-based unit test
*/
func init() {
fixtureData_1_0 := fixtureGenerator{
expectErrorSubstring: "host namespaces",
generatePass: func(p *corev1.Pod) []*corev1.Pod {
return []*corev1.Pod{p} // minimal valid pod
},
generateFail: func(p *corev1.Pod) []*corev1.Pod {
return []*corev1.Pod{
tweak(p, func(p *corev1.Pod) {
p.Spec.HostIPC = true
}),
tweak(p, func(p *corev1.Pod) {
p.Spec.HostNetwork = true
}),
tweak(p, func(p *corev1.Pod) {
p.Spec.HostPID = true
}),
}
},
}
registerFixtureGenerator(
fixtureKey{level: api.LevelBaseline, version: api.MajorMinorVersion(1, 0), check: "hostNamespaces"},
fixtureData_1_0,
)
}

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1

View File

@@ -0,0 +1,14 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1
securityContext:
runAsNonRoot: true

View File

@@ -0,0 +1,14 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1
securityContext:
runAsNonRoot: true

View File

@@ -0,0 +1,14 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces2
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostPID: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1
securityContext:
runAsNonRoot: true

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1
securityContext:
runAsNonRoot: true

View File

@@ -0,0 +1,14 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces0
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostIPC: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1
securityContext:
runAsNonRoot: true

View File

@@ -0,0 +1,14 @@
apiVersion: v1
kind: Pod
metadata:
name: hostnamespaces1
spec:
containers:
- image: k8s.gcr.io/pause
name: container1
hostNetwork: true
initContainers:
- image: k8s.gcr.io/pause
name: initcontainer1
securityContext:
runAsNonRoot: true

Some files were not shown because too many files have changed in this diff Show More