Fix example validation
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
approvers:
|
|
||||||
- derekwaynecarr
|
|
||||||
- janetkuo
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"kind": "Namespace",
|
|
||||||
"apiVersion": "v1",
|
|
||||||
"metadata": {
|
|
||||||
"name": "development",
|
|
||||||
"labels": {
|
|
||||||
"name": "development"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -66,7 +66,7 @@ $ kubectl create -f docs/admin/namespaces/namespace-dev.json
|
|||||||
And then let's create the production namespace using kubectl.
|
And then let's create the production namespace using kubectl.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ kubectl create -f docs/admin/namespaces/namespace-prod.json
|
$ kubectl create -f docs/tasks/administer-cluster/namespace-prod.json
|
||||||
```
|
```
|
||||||
|
|
||||||
To be sure things are right, let's list all of the namespaces in our cluster.
|
To be sure things are right, let's list all of the namespaces in our cluster.
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ $ kubectl create -f docs/admin/namespaces/namespace-dev.json
|
|||||||
And then let's create the production namespace using kubectl.
|
And then let's create the production namespace using kubectl.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ kubectl create -f docs/admin/namespaces/namespace-prod.json
|
$ kubectl create -f docs/tasks/administer-cluster/namespace-prod.json
|
||||||
```
|
```
|
||||||
|
|
||||||
To be sure things are right, list all of the namespaces in our cluster.
|
To be sure things are right, list all of the namespaces in our cluster.
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ apiVersion: rbac.authorization.k8s.io/v1
|
|||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
metadata:
|
metadata:
|
||||||
name: event-exporter-rb
|
name: event-exporter-rb
|
||||||
namespace: default
|
|
||||||
labels:
|
labels:
|
||||||
app: event-exporter
|
app: event-exporter
|
||||||
roleRef:
|
roleRef:
|
||||||
@@ -42,4 +41,4 @@ spec:
|
|||||||
image: gcr.io/google-containers/event-exporter:v0.1.0
|
image: gcr.io/google-containers/event-exporter:v0.1.0
|
||||||
command:
|
command:
|
||||||
- '/event-exporter'
|
- '/event-exporter'
|
||||||
terminationGracePeriodSeconds: 30
|
terminationGracePeriodSeconds: 30
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ spec:
|
|||||||
value: $(REPLACE_ME)
|
value: $(REPLACE_ME)
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: etcd-env-config
|
name: etcd-env-config
|
||||||
volumes:
|
volumes:
|
||||||
- name: cache-volume
|
- name: cache-volume
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ spec:
|
|||||||
role: frontend
|
role: frontend
|
||||||
env:
|
env:
|
||||||
- name: DB_PORT
|
- name: DB_PORT
|
||||||
value: 6379
|
value: "6379"
|
||||||
- name: duplicate_key
|
- name: duplicate_key
|
||||||
value: FROM_ENV
|
value: FROM_ENV
|
||||||
- name: expansion
|
- name: expansion
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ spec:
|
|||||||
- mountPath: /cache
|
- mountPath: /cache
|
||||||
name: cache-volume
|
name: cache-volume
|
||||||
ports:
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
volumes:
|
volumes:
|
||||||
- name: cache-volume
|
- name: cache-volume
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- containerPort: 80
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
|
name: frontend
|
||||||
labels:
|
labels:
|
||||||
app: guestbook
|
app: guestbook
|
||||||
tier: frontend
|
tier: frontend
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
kind: PersistentVolumeClaim
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: myclaim-1
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 3Gi
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
kind: PersistentVolumeClaim
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: myclaim-2
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 8Gi
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"kind": "PersistentVolumeClaim",
|
|
||||||
"apiVersion": "v1",
|
|
||||||
"metadata": {
|
|
||||||
"name": "myclaim-3"
|
|
||||||
}, "spec": {
|
|
||||||
"accessModes": [
|
|
||||||
"ReadWriteOnce",
|
|
||||||
"ReadOnlyMany"
|
|
||||||
],
|
|
||||||
"resources": {
|
|
||||||
"requests": {
|
|
||||||
"storage": "10G"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"kind": "Namespace",
|
|
||||||
"apiVersion":"v1",
|
|
||||||
"metadata": {
|
|
||||||
"name": "myns",
|
|
||||||
"labels": {
|
|
||||||
"name": "development"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
kind: Pod
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: mypod
|
|
||||||
labels:
|
|
||||||
name: frontendhttp
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: myfrontend
|
|
||||||
image: nginx
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
||||||
name: "http-server"
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: "/usr/share/nginx/html"
|
|
||||||
name: mypd
|
|
||||||
volumes:
|
|
||||||
- name: mypd
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: myclaim-1
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"kind": "Service",
|
|
||||||
"apiVersion": "v1",
|
|
||||||
"metadata": {
|
|
||||||
"name": "frontendservice"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"ports": [
|
|
||||||
{
|
|
||||||
"protocol": "TCP",
|
|
||||||
"port": 3000,
|
|
||||||
"targetPort": "http-server"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"selector": {
|
|
||||||
"name": "frontendhttp"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
kind: PersistentVolume
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: pv0003
|
|
||||||
spec:
|
|
||||||
capacity:
|
|
||||||
storage: 10Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
- ReadOnlyMany
|
|
||||||
gcePersistentDisk:
|
|
||||||
pdName: "abc123"
|
|
||||||
fsType: "ext4"
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
kind: PersistentVolume
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: pv0001
|
|
||||||
labels:
|
|
||||||
type: local
|
|
||||||
spec:
|
|
||||||
capacity:
|
|
||||||
storage: 10Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
hostPath:
|
|
||||||
path: "/tmp/data01"
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
kind: PersistentVolume
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: pv0002
|
|
||||||
labels:
|
|
||||||
type: local
|
|
||||||
spec:
|
|
||||||
capacity:
|
|
||||||
storage: 8Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
hostPath:
|
|
||||||
path: "/somepath/data02"
|
|
||||||
persistentVolumeReclaimPolicy: Recycle
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
|
||||||
name: pv0003
|
|
||||||
spec:
|
|
||||||
capacity:
|
|
||||||
storage: 5Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
nfs:
|
|
||||||
path: /somepath
|
|
||||||
server: 172.17.0.2
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
approvers:
|
|
||||||
- caesarxuchao
|
|
||||||
- mikedanese
|
|
||||||
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"kind": "Pod",
|
|
||||||
"apiVersion": "v1",
|
|
||||||
"metadata": {
|
|
||||||
"name": "",
|
|
||||||
"labels": {
|
|
||||||
"name": ""
|
|
||||||
},
|
|
||||||
"generateName": "",
|
|
||||||
"namespace": "",
|
|
||||||
"annotations": []
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
|
|
||||||
// See 'The spec schema' for details.
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: ""
|
|
||||||
labels:
|
|
||||||
name: ""
|
|
||||||
namespace: ""
|
|
||||||
annotations: []
|
|
||||||
generateName: ""
|
|
||||||
spec:
|
|
||||||
? "// See 'The spec schema' for details."
|
|
||||||
: ~
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
{
|
|
||||||
"kind": "Pod",
|
|
||||||
"apiVersion": "v1",
|
|
||||||
"metadata": {
|
|
||||||
"name": "redis-django",
|
|
||||||
"labels": {
|
|
||||||
"app": "webapp"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"containers": [
|
|
||||||
{
|
|
||||||
"name": "key-value-store",
|
|
||||||
"image": "redis",
|
|
||||||
"ports": [
|
|
||||||
{
|
|
||||||
"containerPort": 6379
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "frontend",
|
|
||||||
"image": "django",
|
|
||||||
"ports": [
|
|
||||||
{
|
|
||||||
"containerPort": 8000
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: redis-django
|
|
||||||
labels:
|
|
||||||
app: web
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: key-value-store
|
|
||||||
image: redis
|
|
||||||
ports:
|
|
||||||
- containerPort: 6379
|
|
||||||
- name: frontend
|
|
||||||
image: django
|
|
||||||
ports:
|
|
||||||
- containerPort: 8000
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
"spec": {
|
|
||||||
"containers": [
|
|
||||||
{
|
|
||||||
"name": "",
|
|
||||||
"image": "",
|
|
||||||
"command": [
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"args": [
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"env": [
|
|
||||||
{
|
|
||||||
"name": "",
|
|
||||||
"value": ""
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"imagePullPolicy": "",
|
|
||||||
"ports": [
|
|
||||||
{
|
|
||||||
"containerPort": 0,
|
|
||||||
"name": "",
|
|
||||||
"protocol": ""
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"resources": {
|
|
||||||
"cpu": "",
|
|
||||||
"memory": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"restartPolicy": "",
|
|
||||||
"volumes": [
|
|
||||||
{
|
|
||||||
"name": "",
|
|
||||||
"emptyDir": {
|
|
||||||
"medium": ""
|
|
||||||
},
|
|
||||||
"secret": {
|
|
||||||
"secretName": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
spec:
|
|
||||||
containers:
|
|
||||||
-
|
|
||||||
args:
|
|
||||||
- ""
|
|
||||||
command:
|
|
||||||
- ""
|
|
||||||
env:
|
|
||||||
-
|
|
||||||
name: ""
|
|
||||||
value: ""
|
|
||||||
image: ""
|
|
||||||
imagePullPolicy: ""
|
|
||||||
name: ""
|
|
||||||
ports:
|
|
||||||
-
|
|
||||||
containerPort: 0
|
|
||||||
name: ""
|
|
||||||
protocol: ""
|
|
||||||
resources:
|
|
||||||
cpu: ""
|
|
||||||
memory: ""
|
|
||||||
restartPolicy: ""
|
|
||||||
volumes:
|
|
||||||
-
|
|
||||||
emptyDir:
|
|
||||||
medium: ""
|
|
||||||
name: ""
|
|
||||||
secret:
|
|
||||||
secretName: ""
|
|
||||||
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
approvers:
|
|
||||||
- bprashanth
|
|
||||||
- bprashanth
|
|
||||||
- caesarxuchao
|
|
||||||
- janetkuo
|
|
||||||
- mikedanese
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ReplicationController
|
|
||||||
metadata:
|
|
||||||
name: nginx
|
|
||||||
spec:
|
|
||||||
replicas: 3
|
|
||||||
selector:
|
|
||||||
app: nginx
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
name: nginx
|
|
||||||
labels:
|
|
||||||
app: nginx
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: nginx
|
|
||||||
image: nginx
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
||||||
+276
-88
@@ -33,6 +33,8 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||||
"k8s.io/apimachinery/pkg/util/yaml"
|
"k8s.io/apimachinery/pkg/util/yaml"
|
||||||
"k8s.io/kubernetes/pkg/api/testapi"
|
"k8s.io/kubernetes/pkg/api/testapi"
|
||||||
|
"k8s.io/kubernetes/pkg/apis/admissionregistration"
|
||||||
|
ar_validation "k8s.io/kubernetes/pkg/apis/admissionregistration/validation"
|
||||||
"k8s.io/kubernetes/pkg/apis/apps"
|
"k8s.io/kubernetes/pkg/apis/apps"
|
||||||
apps_validation "k8s.io/kubernetes/pkg/apis/apps/validation"
|
apps_validation "k8s.io/kubernetes/pkg/apis/apps/validation"
|
||||||
"k8s.io/kubernetes/pkg/apis/autoscaling"
|
"k8s.io/kubernetes/pkg/apis/autoscaling"
|
||||||
@@ -44,9 +46,13 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/apis/extensions"
|
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||||
ext_validation "k8s.io/kubernetes/pkg/apis/extensions/validation"
|
ext_validation "k8s.io/kubernetes/pkg/apis/extensions/validation"
|
||||||
"k8s.io/kubernetes/pkg/apis/policy"
|
"k8s.io/kubernetes/pkg/apis/policy"
|
||||||
policyvalidation "k8s.io/kubernetes/pkg/apis/policy/validation"
|
policy_validation "k8s.io/kubernetes/pkg/apis/policy/validation"
|
||||||
|
"k8s.io/kubernetes/pkg/apis/rbac"
|
||||||
|
rbac_validation "k8s.io/kubernetes/pkg/apis/rbac/validation"
|
||||||
|
"k8s.io/kubernetes/pkg/apis/settings"
|
||||||
|
settings_validation "k8s.io/kubernetes/pkg/apis/settings/validation"
|
||||||
"k8s.io/kubernetes/pkg/apis/storage"
|
"k8s.io/kubernetes/pkg/apis/storage"
|
||||||
storagevalidation "k8s.io/kubernetes/pkg/apis/storage/validation"
|
storage_validation "k8s.io/kubernetes/pkg/apis/storage/validation"
|
||||||
"k8s.io/kubernetes/pkg/capabilities"
|
"k8s.io/kubernetes/pkg/capabilities"
|
||||||
"k8s.io/kubernetes/pkg/registry/batch/job"
|
"k8s.io/kubernetes/pkg/registry/batch/job"
|
||||||
schedulerapilatest "k8s.io/kubernetes/plugin/pkg/scheduler/api/latest"
|
schedulerapilatest "k8s.io/kubernetes/plugin/pkg/scheduler/api/latest"
|
||||||
@@ -54,24 +60,33 @@ import (
|
|||||||
|
|
||||||
func validateObject(obj runtime.Object) (errors field.ErrorList) {
|
func validateObject(obj runtime.Object) (errors field.ErrorList) {
|
||||||
switch t := obj.(type) {
|
switch t := obj.(type) {
|
||||||
case *api.ReplicationController:
|
case *admissionregistration.InitializerConfiguration:
|
||||||
|
// cluster scope resource
|
||||||
|
errors = ar_validation.ValidateInitializerConfiguration(t)
|
||||||
|
case *api.ConfigMap:
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
}
|
}
|
||||||
errors = validation.ValidateReplicationController(t)
|
errors = validation.ValidateConfigMap(t)
|
||||||
case *api.ReplicationControllerList:
|
case *api.Endpoints:
|
||||||
for i := range t.Items {
|
|
||||||
errors = append(errors, validateObject(&t.Items[i])...)
|
|
||||||
}
|
|
||||||
case *api.Service:
|
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
}
|
}
|
||||||
errors = validation.ValidateService(t)
|
errors = validation.ValidateEndpoints(t)
|
||||||
case *api.ServiceList:
|
case *api.LimitRange:
|
||||||
for i := range t.Items {
|
if t.Namespace == "" {
|
||||||
errors = append(errors, validateObject(&t.Items[i])...)
|
t.Namespace = api.NamespaceDefault
|
||||||
}
|
}
|
||||||
|
errors = validation.ValidateLimitRange(t)
|
||||||
|
case *api.Namespace:
|
||||||
|
errors = validation.ValidateNamespace(t)
|
||||||
|
case *api.PersistentVolume:
|
||||||
|
errors = validation.ValidatePersistentVolume(t)
|
||||||
|
case *api.PersistentVolumeClaim:
|
||||||
|
if t.Namespace == "" {
|
||||||
|
t.Namespace = api.NamespaceDefault
|
||||||
|
}
|
||||||
|
errors = validation.ValidatePersistentVolumeClaim(t)
|
||||||
case *api.Pod:
|
case *api.Pod:
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
@@ -81,55 +96,54 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
|
|||||||
for i := range t.Items {
|
for i := range t.Items {
|
||||||
errors = append(errors, validateObject(&t.Items[i])...)
|
errors = append(errors, validateObject(&t.Items[i])...)
|
||||||
}
|
}
|
||||||
case *api.PersistentVolume:
|
|
||||||
errors = validation.ValidatePersistentVolume(t)
|
|
||||||
case *api.PersistentVolumeClaim:
|
|
||||||
if t.Namespace == "" {
|
|
||||||
t.Namespace = api.NamespaceDefault
|
|
||||||
}
|
|
||||||
errors = validation.ValidatePersistentVolumeClaim(t)
|
|
||||||
case *api.PodTemplate:
|
case *api.PodTemplate:
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
}
|
}
|
||||||
errors = validation.ValidatePodTemplate(t)
|
errors = validation.ValidatePodTemplate(t)
|
||||||
case *api.Endpoints:
|
case *api.ReplicationController:
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
}
|
}
|
||||||
errors = validation.ValidateEndpoints(t)
|
errors = validation.ValidateReplicationController(t)
|
||||||
case *api.Namespace:
|
case *api.ReplicationControllerList:
|
||||||
errors = validation.ValidateNamespace(t)
|
for i := range t.Items {
|
||||||
case *api.Secret:
|
errors = append(errors, validateObject(&t.Items[i])...)
|
||||||
if t.Namespace == "" {
|
|
||||||
t.Namespace = api.NamespaceDefault
|
|
||||||
}
|
}
|
||||||
errors = validation.ValidateSecret(t)
|
|
||||||
case *api.LimitRange:
|
|
||||||
if t.Namespace == "" {
|
|
||||||
t.Namespace = api.NamespaceDefault
|
|
||||||
}
|
|
||||||
errors = validation.ValidateLimitRange(t)
|
|
||||||
case *api.ResourceQuota:
|
case *api.ResourceQuota:
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
}
|
}
|
||||||
errors = validation.ValidateResourceQuota(t)
|
errors = validation.ValidateResourceQuota(t)
|
||||||
|
case *api.Secret:
|
||||||
|
if t.Namespace == "" {
|
||||||
|
t.Namespace = api.NamespaceDefault
|
||||||
|
}
|
||||||
|
errors = validation.ValidateSecret(t)
|
||||||
|
case *api.Service:
|
||||||
|
if t.Namespace == "" {
|
||||||
|
t.Namespace = api.NamespaceDefault
|
||||||
|
}
|
||||||
|
errors = validation.ValidateService(t)
|
||||||
|
case *api.ServiceAccount:
|
||||||
|
if t.Namespace == "" {
|
||||||
|
t.Namespace = api.NamespaceDefault
|
||||||
|
}
|
||||||
|
errors = validation.ValidateServiceAccount(t)
|
||||||
|
case *api.ServiceList:
|
||||||
|
for i := range t.Items {
|
||||||
|
errors = append(errors, validateObject(&t.Items[i])...)
|
||||||
|
}
|
||||||
|
case *apps.StatefulSet:
|
||||||
|
if t.Namespace == "" {
|
||||||
|
t.Namespace = api.NamespaceDefault
|
||||||
|
}
|
||||||
|
errors = apps_validation.ValidateStatefulSet(t)
|
||||||
case *autoscaling.HorizontalPodAutoscaler:
|
case *autoscaling.HorizontalPodAutoscaler:
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
}
|
}
|
||||||
errors = autoscaling_validation.ValidateHorizontalPodAutoscaler(t)
|
errors = autoscaling_validation.ValidateHorizontalPodAutoscaler(t)
|
||||||
case *extensions.Deployment:
|
|
||||||
if t.Namespace == "" {
|
|
||||||
t.Namespace = api.NamespaceDefault
|
|
||||||
}
|
|
||||||
errors = ext_validation.ValidateDeployment(t)
|
|
||||||
case *extensions.ReplicaSet:
|
|
||||||
if t.Namespace == "" {
|
|
||||||
t.Namespace = api.NamespaceDefault
|
|
||||||
}
|
|
||||||
errors = ext_validation.ValidateReplicaSet(t)
|
|
||||||
case *batch.Job:
|
case *batch.Job:
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
@@ -137,42 +151,53 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
|
|||||||
// Job needs generateSelector called before validation, and job.Validate does this.
|
// Job needs generateSelector called before validation, and job.Validate does this.
|
||||||
// See: https://github.com/kubernetes/kubernetes/issues/20951#issuecomment-187787040
|
// See: https://github.com/kubernetes/kubernetes/issues/20951#issuecomment-187787040
|
||||||
t.ObjectMeta.UID = types.UID("fakeuid")
|
t.ObjectMeta.UID = types.UID("fakeuid")
|
||||||
errors = job.Strategy.Validate(nil, t)
|
if strings.Index(t.ObjectMeta.Name, "$") > -1 {
|
||||||
case *extensions.Ingress:
|
t.ObjectMeta.Name = "skip-for-good"
|
||||||
if t.Namespace == "" {
|
|
||||||
t.Namespace = api.NamespaceDefault
|
|
||||||
}
|
}
|
||||||
errors = ext_validation.ValidateIngress(t)
|
errors = job.Strategy.Validate(nil, t)
|
||||||
case *extensions.DaemonSet:
|
case *extensions.DaemonSet:
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
}
|
}
|
||||||
errors = ext_validation.ValidateDaemonSet(t)
|
errors = ext_validation.ValidateDaemonSet(t)
|
||||||
|
case *extensions.Deployment:
|
||||||
|
if t.Namespace == "" {
|
||||||
|
t.Namespace = api.NamespaceDefault
|
||||||
|
}
|
||||||
|
errors = ext_validation.ValidateDeployment(t)
|
||||||
|
case *extensions.Ingress:
|
||||||
|
if t.Namespace == "" {
|
||||||
|
t.Namespace = api.NamespaceDefault
|
||||||
|
}
|
||||||
|
errors = ext_validation.ValidateIngress(t)
|
||||||
case *extensions.PodSecurityPolicy:
|
case *extensions.PodSecurityPolicy:
|
||||||
errors = ext_validation.ValidatePodSecurityPolicy(t)
|
errors = ext_validation.ValidatePodSecurityPolicy(t)
|
||||||
|
case *extensions.ReplicaSet:
|
||||||
|
if t.Namespace == "" {
|
||||||
|
t.Namespace = api.NamespaceDefault
|
||||||
|
}
|
||||||
|
errors = ext_validation.ValidateReplicaSet(t)
|
||||||
case *batch.CronJob:
|
case *batch.CronJob:
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
}
|
}
|
||||||
errors = batch_validation.ValidateCronJob(t)
|
errors = batch_validation.ValidateCronJob(t)
|
||||||
case *api.ConfigMap:
|
|
||||||
if t.Namespace == "" {
|
|
||||||
t.Namespace = api.NamespaceDefault
|
|
||||||
}
|
|
||||||
errors = validation.ValidateConfigMap(t)
|
|
||||||
case *apps.StatefulSet:
|
|
||||||
if t.Namespace == "" {
|
|
||||||
t.Namespace = api.NamespaceDefault
|
|
||||||
}
|
|
||||||
errors = apps_validation.ValidateStatefulSet(t)
|
|
||||||
case *policy.PodDisruptionBudget:
|
case *policy.PodDisruptionBudget:
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
}
|
}
|
||||||
errors = policyvalidation.ValidatePodDisruptionBudget(t)
|
errors = policy_validation.ValidatePodDisruptionBudget(t)
|
||||||
|
case *rbac.ClusterRoleBinding:
|
||||||
|
// clusterolebinding does not accept namespace
|
||||||
|
errors = rbac_validation.ValidateClusterRoleBinding(t)
|
||||||
|
case *settings.PodPreset:
|
||||||
|
if t.Namespace == "" {
|
||||||
|
t.Namespace = api.NamespaceDefault
|
||||||
|
}
|
||||||
|
errors = settings_validation.ValidatePodPreset(t)
|
||||||
case *storage.StorageClass:
|
case *storage.StorageClass:
|
||||||
// storageclass does not accept namespace
|
// storageclass does not accept namespace
|
||||||
errors = storagevalidation.ValidateStorageClass(t)
|
errors = storage_validation.ValidateStorageClass(t)
|
||||||
default:
|
default:
|
||||||
errors = field.ErrorList{}
|
errors = field.ErrorList{}
|
||||||
errors = append(errors, field.InternalError(field.NewPath(""), fmt.Errorf("no validation defined for %#v", obj)))
|
errors = append(errors, field.InternalError(field.NewPath(""), fmt.Errorf("no validation defined for %#v", obj)))
|
||||||
@@ -258,10 +283,6 @@ func TestExampleObjectSchemas(t *testing.T) {
|
|||||||
"pod2": {&api.Pod{}},
|
"pod2": {&api.Pod{}},
|
||||||
"pod3": {&api.Pod{}},
|
"pod3": {&api.Pod{}},
|
||||||
},
|
},
|
||||||
"../docs/admin/namespaces": {
|
|
||||||
"namespace-dev": {&api.Namespace{}},
|
|
||||||
"namespace-prod": {&api.Namespace{}},
|
|
||||||
},
|
|
||||||
"../docs/admin/resourcequota": {
|
"../docs/admin/resourcequota": {
|
||||||
"best-effort": {&api.ResourceQuota{}},
|
"best-effort": {&api.ResourceQuota{}},
|
||||||
"compute-resources": {&api.ResourceQuota{}},
|
"compute-resources": {&api.ResourceQuota{}},
|
||||||
@@ -310,6 +331,118 @@ func TestExampleObjectSchemas(t *testing.T) {
|
|||||||
"nginx-deployment": {&extensions.Deployment{}},
|
"nginx-deployment": {&extensions.Deployment{}},
|
||||||
"replication": {&api.ReplicationController{}},
|
"replication": {&api.ReplicationController{}},
|
||||||
},
|
},
|
||||||
|
"../docs/tasks/access-application-cluster": {
|
||||||
|
"frontend": {&api.Service{}, &extensions.Deployment{}},
|
||||||
|
"hello-service": {&api.Service{}},
|
||||||
|
"hello": {&extensions.Deployment{}},
|
||||||
|
"redis-master": {&api.Pod{}},
|
||||||
|
"two-container-pod": {&api.Pod{}},
|
||||||
|
},
|
||||||
|
"../docs/tasks/administer-cluster": {
|
||||||
|
"cloud-controller-manager-daemonset-example": {&api.ServiceAccount{}, &rbac.ClusterRoleBinding{}, &extensions.DaemonSet{}},
|
||||||
|
"cpu-constraints": {&api.LimitRange{}},
|
||||||
|
"cpu-constraints-pod": {&api.Pod{}},
|
||||||
|
"cpu-constraints-pod-2": {&api.Pod{}},
|
||||||
|
"cpu-constraints-pod-3": {&api.Pod{}},
|
||||||
|
"cpu-constraints-pod-4": {&api.Pod{}},
|
||||||
|
"cpu-defaults": {&api.LimitRange{}},
|
||||||
|
"cpu-defaults-pod": {&api.Pod{}},
|
||||||
|
"cpu-defaults-pod-2": {&api.Pod{}},
|
||||||
|
"cpu-defaults-pod-3": {&api.Pod{}},
|
||||||
|
"dns-horizontal-autoscaler": {&extensions.Deployment{}},
|
||||||
|
"memory-constraints": {&api.LimitRange{}},
|
||||||
|
"memory-constraints-pod": {&api.Pod{}},
|
||||||
|
"memory-constraints-pod-2": {&api.Pod{}},
|
||||||
|
"memory-constraints-pod-3": {&api.Pod{}},
|
||||||
|
"memory-constraints-pod-4": {&api.Pod{}},
|
||||||
|
"memory-defaults": {&api.LimitRange{}},
|
||||||
|
"memory-defaults-pod": {&api.Pod{}},
|
||||||
|
"memory-defaults-pod-2": {&api.Pod{}},
|
||||||
|
"memory-defaults-pod-3": {&api.Pod{}},
|
||||||
|
"my-scheduler": {&extensions.Deployment{}},
|
||||||
|
"namespace-dev": {&api.Namespace{}},
|
||||||
|
"namespace-prod": {&api.Namespace{}},
|
||||||
|
"persistent-volume-label-initializer-config": {&admissionregistration.InitializerConfiguration{}},
|
||||||
|
"pod1": {&api.Pod{}},
|
||||||
|
"pod2": {&api.Pod{}},
|
||||||
|
"pod3": {&api.Pod{}},
|
||||||
|
"quota-mem-cpu": {&api.ResourceQuota{}},
|
||||||
|
"quota-mem-cpu-pod": {&api.Pod{}},
|
||||||
|
"quota-mem-cpu-pod-2": {&api.Pod{}},
|
||||||
|
"quota-objects": {&api.ResourceQuota{}},
|
||||||
|
"quota-objects-pvc": {&api.PersistentVolumeClaim{}},
|
||||||
|
"quota-objects-pvc-2": {&api.PersistentVolumeClaim{}},
|
||||||
|
"quota-pod": {&api.ResourceQuota{}},
|
||||||
|
"quota-pod-deployment": {&extensions.Deployment{}},
|
||||||
|
"quota-pvc-2": {&api.PersistentVolumeClaim{}},
|
||||||
|
},
|
||||||
|
"../docs/tasks/configure-pod-container": {
|
||||||
|
"cpu-request-limit": {&api.Pod{}},
|
||||||
|
"cpu-request-limit-2": {&api.Pod{}},
|
||||||
|
"exec-liveness": {&api.Pod{}},
|
||||||
|
"http-liveness": {&api.Pod{}},
|
||||||
|
"init-containers": {&api.Pod{}},
|
||||||
|
"lifecycle-events": {&api.Pod{}},
|
||||||
|
"mem-limit-range": {&api.LimitRange{}},
|
||||||
|
"memory-request-limit": {&api.Pod{}},
|
||||||
|
"memory-request-limit-2": {&api.Pod{}},
|
||||||
|
"memory-request-limit-3": {&api.Pod{}},
|
||||||
|
"oir-pod": {&api.Pod{}},
|
||||||
|
"oir-pod-2": {&api.Pod{}},
|
||||||
|
"pod": {&api.Pod{}},
|
||||||
|
"pod-redis": {&api.Pod{}},
|
||||||
|
"private-reg-pod": {&api.Pod{}},
|
||||||
|
"projected-volume": {&api.Pod{}},
|
||||||
|
"qos-pod": {&api.Pod{}},
|
||||||
|
"qos-pod-2": {&api.Pod{}},
|
||||||
|
"qos-pod-3": {&api.Pod{}},
|
||||||
|
"qos-pod-4": {&api.Pod{}},
|
||||||
|
"rq-compute-resources": {&api.ResourceQuota{}},
|
||||||
|
"security-context": {&api.Pod{}},
|
||||||
|
"security-context-2": {&api.Pod{}},
|
||||||
|
"security-context-3": {&api.Pod{}},
|
||||||
|
"security-context-4": {&api.Pod{}},
|
||||||
|
"task-pv-claim": {&api.PersistentVolumeClaim{}},
|
||||||
|
"task-pv-pod": {&api.Pod{}},
|
||||||
|
"task-pv-volume": {&api.PersistentVolume{}},
|
||||||
|
"tcp-liveness-readiness": {&api.Pod{}},
|
||||||
|
},
|
||||||
|
"../docs/tasks/debug-application-cluster": {
|
||||||
|
"counter-pod": {&api.Pod{}},
|
||||||
|
"event-exporter-deploy": {&api.ServiceAccount{}, &rbac.ClusterRoleBinding{}, &extensions.Deployment{}},
|
||||||
|
"fluentd-gcp-configmap": {&api.ConfigMap{}},
|
||||||
|
"fluentd-gcp-ds": {&extensions.DaemonSet{}},
|
||||||
|
"nginx-dep": {&extensions.Deployment{}},
|
||||||
|
"shell-demo": {&api.Pod{}},
|
||||||
|
"termination": {&api.Pod{}},
|
||||||
|
},
|
||||||
|
// TODO: decide whether federation examples should be added
|
||||||
|
"../docs/tasks/inject-data-application": {
|
||||||
|
"commands": {&api.Pod{}},
|
||||||
|
"dapi-envars-container": {&api.Pod{}},
|
||||||
|
"dapi-envars-pod": {&api.Pod{}},
|
||||||
|
"dapi-volume": {&api.Pod{}},
|
||||||
|
"dapi-volume-resources": {&api.Pod{}},
|
||||||
|
"envars": {&api.Pod{}},
|
||||||
|
"podpreset-allow-db": {&settings.PodPreset{}},
|
||||||
|
"podpreset-allow-db-merged": {&api.Pod{}},
|
||||||
|
"podpreset-configmap": {&api.ConfigMap{}},
|
||||||
|
"podpreset-conflict-pod": {&api.Pod{}},
|
||||||
|
"podpreset-conflict-preset": {&settings.PodPreset{}},
|
||||||
|
"podpreset-merged": {&api.Pod{}},
|
||||||
|
"podpreset-multi-merged": {&api.Pod{}},
|
||||||
|
"podpreset-pod": {&api.Pod{}},
|
||||||
|
"podpreset-preset": {&settings.PodPreset{}},
|
||||||
|
"podpreset-proxy": {&settings.PodPreset{}},
|
||||||
|
"podpreset-replicaset-merged": {&api.Pod{}},
|
||||||
|
"podpreset-replicaset": {&extensions.ReplicaSet{}},
|
||||||
|
"secret": {&api.Secret{}},
|
||||||
|
"secret-envars-pod": {&api.Pod{}},
|
||||||
|
"secret-pod": {&api.Pod{}},
|
||||||
|
},
|
||||||
|
"../docs/tasks/job": {
|
||||||
|
"job": {&batch.Job{}},
|
||||||
|
},
|
||||||
"../docs/tasks/job/coarse-parallel-processing-work-queue": {
|
"../docs/tasks/job/coarse-parallel-processing-work-queue": {
|
||||||
"job": {&batch.Job{}},
|
"job": {&batch.Job{}},
|
||||||
},
|
},
|
||||||
@@ -318,21 +451,53 @@ func TestExampleObjectSchemas(t *testing.T) {
|
|||||||
"redis-pod": {&api.Pod{}},
|
"redis-pod": {&api.Pod{}},
|
||||||
"redis-service": {&api.Service{}},
|
"redis-service": {&api.Service{}},
|
||||||
},
|
},
|
||||||
"../docs/tutorials/stateful-application": {
|
"../docs/tasks/run-application": {
|
||||||
"gce-volume": {&api.PersistentVolume{}},
|
"deployment": {&extensions.Deployment{}},
|
||||||
|
"deployment-patch-demo": {&extensions.Deployment{}},
|
||||||
|
"deployment-scale": {&extensions.Deployment{}},
|
||||||
|
"deployment-update": {&extensions.Deployment{}},
|
||||||
|
"mysql-configmap": {&api.ConfigMap{}},
|
||||||
"mysql-deployment": {&api.Service{}, &api.PersistentVolumeClaim{}, &extensions.Deployment{}},
|
"mysql-deployment": {&api.Service{}, &api.PersistentVolumeClaim{}, &extensions.Deployment{}},
|
||||||
"mysql-services": {&api.Service{}, &api.Service{}},
|
"mysql-services": {&api.Service{}, &api.Service{}},
|
||||||
"mysql-configmap": {&api.ConfigMap{}},
|
|
||||||
"mysql-statefulset": {&apps.StatefulSet{}},
|
"mysql-statefulset": {&apps.StatefulSet{}},
|
||||||
"cassandra-service": {&api.Service{}},
|
},
|
||||||
"cassandra-statefulset": {&apps.StatefulSet{}, &storage.StorageClass{}},
|
"../docs/tutorials/clusters": {
|
||||||
|
"hello-apparmor-pod": {&api.Pod{}},
|
||||||
|
"my-scheduler": {&extensions.Deployment{}},
|
||||||
|
},
|
||||||
|
"../docs/tutorials/object-management-kubectl": {
|
||||||
|
"simple_deployment": {&extensions.Deployment{}},
|
||||||
|
"update_deployment": {&extensions.Deployment{}},
|
||||||
|
},
|
||||||
|
"../docs/tutorials/stateful-application": {
|
||||||
"web": {&api.Service{}, &apps.StatefulSet{}},
|
"web": {&api.Service{}, &apps.StatefulSet{}},
|
||||||
"webp": {&api.Service{}, &apps.StatefulSet{}},
|
"webp": {&api.Service{}, &apps.StatefulSet{}},
|
||||||
"zookeeper": {&api.Service{}, &api.Service{}, &policy.PodDisruptionBudget{}, &apps.StatefulSet{}},
|
"zookeeper": {&api.Service{}, &api.Service{}, &policy.PodDisruptionBudget{}, &apps.StatefulSet{}},
|
||||||
},
|
},
|
||||||
|
"../docs/tutorials/stateful-application/cassandra": {
|
||||||
|
"cassandra-service": {&api.Service{}},
|
||||||
|
"cassandra-statefulset": {&apps.StatefulSet{}, &storage.StorageClass{}},
|
||||||
|
},
|
||||||
|
"../docs/tutorials/stateful-application/mysql-wordpress-persistent-volume": {
|
||||||
|
"local-volumes": {&api.PersistentVolume{}, &api.PersistentVolume{}},
|
||||||
|
"mysql-deployment": {&api.Service{}, &api.PersistentVolumeClaim{}, &extensions.Deployment{}},
|
||||||
|
"wordpress-deployment": {&api.Service{}, &api.PersistentVolumeClaim{}, &extensions.Deployment{}},
|
||||||
|
},
|
||||||
|
"../docs/tutorials/stateless-application": {
|
||||||
|
"deployment": {&extensions.Deployment{}},
|
||||||
|
"deployment-scale": {&extensions.Deployment{}},
|
||||||
|
"deployment-update": {&extensions.Deployment{}},
|
||||||
|
},
|
||||||
|
"../docs/tutorials/stateless-application/guestbook": {
|
||||||
|
"frontend-deployment": {&extensions.Deployment{}},
|
||||||
|
"frontend-service": {&api.Service{}},
|
||||||
|
"redis-master-deployment": {&extensions.Deployment{}},
|
||||||
|
"redis-master-service": {&api.Service{}},
|
||||||
|
"redis-slave-deployment": {&extensions.Deployment{}},
|
||||||
|
"redis-slave-service": {&api.Service{}},
|
||||||
|
},
|
||||||
"../docs/user-guide": {
|
"../docs/user-guide": {
|
||||||
"bad-nginx-deployment": {&extensions.Deployment{}},
|
"bad-nginx-deployment": {&extensions.Deployment{}},
|
||||||
"counter-pod": {&api.Pod{}},
|
|
||||||
"curlpod": {&extensions.Deployment{}},
|
"curlpod": {&extensions.Deployment{}},
|
||||||
"deployment": {&extensions.Deployment{}},
|
"deployment": {&extensions.Deployment{}},
|
||||||
"ingress": {&extensions.Ingress{}},
|
"ingress": {&extensions.Ingress{}},
|
||||||
@@ -352,46 +517,69 @@ func TestExampleObjectSchemas(t *testing.T) {
|
|||||||
"redis-resource-deployment": {&extensions.Deployment{}},
|
"redis-resource-deployment": {&extensions.Deployment{}},
|
||||||
"redis-secret-deployment": {&extensions.Deployment{}},
|
"redis-secret-deployment": {&extensions.Deployment{}},
|
||||||
"run-my-nginx": {&extensions.Deployment{}},
|
"run-my-nginx": {&extensions.Deployment{}},
|
||||||
"cronjob": {&batch.CronJob{}},
|
},
|
||||||
|
"../docs/user-guide/configmap": {
|
||||||
|
"command-pod": {&api.Pod{}},
|
||||||
|
"configmap": {&api.ConfigMap{}},
|
||||||
|
"env-pod": {&api.Pod{}},
|
||||||
|
"mount-file-pod": {&api.Pod{}},
|
||||||
|
"volume-pod": {&api.Pod{}},
|
||||||
|
},
|
||||||
|
"../docs/user-guide/configmap/redis": {
|
||||||
|
"redis-pod": {&api.Pod{}},
|
||||||
},
|
},
|
||||||
"../docs/user-guide/downward-api": {
|
"../docs/user-guide/downward-api": {
|
||||||
"dapi-pod": {&api.Pod{}},
|
"dapi-pod": {&api.Pod{}},
|
||||||
"dapi-container-resources": {&api.Pod{}},
|
"dapi-container-resources": {&api.Pod{}},
|
||||||
},
|
},
|
||||||
"../docs/user-guide/downward-api/volume/": {
|
"../docs/user-guide/downward-api/volume": {
|
||||||
"dapi-volume": {&api.Pod{}},
|
"dapi-volume": {&api.Pod{}},
|
||||||
"dapi-volume-resources": {&api.Pod{}},
|
"dapi-volume-resources": {&api.Pod{}},
|
||||||
},
|
},
|
||||||
|
"../docs/user-guide/environment-guide": {
|
||||||
|
"backend-rc": {&api.ReplicationController{}},
|
||||||
|
"backend-srv": {&api.Service{}},
|
||||||
|
"show-rc": {&api.ReplicationController{}},
|
||||||
|
"show-srv": {&api.Service{}},
|
||||||
|
},
|
||||||
|
"../docs/user-guide/horizontal-pod-autoscaling": {
|
||||||
|
"hpa-php-apache": {&autoscaling.HorizontalPodAutoscaler{}},
|
||||||
|
},
|
||||||
|
"../docs/user-guide/jobs/work-queue-1": {
|
||||||
|
"job": {&batch.Job{}},
|
||||||
|
},
|
||||||
|
"../docs/user-guide/jobs/work-queue-2": {
|
||||||
|
"job": {&batch.Job{}},
|
||||||
|
"redis-pod": {&api.Pod{}},
|
||||||
|
"redis-service": {&api.Service{}},
|
||||||
|
},
|
||||||
"../docs/user-guide/liveness": {
|
"../docs/user-guide/liveness": {
|
||||||
"exec-liveness": {&api.Pod{}},
|
"exec-liveness": {&api.Pod{}},
|
||||||
"http-liveness": {&api.Pod{}},
|
"http-liveness": {&api.Pod{}},
|
||||||
"http-liveness-named-port": {&api.Pod{}},
|
"http-liveness-named-port": {&api.Pod{}},
|
||||||
},
|
},
|
||||||
|
"../docs/user-guide/nginx": {
|
||||||
|
"nginx-deployment": {&extensions.Deployment{}},
|
||||||
|
"nginx-svc": {&api.Service{}},
|
||||||
|
},
|
||||||
"../docs/user-guide/node-selection": {
|
"../docs/user-guide/node-selection": {
|
||||||
"pod": {&api.Pod{}},
|
"pod": {&api.Pod{}},
|
||||||
"pod-with-node-affinity": {&api.Pod{}},
|
"pod-with-node-affinity": {&api.Pod{}},
|
||||||
"pod-with-pod-affinity": {&api.Pod{}},
|
"pod-with-pod-affinity": {&api.Pod{}},
|
||||||
},
|
},
|
||||||
"../docs/user-guide/persistent-volumes/volumes": {
|
"../docs/user-guide/replicasets": {
|
||||||
"local-01": {&api.PersistentVolume{}},
|
"frontend": {&extensions.ReplicaSet{}},
|
||||||
"local-02": {&api.PersistentVolume{}},
|
"hpa-rs": {&autoscaling.HorizontalPodAutoscaler{}},
|
||||||
"gce": {&api.PersistentVolume{}},
|
"redis-slave": {&extensions.ReplicaSet{}},
|
||||||
"nfs": {&api.PersistentVolume{}},
|
|
||||||
},
|
|
||||||
"../docs/user-guide/persistent-volumes/claims": {
|
|
||||||
"claim-01": {&api.PersistentVolumeClaim{}},
|
|
||||||
"claim-02": {&api.PersistentVolumeClaim{}},
|
|
||||||
"claim-03": {&api.PersistentVolumeClaim{}},
|
|
||||||
},
|
|
||||||
"../docs/user-guide/persistent-volumes/simpletest": {
|
|
||||||
"namespace": {&api.Namespace{}},
|
|
||||||
"pod": {&api.Pod{}},
|
|
||||||
"service": {&api.Service{}},
|
|
||||||
},
|
},
|
||||||
"../docs/user-guide/secrets": {
|
"../docs/user-guide/secrets": {
|
||||||
"secret-pod": {&api.Pod{}},
|
|
||||||
"secret": {&api.Secret{}},
|
"secret": {&api.Secret{}},
|
||||||
"secret-env-pod": {&api.Pod{}},
|
"secret-env-pod": {&api.Pod{}},
|
||||||
|
"secret-pod": {&api.Pod{}},
|
||||||
|
},
|
||||||
|
"../docs/user-guide/services": {
|
||||||
|
"load-balancer-sample": {&api.Service{}},
|
||||||
|
"service-sample": {&api.Service{}},
|
||||||
},
|
},
|
||||||
"../docs/user-guide/update-demo": {
|
"../docs/user-guide/update-demo": {
|
||||||
"kitten-rc": {&api.ReplicationController{}},
|
"kitten-rc": {&api.ReplicationController{}},
|
||||||
|
|||||||
Reference in New Issue
Block a user