@@ -160,10 +160,6 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
|
|||||||
AllowPodAffinityNamespaceSelector: true,
|
AllowPodAffinityNamespaceSelector: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
pspValidationOptions := policy_validation.PodSecurityPolicyValidationOptions{
|
|
||||||
AllowEphemeralVolumeType: true,
|
|
||||||
}
|
|
||||||
|
|
||||||
// Enable CustomPodDNS for testing
|
// Enable CustomPodDNS for testing
|
||||||
// feature.DefaultFeatureGate.Set("CustomPodDNS=true")
|
// feature.DefaultFeatureGate.Set("CustomPodDNS=true")
|
||||||
switch t := obj.(type) {
|
switch t := obj.(type) {
|
||||||
@@ -283,11 +279,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
|
|||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
}
|
}
|
||||||
gv := schema.GroupVersion{
|
errors = networking_validation.ValidateIngressCreate(t)
|
||||||
Group: networking.GroupName,
|
|
||||||
Version: legacyscheme.Scheme.PrioritizedVersionsForGroup(networking.GroupName)[0].Version,
|
|
||||||
}
|
|
||||||
errors = networking_validation.ValidateIngressCreate(t, gv)
|
|
||||||
case *networking.IngressClass:
|
case *networking.IngressClass:
|
||||||
/*
|
/*
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
@@ -301,7 +293,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
|
|||||||
errors = networking_validation.ValidateIngressClass(t)
|
errors = networking_validation.ValidateIngressClass(t)
|
||||||
|
|
||||||
case *policy.PodSecurityPolicy:
|
case *policy.PodSecurityPolicy:
|
||||||
errors = policy_validation.ValidatePodSecurityPolicy(t, pspValidationOptions)
|
errors = policy_validation.ValidatePodSecurityPolicy(t)
|
||||||
case *apps.ReplicaSet:
|
case *apps.ReplicaSet:
|
||||||
if t.Namespace == "" {
|
if t.Namespace == "" {
|
||||||
t.Namespace = api.NamespaceDefault
|
t.Namespace = api.NamespaceDefault
|
||||||
@@ -405,7 +397,7 @@ func TestExampleObjectSchemas(t *testing.T) {
|
|||||||
},
|
},
|
||||||
"admin/dns": {
|
"admin/dns": {
|
||||||
"busybox": {&api.Pod{}},
|
"busybox": {&api.Pod{}},
|
||||||
"dns-horizontal-autoscaler": {&apps.Deployment{}},
|
"dns-horizontal-autoscaler": {&api.ServiceAccount{}, &rbac.ClusterRole{}, &rbac.ClusterRoleBinding{}, &apps.Deployment{}},
|
||||||
"dnsutils": {&api.Pod{}},
|
"dnsutils": {&api.Pod{}},
|
||||||
},
|
},
|
||||||
"admin/logging": {
|
"admin/logging": {
|
||||||
@@ -453,7 +445,7 @@ func TestExampleObjectSchemas(t *testing.T) {
|
|||||||
},
|
},
|
||||||
"admin/sched": {
|
"admin/sched": {
|
||||||
"clusterrole": {&rbac.ClusterRole{}},
|
"clusterrole": {&rbac.ClusterRole{}},
|
||||||
"my-scheduler": {&api.ServiceAccount{}, &rbac.ClusterRoleBinding{}, &rbac.ClusterRoleBinding{}, &apps.Deployment{}},
|
"my-scheduler": {&api.ServiceAccount{}, &rbac.ClusterRoleBinding{}, &rbac.ClusterRoleBinding{}, &api.ConfigMap{}, &apps.Deployment{}},
|
||||||
"pod1": {&api.Pod{}},
|
"pod1": {&api.Pod{}},
|
||||||
"pod2": {&api.Pod{}},
|
"pod2": {&api.Pod{}},
|
||||||
"pod3": {&api.Pod{}},
|
"pod3": {&api.Pod{}},
|
||||||
@@ -592,6 +584,7 @@ func TestExampleObjectSchemas(t *testing.T) {
|
|||||||
},
|
},
|
||||||
"pods/probe": {
|
"pods/probe": {
|
||||||
"exec-liveness": {&api.Pod{}},
|
"exec-liveness": {&api.Pod{}},
|
||||||
|
"grpc-liveness": {&api.Pod{}},
|
||||||
"http-liveness": {&api.Pod{}},
|
"http-liveness": {&api.Pod{}},
|
||||||
"pod-with-http-healthcheck": {&api.Pod{}},
|
"pod-with-http-healthcheck": {&api.Pod{}},
|
||||||
"pod-with-tcp-socket-healthcheck": {&api.Pod{}},
|
"pod-with-tcp-socket-healthcheck": {&api.Pod{}},
|
||||||
@@ -621,7 +614,11 @@ func TestExampleObjectSchemas(t *testing.T) {
|
|||||||
},
|
},
|
||||||
"pods/storage": {
|
"pods/storage": {
|
||||||
"projected": {&api.Pod{}},
|
"projected": {&api.Pod{}},
|
||||||
|
"projected-secret-downwardapi-configmap": {&api.Pod{}},
|
||||||
|
"projected-secrets-nondefault-permission-mode": {&api.Pod{}},
|
||||||
|
"projected-service-account-token": {&api.Pod{}},
|
||||||
"pv-claim": {&api.PersistentVolumeClaim{}},
|
"pv-claim": {&api.PersistentVolumeClaim{}},
|
||||||
|
"pv-duplicate": {&api.Pod{}},
|
||||||
"pv-pod": {&api.Pod{}},
|
"pv-pod": {&api.Pod{}},
|
||||||
"pv-volume": {&api.PersistentVolume{}},
|
"pv-volume": {&api.PersistentVolume{}},
|
||||||
"redis": {&api.Pod{}},
|
"redis": {&api.Pod{}},
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ spec:
|
|||||||
- name: token-vol
|
- name: token-vol
|
||||||
mountPath: "/service-account"
|
mountPath: "/service-account"
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
serviceAccountName: default
|
||||||
volumes:
|
volumes:
|
||||||
- name: token-vol
|
- name: token-vol
|
||||||
projected:
|
projected:
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ spec:
|
|||||||
- name: test
|
- name: test
|
||||||
image: nginx
|
image: nginx
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: site-data
|
# a mount for site-data
|
||||||
|
- name: config
|
||||||
mountPath: /usr/share/nginx/html
|
mountPath: /usr/share/nginx/html
|
||||||
subPath: html
|
subPath: html
|
||||||
|
# another mount for nginx config
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /etc/nginx/nginx.conf
|
mountPath: /etc/nginx/nginx.conf
|
||||||
subPath: nginx.conf
|
subPath: nginx.conf
|
||||||
|
|||||||
@@ -1,40 +1,116 @@
|
|||||||
module k8s.io/website
|
module k8s.io/website
|
||||||
|
|
||||||
go 1.16
|
go 1.17
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/google/go-cmp v0.5.6 // indirect
|
k8s.io/apimachinery v0.23.0
|
||||||
k8s.io/apimachinery v0.22.0
|
|
||||||
k8s.io/kubernetes v0.0.0
|
k8s.io/kubernetes v0.0.0
|
||||||
)
|
)
|
||||||
|
|
||||||
replace (
|
require (
|
||||||
k8s.io/api => k8s.io/api v0.22.0
|
cloud.google.com/go v0.97.0 // indirect
|
||||||
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.22.0
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
k8s.io/apimachinery => k8s.io/apimachinery v0.22.0
|
github.com/blang/semver v3.5.1+incompatible // indirect
|
||||||
k8s.io/apiserver => k8s.io/apiserver v0.22.0
|
github.com/cespare/xxhash/v2 v2.1.1 // indirect
|
||||||
k8s.io/cli-runtime => k8s.io/cli-runtime v0.22.0
|
github.com/coreos/go-semver v0.3.0 // indirect
|
||||||
k8s.io/client-go => k8s.io/client-go v0.22.0
|
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
|
||||||
k8s.io/cloud-provider => k8s.io/cloud-provider v0.22.0
|
github.com/cyphar/filepath-securejoin v0.2.2 // indirect
|
||||||
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.22.0
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
k8s.io/code-generator => k8s.io/code-generator v0.22.0
|
github.com/docker/distribution v2.7.1+incompatible // indirect
|
||||||
k8s.io/component-base => k8s.io/component-base v0.22.0
|
github.com/felixge/httpsnoop v1.0.1 // indirect
|
||||||
k8s.io/component-helpers => k8s.io/component-helpers v0.22.0
|
github.com/go-logr/logr v1.2.0 // indirect
|
||||||
k8s.io/controller-manager => k8s.io/controller-manager v0.22.0
|
github.com/gogo/protobuf v1.3.2 // indirect
|
||||||
k8s.io/cri-api => k8s.io/cri-api v0.22.0
|
github.com/golang/protobuf v1.5.2 // indirect
|
||||||
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.22.0
|
github.com/google/go-cmp v0.5.6 // indirect
|
||||||
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.22.0
|
github.com/google/gofuzz v1.1.0 // indirect
|
||||||
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.22.0
|
github.com/google/uuid v1.1.2 // indirect
|
||||||
k8s.io/kube-proxy => k8s.io/kube-proxy v0.22.0
|
github.com/googleapis/gnostic v0.5.5 // indirect
|
||||||
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.22.0
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
||||||
k8s.io/kubectl => k8s.io/kubectl v0.22.0
|
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
||||||
k8s.io/kubelet => k8s.io/kubelet v0.22.0
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
k8s.io/kubernetes => ../kubernetes
|
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||||
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.22.0
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
k8s.io/metrics => k8s.io/metrics v0.22.0
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
k8s.io/mount-utils => k8s.io/mount-utils v0.22.0
|
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||||
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.22.0
|
github.com/opencontainers/runc v1.0.2 // indirect
|
||||||
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.22.0
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.22.0
|
github.com/prometheus/client_golang v1.11.0 // indirect
|
||||||
k8s.io/sample-controller => k8s.io/sample-controller v0.22.0
|
github.com/prometheus/client_model v0.2.0 // indirect
|
||||||
|
github.com/prometheus/common v0.28.0 // indirect
|
||||||
|
github.com/prometheus/procfs v0.6.0 // indirect
|
||||||
|
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||||
|
github.com/spf13/pflag v1.0.5 // indirect
|
||||||
|
go.etcd.io/etcd/api/v3 v3.5.0 // indirect
|
||||||
|
go.etcd.io/etcd/client/pkg/v3 v3.5.0 // indirect
|
||||||
|
go.etcd.io/etcd/client/v3 v3.5.0 // indirect
|
||||||
|
go.opentelemetry.io/contrib v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/otel v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/metric v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/sdk v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/trace v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/proto/otlp v0.7.0 // indirect
|
||||||
|
go.uber.org/atomic v1.7.0 // indirect
|
||||||
|
go.uber.org/multierr v1.6.0 // indirect
|
||||||
|
go.uber.org/zap v1.19.0 // indirect
|
||||||
|
golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect
|
||||||
|
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 // indirect
|
||||||
|
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 // indirect
|
||||||
|
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
|
||||||
|
golang.org/x/text v0.3.7 // indirect
|
||||||
|
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
|
||||||
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
|
google.golang.org/genproto v0.0.0-20211021150943-2b146023228c // indirect
|
||||||
|
google.golang.org/grpc v1.40.0 // indirect
|
||||||
|
google.golang.org/protobuf v1.27.1 // indirect
|
||||||
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||||
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
||||||
|
k8s.io/api v0.23.0 // indirect
|
||||||
|
k8s.io/apiserver v0.23.0 // indirect
|
||||||
|
k8s.io/client-go v0.23.0 // indirect
|
||||||
|
k8s.io/component-base v0.23.0 // indirect
|
||||||
|
k8s.io/component-helpers v0.23.0 // indirect
|
||||||
|
k8s.io/klog/v2 v2.30.0 // indirect
|
||||||
|
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
|
||||||
|
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
|
||||||
|
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25 // indirect
|
||||||
|
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
|
||||||
|
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
|
||||||
|
sigs.k8s.io/yaml v1.2.0 // indirect
|
||||||
|
)
|
||||||
|
|
||||||
|
replace (
|
||||||
|
k8s.io/api => k8s.io/api v0.23.0
|
||||||
|
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.23.0
|
||||||
|
k8s.io/apimachinery => k8s.io/apimachinery v0.23.0
|
||||||
|
k8s.io/apiserver => k8s.io/apiserver v0.23.0
|
||||||
|
k8s.io/cli-runtime => k8s.io/cli-runtime v0.23.0
|
||||||
|
k8s.io/client-go => k8s.io/client-go v0.23.0
|
||||||
|
k8s.io/cloud-provider => k8s.io/cloud-provider v0.23.0
|
||||||
|
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.23.0
|
||||||
|
k8s.io/code-generator => k8s.io/code-generator v0.23.0
|
||||||
|
k8s.io/component-base => k8s.io/component-base v0.23.0
|
||||||
|
k8s.io/component-helpers => k8s.io/component-helpers v0.23.0
|
||||||
|
k8s.io/controller-manager => k8s.io/controller-manager v0.23.0
|
||||||
|
k8s.io/cri-api => k8s.io/cri-api v0.23.0
|
||||||
|
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.23.0
|
||||||
|
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.23.0
|
||||||
|
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.23.0
|
||||||
|
k8s.io/kube-proxy => k8s.io/kube-proxy v0.23.0
|
||||||
|
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.23.0
|
||||||
|
k8s.io/kubectl => k8s.io/kubectl v0.23.0
|
||||||
|
k8s.io/kubelet => k8s.io/kubelet v0.23.0
|
||||||
|
k8s.io/kubernetes => ../kubernetes
|
||||||
|
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.23.0
|
||||||
|
k8s.io/metrics => k8s.io/metrics v0.23.0
|
||||||
|
k8s.io/mount-utils => k8s.io/mount-utils v0.23.0
|
||||||
|
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.23.0
|
||||||
|
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.23.0
|
||||||
|
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.23.0
|
||||||
|
k8s.io/sample-controller => k8s.io/sample-controller v0.23.0
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user