mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-06 11:46:36 +00:00
published by bot
copied from https://github.com/kubernetes/kubernetes.git last commit is ebe733e46983b0201501a23a26d48a73f41fe04c
This commit is contained in:
parent
fb302effa4
commit
eb638c622f
766
1.4/Godeps/Godeps.json
generated
Normal file
766
1.4/Godeps/Godeps.json
generated
Normal file
@ -0,0 +1,766 @@
|
|||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/staging/src/k8s.io/client-go/1.4/_tmp",
|
||||||
|
"GoVersion": "go1.7",
|
||||||
|
"GodepVersion": "v74",
|
||||||
|
"Packages": [
|
||||||
|
"./..."
|
||||||
|
],
|
||||||
|
"Deps": [
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/blang/semver",
|
||||||
|
"Comment": "v3.0.1",
|
||||||
|
"Rev": "31b736133b98f26d5e078ec9eb591666edfd091f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/davecgh/go-spew/spew",
|
||||||
|
"Rev": "5215b55f46b2b919f50a1df0eaa5886afe4e3b3d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/docker/distribution/digest",
|
||||||
|
"Comment": "v2.4.0-rc.1-38-gcd27f17",
|
||||||
|
"Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/docker/distribution/reference",
|
||||||
|
"Comment": "v2.4.0-rc.1-38-gcd27f17",
|
||||||
|
"Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/emicklei/go-restful",
|
||||||
|
"Comment": "v1.2-79-g89ef8af",
|
||||||
|
"Rev": "89ef8af493ab468a45a42bb0d89a06fccdd2fb22"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/emicklei/go-restful/log",
|
||||||
|
"Comment": "v1.2-79-g89ef8af",
|
||||||
|
"Rev": "89ef8af493ab468a45a42bb0d89a06fccdd2fb22"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/emicklei/go-restful/swagger",
|
||||||
|
"Comment": "v1.2-79-g89ef8af",
|
||||||
|
"Rev": "89ef8af493ab468a45a42bb0d89a06fccdd2fb22"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/ghodss/yaml",
|
||||||
|
"Rev": "73d445a93680fa1a78ae23a5839bad48f32ba1ee"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/gogo/protobuf/proto",
|
||||||
|
"Comment": "v0.2-33-ge18d7aa",
|
||||||
|
"Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/gogo/protobuf/sortkeys",
|
||||||
|
"Comment": "v0.2-33-ge18d7aa",
|
||||||
|
"Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/golang/glog",
|
||||||
|
"Rev": "44145f04b68cf362d9c4df2182967c2275eaefed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/golang/groupcache/lru",
|
||||||
|
"Rev": "02826c3e79038b59d737d3b1c0a1d937f71a4433"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/google/gofuzz",
|
||||||
|
"Rev": "bbcb9da2d746f8bdbd6a936686a0a6067ada0ec5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/imdario/mergo",
|
||||||
|
"Comment": "0.1.3-8-g6633656",
|
||||||
|
"Rev": "6633656539c1639d9d78127b7d47c622b5d7b6dc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/juju/ratelimit",
|
||||||
|
"Rev": "77ed1c8a01217656d2080ad51981f6e99adaa177"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/pborman/uuid",
|
||||||
|
"Rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/spf13/pflag",
|
||||||
|
"Rev": "1560c1005499d61b80f865c04d39ca7505bf7f0b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/ugorji/go/codec",
|
||||||
|
"Rev": "f1f1a805ed361a0e078bb537e4ea78cd37dcf065"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/context",
|
||||||
|
"Rev": "e90d6d0afc4c315a0d87a568ae68577cc15149a0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/http2",
|
||||||
|
"Rev": "e90d6d0afc4c315a0d87a568ae68577cc15149a0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/http2/hpack",
|
||||||
|
"Rev": "e90d6d0afc4c315a0d87a568ae68577cc15149a0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/lex/httplex",
|
||||||
|
"Rev": "e90d6d0afc4c315a0d87a568ae68577cc15149a0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "gopkg.in/inf.v0",
|
||||||
|
"Comment": "v0.9.0",
|
||||||
|
"Rev": "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "gopkg.in/yaml.v2",
|
||||||
|
"Rev": "53feefa2559fb8dfa8d81baad31be332c97d6c77"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/federation/apis/federation",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/federation/apis/federation/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/federation/apis/federation/v1beta1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/endpoints",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/errors",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/meta",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/meta/metatypes",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/pod",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/resource",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/service",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/testapi",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/unversioned",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/unversioned/validation",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/util",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/v1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/api/validation",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apimachinery",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apimachinery/registered",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/apps",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/apps/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/apps/v1alpha1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/authentication",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/authentication/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/authentication/v1beta1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/authorization",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/authorization/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/authorization/v1beta1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/autoscaling",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/autoscaling/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/autoscaling/v1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/batch",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/batch/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/batch/v1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/batch/v2alpha1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/certificates",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/certificates/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/componentconfig",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/componentconfig/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/extensions",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/extensions/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/extensions/v1beta1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/imagepolicy",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/imagepolicy/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/policy",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/policy/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/policy/v1alpha1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/rbac",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/rbac/install",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/auth/user",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/capabilities",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/authorization/v1beta1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/authorization/v1beta1/fake",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/autoscaling/v1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/autoscaling/v1/fake",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/batch/v1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/batch/v1/fake",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/core/v1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/core/v1/fake",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/extensions/v1beta1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/extensions/v1beta1/fake",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/policy/v1alpha1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/policy/v1alpha1/fake",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/metrics",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/restclient",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/testing/core",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/transport",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/typed/discovery",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/typed/discovery/fake",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/unversioned/auth",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/conversion",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/conversion/queryparams",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/fields",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/kubelet/qos",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/kubelet/server/portforward",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/kubelet/types",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/labels",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/master/ports",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/runtime",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/runtime/serializer",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/runtime/serializer/json",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/runtime/serializer/protobuf",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/runtime/serializer/recognizer",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/runtime/serializer/streaming",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/runtime/serializer/versioning",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/security/apparmor",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/selection",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/types",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/clock",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/config",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/crypto",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/diff",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/errors",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/flowcontrol",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/framer",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/hash",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/homedir",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/httpstream",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/integer",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/intstr",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/json",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/labels",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/net",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/net/sets",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/parsers",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/rand",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/runtime",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/sets",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/strategicpatch",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/testing",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/uuid",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/validation",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/validation/field",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/wait",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/util/yaml",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/version",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/watch",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/pkg/watch/versioned",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/third_party/forked/golang/json",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "k8s.io/kubernetes/third_party/forked/golang/reflect",
|
||||||
|
"Comment": "v1.4.0-alpha.3-189-g57ef2cc",
|
||||||
|
"Rev": "57ef2cce04875b7ba50cad2e13ad556a4cc3f30d"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -234,7 +234,7 @@ func (d *DiscoveryClient) ServerVersion() (*version.Info, error) {
|
|||||||
|
|
||||||
// SwaggerSchema retrieves and parses the swagger API schema the server supports.
|
// SwaggerSchema retrieves and parses the swagger API schema the server supports.
|
||||||
func (d *DiscoveryClient) SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error) {
|
func (d *DiscoveryClient) SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error) {
|
||||||
if version.IsEmpty() {
|
if version.Empty() {
|
||||||
return nil, fmt.Errorf("groupVersion cannot be empty")
|
return nil, fmt.Errorf("groupVersion cannot be empty")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,6 +80,8 @@ func NewRESTMapper(groupResources []*APIGroupResources, versionInterfaces meta.V
|
|||||||
// TODO only do this if it supports listing
|
// TODO only do this if it supports listing
|
||||||
versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope)
|
versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope)
|
||||||
}
|
}
|
||||||
|
// TODO why is this type not in discovery (at least for "v1")
|
||||||
|
versionMapper.Add(gv.WithKind("List"), meta.RESTScopeRoot)
|
||||||
unionMapper = append(unionMapper, versionMapper)
|
unionMapper = append(unionMapper, versionMapper)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
95
1.4/discovery/unstructured.go
Normal file
95
1.4/discovery/unstructured.go
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 discovery
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"k8s.io/client-go/1.4/pkg/api/unversioned"
|
||||||
|
"k8s.io/client-go/1.4/pkg/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UnstructuredObjectTyper provides a runtime.ObjectTyper implmentation for
|
||||||
|
// runtime.Unstructured object based on discovery information.
|
||||||
|
type UnstructuredObjectTyper struct {
|
||||||
|
registered map[unversioned.GroupVersionKind]bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewUnstructuredObjectTyper returns a runtime.ObjectTyper for
|
||||||
|
// unstructred objects based on discovery information.
|
||||||
|
func NewUnstructuredObjectTyper(groupResources []*APIGroupResources) *UnstructuredObjectTyper {
|
||||||
|
dot := &UnstructuredObjectTyper{registered: make(map[unversioned.GroupVersionKind]bool)}
|
||||||
|
for _, group := range groupResources {
|
||||||
|
for _, discoveryVersion := range group.Group.Versions {
|
||||||
|
resources, ok := group.VersionedResources[discoveryVersion.Version]
|
||||||
|
if !ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
gv := unversioned.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version}
|
||||||
|
for _, resource := range resources {
|
||||||
|
dot.registered[gv.WithKind(resource.Kind)] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return dot
|
||||||
|
}
|
||||||
|
|
||||||
|
// ObjectKind returns the group,version,kind of the provided object, or an error
|
||||||
|
// if the object in not *runtime.Unstructured or has no group,version,kind
|
||||||
|
// information.
|
||||||
|
func (d *UnstructuredObjectTyper) ObjectKind(obj runtime.Object) (unversioned.GroupVersionKind, error) {
|
||||||
|
if _, ok := obj.(*runtime.Unstructured); !ok {
|
||||||
|
return unversioned.GroupVersionKind{}, fmt.Errorf("type %T is invalid for dynamic object typer", obj)
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj.GetObjectKind().GroupVersionKind(), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ObjectKinds returns a slice of one element with the group,version,kind of the
|
||||||
|
// provided object, or an error if the object is not *runtime.Unstructured or
|
||||||
|
// has no group,version,kind information. unversionedType will always be false
|
||||||
|
// because runtime.Unstructured object should always have group,version,kind
|
||||||
|
// information set.
|
||||||
|
func (d *UnstructuredObjectTyper) ObjectKinds(obj runtime.Object) (gvks []unversioned.GroupVersionKind, unversionedType bool, err error) {
|
||||||
|
gvk, err := d.ObjectKind(obj)
|
||||||
|
if err != nil {
|
||||||
|
return nil, false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return []unversioned.GroupVersionKind{gvk}, false, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recognizes returns true if the provided group,version,kind was in the
|
||||||
|
// discovery information.
|
||||||
|
func (d *UnstructuredObjectTyper) Recognizes(gvk unversioned.GroupVersionKind) bool {
|
||||||
|
return d.registered[gvk]
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsUnversioned returns false always because *runtime.Unstructured objects
|
||||||
|
// should always have group,version,kind information set. ok will be true if the
|
||||||
|
// object's group,version,kind is registered.
|
||||||
|
func (d *UnstructuredObjectTyper) IsUnversioned(obj runtime.Object) (unversioned bool, ok bool) {
|
||||||
|
gvk, err := d.ObjectKind(obj)
|
||||||
|
if err != nil {
|
||||||
|
return false, false
|
||||||
|
}
|
||||||
|
|
||||||
|
return false, d.registered[gvk]
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ runtime.ObjectTyper = &UnstructuredObjectTyper{}
|
@ -41,10 +41,6 @@ import (
|
|||||||
// and manipulate metadata of a Kubernetes API group.
|
// and manipulate metadata of a Kubernetes API group.
|
||||||
type Client struct {
|
type Client struct {
|
||||||
cl *rest.RESTClient
|
cl *rest.RESTClient
|
||||||
}
|
|
||||||
|
|
||||||
type ClientWithParameterCodec struct {
|
|
||||||
client *Client
|
|
||||||
parameterCodec runtime.ParameterCodec
|
parameterCodec runtime.ParameterCodec
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,9 +51,12 @@ func NewClient(conf *rest.Config) (*Client, error) {
|
|||||||
confCopy := *conf
|
confCopy := *conf
|
||||||
conf = &confCopy
|
conf = &confCopy
|
||||||
|
|
||||||
// TODO: it's questionable that this should be using anything other than unstructured schema and JSON
|
contentConfig := ContentConfig()
|
||||||
conf.ContentType = runtime.ContentTypeJSON
|
contentConfig.GroupVersion = conf.GroupVersion
|
||||||
conf.AcceptContentTypes = runtime.ContentTypeJSON
|
if conf.NegotiatedSerializer != nil {
|
||||||
|
contentConfig.NegotiatedSerializer = conf.NegotiatedSerializer
|
||||||
|
}
|
||||||
|
conf.ContentConfig = contentConfig
|
||||||
|
|
||||||
if conf.APIPath == "" {
|
if conf.APIPath == "" {
|
||||||
conf.APIPath = "/api"
|
conf.APIPath = "/api"
|
||||||
@ -66,10 +65,6 @@ func NewClient(conf *rest.Config) (*Client, error) {
|
|||||||
if len(conf.UserAgent) == 0 {
|
if len(conf.UserAgent) == 0 {
|
||||||
conf.UserAgent = rest.DefaultKubernetesUserAgent()
|
conf.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
}
|
}
|
||||||
if conf.NegotiatedSerializer == nil {
|
|
||||||
streamingInfo, _ := api.Codecs.StreamingSerializerForMediaType("application/json;stream=watch", nil)
|
|
||||||
conf.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: dynamicCodec{}}, streamingInfo)
|
|
||||||
}
|
|
||||||
|
|
||||||
cl, err := rest.RESTClientFor(conf)
|
cl, err := rest.RESTClientFor(conf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -86,35 +81,24 @@ func (c *Client) GetRateLimiter() flowcontrol.RateLimiter {
|
|||||||
|
|
||||||
// Resource returns an API interface to the specified resource for this client's
|
// Resource returns an API interface to the specified resource for this client's
|
||||||
// group and version. If resource is not a namespaced resource, then namespace
|
// group and version. If resource is not a namespaced resource, then namespace
|
||||||
// is ignored.
|
// is ignored. The ResourceClient inherits the parameter codec of c.
|
||||||
func (c *Client) Resource(resource *unversioned.APIResource, namespace string) *ResourceClient {
|
func (c *Client) Resource(resource *unversioned.APIResource, namespace string) *ResourceClient {
|
||||||
return &ResourceClient{
|
return &ResourceClient{
|
||||||
cl: c.cl,
|
cl: c.cl,
|
||||||
resource: resource,
|
resource: resource,
|
||||||
ns: namespace,
|
ns: namespace,
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ParameterCodec wraps a parameterCodec around the Client.
|
|
||||||
func (c *Client) ParameterCodec(parameterCodec runtime.ParameterCodec) *ClientWithParameterCodec {
|
|
||||||
return &ClientWithParameterCodec{
|
|
||||||
client: c,
|
|
||||||
parameterCodec: parameterCodec,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resource returns an API interface to the specified resource for this client's
|
|
||||||
// group and version. If resource is not a namespaced resource, then namespace
|
|
||||||
// is ignored. The ResourceClient inherits the parameter codec of c.
|
|
||||||
func (c *ClientWithParameterCodec) Resource(resource *unversioned.APIResource, namespace string) *ResourceClient {
|
|
||||||
return &ResourceClient{
|
|
||||||
cl: c.client.cl,
|
|
||||||
resource: resource,
|
|
||||||
ns: namespace,
|
|
||||||
parameterCodec: c.parameterCodec,
|
parameterCodec: c.parameterCodec,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ParameterCodec returns a client with the provided parameter codec.
|
||||||
|
func (c *Client) ParameterCodec(parameterCodec runtime.ParameterCodec) *Client {
|
||||||
|
return &Client{
|
||||||
|
cl: c.cl,
|
||||||
|
parameterCodec: parameterCodec,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ResourceClient is an API interface to a specific resource under a
|
// ResourceClient is an API interface to a specific resource under a
|
||||||
// dynamic client.
|
// dynamic client.
|
||||||
type ResourceClient struct {
|
type ResourceClient struct {
|
||||||
@ -255,6 +239,18 @@ func (dynamicCodec) Encode(obj runtime.Object, w io.Writer) error {
|
|||||||
return runtime.UnstructuredJSONScheme.Encode(obj, w)
|
return runtime.UnstructuredJSONScheme.Encode(obj, w)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ContentConfig returns a rest.ContentConfig for dynamic types.
|
||||||
|
func ContentConfig() rest.ContentConfig {
|
||||||
|
// TODO: it's questionable that this should be using anything other than unstructured schema and JSON
|
||||||
|
codec := dynamicCodec{}
|
||||||
|
streamingInfo, _ := api.Codecs.StreamingSerializerForMediaType("application/json;stream=watch", nil)
|
||||||
|
return rest.ContentConfig{
|
||||||
|
AcceptContentTypes: runtime.ContentTypeJSON,
|
||||||
|
ContentType: runtime.ContentTypeJSON,
|
||||||
|
NegotiatedSerializer: serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec}, streamingInfo),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// paramaterCodec is a codec converts an API object to query
|
// paramaterCodec is a codec converts an API object to query
|
||||||
// parameters without trying to convert to the target version.
|
// parameters without trying to convert to the target version.
|
||||||
type parameterCodec struct{}
|
type parameterCodec struct{}
|
||||||
|
@ -24,6 +24,7 @@ import (
|
|||||||
v1batch "k8s.io/client-go/1.4/kubernetes/typed/batch/v1"
|
v1batch "k8s.io/client-go/1.4/kubernetes/typed/batch/v1"
|
||||||
v1core "k8s.io/client-go/1.4/kubernetes/typed/core/v1"
|
v1core "k8s.io/client-go/1.4/kubernetes/typed/core/v1"
|
||||||
v1beta1extensions "k8s.io/client-go/1.4/kubernetes/typed/extensions/v1beta1"
|
v1beta1extensions "k8s.io/client-go/1.4/kubernetes/typed/extensions/v1beta1"
|
||||||
|
v1alpha1policy "k8s.io/client-go/1.4/kubernetes/typed/policy/v1alpha1"
|
||||||
"k8s.io/client-go/1.4/pkg/util/flowcontrol"
|
"k8s.io/client-go/1.4/pkg/util/flowcontrol"
|
||||||
rest "k8s.io/client-go/1.4/rest"
|
rest "k8s.io/client-go/1.4/rest"
|
||||||
)
|
)
|
||||||
@ -35,6 +36,7 @@ type Interface interface {
|
|||||||
Autoscaling() v1autoscaling.AutoscalingInterface
|
Autoscaling() v1autoscaling.AutoscalingInterface
|
||||||
Batch() v1batch.BatchInterface
|
Batch() v1batch.BatchInterface
|
||||||
Extensions() v1beta1extensions.ExtensionsInterface
|
Extensions() v1beta1extensions.ExtensionsInterface
|
||||||
|
Policy() v1alpha1policy.PolicyInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clientset contains the clients for groups. Each group has exactly one
|
// Clientset contains the clients for groups. Each group has exactly one
|
||||||
@ -46,6 +48,7 @@ type Clientset struct {
|
|||||||
*v1autoscaling.AutoscalingClient
|
*v1autoscaling.AutoscalingClient
|
||||||
*v1batch.BatchClient
|
*v1batch.BatchClient
|
||||||
*v1beta1extensions.ExtensionsClient
|
*v1beta1extensions.ExtensionsClient
|
||||||
|
*v1alpha1policy.PolicyClient
|
||||||
}
|
}
|
||||||
|
|
||||||
// Core retrieves the CoreClient
|
// Core retrieves the CoreClient
|
||||||
@ -88,6 +91,14 @@ func (c *Clientset) Extensions() v1beta1extensions.ExtensionsInterface {
|
|||||||
return c.ExtensionsClient
|
return c.ExtensionsClient
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Policy retrieves the PolicyClient
|
||||||
|
func (c *Clientset) Policy() v1alpha1policy.PolicyInterface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.PolicyClient
|
||||||
|
}
|
||||||
|
|
||||||
// Discovery retrieves the DiscoveryClient
|
// Discovery retrieves the DiscoveryClient
|
||||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||||
return c.DiscoveryClient
|
return c.DiscoveryClient
|
||||||
@ -121,6 +132,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
clientset.PolicyClient, err = v1alpha1policy.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
clientset.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
clientset.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -139,6 +154,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
|||||||
clientset.AutoscalingClient = v1autoscaling.NewForConfigOrDie(c)
|
clientset.AutoscalingClient = v1autoscaling.NewForConfigOrDie(c)
|
||||||
clientset.BatchClient = v1batch.NewForConfigOrDie(c)
|
clientset.BatchClient = v1batch.NewForConfigOrDie(c)
|
||||||
clientset.ExtensionsClient = v1beta1extensions.NewForConfigOrDie(c)
|
clientset.ExtensionsClient = v1beta1extensions.NewForConfigOrDie(c)
|
||||||
|
clientset.PolicyClient = v1alpha1policy.NewForConfigOrDie(c)
|
||||||
|
|
||||||
clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||||
return &clientset
|
return &clientset
|
||||||
@ -152,6 +168,7 @@ func New(c *rest.RESTClient) *Clientset {
|
|||||||
clientset.AutoscalingClient = v1autoscaling.New(c)
|
clientset.AutoscalingClient = v1autoscaling.New(c)
|
||||||
clientset.BatchClient = v1batch.New(c)
|
clientset.BatchClient = v1batch.New(c)
|
||||||
clientset.ExtensionsClient = v1beta1extensions.New(c)
|
clientset.ExtensionsClient = v1beta1extensions.New(c)
|
||||||
|
clientset.PolicyClient = v1alpha1policy.New(c)
|
||||||
|
|
||||||
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||||
return &clientset
|
return &clientset
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
// This package has the automatically generated clientset.
|
// This package has the automatically generated clientset.
|
||||||
package kubernetes
|
package kubernetes
|
||||||
|
@ -30,6 +30,8 @@ import (
|
|||||||
fakev1core "k8s.io/client-go/1.4/kubernetes/typed/core/v1/fake"
|
fakev1core "k8s.io/client-go/1.4/kubernetes/typed/core/v1/fake"
|
||||||
v1beta1extensions "k8s.io/client-go/1.4/kubernetes/typed/extensions/v1beta1"
|
v1beta1extensions "k8s.io/client-go/1.4/kubernetes/typed/extensions/v1beta1"
|
||||||
fakev1beta1extensions "k8s.io/client-go/1.4/kubernetes/typed/extensions/v1beta1/fake"
|
fakev1beta1extensions "k8s.io/client-go/1.4/kubernetes/typed/extensions/v1beta1/fake"
|
||||||
|
v1alpha1policy "k8s.io/client-go/1.4/kubernetes/typed/policy/v1alpha1"
|
||||||
|
fakev1alpha1policy "k8s.io/client-go/1.4/kubernetes/typed/policy/v1alpha1/fake"
|
||||||
"k8s.io/client-go/1.4/pkg/api"
|
"k8s.io/client-go/1.4/pkg/api"
|
||||||
"k8s.io/client-go/1.4/pkg/apimachinery/registered"
|
"k8s.io/client-go/1.4/pkg/apimachinery/registered"
|
||||||
"k8s.io/client-go/1.4/pkg/runtime"
|
"k8s.io/client-go/1.4/pkg/runtime"
|
||||||
@ -94,3 +96,8 @@ func (c *Clientset) Batch() v1batch.BatchInterface {
|
|||||||
func (c *Clientset) Extensions() v1beta1extensions.ExtensionsInterface {
|
func (c *Clientset) Extensions() v1beta1extensions.ExtensionsInterface {
|
||||||
return &fakev1beta1extensions.FakeExtensions{Fake: &c.Fake}
|
return &fakev1beta1extensions.FakeExtensions{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Policy retrieves the PolicyClient
|
||||||
|
func (c *Clientset) Policy() v1alpha1policy.PolicyInterface {
|
||||||
|
return &fakev1alpha1policy.FakePolicy{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
// This package has the automatically generated fake clientset.
|
// This package has the automatically generated fake clientset.
|
||||||
package fake
|
package fake
|
||||||
|
@ -26,6 +26,7 @@ import (
|
|||||||
_ "k8s.io/client-go/1.4/pkg/apis/autoscaling/install"
|
_ "k8s.io/client-go/1.4/pkg/apis/autoscaling/install"
|
||||||
_ "k8s.io/client-go/1.4/pkg/apis/batch/install"
|
_ "k8s.io/client-go/1.4/pkg/apis/batch/install"
|
||||||
_ "k8s.io/client-go/1.4/pkg/apis/extensions/install"
|
_ "k8s.io/client-go/1.4/pkg/apis/extensions/install"
|
||||||
|
_ "k8s.io/client-go/1.4/pkg/apis/policy/install"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -15,22 +15,3 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
|
||||||
authorizationapi "k8s.io/client-go/1.4/pkg/apis/authorization/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// The PodExpansion interface allows manually adding extra methods to the PodInterface.
|
|
||||||
type SubjectAccessReviewExpansion interface {
|
|
||||||
Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
|
|
||||||
result = &authorizationapi.SubjectAccessReview{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("subjectaccessreviews").
|
|
||||||
Body(sar).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
authorizationapi "k8s.io/client-go/1.4/pkg/apis/authorization/v1beta1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface.
|
||||||
|
type SubjectAccessReviewExpansion interface {
|
||||||
|
Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
|
||||||
|
result = &authorizationapi.SubjectAccessReview{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("subjectaccessreviews").
|
||||||
|
Body(sar).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package v1
|
package v1
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package v1
|
package v1
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package v1
|
package v1
|
||||||
|
162
1.4/kubernetes/typed/core/v1/event_expansion.go
Normal file
162
1.4/kubernetes/typed/core/v1/event_expansion.go
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"k8s.io/client-go/1.4/pkg/api"
|
||||||
|
"k8s.io/client-go/1.4/pkg/api/v1"
|
||||||
|
"k8s.io/client-go/1.4/pkg/fields"
|
||||||
|
"k8s.io/client-go/1.4/pkg/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
// The EventExpansion interface allows manually adding extra methods to the EventInterface.
|
||||||
|
type EventExpansion interface {
|
||||||
|
// CreateWithEventNamespace is the same as a Create, except that it sends the request to the event.Namespace.
|
||||||
|
CreateWithEventNamespace(event *v1.Event) (*v1.Event, error)
|
||||||
|
// UpdateWithEventNamespace is the same as a Update, except that it sends the request to the event.Namespace.
|
||||||
|
UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error)
|
||||||
|
PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.Event, error)
|
||||||
|
// Search finds events about the specified object
|
||||||
|
Search(objOrRef runtime.Object) (*v1.EventList, error)
|
||||||
|
// Returns the appropriate field selector based on the API version being used to communicate with the server.
|
||||||
|
// The returned field selector can be used with List and Watch to filter desired events.
|
||||||
|
GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateWithEventNamespace makes a new event. Returns the copy of the event the server returns,
|
||||||
|
// or an error. The namespace to create the event within is deduced from the
|
||||||
|
// event; it must either match this event client's namespace, or this event
|
||||||
|
// client must have been created with the "" namespace.
|
||||||
|
func (e *events) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
|
||||||
|
if e.ns != "" && event.Namespace != e.ns {
|
||||||
|
return nil, fmt.Errorf("can't create an event with namespace '%v' in namespace '%v'", event.Namespace, e.ns)
|
||||||
|
}
|
||||||
|
result := &v1.Event{}
|
||||||
|
err := e.client.Post().
|
||||||
|
NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0).
|
||||||
|
Resource("events").
|
||||||
|
Body(event).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return result, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateWithEventNamespace modifies an existing event. It returns the copy of the event that the server returns,
|
||||||
|
// or an error. The namespace and key to update the event within is deduced from the event. The
|
||||||
|
// namespace must either match this event client's namespace, or this event client must have been
|
||||||
|
// created with the "" namespace. Update also requires the ResourceVersion to be set in the event
|
||||||
|
// object.
|
||||||
|
func (e *events) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
|
||||||
|
result := &v1.Event{}
|
||||||
|
err := e.client.Put().
|
||||||
|
NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0).
|
||||||
|
Resource("events").
|
||||||
|
Name(event.Name).
|
||||||
|
Body(event).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return result, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// PatchWithEventNamespace modifies an existing event. It returns the copy of
|
||||||
|
// the event that the server returns, or an error. The namespace and name of the
|
||||||
|
// target event is deduced from the incompleteEvent. The namespace must either
|
||||||
|
// match this event client's namespace, or this event client must have been
|
||||||
|
// created with the "" namespace.
|
||||||
|
func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte) (*v1.Event, error) {
|
||||||
|
if e.ns != "" && incompleteEvent.Namespace != e.ns {
|
||||||
|
return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", incompleteEvent.Namespace, e.ns)
|
||||||
|
}
|
||||||
|
result := &v1.Event{}
|
||||||
|
err := e.client.Patch(api.StrategicMergePatchType).
|
||||||
|
NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0).
|
||||||
|
Resource("events").
|
||||||
|
Name(incompleteEvent.Name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return result, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Search finds events about the specified object. The namespace of the
|
||||||
|
// object must match this event's client namespace unless the event client
|
||||||
|
// was made with the "" namespace.
|
||||||
|
func (e *events) Search(objOrRef runtime.Object) (*v1.EventList, error) {
|
||||||
|
ref, err := api.GetReference(objOrRef)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if e.ns != "" && ref.Namespace != e.ns {
|
||||||
|
return nil, fmt.Errorf("won't be able to find any events of namespace '%v' in namespace '%v'", ref.Namespace, e.ns)
|
||||||
|
}
|
||||||
|
stringRefKind := string(ref.Kind)
|
||||||
|
var refKind *string
|
||||||
|
if stringRefKind != "" {
|
||||||
|
refKind = &stringRefKind
|
||||||
|
}
|
||||||
|
stringRefUID := string(ref.UID)
|
||||||
|
var refUID *string
|
||||||
|
if stringRefUID != "" {
|
||||||
|
refUID = &stringRefUID
|
||||||
|
}
|
||||||
|
fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID)
|
||||||
|
return e.List(api.ListOptions{FieldSelector: fieldSelector})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the appropriate field selector based on the API version being used to communicate with the server.
|
||||||
|
// The returned field selector can be used with List and Watch to filter desired events.
|
||||||
|
func (e *events) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
|
||||||
|
apiVersion := e.client.APIVersion().String()
|
||||||
|
field := fields.Set{}
|
||||||
|
if involvedObjectName != nil {
|
||||||
|
field[GetInvolvedObjectNameFieldLabel(apiVersion)] = *involvedObjectName
|
||||||
|
}
|
||||||
|
if involvedObjectNamespace != nil {
|
||||||
|
field["involvedObject.namespace"] = *involvedObjectNamespace
|
||||||
|
}
|
||||||
|
if involvedObjectKind != nil {
|
||||||
|
field["involvedObject.kind"] = *involvedObjectKind
|
||||||
|
}
|
||||||
|
if involvedObjectUID != nil {
|
||||||
|
field["involvedObject.uid"] = *involvedObjectUID
|
||||||
|
}
|
||||||
|
return field.AsSelector()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the appropriate field label to use for name of the involved object as per the given API version.
|
||||||
|
func GetInvolvedObjectNameFieldLabel(version string) string {
|
||||||
|
return "involvedObject.name"
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: This is a temporary arrangement and will be removed once all clients are moved to use the clientset.
|
||||||
|
type EventSinkImpl struct {
|
||||||
|
Interface EventInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *EventSinkImpl) Create(event *v1.Event) (*v1.Event, error) {
|
||||||
|
return e.Interface.CreateWithEventNamespace(event)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *EventSinkImpl) Update(event *v1.Event) (*v1.Event, error) {
|
||||||
|
return e.Interface.UpdateWithEventNamespace(event)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *EventSinkImpl) Patch(event *v1.Event, data []byte) (*v1.Event, error) {
|
||||||
|
return e.Interface.PatchWithEventNamespace(event, data)
|
||||||
|
}
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
89
1.4/kubernetes/typed/core/v1/fake/fake_event_expansion.go
Normal file
89
1.4/kubernetes/typed/core/v1/fake/fake_event_expansion.go
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2014 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 fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/client-go/1.4/pkg/api"
|
||||||
|
"k8s.io/client-go/1.4/pkg/api/v1"
|
||||||
|
"k8s.io/client-go/1.4/pkg/fields"
|
||||||
|
"k8s.io/client-go/1.4/pkg/runtime"
|
||||||
|
"k8s.io/client-go/1.4/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *FakeEvents) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
|
||||||
|
action := testing.NewRootCreateAction(eventsResource, event)
|
||||||
|
if c.ns != "" {
|
||||||
|
action = testing.NewCreateAction(eventsResource, c.ns, event)
|
||||||
|
}
|
||||||
|
obj, err := c.Fake.Invokes(action, event)
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj.(*v1.Event), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update replaces an existing event. Returns the copy of the event the server returns, or an error.
|
||||||
|
func (c *FakeEvents) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
|
||||||
|
action := testing.NewRootUpdateAction(eventsResource, event)
|
||||||
|
if c.ns != "" {
|
||||||
|
action = testing.NewUpdateAction(eventsResource, c.ns, event)
|
||||||
|
}
|
||||||
|
obj, err := c.Fake.Invokes(action, event)
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj.(*v1.Event), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// PatchWithEventNamespace patches an existing event. Returns the copy of the event the server returns, or an error.
|
||||||
|
func (c *FakeEvents) PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.Event, error) {
|
||||||
|
action := testing.NewRootPatchAction(eventsResource, event.Name, data)
|
||||||
|
if c.ns != "" {
|
||||||
|
action = testing.NewPatchAction(eventsResource, c.ns, event.Name, data)
|
||||||
|
}
|
||||||
|
obj, err := c.Fake.Invokes(action, event)
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj.(*v1.Event), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Search returns a list of events matching the specified object.
|
||||||
|
func (c *FakeEvents) Search(objOrRef runtime.Object) (*v1.EventList, error) {
|
||||||
|
action := testing.NewRootListAction(eventsResource, api.ListOptions{})
|
||||||
|
if c.ns != "" {
|
||||||
|
action = testing.NewListAction(eventsResource, c.ns, api.ListOptions{})
|
||||||
|
}
|
||||||
|
obj, err := c.Fake.Invokes(action, &v1.EventList{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj.(*v1.EventList), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeEvents) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
|
||||||
|
action := testing.GenericActionImpl{}
|
||||||
|
action.Verb = "get-field-selector"
|
||||||
|
action.Resource = eventsResource
|
||||||
|
|
||||||
|
c.Fake.Invokes(action, nil)
|
||||||
|
return fields.Everything()
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2014 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 fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/client-go/1.4/pkg/api/v1"
|
||||||
|
"k8s.io/client-go/1.4/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *FakeNamespaces) Finalize(namespace *v1.Namespace) (*v1.Namespace, error) {
|
||||||
|
action := testing.CreateActionImpl{}
|
||||||
|
action.Verb = "create"
|
||||||
|
action.Resource = namespacesResource
|
||||||
|
action.Subresource = "finalize"
|
||||||
|
action.Object = namespace
|
||||||
|
|
||||||
|
obj, err := c.Fake.Invokes(action, namespace)
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj.(*v1.Namespace), err
|
||||||
|
}
|
46
1.4/kubernetes/typed/core/v1/fake/fake_pod_expansion.go
Normal file
46
1.4/kubernetes/typed/core/v1/fake/fake_pod_expansion.go
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2014 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 fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/client-go/1.4/pkg/api/v1"
|
||||||
|
"k8s.io/client-go/1.4/rest"
|
||||||
|
"k8s.io/client-go/1.4/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *FakePods) Bind(binding *v1.Binding) error {
|
||||||
|
action := testing.CreateActionImpl{}
|
||||||
|
action.Verb = "create"
|
||||||
|
action.Resource = podsResource
|
||||||
|
action.Subresource = "bindings"
|
||||||
|
action.Object = binding
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, binding)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *rest.Request {
|
||||||
|
action := testing.GenericActionImpl{}
|
||||||
|
action.Verb = "get"
|
||||||
|
action.Namespace = c.ns
|
||||||
|
action.Resource = podsResource
|
||||||
|
action.Subresource = "logs"
|
||||||
|
action.Value = opts
|
||||||
|
|
||||||
|
_, _ = c.Fake.Invokes(action, &v1.Pod{})
|
||||||
|
return &rest.Request{}
|
||||||
|
}
|
26
1.4/kubernetes/typed/core/v1/fake/fake_service_expansion.go
Normal file
26
1.4/kubernetes/typed/core/v1/fake/fake_service_expansion.go
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2014 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 fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/client-go/1.4/rest"
|
||||||
|
"k8s.io/client-go/1.4/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *FakeServices) ProxyGet(scheme, name, port, path string, params map[string]string) rest.ResponseWrapper {
|
||||||
|
return c.Fake.InvokesProxy(testing.NewProxyGetAction(servicesResource, c.ns, scheme, name, port, path, params))
|
||||||
|
}
|
@ -22,18 +22,12 @@ type ConfigMapExpansion interface{}
|
|||||||
|
|
||||||
type EndpointsExpansion interface{}
|
type EndpointsExpansion interface{}
|
||||||
|
|
||||||
type EventExpansion interface{}
|
|
||||||
|
|
||||||
type LimitRangeExpansion interface{}
|
type LimitRangeExpansion interface{}
|
||||||
|
|
||||||
type NamespaceExpansion interface{}
|
|
||||||
|
|
||||||
type NodeExpansion interface{}
|
type NodeExpansion interface{}
|
||||||
|
|
||||||
type PersistentVolumeExpansion interface{}
|
type PersistentVolumeExpansion interface{}
|
||||||
|
|
||||||
type PodExpansion interface{}
|
|
||||||
|
|
||||||
type PodTemplateExpansion interface{}
|
type PodTemplateExpansion interface{}
|
||||||
|
|
||||||
type ReplicationControllerExpansion interface{}
|
type ReplicationControllerExpansion interface{}
|
||||||
@ -42,6 +36,4 @@ type ResourceQuotaExpansion interface{}
|
|||||||
|
|
||||||
type SecretExpansion interface{}
|
type SecretExpansion interface{}
|
||||||
|
|
||||||
type ServiceExpansion interface{}
|
|
||||||
|
|
||||||
type ServiceAccountExpansion interface{}
|
type ServiceAccountExpansion interface{}
|
||||||
|
31
1.4/kubernetes/typed/core/v1/namespace_expansion.go
Normal file
31
1.4/kubernetes/typed/core/v1/namespace_expansion.go
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 v1
|
||||||
|
|
||||||
|
import "k8s.io/client-go/1.4/pkg/api/v1"
|
||||||
|
|
||||||
|
// The NamespaceExpansion interface allows manually adding extra methods to the NamespaceInterface.
|
||||||
|
type NamespaceExpansion interface {
|
||||||
|
Finalize(item *v1.Namespace) (*v1.Namespace, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Finalize takes the representation of a namespace to update. Returns the server's representation of the namespace, and an error, if it occurs.
|
||||||
|
func (c *namespaces) Finalize(namespace *v1.Namespace) (result *v1.Namespace, err error) {
|
||||||
|
result = &v1.Namespace{}
|
||||||
|
err = c.client.Put().Resource("namespaces").Name(namespace.Name).SubResource("finalize").Body(namespace).Do().Into(result)
|
||||||
|
return
|
||||||
|
}
|
39
1.4/kubernetes/typed/core/v1/pod_expansion.go
Normal file
39
1.4/kubernetes/typed/core/v1/pod_expansion.go
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/client-go/1.4/pkg/api"
|
||||||
|
"k8s.io/client-go/1.4/pkg/api/v1"
|
||||||
|
"k8s.io/client-go/1.4/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// The PodExpansion interface allows manually adding extra methods to the PodInterface.
|
||||||
|
type PodExpansion interface {
|
||||||
|
Bind(binding *v1.Binding) error
|
||||||
|
GetLogs(name string, opts *v1.PodLogOptions) *rest.Request
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored).
|
||||||
|
func (c *pods) Bind(binding *v1.Binding) error {
|
||||||
|
return c.client.Post().Namespace(c.ns).Resource("pods").Name(binding.Name).SubResource("binding").Body(binding).Do().Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get constructs a request for getting the logs for a pod
|
||||||
|
func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *rest.Request {
|
||||||
|
return c.client.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, api.ParameterCodec)
|
||||||
|
}
|
41
1.4/kubernetes/typed/core/v1/service_expansion.go
Normal file
41
1.4/kubernetes/typed/core/v1/service_expansion.go
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/client-go/1.4/pkg/util/net"
|
||||||
|
"k8s.io/client-go/1.4/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface.
|
||||||
|
type ServiceExpansion interface {
|
||||||
|
ProxyGet(scheme, name, port, path string, params map[string]string) rest.ResponseWrapper
|
||||||
|
}
|
||||||
|
|
||||||
|
// ProxyGet returns a response of the service by calling it through the proxy.
|
||||||
|
func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) rest.ResponseWrapper {
|
||||||
|
request := c.client.Get().
|
||||||
|
Prefix("proxy").
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("services").
|
||||||
|
Name(net.JoinSchemeNamePort(scheme, name, port)).
|
||||||
|
Suffix(path)
|
||||||
|
for k, v := range params {
|
||||||
|
request = request.Param(k, v)
|
||||||
|
}
|
||||||
|
return request
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 v1beta1
|
||||||
|
|
||||||
|
import "k8s.io/client-go/1.4/pkg/apis/extensions/v1beta1"
|
||||||
|
|
||||||
|
// The DeploymentExpansion interface allows manually adding extra methods to the DeploymentInterface.
|
||||||
|
type DeploymentExpansion interface {
|
||||||
|
Rollback(*v1beta1.DeploymentRollback) error
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rollback applied the provided DeploymentRollback to the named deployment in the current namespace.
|
||||||
|
func (c *deployments) Rollback(deploymentRollback *v1beta1.DeploymentRollback) error {
|
||||||
|
return c.client.Post().Namespace(c.ns).Resource("deployments").Name(deploymentRollback.Name).SubResource("rollback").Body(deploymentRollback).Do().Error()
|
||||||
|
}
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
@ -27,7 +27,6 @@ type ExtensionsInterface interface {
|
|||||||
GetRESTClient() *rest.RESTClient
|
GetRESTClient() *rest.RESTClient
|
||||||
DaemonSetsGetter
|
DaemonSetsGetter
|
||||||
DeploymentsGetter
|
DeploymentsGetter
|
||||||
HorizontalPodAutoscalersGetter
|
|
||||||
IngressesGetter
|
IngressesGetter
|
||||||
JobsGetter
|
JobsGetter
|
||||||
PodSecurityPoliciesGetter
|
PodSecurityPoliciesGetter
|
||||||
@ -50,10 +49,6 @@ func (c *ExtensionsClient) Deployments(namespace string) DeploymentInterface {
|
|||||||
return newDeployments(c, namespace)
|
return newDeployments(c, namespace)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ExtensionsClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
|
|
||||||
return newHorizontalPodAutoscalers(c, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *ExtensionsClient) Ingresses(namespace string) IngressInterface {
|
func (c *ExtensionsClient) Ingresses(namespace string) IngressInterface {
|
||||||
return newIngresses(c, namespace)
|
return newIngresses(c, namespace)
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2014 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 fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/client-go/1.4/pkg/apis/extensions/v1beta1"
|
||||||
|
"k8s.io/client-go/1.4/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *FakeDeployments) Rollback(deploymentRollback *v1beta1.DeploymentRollback) error {
|
||||||
|
action := testing.CreateActionImpl{}
|
||||||
|
action.Verb = "create"
|
||||||
|
action.Resource = deploymentsResource
|
||||||
|
action.Subresource = "rollback"
|
||||||
|
action.Object = deploymentRollback
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, deploymentRollback)
|
||||||
|
return err
|
||||||
|
}
|
@ -34,10 +34,6 @@ func (c *FakeExtensions) Deployments(namespace string) v1beta1.DeploymentInterfa
|
|||||||
return &FakeDeployments{c, namespace}
|
return &FakeDeployments{c, namespace}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeExtensions) HorizontalPodAutoscalers(namespace string) v1beta1.HorizontalPodAutoscalerInterface {
|
|
||||||
return &FakeHorizontalPodAutoscalers{c, namespace}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeExtensions) Ingresses(namespace string) v1beta1.IngressInterface {
|
func (c *FakeExtensions) Ingresses(namespace string) v1beta1.IngressInterface {
|
||||||
return &FakeIngresses{c, namespace}
|
return &FakeIngresses{c, namespace}
|
||||||
}
|
}
|
||||||
|
@ -1,127 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016 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 fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
api "k8s.io/client-go/1.4/pkg/api"
|
|
||||||
unversioned "k8s.io/client-go/1.4/pkg/api/unversioned"
|
|
||||||
v1beta1 "k8s.io/client-go/1.4/pkg/apis/extensions/v1beta1"
|
|
||||||
labels "k8s.io/client-go/1.4/pkg/labels"
|
|
||||||
watch "k8s.io/client-go/1.4/pkg/watch"
|
|
||||||
testing "k8s.io/client-go/1.4/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
|
|
||||||
type FakeHorizontalPodAutoscalers struct {
|
|
||||||
Fake *FakeExtensions
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
var horizontalpodautoscalersResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "horizontalpodautoscalers"}
|
|
||||||
|
|
||||||
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1beta1.HorizontalPodAutoscaler), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1beta1.HorizontalPodAutoscaler), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (*v1beta1.HorizontalPodAutoscaler, error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1beta1.HorizontalPodAutoscaler), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v1beta1.HorizontalPodAutoscaler{})
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
|
||||||
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v1beta1.HorizontalPodAutoscalerList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v1beta1.HorizontalPodAutoscaler{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1beta1.HorizontalPodAutoscaler), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *v1beta1.HorizontalPodAutoscalerList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1beta1.HorizontalPodAutoscalerList{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label := opts.LabelSelector
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v1beta1.HorizontalPodAutoscalerList{}
|
|
||||||
for _, item := range obj.(*v1beta1.HorizontalPodAutoscalerList).Items {
|
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
|
||||||
list.Items = append(list.Items, item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
|
||||||
func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
|
|
||||||
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &v1beta1.HorizontalPodAutoscaler{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1beta1.HorizontalPodAutoscaler), err
|
|
||||||
}
|
|
@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 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 fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/client-go/1.4/pkg/api/unversioned"
|
||||||
|
"k8s.io/client-go/1.4/pkg/apis/extensions/v1beta1"
|
||||||
|
"k8s.io/client-go/1.4/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *FakeScales) Get(kind string, name string) (result *v1beta1.Scale, err error) {
|
||||||
|
action := testing.GetActionImpl{}
|
||||||
|
action.Verb = "get"
|
||||||
|
action.Namespace = c.ns
|
||||||
|
action.Resource = unversioned.GroupVersionResource{Resource: kind}
|
||||||
|
action.Subresource = "scale"
|
||||||
|
action.Name = name
|
||||||
|
obj, err := c.Fake.Invokes(action, &v1beta1.Scale{})
|
||||||
|
result = obj.(*v1beta1.Scale)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeScales) Update(kind string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) {
|
||||||
|
action := testing.UpdateActionImpl{}
|
||||||
|
action.Verb = "update"
|
||||||
|
action.Namespace = c.ns
|
||||||
|
action.Resource = unversioned.GroupVersionResource{Resource: kind}
|
||||||
|
action.Subresource = "scale"
|
||||||
|
action.Object = scale
|
||||||
|
obj, err := c.Fake.Invokes(action, scale)
|
||||||
|
result = obj.(*v1beta1.Scale)
|
||||||
|
return
|
||||||
|
}
|
@ -18,10 +18,6 @@ package v1beta1
|
|||||||
|
|
||||||
type DaemonSetExpansion interface{}
|
type DaemonSetExpansion interface{}
|
||||||
|
|
||||||
type DeploymentExpansion interface{}
|
|
||||||
|
|
||||||
type HorizontalPodAutoscalerExpansion interface{}
|
|
||||||
|
|
||||||
type IngressExpansion interface{}
|
type IngressExpansion interface{}
|
||||||
|
|
||||||
type JobExpansion interface{}
|
type JobExpansion interface{}
|
||||||
@ -30,8 +26,6 @@ type PodSecurityPolicyExpansion interface{}
|
|||||||
|
|
||||||
type ReplicaSetExpansion interface{}
|
type ReplicaSetExpansion interface{}
|
||||||
|
|
||||||
type ScaleExpansion interface{}
|
type StorageClassExpansion interface{}
|
||||||
|
|
||||||
type ThirdPartyResourceExpansion interface{}
|
type ThirdPartyResourceExpansion interface{}
|
||||||
|
|
||||||
type StorageClassExpansion interface{}
|
|
||||||
|
@ -1,165 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016 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 v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
api "k8s.io/client-go/1.4/pkg/api"
|
|
||||||
v1beta1 "k8s.io/client-go/1.4/pkg/apis/extensions/v1beta1"
|
|
||||||
watch "k8s.io/client-go/1.4/pkg/watch"
|
|
||||||
)
|
|
||||||
|
|
||||||
// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
|
|
||||||
// A group's client should implement this interface.
|
|
||||||
type HorizontalPodAutoscalersGetter interface {
|
|
||||||
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
|
|
||||||
type HorizontalPodAutoscalerInterface interface {
|
|
||||||
Create(*v1beta1.HorizontalPodAutoscaler) (*v1beta1.HorizontalPodAutoscaler, error)
|
|
||||||
Update(*v1beta1.HorizontalPodAutoscaler) (*v1beta1.HorizontalPodAutoscaler, error)
|
|
||||||
UpdateStatus(*v1beta1.HorizontalPodAutoscaler) (*v1beta1.HorizontalPodAutoscaler, error)
|
|
||||||
Delete(name string, options *api.DeleteOptions) error
|
|
||||||
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
|
|
||||||
Get(name string) (*v1beta1.HorizontalPodAutoscaler, error)
|
|
||||||
List(opts api.ListOptions) (*v1beta1.HorizontalPodAutoscalerList, error)
|
|
||||||
Watch(opts api.ListOptions) (watch.Interface, error)
|
|
||||||
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.HorizontalPodAutoscaler, err error)
|
|
||||||
HorizontalPodAutoscalerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
|
|
||||||
type horizontalPodAutoscalers struct {
|
|
||||||
client *ExtensionsClient
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
|
|
||||||
func newHorizontalPodAutoscalers(c *ExtensionsClient, namespace string) *horizontalPodAutoscalers {
|
|
||||||
return &horizontalPodAutoscalers{
|
|
||||||
client: c,
|
|
||||||
ns: namespace,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
|
||||||
func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
|
||||||
result = &v1beta1.HorizontalPodAutoscaler{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("horizontalpodautoscalers").
|
|
||||||
Body(horizontalPodAutoscaler).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
|
||||||
func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
|
||||||
result = &v1beta1.HorizontalPodAutoscaler{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("horizontalpodautoscalers").
|
|
||||||
Name(horizontalPodAutoscaler.Name).
|
|
||||||
Body(horizontalPodAutoscaler).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
|
||||||
result = &v1beta1.HorizontalPodAutoscaler{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("horizontalpodautoscalers").
|
|
||||||
Name(horizontalPodAutoscaler.Name).
|
|
||||||
SubResource("status").
|
|
||||||
Body(horizontalPodAutoscaler).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
|
|
||||||
return c.client.Delete().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("horizontalpodautoscalers").
|
|
||||||
Name(name).
|
|
||||||
Body(options).
|
|
||||||
Do().
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *horizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
|
||||||
return c.client.Delete().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("horizontalpodautoscalers").
|
|
||||||
VersionedParams(&listOptions, api.ParameterCodec).
|
|
||||||
Body(options).
|
|
||||||
Do().
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
|
|
||||||
func (c *horizontalPodAutoscalers) Get(name string) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
|
||||||
result = &v1beta1.HorizontalPodAutoscaler{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("horizontalpodautoscalers").
|
|
||||||
Name(name).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
|
||||||
func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *v1beta1.HorizontalPodAutoscalerList, err error) {
|
|
||||||
result = &v1beta1.HorizontalPodAutoscalerList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("horizontalpodautoscalers").
|
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
|
||||||
func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.client.Get().
|
|
||||||
Prefix("watch").
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("horizontalpodautoscalers").
|
|
||||||
VersionedParams(&opts, api.ParameterCodec).
|
|
||||||
Watch()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
|
|
||||||
func (c *horizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
|
||||||
result = &v1beta1.HorizontalPodAutoscaler{}
|
|
||||||
err = c.client.Patch(pt).
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("horizontalpodautoscalers").
|
|
||||||
SubResource(subresources...).
|
|
||||||
Name(name).
|
|
||||||
Body(data).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
65
1.4/kubernetes/typed/extensions/v1beta1/scale_expansion.go
Normal file
65
1.4/kubernetes/typed/extensions/v1beta1/scale_expansion.go
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/client-go/1.4/pkg/api/meta"
|
||||||
|
"k8s.io/client-go/1.4/pkg/api/unversioned"
|
||||||
|
"k8s.io/client-go/1.4/pkg/apis/extensions/v1beta1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// The ScaleExpansion interface allows manually adding extra methods to the ScaleInterface.
|
||||||
|
type ScaleExpansion interface {
|
||||||
|
Get(kind string, name string) (*v1beta1.Scale, error)
|
||||||
|
Update(kind string, scale *v1beta1.Scale) (*v1beta1.Scale, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes the reference to scale subresource and returns the subresource or error, if one occurs.
|
||||||
|
func (c *scales) Get(kind string, name string) (result *v1beta1.Scale, err error) {
|
||||||
|
result = &v1beta1.Scale{}
|
||||||
|
|
||||||
|
// TODO this method needs to take a proper unambiguous kind
|
||||||
|
fullyQualifiedKind := unversioned.GroupVersionKind{Kind: kind}
|
||||||
|
resource, _ := meta.KindToResource(fullyQualifiedKind)
|
||||||
|
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource(resource.Resource).
|
||||||
|
Name(name).
|
||||||
|
SubResource("scale").
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *scales) Update(kind string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) {
|
||||||
|
result = &v1beta1.Scale{}
|
||||||
|
|
||||||
|
// TODO this method needs to take a proper unambiguous kind
|
||||||
|
fullyQualifiedKind := unversioned.GroupVersionKind{Kind: kind}
|
||||||
|
resource, _ := meta.KindToResource(fullyQualifiedKind)
|
||||||
|
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(scale.Namespace).
|
||||||
|
Resource(resource.Resource).
|
||||||
|
Name(scale.Name).
|
||||||
|
SubResource("scale").
|
||||||
|
Body(scale).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
20
1.4/kubernetes/typed/policy/v1alpha1/doc.go
Normal file
20
1.4/kubernetes/typed/policy/v1alpha1/doc.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
|
// This package has the automatically generated typed clients.
|
||||||
|
package v1alpha1
|
20
1.4/kubernetes/typed/policy/v1alpha1/fake/doc.go
Normal file
20
1.4/kubernetes/typed/policy/v1alpha1/fake/doc.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1]
|
||||||
|
|
||||||
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
@ -0,0 +1,127 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
api "k8s.io/client-go/1.4/pkg/api"
|
||||||
|
unversioned "k8s.io/client-go/1.4/pkg/api/unversioned"
|
||||||
|
v1alpha1 "k8s.io/client-go/1.4/pkg/apis/policy/v1alpha1"
|
||||||
|
labels "k8s.io/client-go/1.4/pkg/labels"
|
||||||
|
watch "k8s.io/client-go/1.4/pkg/watch"
|
||||||
|
testing "k8s.io/client-go/1.4/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakePodDisruptionBudgets implements PodDisruptionBudgetInterface
|
||||||
|
type FakePodDisruptionBudgets struct {
|
||||||
|
Fake *FakePolicy
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var poddisruptionbudgetsResource = unversioned.GroupVersionResource{Group: "policy", Version: "v1alpha1", Resource: "poddisruptionbudgets"}
|
||||||
|
|
||||||
|
func (c *FakePodDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.PodDisruptionBudget), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePodDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.PodDisruptionBudget), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePodDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateSubresourceAction(poddisruptionbudgetsResource, "status", c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.PodDisruptionBudget), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePodDisruptionBudgets) Delete(name string, options *api.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePodDisruptionBudgets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &v1alpha1.PodDisruptionBudgetList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePodDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.PodDisruptionBudget), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePodDisruptionBudgets) List(opts api.ListOptions) (result *v1alpha1.PodDisruptionBudgetList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(poddisruptionbudgetsResource, c.ns, opts), &v1alpha1.PodDisruptionBudgetList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label := opts.LabelSelector
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &v1alpha1.PodDisruptionBudgetList{}
|
||||||
|
for _, item := range obj.(*v1alpha1.PodDisruptionBudgetList).Items {
|
||||||
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
|
list.Items = append(list.Items, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested podDisruptionBudgets.
|
||||||
|
func (c *FakePodDisruptionBudgets) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(poddisruptionbudgetsResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched podDisruptionBudget.
|
||||||
|
func (c *FakePodDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, data, subresources...), &v1alpha1.PodDisruptionBudget{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.PodDisruptionBudget), err
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1alpha1 "k8s.io/client-go/1.4/kubernetes/typed/policy/v1alpha1"
|
||||||
|
rest "k8s.io/client-go/1.4/rest"
|
||||||
|
testing "k8s.io/client-go/1.4/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakePolicy struct {
|
||||||
|
*testing.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakePolicy) PodDisruptionBudgets(namespace string) v1alpha1.PodDisruptionBudgetInterface {
|
||||||
|
return &FakePodDisruptionBudgets{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakePolicy) GetRESTClient() *rest.RESTClient {
|
||||||
|
return nil
|
||||||
|
}
|
19
1.4/kubernetes/typed/policy/v1alpha1/generated_expansion.go
Normal file
19
1.4/kubernetes/typed/policy/v1alpha1/generated_expansion.go
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 v1alpha1
|
||||||
|
|
||||||
|
type PodDisruptionBudgetExpansion interface{}
|
165
1.4/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go
Normal file
165
1.4/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
api "k8s.io/client-go/1.4/pkg/api"
|
||||||
|
v1alpha1 "k8s.io/client-go/1.4/pkg/apis/policy/v1alpha1"
|
||||||
|
watch "k8s.io/client-go/1.4/pkg/watch"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type PodDisruptionBudgetsGetter interface {
|
||||||
|
PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources.
|
||||||
|
type PodDisruptionBudgetInterface interface {
|
||||||
|
Create(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error)
|
||||||
|
Update(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error)
|
||||||
|
UpdateStatus(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error)
|
||||||
|
Delete(name string, options *api.DeleteOptions) error
|
||||||
|
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
|
||||||
|
Get(name string) (*v1alpha1.PodDisruptionBudget, error)
|
||||||
|
List(opts api.ListOptions) (*v1alpha1.PodDisruptionBudgetList, error)
|
||||||
|
Watch(opts api.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error)
|
||||||
|
PodDisruptionBudgetExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// podDisruptionBudgets implements PodDisruptionBudgetInterface
|
||||||
|
type podDisruptionBudgets struct {
|
||||||
|
client *PolicyClient
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newPodDisruptionBudgets returns a PodDisruptionBudgets
|
||||||
|
func newPodDisruptionBudgets(c *PolicyClient, namespace string) *podDisruptionBudgets {
|
||||||
|
return &podDisruptionBudgets{
|
||||||
|
client: c,
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any.
|
||||||
|
func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) {
|
||||||
|
result = &v1alpha1.PodDisruptionBudget{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("poddisruptionbudgets").
|
||||||
|
Body(podDisruptionBudget).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any.
|
||||||
|
func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) {
|
||||||
|
result = &v1alpha1.PodDisruptionBudget{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("poddisruptionbudgets").
|
||||||
|
Name(podDisruptionBudget.Name).
|
||||||
|
Body(podDisruptionBudget).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) {
|
||||||
|
result = &v1alpha1.PodDisruptionBudget{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("poddisruptionbudgets").
|
||||||
|
Name(podDisruptionBudget.Name).
|
||||||
|
SubResource("status").
|
||||||
|
Body(podDisruptionBudget).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *podDisruptionBudgets) Delete(name string, options *api.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("poddisruptionbudgets").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *podDisruptionBudgets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("poddisruptionbudgets").
|
||||||
|
VersionedParams(&listOptions, api.ParameterCodec).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any.
|
||||||
|
func (c *podDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) {
|
||||||
|
result = &v1alpha1.PodDisruptionBudget{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("poddisruptionbudgets").
|
||||||
|
Name(name).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors.
|
||||||
|
func (c *podDisruptionBudgets) List(opts api.ListOptions) (result *v1alpha1.PodDisruptionBudgetList, err error) {
|
||||||
|
result = &v1alpha1.PodDisruptionBudgetList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("poddisruptionbudgets").
|
||||||
|
VersionedParams(&opts, api.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested podDisruptionBudgets.
|
||||||
|
func (c *podDisruptionBudgets) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.client.Get().
|
||||||
|
Prefix("watch").
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("poddisruptionbudgets").
|
||||||
|
VersionedParams(&opts, api.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched podDisruptionBudget.
|
||||||
|
func (c *podDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) {
|
||||||
|
result = &v1alpha1.PodDisruptionBudget{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("poddisruptionbudgets").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
96
1.4/kubernetes/typed/policy/v1alpha1/policy_client.go
Normal file
96
1.4/kubernetes/typed/policy/v1alpha1/policy_client.go
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
api "k8s.io/client-go/1.4/pkg/api"
|
||||||
|
registered "k8s.io/client-go/1.4/pkg/apimachinery/registered"
|
||||||
|
serializer "k8s.io/client-go/1.4/pkg/runtime/serializer"
|
||||||
|
rest "k8s.io/client-go/1.4/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
type PolicyInterface interface {
|
||||||
|
GetRESTClient() *rest.RESTClient
|
||||||
|
PodDisruptionBudgetsGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// PolicyClient is used to interact with features provided by the Policy group.
|
||||||
|
type PolicyClient struct {
|
||||||
|
*rest.RESTClient
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *PolicyClient) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface {
|
||||||
|
return newPodDisruptionBudgets(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new PolicyClient for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*PolicyClient, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := rest.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &PolicyClient{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new PolicyClient for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *PolicyClient {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new PolicyClient for the given RESTClient.
|
||||||
|
func New(c *rest.RESTClient) *PolicyClient {
|
||||||
|
return &PolicyClient{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
|
// if policy group is not registered, return an error
|
||||||
|
g, err := registered.Group("policy")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
config.APIPath = "/apis"
|
||||||
|
if config.UserAgent == "" {
|
||||||
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
|
}
|
||||||
|
// TODO: Unconditionally set the config.Version, until we fix the config.
|
||||||
|
//if config.Version == "" {
|
||||||
|
copyGroupVersion := g.GroupVersion
|
||||||
|
config.GroupVersion = ©GroupVersion
|
||||||
|
//}
|
||||||
|
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *PolicyClient) GetRESTClient() *rest.RESTClient {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.RESTClient
|
||||||
|
}
|
@ -329,9 +329,9 @@ func NewGenericServerResponse(code int, verb string, qualifiedResource unversion
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch {
|
switch {
|
||||||
case !qualifiedResource.IsEmpty() && len(name) > 0:
|
case !qualifiedResource.Empty() && len(name) > 0:
|
||||||
message = fmt.Sprintf("%s (%s %s %s)", message, strings.ToLower(verb), qualifiedResource.String(), name)
|
message = fmt.Sprintf("%s (%s %s %s)", message, strings.ToLower(verb), qualifiedResource.String(), name)
|
||||||
case !qualifiedResource.IsEmpty():
|
case !qualifiedResource.Empty():
|
||||||
message = fmt.Sprintf("%s (%s %s)", message, strings.ToLower(verb), qualifiedResource.String())
|
message = fmt.Sprintf("%s (%s %s)", message, strings.ToLower(verb), qualifiedResource.String())
|
||||||
}
|
}
|
||||||
var causes []unversioned.StatusCause
|
var causes []unversioned.StatusCause
|
||||||
|
@ -30,6 +30,7 @@ import (
|
|||||||
"k8s.io/client-go/1.4/pkg/fields"
|
"k8s.io/client-go/1.4/pkg/fields"
|
||||||
"k8s.io/client-go/1.4/pkg/labels"
|
"k8s.io/client-go/1.4/pkg/labels"
|
||||||
"k8s.io/client-go/1.4/pkg/runtime"
|
"k8s.io/client-go/1.4/pkg/runtime"
|
||||||
|
"k8s.io/client-go/1.4/pkg/selection"
|
||||||
"k8s.io/client-go/1.4/pkg/types"
|
"k8s.io/client-go/1.4/pkg/types"
|
||||||
"k8s.io/client-go/1.4/pkg/util/sets"
|
"k8s.io/client-go/1.4/pkg/util/sets"
|
||||||
|
|
||||||
@ -222,6 +223,10 @@ func IsServiceIPSet(service *Service) bool {
|
|||||||
|
|
||||||
// this function aims to check if the service's cluster IP is requested or not
|
// this function aims to check if the service's cluster IP is requested or not
|
||||||
func IsServiceIPRequested(service *Service) bool {
|
func IsServiceIPRequested(service *Service) bool {
|
||||||
|
// ExternalName services are CNAME aliases to external ones. Ignore the IP.
|
||||||
|
if service.Spec.Type == ServiceTypeExternalName {
|
||||||
|
return false
|
||||||
|
}
|
||||||
return service.Spec.ClusterIP == ""
|
return service.Spec.ClusterIP == ""
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,20 +384,20 @@ func NodeSelectorRequirementsAsSelector(nsm []NodeSelectorRequirement) (labels.S
|
|||||||
}
|
}
|
||||||
selector := labels.NewSelector()
|
selector := labels.NewSelector()
|
||||||
for _, expr := range nsm {
|
for _, expr := range nsm {
|
||||||
var op labels.Operator
|
var op selection.Operator
|
||||||
switch expr.Operator {
|
switch expr.Operator {
|
||||||
case NodeSelectorOpIn:
|
case NodeSelectorOpIn:
|
||||||
op = labels.InOperator
|
op = selection.In
|
||||||
case NodeSelectorOpNotIn:
|
case NodeSelectorOpNotIn:
|
||||||
op = labels.NotInOperator
|
op = selection.NotIn
|
||||||
case NodeSelectorOpExists:
|
case NodeSelectorOpExists:
|
||||||
op = labels.ExistsOperator
|
op = selection.Exists
|
||||||
case NodeSelectorOpDoesNotExist:
|
case NodeSelectorOpDoesNotExist:
|
||||||
op = labels.DoesNotExistOperator
|
op = selection.DoesNotExist
|
||||||
case NodeSelectorOpGt:
|
case NodeSelectorOpGt:
|
||||||
op = labels.GreaterThanOperator
|
op = selection.GreaterThan
|
||||||
case NodeSelectorOpLt:
|
case NodeSelectorOpLt:
|
||||||
op = labels.LessThanOperator
|
op = selection.LessThan
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("%q is not a valid node selector operator", expr.Operator)
|
return nil, fmt.Errorf("%q is not a valid node selector operator", expr.Operator)
|
||||||
}
|
}
|
||||||
@ -433,6 +438,20 @@ const (
|
|||||||
// PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized)
|
// PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized)
|
||||||
// in the Annotations of a Node.
|
// in the Annotations of a Node.
|
||||||
PreferAvoidPodsAnnotationKey string = "scheduler.alpha.kubernetes.io/preferAvoidPods"
|
PreferAvoidPodsAnnotationKey string = "scheduler.alpha.kubernetes.io/preferAvoidPods"
|
||||||
|
|
||||||
|
// SysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure
|
||||||
|
// container of a pod. The annotation value is a comma separated list of sysctl_name=value
|
||||||
|
// key-value pairs. Only a limited set of whitelisted and isolated sysctls is supported by
|
||||||
|
// the kubelet. Pods with other sysctls will fail to launch.
|
||||||
|
SysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/sysctls"
|
||||||
|
|
||||||
|
// UnsafeSysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure
|
||||||
|
// container of a pod. The annotation value is a comma separated list of sysctl_name=value
|
||||||
|
// key-value pairs. Unsafe sysctls must be explicitly enabled for a kubelet. They are properly
|
||||||
|
// namespaced to a pod or a container, but their isolation is usually unclear or weak. Their use
|
||||||
|
// is at-your-own-risk. Pods that attempt to set an unsafe sysctl that is not enabled for a kubelet
|
||||||
|
// will fail to launch.
|
||||||
|
UnsafeSysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/unsafe-sysctls"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetAffinityFromPod gets the json serialized affinity data from Pod.Annotations
|
// GetAffinityFromPod gets the json serialized affinity data from Pod.Annotations
|
||||||
@ -517,3 +536,51 @@ func GetAvoidPodsFromNodeAnnotations(annotations map[string]string) (AvoidPods,
|
|||||||
}
|
}
|
||||||
return avoidPods, nil
|
return avoidPods, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SysctlsFromPodAnnotations parses the sysctl annotations into a slice of safe Sysctls
|
||||||
|
// and a slice of unsafe Sysctls. This is only a convenience wrapper around
|
||||||
|
// SysctlsFromPodAnnotation.
|
||||||
|
func SysctlsFromPodAnnotations(a map[string]string) ([]Sysctl, []Sysctl, error) {
|
||||||
|
safe, err := SysctlsFromPodAnnotation(a[SysctlsPodAnnotationKey])
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
unsafe, err := SysctlsFromPodAnnotation(a[UnsafeSysctlsPodAnnotationKey])
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return safe, unsafe, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// SysctlsFromPodAnnotation parses an annotation value into a slice of Sysctls.
|
||||||
|
func SysctlsFromPodAnnotation(annotation string) ([]Sysctl, error) {
|
||||||
|
if len(annotation) == 0 {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
kvs := strings.Split(annotation, ",")
|
||||||
|
sysctls := make([]Sysctl, len(kvs))
|
||||||
|
for i, kv := range kvs {
|
||||||
|
cs := strings.Split(kv, "=")
|
||||||
|
if len(cs) != 2 {
|
||||||
|
return nil, fmt.Errorf("sysctl %q not of the format sysctl_name=value", kv)
|
||||||
|
}
|
||||||
|
sysctls[i].Name = cs[0]
|
||||||
|
sysctls[i].Value = cs[1]
|
||||||
|
}
|
||||||
|
return sysctls, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// PodAnnotationsFromSysctls creates an annotation value for a slice of Sysctls.
|
||||||
|
func PodAnnotationsFromSysctls(sysctls []Sysctl) string {
|
||||||
|
if len(sysctls) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
kvs := make([]string, len(sysctls))
|
||||||
|
for i := range sysctls {
|
||||||
|
kvs[i] = fmt.Sprintf("%s=%s", sysctls[i].Name, sysctls[i].Value)
|
||||||
|
}
|
||||||
|
return strings.Join(kvs, ",")
|
||||||
|
}
|
||||||
|
@ -131,3 +131,10 @@ func (meta *ObjectMeta) SetOwnerReferences(references []metatypes.OwnerReference
|
|||||||
}
|
}
|
||||||
meta.OwnerReferences = newReferences
|
meta.OwnerReferences = newReferences
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (meta *ObjectMeta) GetClusterName() string {
|
||||||
|
return meta.ClusterName
|
||||||
|
}
|
||||||
|
func (meta *ObjectMeta) SetClusterName(clusterName string) {
|
||||||
|
meta.ClusterName = clusterName
|
||||||
|
}
|
||||||
|
@ -62,6 +62,8 @@ type Object interface {
|
|||||||
SetFinalizers(finalizers []string)
|
SetFinalizers(finalizers []string)
|
||||||
GetOwnerReferences() []metatypes.OwnerReference
|
GetOwnerReferences() []metatypes.OwnerReference
|
||||||
SetOwnerReferences([]metatypes.OwnerReference)
|
SetOwnerReferences([]metatypes.OwnerReference)
|
||||||
|
GetClusterName() string
|
||||||
|
SetClusterName(clusterName string)
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ Object = &runtime.Unstructured{}
|
var _ Object = &runtime.Unstructured{}
|
||||||
|
@ -183,7 +183,7 @@ func (m *DefaultRESTMapper) ResourceSingularizer(resourceType string) (string, e
|
|||||||
if !ok {
|
if !ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if singular.IsEmpty() {
|
if singular.Empty() {
|
||||||
singular = currSingular
|
singular = currSingular
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -193,7 +193,7 @@ func (m *DefaultRESTMapper) ResourceSingularizer(resourceType string) (string, e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if singular.IsEmpty() {
|
if singular.Empty() {
|
||||||
return resourceType, fmt.Errorf("no singular of resource %v has been defined", resourceType)
|
return resourceType, fmt.Errorf("no singular of resource %v has been defined", resourceType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
31
1.4/pkg/api/meta/unstructured.go
Normal file
31
1.4/pkg/api/meta/unstructured.go
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 meta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"k8s.io/client-go/1.4/pkg/api/unversioned"
|
||||||
|
"k8s.io/client-go/1.4/pkg/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
// InterfacesForUnstructured returns VersionInterfaces suitable for
|
||||||
|
// dealing with runtime.Unstructured objects.
|
||||||
|
func InterfacesForUnstructured(unversioned.GroupVersion) (*VersionInterfaces, error) {
|
||||||
|
return &VersionInterfaces{
|
||||||
|
ObjectConvertor: &runtime.UnstructuredObjectConverter{},
|
||||||
|
MetadataAccessor: NewAccessor(),
|
||||||
|
}, nil
|
||||||
|
}
|
@ -40,7 +40,8 @@
|
|||||||
"secret": null,
|
"secret": null,
|
||||||
"nfs": null,
|
"nfs": null,
|
||||||
"iscsi": null,
|
"iscsi": null,
|
||||||
"glusterfs": null
|
"glusterfs": null,
|
||||||
|
"quobyte": null
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"containers": [
|
"containers": [
|
||||||
|
@ -16,6 +16,13 @@ limitations under the License.
|
|||||||
|
|
||||||
package service
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/golang/glog"
|
||||||
|
"k8s.io/client-go/1.4/pkg/api"
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// AnnotationLoadBalancerSourceRangesKey is the key of the annotation on a service to set allowed ingress ranges on their LoadBalancers
|
// AnnotationLoadBalancerSourceRangesKey is the key of the annotation on a service to set allowed ingress ranges on their LoadBalancers
|
||||||
//
|
//
|
||||||
@ -25,4 +32,58 @@ const (
|
|||||||
//
|
//
|
||||||
// Not all cloud providers support this annotation, though AWS & GCE do.
|
// Not all cloud providers support this annotation, though AWS & GCE do.
|
||||||
AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges"
|
AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges"
|
||||||
|
|
||||||
|
// AnnotationExternalTraffic An annotation that denotes if this Service desires to route external traffic to local
|
||||||
|
// endpoints only. This preserves Source IP and avoids a second hop.
|
||||||
|
AnnotationExternalTraffic = "service.alpha.kubernetes.io/external-traffic"
|
||||||
|
// AnnotationValueExternalTrafficLocal Value of annotation to specify local endpoints behaviour
|
||||||
|
AnnotationValueExternalTrafficLocal = "OnlyLocal"
|
||||||
|
// AnnotationValueExternalTrafficGlobal Value of annotation to specify global (legacy) behaviour
|
||||||
|
AnnotationValueExternalTrafficGlobal = "Global"
|
||||||
|
// AnnotationHealthCheckNodePort Annotation specifying the healthcheck nodePort for the service
|
||||||
|
// If not specified, annotation is created by the service api backend with the allocated nodePort
|
||||||
|
// Will use user-specified nodePort value if specified by the client
|
||||||
|
AnnotationHealthCheckNodePort = "service.alpha.kubernetes.io/healthcheck-nodeport"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// NeedsHealthCheck Check service for health check annotations
|
||||||
|
func NeedsHealthCheck(service *api.Service) bool {
|
||||||
|
if l, ok := service.Annotations[AnnotationExternalTraffic]; ok {
|
||||||
|
if l == AnnotationValueExternalTrafficLocal {
|
||||||
|
return true
|
||||||
|
} else if l == AnnotationValueExternalTrafficGlobal {
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
|
glog.Errorf("Invalid value for annotation %v", AnnotationExternalTraffic)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetServiceHealthCheckNodePort Return health check node port annotation for service, if one exists
|
||||||
|
func GetServiceHealthCheckNodePort(service *api.Service) int32 {
|
||||||
|
if NeedsHealthCheck(service) {
|
||||||
|
if l, ok := service.Annotations[AnnotationHealthCheckNodePort]; ok {
|
||||||
|
p, err := strconv.Atoi(l)
|
||||||
|
if err != nil {
|
||||||
|
glog.Errorf("Failed to parse annotation %v: %v", AnnotationHealthCheckNodePort, err)
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return int32(p)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetServiceHealthCheckPathPort Return the path and nodePort programmed into the Cloud LB Health Check
|
||||||
|
func GetServiceHealthCheckPathPort(service *api.Service) (string, int32) {
|
||||||
|
if !NeedsHealthCheck(service) {
|
||||||
|
return "", 0
|
||||||
|
}
|
||||||
|
port := GetServiceHealthCheckNodePort(service)
|
||||||
|
if port == 0 {
|
||||||
|
return "", 0
|
||||||
|
}
|
||||||
|
return "/healthz", port
|
||||||
|
}
|
||||||
|
@ -33,6 +33,7 @@ import (
|
|||||||
"k8s.io/client-go/1.4/pkg/apis/batch"
|
"k8s.io/client-go/1.4/pkg/apis/batch"
|
||||||
"k8s.io/client-go/1.4/pkg/apis/certificates"
|
"k8s.io/client-go/1.4/pkg/apis/certificates"
|
||||||
"k8s.io/client-go/1.4/pkg/apis/extensions"
|
"k8s.io/client-go/1.4/pkg/apis/extensions"
|
||||||
|
"k8s.io/client-go/1.4/pkg/apis/imagepolicy"
|
||||||
"k8s.io/client-go/1.4/pkg/apis/policy"
|
"k8s.io/client-go/1.4/pkg/apis/policy"
|
||||||
"k8s.io/client-go/1.4/pkg/apis/rbac"
|
"k8s.io/client-go/1.4/pkg/apis/rbac"
|
||||||
"k8s.io/client-go/1.4/pkg/federation/apis/federation"
|
"k8s.io/client-go/1.4/pkg/federation/apis/federation"
|
||||||
@ -48,6 +49,7 @@ import (
|
|||||||
_ "k8s.io/client-go/1.4/pkg/apis/certificates/install"
|
_ "k8s.io/client-go/1.4/pkg/apis/certificates/install"
|
||||||
_ "k8s.io/client-go/1.4/pkg/apis/componentconfig/install"
|
_ "k8s.io/client-go/1.4/pkg/apis/componentconfig/install"
|
||||||
_ "k8s.io/client-go/1.4/pkg/apis/extensions/install"
|
_ "k8s.io/client-go/1.4/pkg/apis/extensions/install"
|
||||||
|
_ "k8s.io/client-go/1.4/pkg/apis/imagepolicy/install"
|
||||||
_ "k8s.io/client-go/1.4/pkg/apis/policy/install"
|
_ "k8s.io/client-go/1.4/pkg/apis/policy/install"
|
||||||
_ "k8s.io/client-go/1.4/pkg/apis/rbac/install"
|
_ "k8s.io/client-go/1.4/pkg/apis/rbac/install"
|
||||||
_ "k8s.io/client-go/1.4/pkg/federation/apis/federation/install"
|
_ "k8s.io/client-go/1.4/pkg/federation/apis/federation/install"
|
||||||
@ -64,6 +66,7 @@ var (
|
|||||||
Federation TestGroup
|
Federation TestGroup
|
||||||
Rbac TestGroup
|
Rbac TestGroup
|
||||||
Certificates TestGroup
|
Certificates TestGroup
|
||||||
|
ImagePolicy TestGroup
|
||||||
|
|
||||||
serializer runtime.SerializerInfo
|
serializer runtime.SerializerInfo
|
||||||
storageSerializer runtime.SerializerInfo
|
storageSerializer runtime.SerializerInfo
|
||||||
@ -225,6 +228,16 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if _, ok := Groups[imagepolicy.GroupName]; !ok {
|
||||||
|
externalGroupVersion := unversioned.GroupVersion{Group: imagepolicy.GroupName, Version: registered.GroupOrDie(imagepolicy.GroupName).GroupVersion.Version}
|
||||||
|
Groups[imagepolicy.GroupName] = TestGroup{
|
||||||
|
externalGroupVersion: externalGroupVersion,
|
||||||
|
internalGroupVersion: imagepolicy.SchemeGroupVersion,
|
||||||
|
internalTypes: api.Scheme.KnownTypes(imagepolicy.SchemeGroupVersion),
|
||||||
|
externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Default = Groups[api.GroupName]
|
Default = Groups[api.GroupName]
|
||||||
Autoscaling = Groups[autoscaling.GroupName]
|
Autoscaling = Groups[autoscaling.GroupName]
|
||||||
Batch = Groups[batch.GroupName]
|
Batch = Groups[batch.GroupName]
|
||||||
@ -234,6 +247,7 @@ func init() {
|
|||||||
Extensions = Groups[extensions.GroupName]
|
Extensions = Groups[extensions.GroupName]
|
||||||
Federation = Groups[federation.GroupName]
|
Federation = Groups[federation.GroupName]
|
||||||
Rbac = Groups[rbac.GroupName]
|
Rbac = Groups[rbac.GroupName]
|
||||||
|
ImagePolicy = Groups[imagepolicy.GroupName]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g TestGroup) ContentConfig() (string, *unversioned.GroupVersion, runtime.Codec) {
|
func (g TestGroup) ContentConfig() (string, *unversioned.GroupVersion, runtime.Codec) {
|
||||||
@ -267,7 +281,7 @@ func (g TestGroup) Codec() runtime.Codec {
|
|||||||
if serializer.Serializer == nil {
|
if serializer.Serializer == nil {
|
||||||
return api.Codecs.LegacyCodec(g.externalGroupVersion)
|
return api.Codecs.LegacyCodec(g.externalGroupVersion)
|
||||||
}
|
}
|
||||||
return api.Codecs.CodecForVersions(serializer, api.Codecs.UniversalDeserializer(), []unversioned.GroupVersion{g.externalGroupVersion}, nil)
|
return api.Codecs.CodecForVersions(serializer, api.Codecs.UniversalDeserializer(), unversioned.GroupVersions{g.externalGroupVersion}, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NegotiatedSerializer returns the negotiated serializer for the server.
|
// NegotiatedSerializer returns the negotiated serializer for the server.
|
||||||
@ -295,7 +309,7 @@ func (g TestGroup) StorageCodec() runtime.Codec {
|
|||||||
}
|
}
|
||||||
ds := recognizer.NewDecoder(s, api.Codecs.UniversalDeserializer())
|
ds := recognizer.NewDecoder(s, api.Codecs.UniversalDeserializer())
|
||||||
|
|
||||||
return api.Codecs.CodecForVersions(s, ds, []unversioned.GroupVersion{g.externalGroupVersion}, nil)
|
return api.Codecs.CodecForVersions(s, ds, unversioned.GroupVersions{g.externalGroupVersion}, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Converter returns the api.Scheme for the API version to test against, as set by the
|
// Converter returns the api.Scheme for the API version to test against, as set by the
|
||||||
@ -379,7 +393,7 @@ func (g TestGroup) RESTMapper() meta.RESTMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ExternalGroupVersions returns all external group versions allowed for the server.
|
// ExternalGroupVersions returns all external group versions allowed for the server.
|
||||||
func ExternalGroupVersions() []unversioned.GroupVersion {
|
func ExternalGroupVersions() unversioned.GroupVersions {
|
||||||
versions := []unversioned.GroupVersion{}
|
versions := []unversioned.GroupVersion{}
|
||||||
for _, g := range Groups {
|
for _, g := range Groups {
|
||||||
gv := g.GroupVersion()
|
gv := g.GroupVersion()
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -130,7 +130,6 @@ type ObjectMeta struct {
|
|||||||
// The prefix is optional. If the prefix is not specified, the key is assumed to be private
|
// The prefix is optional. If the prefix is not specified, the key is assumed to be private
|
||||||
// to the user. Other system components that wish to use labels must specify a prefix. The
|
// to the user. Other system components that wish to use labels must specify a prefix. The
|
||||||
// "kubernetes.io/" prefix is reserved for use by kubernetes components.
|
// "kubernetes.io/" prefix is reserved for use by kubernetes components.
|
||||||
// TODO: replace map[string]string with labels.LabelSet type
|
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
Labels map[string]string `json:"labels,omitempty"`
|
||||||
|
|
||||||
// Annotations are unstructured key value data stored with a resource that may be set by
|
// Annotations are unstructured key value data stored with a resource that may be set by
|
||||||
@ -150,6 +149,11 @@ type ObjectMeta struct {
|
|||||||
// from the list. If the deletionTimestamp of the object is non-nil, entries
|
// from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||||
// in this list can only be removed.
|
// in this list can only be removed.
|
||||||
Finalizers []string `json:"finalizers,omitempty"`
|
Finalizers []string `json:"finalizers,omitempty"`
|
||||||
|
|
||||||
|
// The name of the cluster which the object belongs to.
|
||||||
|
// This is used to distinguish resources with same name and namespace in different clusters.
|
||||||
|
// This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
|
||||||
|
ClusterName string `json:"clusterName,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -210,6 +214,10 @@ type VolumeSource struct {
|
|||||||
PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"`
|
PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"`
|
||||||
// RBD represents a Rados Block Device mount on the host that shares a pod's lifetime
|
// RBD represents a Rados Block Device mount on the host that shares a pod's lifetime
|
||||||
RBD *RBDVolumeSource `json:"rbd,omitempty"`
|
RBD *RBDVolumeSource `json:"rbd,omitempty"`
|
||||||
|
|
||||||
|
// Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
|
||||||
|
Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty"`
|
||||||
|
|
||||||
// FlexVolume represents a generic volume resource that is
|
// FlexVolume represents a generic volume resource that is
|
||||||
// provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.
|
// provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.
|
||||||
FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty"`
|
FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty"`
|
||||||
@ -233,6 +241,8 @@ type VolumeSource struct {
|
|||||||
ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty"`
|
ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty"`
|
||||||
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
||||||
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"`
|
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"`
|
||||||
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
|
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Similar to VolumeSource but meant for the administrator who creates PVs.
|
// Similar to VolumeSource but meant for the administrator who creates PVs.
|
||||||
@ -255,6 +265,8 @@ type PersistentVolumeSource struct {
|
|||||||
NFS *NFSVolumeSource `json:"nfs,omitempty"`
|
NFS *NFSVolumeSource `json:"nfs,omitempty"`
|
||||||
// RBD represents a Rados Block Device mount on the host that shares a pod's lifetime
|
// RBD represents a Rados Block Device mount on the host that shares a pod's lifetime
|
||||||
RBD *RBDVolumeSource `json:"rbd,omitempty"`
|
RBD *RBDVolumeSource `json:"rbd,omitempty"`
|
||||||
|
// Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
|
||||||
|
Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty"`
|
||||||
// ISCSIVolumeSource represents an ISCSI resource that is attached to a
|
// ISCSIVolumeSource represents an ISCSI resource that is attached to a
|
||||||
// kubelet's host machine and then exposed to the pod.
|
// kubelet's host machine and then exposed to the pod.
|
||||||
ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty"`
|
ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty"`
|
||||||
@ -273,6 +285,8 @@ type PersistentVolumeSource struct {
|
|||||||
AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty"`
|
AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty"`
|
||||||
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
||||||
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"`
|
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"`
|
||||||
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
|
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PersistentVolumeClaimVolumeSource struct {
|
type PersistentVolumeClaimVolumeSource struct {
|
||||||
@ -607,6 +621,12 @@ type SecretVolumeSource struct {
|
|||||||
// the volume setup will error. Paths must be relative and may not contain
|
// the volume setup will error. Paths must be relative and may not contain
|
||||||
// the '..' path or start with '..'.
|
// the '..' path or start with '..'.
|
||||||
Items []KeyToPath `json:"items,omitempty"`
|
Items []KeyToPath `json:"items,omitempty"`
|
||||||
|
// Mode bits to use on created files by default. Must be a value between
|
||||||
|
// 0 and 0777.
|
||||||
|
// Directories within the path are not affected by this setting.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
DefaultMode *int32 `json:"defaultMode,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Represents an NFS mount that lasts the lifetime of a pod.
|
// Represents an NFS mount that lasts the lifetime of a pod.
|
||||||
@ -623,6 +643,30 @@ type NFSVolumeSource struct {
|
|||||||
ReadOnly bool `json:"readOnly,omitempty"`
|
ReadOnly bool `json:"readOnly,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Represents a Quobyte mount that lasts the lifetime of a pod.
|
||||||
|
// Quobyte volumes do not support ownership management or SELinux relabeling.
|
||||||
|
type QuobyteVolumeSource struct {
|
||||||
|
// Registry represents a single or multiple Quobyte Registry services
|
||||||
|
// specified as a string as host:port pair (multiple entries are separated with commas)
|
||||||
|
// which acts as the central registry for volumes
|
||||||
|
Registry string `json:"registry"`
|
||||||
|
|
||||||
|
// Volume is a string that references an already created Quobyte volume by name.
|
||||||
|
Volume string `json:"volume"`
|
||||||
|
|
||||||
|
// Defaults to false (read/write). ReadOnly here will force
|
||||||
|
// the Quobyte to be mounted with read-only permissions
|
||||||
|
ReadOnly bool `json:"readOnly,omitempty"`
|
||||||
|
|
||||||
|
// User to map volume access to
|
||||||
|
// Defaults to the root user
|
||||||
|
User string `json:"user,omitempty"`
|
||||||
|
|
||||||
|
// Group to map volume access to
|
||||||
|
// Default is no group
|
||||||
|
Group string `json:"group,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// Represents a Glusterfs mount that lasts the lifetime of a pod.
|
// Represents a Glusterfs mount that lasts the lifetime of a pod.
|
||||||
// Glusterfs volumes do not support ownership management or SELinux relabeling.
|
// Glusterfs volumes do not support ownership management or SELinux relabeling.
|
||||||
type GlusterfsVolumeSource struct {
|
type GlusterfsVolumeSource struct {
|
||||||
@ -708,6 +752,12 @@ type FlockerVolumeSource struct {
|
|||||||
type DownwardAPIVolumeSource struct {
|
type DownwardAPIVolumeSource struct {
|
||||||
// Items is a list of DownwardAPIVolume file
|
// Items is a list of DownwardAPIVolume file
|
||||||
Items []DownwardAPIVolumeFile `json:"items,omitempty"`
|
Items []DownwardAPIVolumeFile `json:"items,omitempty"`
|
||||||
|
// Mode bits to use on created files by default. Must be a value between
|
||||||
|
// 0 and 0777.
|
||||||
|
// Directories within the path are not affected by this setting.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
DefaultMode *int32 `json:"defaultMode,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Represents a single file containing information from the downward API
|
// Represents a single file containing information from the downward API
|
||||||
@ -719,6 +769,11 @@ type DownwardAPIVolumeFile struct {
|
|||||||
// Selects a resource of the container: only resources limits and requests
|
// Selects a resource of the container: only resources limits and requests
|
||||||
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
|
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
|
||||||
ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty"`
|
ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty"`
|
||||||
|
// Optional: mode bits to use on this file, must be a value between 0
|
||||||
|
// and 0777. If not specified, the volume defaultMode will be used.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
Mode *int32 `json:"mode,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
|
// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
|
||||||
@ -742,6 +797,31 @@ type VsphereVirtualDiskVolumeSource struct {
|
|||||||
FSType string `json:"fsType,omitempty"`
|
FSType string `json:"fsType,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type AzureDataDiskCachingMode string
|
||||||
|
|
||||||
|
const (
|
||||||
|
AzureDataDiskCachingNone AzureDataDiskCachingMode = "None"
|
||||||
|
AzureDataDiskCachingReadOnly AzureDataDiskCachingMode = "ReadOnly"
|
||||||
|
AzureDataDiskCachingReadWrite AzureDataDiskCachingMode = "ReadWrite"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
|
type AzureDiskVolumeSource struct {
|
||||||
|
// The Name of the data disk in the blob storage
|
||||||
|
DiskName string `json:"diskName"`
|
||||||
|
// The URI the the data disk in the blob storage
|
||||||
|
DataDiskURI string `json:"diskURI"`
|
||||||
|
// Host Caching mode: None, Read Only, Read Write.
|
||||||
|
CachingMode *AzureDataDiskCachingMode `json:"cachingMode,omitempty"`
|
||||||
|
// Filesystem type to mount.
|
||||||
|
// Must be a filesystem type supported by the host operating system.
|
||||||
|
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
|
||||||
|
FSType *string `json:"fsType,omitempty"`
|
||||||
|
// Defaults to false (read/write). ReadOnly here will force
|
||||||
|
// the ReadOnly setting in VolumeMounts.
|
||||||
|
ReadOnly *bool `json:"readOnly,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// Adapts a ConfigMap into a volume.
|
// Adapts a ConfigMap into a volume.
|
||||||
//
|
//
|
||||||
// The contents of the target ConfigMap's Data field will be presented in a
|
// The contents of the target ConfigMap's Data field will be presented in a
|
||||||
@ -758,6 +838,12 @@ type ConfigMapVolumeSource struct {
|
|||||||
// the volume setup will error. Paths must be relative and may not contain
|
// the volume setup will error. Paths must be relative and may not contain
|
||||||
// the '..' path or start with '..'.
|
// the '..' path or start with '..'.
|
||||||
Items []KeyToPath `json:"items,omitempty"`
|
Items []KeyToPath `json:"items,omitempty"`
|
||||||
|
// Mode bits to use on created files by default. Must be a value between
|
||||||
|
// 0 and 0777.
|
||||||
|
// Directories within the path are not affected by this setting.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
DefaultMode *int32 `json:"defaultMode,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Maps a string key to a path within a volume.
|
// Maps a string key to a path within a volume.
|
||||||
@ -770,6 +856,11 @@ type KeyToPath struct {
|
|||||||
// May not contain the path element '..'.
|
// May not contain the path element '..'.
|
||||||
// May not start with the string '..'.
|
// May not start with the string '..'.
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
|
// Optional: mode bits to use on this file, should be a value between 0
|
||||||
|
// and 0777. If not specified, the volume defaultMode will be used.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
Mode *int32 `json:"mode,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContainerPort represents a network port in a single container
|
// ContainerPort represents a network port in a single container
|
||||||
@ -821,7 +912,8 @@ type EnvVar struct {
|
|||||||
// EnvVarSource represents a source for the value of an EnvVar.
|
// EnvVarSource represents a source for the value of an EnvVar.
|
||||||
// Only one of its fields may be set.
|
// Only one of its fields may be set.
|
||||||
type EnvVarSource struct {
|
type EnvVarSource struct {
|
||||||
// Selects a field of the pod; only name and namespace are supported.
|
// Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
|
||||||
|
// spec.nodeName, spec.serviceAccountName, status.podIP.
|
||||||
FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty"`
|
FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty"`
|
||||||
// Selects a resource of the container: only resources limits and requests
|
// Selects a resource of the container: only resources limits and requests
|
||||||
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
|
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
|
||||||
@ -1472,6 +1564,14 @@ type PodSpec struct {
|
|||||||
Subdomain string `json:"subdomain,omitempty"`
|
Subdomain string `json:"subdomain,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sysctl defines a kernel parameter to be set
|
||||||
|
type Sysctl struct {
|
||||||
|
// Name of a property to set
|
||||||
|
Name string `json:"name"`
|
||||||
|
// Value of a property to set
|
||||||
|
Value string `json:"value"`
|
||||||
|
}
|
||||||
|
|
||||||
// PodSecurityContext holds pod-level security attributes and common container settings.
|
// PodSecurityContext holds pod-level security attributes and common container settings.
|
||||||
// Some fields are also present in container.securityContext. Field values of
|
// Some fields are also present in container.securityContext. Field values of
|
||||||
// container.securityContext take precedence over field values of PodSecurityContext.
|
// container.securityContext take precedence over field values of PodSecurityContext.
|
||||||
@ -1636,6 +1736,9 @@ type ReplicationControllerStatus struct {
|
|||||||
// The number of pods that have labels matching the labels of the pod template of the replication controller.
|
// The number of pods that have labels matching the labels of the pod template of the replication controller.
|
||||||
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"`
|
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"`
|
||||||
|
|
||||||
|
// The number of ready replicas for this replication controller.
|
||||||
|
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
|
||||||
|
|
||||||
// ObservedGeneration is the most recent generation observed by the controller.
|
// ObservedGeneration is the most recent generation observed by the controller.
|
||||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||||
}
|
}
|
||||||
@ -1704,6 +1807,11 @@ const (
|
|||||||
// external load balancer (if the cloud provider supports it), in addition
|
// external load balancer (if the cloud provider supports it), in addition
|
||||||
// to 'NodePort' type.
|
// to 'NodePort' type.
|
||||||
ServiceTypeLoadBalancer ServiceType = "LoadBalancer"
|
ServiceTypeLoadBalancer ServiceType = "LoadBalancer"
|
||||||
|
|
||||||
|
// ServiceTypeExternalName means a service consists of only a reference to
|
||||||
|
// an external name that kubedns or equivalent will return as a CNAME
|
||||||
|
// record, with no exposing or proxying of any pods involved.
|
||||||
|
ServiceTypeExternalName ServiceType = "ExternalName"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ServiceStatus represents the current status of a service
|
// ServiceStatus represents the current status of a service
|
||||||
@ -1734,24 +1842,49 @@ type LoadBalancerIngress struct {
|
|||||||
|
|
||||||
// ServiceSpec describes the attributes that a user creates on a service
|
// ServiceSpec describes the attributes that a user creates on a service
|
||||||
type ServiceSpec struct {
|
type ServiceSpec struct {
|
||||||
// Type determines how the service will be exposed. Valid options: ClusterIP, NodePort, LoadBalancer
|
// Type determines how the Service is exposed. Defaults to ClusterIP. Valid
|
||||||
|
// options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
|
||||||
|
// "ExternalName" maps to the specified externalName.
|
||||||
|
// "ClusterIP" allocates a cluster-internal IP address for load-balancing to
|
||||||
|
// endpoints. Endpoints are determined by the selector or if that is not
|
||||||
|
// specified, by manual construction of an Endpoints object. If clusterIP is
|
||||||
|
// "None", no virtual IP is allocated and the endpoints are published as a
|
||||||
|
// set of endpoints rather than a stable IP.
|
||||||
|
// "NodePort" builds on ClusterIP and allocates a port on every node which
|
||||||
|
// routes to the clusterIP.
|
||||||
|
// "LoadBalancer" builds on NodePort and creates an
|
||||||
|
// external load-balancer (if supported in the current cloud) which routes
|
||||||
|
// to the clusterIP.
|
||||||
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
|
||||||
Type ServiceType `json:"type,omitempty"`
|
Type ServiceType `json:"type,omitempty"`
|
||||||
|
|
||||||
// Required: The list of ports that are exposed by this service.
|
// Required: The list of ports that are exposed by this service.
|
||||||
Ports []ServicePort `json:"ports"`
|
Ports []ServicePort `json:"ports"`
|
||||||
|
|
||||||
// This service will route traffic to pods having labels matching this selector. If empty or not present,
|
// Route service traffic to pods with label keys and values matching this
|
||||||
// the service is assumed to have endpoints set by an external process and Kubernetes will not modify
|
// selector. If empty or not present, the service is assumed to have an
|
||||||
// those endpoints.
|
// external process managing its endpoints, which Kubernetes will not
|
||||||
|
// modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
|
||||||
|
// Ignored if type is ExternalName.
|
||||||
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
|
||||||
Selector map[string]string `json:"selector"`
|
Selector map[string]string `json:"selector"`
|
||||||
|
|
||||||
// ClusterIP is usually assigned by the master. If specified by the user
|
// ClusterIP is the IP address of the service and is usually assigned
|
||||||
// we will try to respect it or else fail the request. This field can
|
// randomly by the master. If an address is specified manually and is not in
|
||||||
// not be changed by updates.
|
// use by others, it will be allocated to the service; otherwise, creation
|
||||||
// Valid values are None, empty string (""), or a valid IP address
|
// of the service will fail. This field can not be changed through updates.
|
||||||
// None can be specified for headless services when proxying is not required
|
// Valid values are "None", empty string (""), or a valid IP address. "None"
|
||||||
|
// can be specified for headless services when proxying is not required.
|
||||||
|
// Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
|
||||||
|
// type is ExternalName.
|
||||||
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
|
||||||
ClusterIP string `json:"clusterIP,omitempty"`
|
ClusterIP string `json:"clusterIP,omitempty"`
|
||||||
|
|
||||||
|
// ExternalName is the external reference that kubedns or equivalent will
|
||||||
|
// return as a CNAME record for this service. No proxying will be involved.
|
||||||
|
// Must be a valid DNS name and requires Type to be ExternalName.
|
||||||
|
ExternalName string
|
||||||
|
|
||||||
// ExternalIPs are used by external load balancers, or can be set by
|
// ExternalIPs are used by external load balancers, or can be set by
|
||||||
// users to handle external traffic that arrives at a node.
|
// users to handle external traffic that arrives at a node.
|
||||||
ExternalIPs []string `json:"externalIPs,omitempty"`
|
ExternalIPs []string `json:"externalIPs,omitempty"`
|
||||||
|
@ -50,7 +50,7 @@ func (gr GroupResource) WithVersion(version string) GroupVersionResource {
|
|||||||
return GroupVersionResource{Group: gr.Group, Version: version, Resource: gr.Resource}
|
return GroupVersionResource{Group: gr.Group, Version: version, Resource: gr.Resource}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gr GroupResource) IsEmpty() bool {
|
func (gr GroupResource) Empty() bool {
|
||||||
return len(gr.Group) == 0 && len(gr.Resource) == 0
|
return len(gr.Group) == 0 && len(gr.Resource) == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ type GroupVersionResource struct {
|
|||||||
Resource string `protobuf:"bytes,3,opt,name=resource"`
|
Resource string `protobuf:"bytes,3,opt,name=resource"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gvr GroupVersionResource) IsEmpty() bool {
|
func (gvr GroupVersionResource) Empty() bool {
|
||||||
return len(gvr.Group) == 0 && len(gvr.Version) == 0 && len(gvr.Resource) == 0
|
return len(gvr.Group) == 0 && len(gvr.Version) == 0 && len(gvr.Resource) == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ type GroupKind struct {
|
|||||||
Kind string `protobuf:"bytes,2,opt,name=kind"`
|
Kind string `protobuf:"bytes,2,opt,name=kind"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gk GroupKind) IsEmpty() bool {
|
func (gk GroupKind) Empty() bool {
|
||||||
return len(gk.Group) == 0 && len(gk.Kind) == 0
|
return len(gk.Group) == 0 && len(gk.Kind) == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,8 +131,8 @@ type GroupVersionKind struct {
|
|||||||
Kind string `protobuf:"bytes,3,opt,name=kind"`
|
Kind string `protobuf:"bytes,3,opt,name=kind"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsEmpty returns true if group, version, and kind are empty
|
// Empty returns true if group, version, and kind are empty
|
||||||
func (gvk GroupVersionKind) IsEmpty() bool {
|
func (gvk GroupVersionKind) Empty() bool {
|
||||||
return len(gvk.Group) == 0 && len(gvk.Version) == 0 && len(gvk.Kind) == 0
|
return len(gvk.Group) == 0 && len(gvk.Version) == 0 && len(gvk.Kind) == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,8 +156,8 @@ type GroupVersion struct {
|
|||||||
Version string `protobuf:"bytes,2,opt,name=version"`
|
Version string `protobuf:"bytes,2,opt,name=version"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsEmpty returns true if group and version are empty
|
// Empty returns true if group and version are empty
|
||||||
func (gv GroupVersion) IsEmpty() bool {
|
func (gv GroupVersion) Empty() bool {
|
||||||
return len(gv.Group) == 0 && len(gv.Version) == 0
|
return len(gv.Group) == 0 && len(gv.Version) == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ func (gv GroupVersion) IsEmpty() bool {
|
|||||||
// it returns "v1".
|
// it returns "v1".
|
||||||
func (gv GroupVersion) String() string {
|
func (gv GroupVersion) String() string {
|
||||||
// special case the internal apiVersion for the legacy kube types
|
// special case the internal apiVersion for the legacy kube types
|
||||||
if gv.IsEmpty() {
|
if gv.Empty() {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,6 +179,25 @@ func (gv GroupVersion) String() string {
|
|||||||
return gv.Version
|
return gv.Version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false
|
||||||
|
// if none of the options match the group. It prefers a match to group and version over just group.
|
||||||
|
// TODO: Move GroupVersion to a package under pkg/runtime, since it's used by scheme.
|
||||||
|
// TODO: Introduce an adapter type between GroupVersion and runtime.GroupVersioner, and use LegacyCodec(GroupVersion)
|
||||||
|
// in fewer places.
|
||||||
|
func (gv GroupVersion) KindForGroupVersionKinds(kinds []GroupVersionKind) (target GroupVersionKind, ok bool) {
|
||||||
|
for _, gvk := range kinds {
|
||||||
|
if gvk.Group == gv.Group && gvk.Version == gv.Version {
|
||||||
|
return gvk, true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, gvk := range kinds {
|
||||||
|
if gvk.Group == gv.Group {
|
||||||
|
return gv.WithKind(gvk.Kind), true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return GroupVersionKind{}, false
|
||||||
|
}
|
||||||
|
|
||||||
// ParseGroupVersion turns "group/version" string into a GroupVersion struct. It reports error
|
// ParseGroupVersion turns "group/version" string into a GroupVersion struct. It reports error
|
||||||
// if it cannot parse the string.
|
// if it cannot parse the string.
|
||||||
func ParseGroupVersion(gv string) (GroupVersion, error) {
|
func ParseGroupVersion(gv string) (GroupVersion, error) {
|
||||||
@ -241,6 +260,25 @@ func (gv *GroupVersion) UnmarshalText(value []byte) error {
|
|||||||
return gv.unmarshal(value)
|
return gv.unmarshal(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GroupVersions can be used to represent a set of desired group versions.
|
||||||
|
// TODO: Move GroupVersions to a package under pkg/runtime, since it's used by scheme.
|
||||||
|
// TODO: Introduce an adapter type between GroupVersions and runtime.GroupVersioner, and use LegacyCodec(GroupVersion)
|
||||||
|
// in fewer places.
|
||||||
|
type GroupVersions []GroupVersion
|
||||||
|
|
||||||
|
// KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false
|
||||||
|
// if none of the options match the group.
|
||||||
|
func (gvs GroupVersions) KindForGroupVersionKinds(kinds []GroupVersionKind) (target GroupVersionKind, ok bool) {
|
||||||
|
for _, gv := range gvs {
|
||||||
|
target, ok := gv.KindForGroupVersionKinds(kinds)
|
||||||
|
if !ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
return target, true
|
||||||
|
}
|
||||||
|
return GroupVersionKind{}, false
|
||||||
|
}
|
||||||
|
|
||||||
// ToAPIVersionAndKind is a convenience method for satisfying runtime.Object on types that
|
// ToAPIVersionAndKind is a convenience method for satisfying runtime.Object on types that
|
||||||
// do not use TypeMeta.
|
// do not use TypeMeta.
|
||||||
func (gvk *GroupVersionKind) ToAPIVersionAndKind() (string, string) {
|
func (gvk *GroupVersionKind) ToAPIVersionAndKind() (string, string) {
|
||||||
|
@ -20,6 +20,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"k8s.io/client-go/1.4/pkg/labels"
|
"k8s.io/client-go/1.4/pkg/labels"
|
||||||
|
"k8s.io/client-go/1.4/pkg/selection"
|
||||||
"k8s.io/client-go/1.4/pkg/util/sets"
|
"k8s.io/client-go/1.4/pkg/util/sets"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -35,23 +36,23 @@ func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error) {
|
|||||||
}
|
}
|
||||||
selector := labels.NewSelector()
|
selector := labels.NewSelector()
|
||||||
for k, v := range ps.MatchLabels {
|
for k, v := range ps.MatchLabels {
|
||||||
r, err := labels.NewRequirement(k, labels.EqualsOperator, sets.NewString(v))
|
r, err := labels.NewRequirement(k, selection.Equals, sets.NewString(v))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
selector = selector.Add(*r)
|
selector = selector.Add(*r)
|
||||||
}
|
}
|
||||||
for _, expr := range ps.MatchExpressions {
|
for _, expr := range ps.MatchExpressions {
|
||||||
var op labels.Operator
|
var op selection.Operator
|
||||||
switch expr.Operator {
|
switch expr.Operator {
|
||||||
case LabelSelectorOpIn:
|
case LabelSelectorOpIn:
|
||||||
op = labels.InOperator
|
op = selection.In
|
||||||
case LabelSelectorOpNotIn:
|
case LabelSelectorOpNotIn:
|
||||||
op = labels.NotInOperator
|
op = selection.NotIn
|
||||||
case LabelSelectorOpExists:
|
case LabelSelectorOpExists:
|
||||||
op = labels.ExistsOperator
|
op = selection.Exists
|
||||||
case LabelSelectorOpDoesNotExist:
|
case LabelSelectorOpDoesNotExist:
|
||||||
op = labels.DoesNotExistOperator
|
op = selection.DoesNotExist
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("%q is not a valid pod selector operator", expr.Operator)
|
return nil, fmt.Errorf("%q is not a valid pod selector operator", expr.Operator)
|
||||||
}
|
}
|
||||||
@ -108,7 +109,7 @@ func ParseToLabelSelector(selector string) (*LabelSelector, error) {
|
|||||||
for _, req := range reqs {
|
for _, req := range reqs {
|
||||||
var op LabelSelectorOperator
|
var op LabelSelectorOperator
|
||||||
switch req.Operator() {
|
switch req.Operator() {
|
||||||
case labels.EqualsOperator, labels.DoubleEqualsOperator:
|
case selection.Equals, selection.DoubleEquals:
|
||||||
vals := req.Values()
|
vals := req.Values()
|
||||||
if vals.Len() != 1 {
|
if vals.Len() != 1 {
|
||||||
return nil, fmt.Errorf("equals operator must have exactly one value")
|
return nil, fmt.Errorf("equals operator must have exactly one value")
|
||||||
@ -119,15 +120,15 @@ func ParseToLabelSelector(selector string) (*LabelSelector, error) {
|
|||||||
}
|
}
|
||||||
labelSelector.MatchLabels[req.Key()] = val
|
labelSelector.MatchLabels[req.Key()] = val
|
||||||
continue
|
continue
|
||||||
case labels.InOperator:
|
case selection.In:
|
||||||
op = LabelSelectorOpIn
|
op = LabelSelectorOpIn
|
||||||
case labels.NotInOperator:
|
case selection.NotIn:
|
||||||
op = LabelSelectorOpNotIn
|
op = LabelSelectorOpNotIn
|
||||||
case labels.ExistsOperator:
|
case selection.Exists:
|
||||||
op = LabelSelectorOpExists
|
op = LabelSelectorOpExists
|
||||||
case labels.DoesNotExistOperator:
|
case selection.DoesNotExist:
|
||||||
op = LabelSelectorOpDoesNotExist
|
op = LabelSelectorOpDoesNotExist
|
||||||
case labels.GreaterThanOperator, labels.LessThanOperator:
|
case selection.GreaterThan, selection.LessThan:
|
||||||
// Adding a separate case for these operators to indicate that this is deliberate
|
// Adding a separate case for these operators to indicate that this is deliberate
|
||||||
return nil, fmt.Errorf("%q isn't supported in label selectors", req.Operator())
|
return nil, fmt.Errorf("%q isn't supported in label selectors", req.Operator())
|
||||||
default:
|
default:
|
||||||
|
@ -164,7 +164,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
|
// Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
|
||||||
for _, kind := range []string{
|
for _, k := range []string{
|
||||||
"Endpoints",
|
"Endpoints",
|
||||||
"ResourceQuota",
|
"ResourceQuota",
|
||||||
"PersistentVolumeClaim",
|
"PersistentVolumeClaim",
|
||||||
@ -172,6 +172,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
|||||||
"ServiceAccount",
|
"ServiceAccount",
|
||||||
"ConfigMap",
|
"ConfigMap",
|
||||||
} {
|
} {
|
||||||
|
kind := k // don't close over range variables
|
||||||
err = scheme.AddFieldLabelConversionFunc("v1", kind,
|
err = scheme.AddFieldLabelConversionFunc("v1", kind,
|
||||||
func(label, value string) (string, string, error) {
|
func(label, value string) (string, string, error) {
|
||||||
switch label {
|
switch label {
|
||||||
@ -192,14 +193,15 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
|||||||
err = scheme.AddFieldLabelConversionFunc("v1", "Pod",
|
err = scheme.AddFieldLabelConversionFunc("v1", "Pod",
|
||||||
func(label, value string) (string, string, error) {
|
func(label, value string) (string, string, error) {
|
||||||
switch label {
|
switch label {
|
||||||
case "metadata.name",
|
case "metadata.annotations",
|
||||||
"metadata.namespace",
|
|
||||||
"metadata.labels",
|
"metadata.labels",
|
||||||
"metadata.annotations",
|
"metadata.name",
|
||||||
"status.phase",
|
"metadata.namespace",
|
||||||
"status.podIP",
|
|
||||||
"spec.nodeName",
|
"spec.nodeName",
|
||||||
"spec.restartPolicy":
|
"spec.restartPolicy",
|
||||||
|
"spec.serviceAccountName",
|
||||||
|
"status.phase",
|
||||||
|
"status.podIP":
|
||||||
return label, value, nil
|
return label, value, nil
|
||||||
// This is for backwards compatibility with old v1 clients which send spec.host
|
// This is for backwards compatibility with old v1 clients which send spec.host
|
||||||
case "spec.host":
|
case "spec.host":
|
||||||
@ -419,7 +421,7 @@ func Convert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error {
|
func Convert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error {
|
||||||
// TODO: when we move init container to beta, remove these conversions
|
// TODO: sometime after we move init container to stable, remove these conversions
|
||||||
if value, ok := in.Annotations[PodInitContainerStatusesAnnotationKey]; ok {
|
if value, ok := in.Annotations[PodInitContainerStatusesAnnotationKey]; ok {
|
||||||
var values []ContainerStatus
|
var values []ContainerStatus
|
||||||
if err := json.Unmarshal([]byte(value), &values); err != nil {
|
if err := json.Unmarshal([]byte(value), &values); err != nil {
|
||||||
@ -453,7 +455,7 @@ func Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in *api.PodTemplateSpec,
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: when we move init container to beta, remove these conversions
|
// TODO: sometime after we move init container to stable, remove these conversions.
|
||||||
if old := out.Annotations; old != nil {
|
if old := out.Annotations; old != nil {
|
||||||
out.Annotations = make(map[string]string, len(old))
|
out.Annotations = make(map[string]string, len(old))
|
||||||
for k, v := range old {
|
for k, v := range old {
|
||||||
@ -469,14 +471,22 @@ func Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in *api.PodTemplateSpec,
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
out.Annotations[PodInitContainersAnnotationKey] = string(value)
|
out.Annotations[PodInitContainersAnnotationKey] = string(value)
|
||||||
|
out.Annotations[PodInitContainersBetaAnnotationKey] = string(value)
|
||||||
} else {
|
} else {
|
||||||
delete(out.Annotations, PodInitContainersAnnotationKey)
|
delete(out.Annotations, PodInitContainersAnnotationKey)
|
||||||
|
delete(out.Annotations, PodInitContainersBetaAnnotationKey)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out *api.PodTemplateSpec, s conversion.Scope) error {
|
func Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out *api.PodTemplateSpec, s conversion.Scope) error {
|
||||||
// TODO: when we move init container to beta, remove these conversions
|
// TODO: sometime after we move init container to stable, remove these conversions
|
||||||
|
// If there is a beta annotation, copy to alpha key.
|
||||||
|
// See commit log for PR #31026 for why we do this.
|
||||||
|
if valueBeta, okBeta := in.Annotations[PodInitContainersBetaAnnotationKey]; okBeta {
|
||||||
|
in.Annotations[PodInitContainersAnnotationKey] = valueBeta
|
||||||
|
}
|
||||||
|
// Move the annotation to the internal repr. field
|
||||||
if value, ok := in.Annotations[PodInitContainersAnnotationKey]; ok {
|
if value, ok := in.Annotations[PodInitContainersAnnotationKey]; ok {
|
||||||
var values []Container
|
var values []Container
|
||||||
if err := json.Unmarshal([]byte(value), &values); err != nil {
|
if err := json.Unmarshal([]byte(value), &values); err != nil {
|
||||||
@ -501,6 +511,7 @@ func Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out
|
|||||||
out.Annotations[k] = v
|
out.Annotations[k] = v
|
||||||
}
|
}
|
||||||
delete(out.Annotations, PodInitContainersAnnotationKey)
|
delete(out.Annotations, PodInitContainersAnnotationKey)
|
||||||
|
delete(out.Annotations, PodInitContainersBetaAnnotationKey)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -554,7 +565,7 @@ func Convert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: when we move init container to beta, remove these conversions
|
// TODO: sometime after we move init container to stable, remove these conversions
|
||||||
if len(out.Spec.InitContainers) > 0 || len(out.Status.InitContainerStatuses) > 0 {
|
if len(out.Spec.InitContainers) > 0 || len(out.Status.InitContainerStatuses) > 0 {
|
||||||
old := out.Annotations
|
old := out.Annotations
|
||||||
out.Annotations = make(map[string]string, len(old))
|
out.Annotations = make(map[string]string, len(old))
|
||||||
@ -562,6 +573,7 @@ func Convert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error
|
|||||||
out.Annotations[k] = v
|
out.Annotations[k] = v
|
||||||
}
|
}
|
||||||
delete(out.Annotations, PodInitContainersAnnotationKey)
|
delete(out.Annotations, PodInitContainersAnnotationKey)
|
||||||
|
delete(out.Annotations, PodInitContainersBetaAnnotationKey)
|
||||||
delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
|
delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
|
||||||
}
|
}
|
||||||
if len(out.Spec.InitContainers) > 0 {
|
if len(out.Spec.InitContainers) > 0 {
|
||||||
@ -570,6 +582,7 @@ func Convert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
out.Annotations[PodInitContainersAnnotationKey] = string(value)
|
out.Annotations[PodInitContainersAnnotationKey] = string(value)
|
||||||
|
out.Annotations[PodInitContainersBetaAnnotationKey] = string(value)
|
||||||
}
|
}
|
||||||
if len(out.Status.InitContainerStatuses) > 0 {
|
if len(out.Status.InitContainerStatuses) > 0 {
|
||||||
value, err := json.Marshal(out.Status.InitContainerStatuses)
|
value, err := json.Marshal(out.Status.InitContainerStatuses)
|
||||||
@ -594,7 +607,13 @@ func Convert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Convert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error {
|
func Convert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error {
|
||||||
// TODO: when we move init container to beta, remove these conversions
|
// If there is a beta annotation, copy to alpha key.
|
||||||
|
// See commit log for PR #31026 for why we do this.
|
||||||
|
if valueBeta, okBeta := in.Annotations[PodInitContainersBetaAnnotationKey]; okBeta {
|
||||||
|
in.Annotations[PodInitContainersAnnotationKey] = valueBeta
|
||||||
|
}
|
||||||
|
// TODO: sometime after we move init container to stable, remove these conversions
|
||||||
|
// Move the annotation to the internal repr. field
|
||||||
if value, ok := in.Annotations[PodInitContainersAnnotationKey]; ok {
|
if value, ok := in.Annotations[PodInitContainersAnnotationKey]; ok {
|
||||||
var values []Container
|
var values []Container
|
||||||
if err := json.Unmarshal([]byte(value), &values); err != nil {
|
if err := json.Unmarshal([]byte(value), &values); err != nil {
|
||||||
@ -632,6 +651,7 @@ func Convert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error
|
|||||||
out.Annotations[k] = v
|
out.Annotations[k] = v
|
||||||
}
|
}
|
||||||
delete(out.Annotations, PodInitContainersAnnotationKey)
|
delete(out.Annotations, PodInitContainersAnnotationKey)
|
||||||
|
delete(out.Annotations, PodInitContainersBetaAnnotationKey)
|
||||||
delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
|
delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -35,6 +35,9 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error {
|
|||||||
SetDefaults_Pod,
|
SetDefaults_Pod,
|
||||||
SetDefaults_PodSpec,
|
SetDefaults_PodSpec,
|
||||||
SetDefaults_Probe,
|
SetDefaults_Probe,
|
||||||
|
SetDefaults_SecretVolumeSource,
|
||||||
|
SetDefaults_ConfigMapVolumeSource,
|
||||||
|
SetDefaults_DownwardAPIVolumeSource,
|
||||||
SetDefaults_Secret,
|
SetDefaults_Secret,
|
||||||
SetDefaults_PersistentVolume,
|
SetDefaults_PersistentVolume,
|
||||||
SetDefaults_PersistentVolumeClaim,
|
SetDefaults_PersistentVolumeClaim,
|
||||||
@ -174,6 +177,24 @@ func SetDefaults_Probe(obj *Probe) {
|
|||||||
obj.FailureThreshold = 3
|
obj.FailureThreshold = 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
func SetDefaults_SecretVolumeSource(obj *SecretVolumeSource) {
|
||||||
|
if obj.DefaultMode == nil {
|
||||||
|
perm := int32(SecretVolumeSourceDefaultMode)
|
||||||
|
obj.DefaultMode = &perm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func SetDefaults_ConfigMapVolumeSource(obj *ConfigMapVolumeSource) {
|
||||||
|
if obj.DefaultMode == nil {
|
||||||
|
perm := int32(ConfigMapVolumeSourceDefaultMode)
|
||||||
|
obj.DefaultMode = &perm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func SetDefaults_DownwardAPIVolumeSource(obj *DownwardAPIVolumeSource) {
|
||||||
|
if obj.DefaultMode == nil {
|
||||||
|
perm := int32(DownwardAPIVolumeSourceDefaultMode)
|
||||||
|
obj.DefaultMode = &perm
|
||||||
|
}
|
||||||
|
}
|
||||||
func SetDefaults_Secret(obj *Secret) {
|
func SetDefaults_Secret(obj *Secret) {
|
||||||
if obj.Type == "" {
|
if obj.Type == "" {
|
||||||
obj.Type = SecretTypeOpaque
|
obj.Type = SecretTypeOpaque
|
||||||
@ -197,6 +218,20 @@ func SetDefaults_ISCSIVolumeSource(obj *ISCSIVolumeSource) {
|
|||||||
obj.ISCSIInterface = "default"
|
obj.ISCSIInterface = "default"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
func SetDefaults_AzureDiskVolumeSource(obj *AzureDiskVolumeSource) {
|
||||||
|
if obj.CachingMode == nil {
|
||||||
|
obj.CachingMode = new(AzureDataDiskCachingMode)
|
||||||
|
*obj.CachingMode = AzureDataDiskCachingNone
|
||||||
|
}
|
||||||
|
if obj.FSType == nil {
|
||||||
|
obj.FSType = new(string)
|
||||||
|
*obj.FSType = "ext4"
|
||||||
|
}
|
||||||
|
if obj.ReadOnly == nil {
|
||||||
|
obj.ReadOnly = new(bool)
|
||||||
|
*obj.ReadOnly = false
|
||||||
|
}
|
||||||
|
}
|
||||||
func SetDefaults_Endpoints(obj *Endpoints) {
|
func SetDefaults_Endpoints(obj *Endpoints) {
|
||||||
for i := range obj.Subsets {
|
for i := range obj.Subsets {
|
||||||
ss := &obj.Subsets[i]
|
ss := &obj.Subsets[i]
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -89,6 +89,27 @@ message AvoidPods {
|
|||||||
repeated PreferAvoidPodsEntry preferAvoidPods = 1;
|
repeated PreferAvoidPodsEntry preferAvoidPods = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
|
message AzureDiskVolumeSource {
|
||||||
|
// The Name of the data disk in the blob storage
|
||||||
|
optional string diskName = 1;
|
||||||
|
|
||||||
|
// The URI the data disk in the blob storage
|
||||||
|
optional string diskURI = 2;
|
||||||
|
|
||||||
|
// Host Caching mode: None, Read Only, Read Write.
|
||||||
|
optional string cachingMode = 3;
|
||||||
|
|
||||||
|
// Filesystem type to mount.
|
||||||
|
// Must be a filesystem type supported by the host operating system.
|
||||||
|
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
|
||||||
|
optional string fsType = 4;
|
||||||
|
|
||||||
|
// Defaults to false (read/write). ReadOnly here will force
|
||||||
|
// the ReadOnly setting in VolumeMounts.
|
||||||
|
optional bool readOnly = 5;
|
||||||
|
}
|
||||||
|
|
||||||
// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
|
// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
|
||||||
message AzureFileVolumeSource {
|
message AzureFileVolumeSource {
|
||||||
// the name of secret that contains Azure Storage Account Name and Key
|
// the name of secret that contains Azure Storage Account Name and Key
|
||||||
@ -256,6 +277,13 @@ message ConfigMapVolumeSource {
|
|||||||
// the volume setup will error. Paths must be relative and may not contain
|
// the volume setup will error. Paths must be relative and may not contain
|
||||||
// the '..' path or start with '..'.
|
// the '..' path or start with '..'.
|
||||||
repeated KeyToPath items = 2;
|
repeated KeyToPath items = 2;
|
||||||
|
|
||||||
|
// Optional: mode bits to use on created files by default. Must be a
|
||||||
|
// value between 0 and 0777. Defaults to 0644.
|
||||||
|
// Directories within the path are not affected by this setting.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
optional int32 defaultMode = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// A single application container that you want to run within a pod.
|
// A single application container that you want to run within a pod.
|
||||||
@ -526,6 +554,12 @@ message DownwardAPIVolumeFile {
|
|||||||
// Selects a resource of the container: only resources limits and requests
|
// Selects a resource of the container: only resources limits and requests
|
||||||
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
|
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
|
||||||
optional ResourceFieldSelector resourceFieldRef = 3;
|
optional ResourceFieldSelector resourceFieldRef = 3;
|
||||||
|
|
||||||
|
// Optional: mode bits to use on this file, must be a value between 0
|
||||||
|
// and 0777. If not specified, the volume defaultMode will be used.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
optional int32 mode = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DownwardAPIVolumeSource represents a volume containing downward API info.
|
// DownwardAPIVolumeSource represents a volume containing downward API info.
|
||||||
@ -533,6 +567,13 @@ message DownwardAPIVolumeFile {
|
|||||||
message DownwardAPIVolumeSource {
|
message DownwardAPIVolumeSource {
|
||||||
// Items is a list of downward API volume file
|
// Items is a list of downward API volume file
|
||||||
repeated DownwardAPIVolumeFile items = 1;
|
repeated DownwardAPIVolumeFile items = 1;
|
||||||
|
|
||||||
|
// Optional: mode bits to use on created files by default. Must be a
|
||||||
|
// value between 0 and 0777. Defaults to 0644.
|
||||||
|
// Directories within the path are not affected by this setting.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
optional int32 defaultMode = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Represents an empty directory for a pod.
|
// Represents an empty directory for a pod.
|
||||||
@ -663,7 +704,8 @@ message EnvVar {
|
|||||||
|
|
||||||
// EnvVarSource represents a source for the value of an EnvVar.
|
// EnvVarSource represents a source for the value of an EnvVar.
|
||||||
message EnvVarSource {
|
message EnvVarSource {
|
||||||
// Selects a field of the pod; only name and namespace are supported.
|
// Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
|
||||||
|
// spec.nodeName, spec.serviceAccountName, status.podIP.
|
||||||
optional ObjectFieldSelector fieldRef = 1;
|
optional ObjectFieldSelector fieldRef = 1;
|
||||||
|
|
||||||
// Selects a resource of the container: only resources limits and requests
|
// Selects a resource of the container: only resources limits and requests
|
||||||
@ -963,6 +1005,12 @@ message KeyToPath {
|
|||||||
// May not contain the path element '..'.
|
// May not contain the path element '..'.
|
||||||
// May not start with the string '..'.
|
// May not start with the string '..'.
|
||||||
optional string path = 2;
|
optional string path = 2;
|
||||||
|
|
||||||
|
// Optional: mode bits to use on this file, must be a value between 0
|
||||||
|
// and 0777. If not specified, the volume defaultMode will be used.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
optional int32 mode = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lifecycle describes actions that the management system should take in response to container lifecycle
|
// Lifecycle describes actions that the management system should take in response to container lifecycle
|
||||||
@ -1479,7 +1527,6 @@ message ObjectMeta {
|
|||||||
// (scope and select) objects. May match selectors of replication controllers
|
// (scope and select) objects. May match selectors of replication controllers
|
||||||
// and services.
|
// and services.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md
|
||||||
// TODO: replace map[string]string with labels.LabelSet type
|
|
||||||
map<string, string> labels = 11;
|
map<string, string> labels = 11;
|
||||||
|
|
||||||
// Annotations is an unstructured key value map stored with a resource that may be
|
// Annotations is an unstructured key value map stored with a resource that may be
|
||||||
@ -1499,6 +1546,11 @@ message ObjectMeta {
|
|||||||
// from the list. If the deletionTimestamp of the object is non-nil, entries
|
// from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||||
// in this list can only be removed.
|
// in this list can only be removed.
|
||||||
repeated string finalizers = 14;
|
repeated string finalizers = 14;
|
||||||
|
|
||||||
|
// The name of the cluster which the object belongs to.
|
||||||
|
// This is used to distinguish resources with same name and namespace in different clusters.
|
||||||
|
// This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
|
||||||
|
optional string clusterName = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ObjectReference contains enough information to let you inspect or modify the referred object.
|
// ObjectReference contains enough information to let you inspect or modify the referred object.
|
||||||
@ -1723,6 +1775,12 @@ message PersistentVolumeSource {
|
|||||||
|
|
||||||
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
||||||
optional VsphereVirtualDiskVolumeSource vsphereVolume = 14;
|
optional VsphereVirtualDiskVolumeSource vsphereVolume = 14;
|
||||||
|
|
||||||
|
// Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
|
||||||
|
optional QuobyteVolumeSource quobyte = 15;
|
||||||
|
|
||||||
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
|
optional AzureDiskVolumeSource azureDisk = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PersistentVolumeSpec is the specification of a persistent volume.
|
// PersistentVolumeSpec is the specification of a persistent volume.
|
||||||
@ -2292,6 +2350,30 @@ message Probe {
|
|||||||
optional int32 failureThreshold = 6;
|
optional int32 failureThreshold = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Represents a Quobyte mount that lasts the lifetime of a pod.
|
||||||
|
// Quobyte volumes do not support ownership management or SELinux relabeling.
|
||||||
|
message QuobyteVolumeSource {
|
||||||
|
// Registry represents a single or multiple Quobyte Registry services
|
||||||
|
// specified as a string as host:port pair (multiple entries are separated with commas)
|
||||||
|
// which acts as the central registry for volumes
|
||||||
|
optional string registry = 1;
|
||||||
|
|
||||||
|
// Volume is a string that references an already created Quobyte volume by name.
|
||||||
|
optional string volume = 2;
|
||||||
|
|
||||||
|
// ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.
|
||||||
|
// Defaults to false.
|
||||||
|
optional bool readOnly = 3;
|
||||||
|
|
||||||
|
// User to map volume access to
|
||||||
|
// Defaults to serivceaccount user
|
||||||
|
optional string user = 4;
|
||||||
|
|
||||||
|
// Group to map volume access to
|
||||||
|
// Default is no group
|
||||||
|
optional string group = 5;
|
||||||
|
}
|
||||||
|
|
||||||
// Represents a Rados Block Device mount that lasts the lifetime of a pod.
|
// Represents a Rados Block Device mount that lasts the lifetime of a pod.
|
||||||
// RBD volumes support ownership management and SELinux relabeling.
|
// RBD volumes support ownership management and SELinux relabeling.
|
||||||
message RBDVolumeSource {
|
message RBDVolumeSource {
|
||||||
@ -2411,6 +2493,9 @@ message ReplicationControllerStatus {
|
|||||||
// The number of pods that have labels matching the labels of the pod template of the replication controller.
|
// The number of pods that have labels matching the labels of the pod template of the replication controller.
|
||||||
optional int32 fullyLabeledReplicas = 2;
|
optional int32 fullyLabeledReplicas = 2;
|
||||||
|
|
||||||
|
// The number of ready replicas for this replication controller.
|
||||||
|
optional int32 readyReplicas = 4;
|
||||||
|
|
||||||
// ObservedGeneration reflects the generation of the most recently observed replication controller.
|
// ObservedGeneration reflects the generation of the most recently observed replication controller.
|
||||||
optional int64 observedGeneration = 3;
|
optional int64 observedGeneration = 3;
|
||||||
}
|
}
|
||||||
@ -2477,13 +2562,13 @@ message ResourceQuotaStatus {
|
|||||||
// ResourceRequirements describes the compute resource requirements.
|
// ResourceRequirements describes the compute resource requirements.
|
||||||
message ResourceRequirements {
|
message ResourceRequirements {
|
||||||
// Limits describes the maximum amount of compute resources allowed.
|
// Limits describes the maximum amount of compute resources allowed.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications
|
// More info: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||||
map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> limits = 1;
|
map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> limits = 1;
|
||||||
|
|
||||||
// Requests describes the minimum amount of compute resources required.
|
// Requests describes the minimum amount of compute resources required.
|
||||||
// If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
|
// If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
|
||||||
// otherwise to an implementation-defined value.
|
// otherwise to an implementation-defined value.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications
|
// More info: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||||
map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> requests = 2;
|
map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> requests = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2565,6 +2650,13 @@ message SecretVolumeSource {
|
|||||||
// the volume setup will error. Paths must be relative and may not contain
|
// the volume setup will error. Paths must be relative and may not contain
|
||||||
// the '..' path or start with '..'.
|
// the '..' path or start with '..'.
|
||||||
repeated KeyToPath items = 2;
|
repeated KeyToPath items = 2;
|
||||||
|
|
||||||
|
// Optional: mode bits to use on created files by default. Must be a
|
||||||
|
// value between 0 and 0777. Defaults to 0644.
|
||||||
|
// Directories within the path are not affected by this setting.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
optional int32 defaultMode = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SecurityContext holds security configuration that will be applied to a container.
|
// SecurityContext holds security configuration that will be applied to a container.
|
||||||
@ -2720,24 +2812,39 @@ message ServiceSpec {
|
|||||||
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
|
||||||
repeated ServicePort ports = 1;
|
repeated ServicePort ports = 1;
|
||||||
|
|
||||||
// This service will route traffic to pods having labels matching this selector.
|
// Route service traffic to pods with label keys and values matching this
|
||||||
// Label keys and values that must match in order to receive traffic for this service.
|
// selector. If empty or not present, the service is assumed to have an
|
||||||
// If not specified, endpoints must be manually specified and the system will not automatically manage them.
|
// external process managing its endpoints, which Kubernetes will not
|
||||||
|
// modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
|
||||||
|
// Ignored if type is ExternalName.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
|
||||||
map<string, string> selector = 2;
|
map<string, string> selector = 2;
|
||||||
|
|
||||||
// ClusterIP is usually assigned by the master and is the IP address of the service.
|
// clusterIP is the IP address of the service and is usually assigned
|
||||||
// If specified, it will be allocated to the service if it is unused
|
// randomly by the master. If an address is specified manually and is not in
|
||||||
// or else creation of the service will fail.
|
// use by others, it will be allocated to the service; otherwise, creation
|
||||||
// Valid values are None, empty string (""), or a valid IP address.
|
// of the service will fail. This field can not be changed through updates.
|
||||||
// 'None' can be specified for a headless service when proxying is not required.
|
// Valid values are "None", empty string (""), or a valid IP address. "None"
|
||||||
// Cannot be updated.
|
// can be specified for headless services when proxying is not required.
|
||||||
|
// Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
|
||||||
|
// type is ExternalName.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
|
||||||
optional string clusterIP = 3;
|
optional string clusterIP = 3;
|
||||||
|
|
||||||
// Type of exposed service. Must be ClusterIP, NodePort, or LoadBalancer.
|
// type determines how the Service is exposed. Defaults to ClusterIP. Valid
|
||||||
// Defaults to ClusterIP.
|
// options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#external-services
|
// "ExternalName" maps to the specified externalName.
|
||||||
|
// "ClusterIP" allocates a cluster-internal IP address for load-balancing to
|
||||||
|
// endpoints. Endpoints are determined by the selector or if that is not
|
||||||
|
// specified, by manual construction of an Endpoints object. If clusterIP is
|
||||||
|
// "None", no virtual IP is allocated and the endpoints are published as a
|
||||||
|
// set of endpoints rather than a stable IP.
|
||||||
|
// "NodePort" builds on ClusterIP and allocates a port on every node which
|
||||||
|
// routes to the clusterIP.
|
||||||
|
// "LoadBalancer" builds on NodePort and creates an
|
||||||
|
// external load-balancer (if supported in the current cloud) which routes
|
||||||
|
// to the clusterIP.
|
||||||
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
|
||||||
optional string type = 4;
|
optional string type = 4;
|
||||||
|
|
||||||
// externalIPs is a list of IP addresses for which nodes in the cluster
|
// externalIPs is a list of IP addresses for which nodes in the cluster
|
||||||
@ -2776,6 +2883,11 @@ message ServiceSpec {
|
|||||||
// cloud-provider does not support the feature."
|
// cloud-provider does not support the feature."
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md
|
||||||
repeated string loadBalancerSourceRanges = 9;
|
repeated string loadBalancerSourceRanges = 9;
|
||||||
|
|
||||||
|
// externalName is the external reference that kubedns or equivalent will
|
||||||
|
// return as a CNAME record for this service. No proxying will be involved.
|
||||||
|
// Must be a valid DNS name and requires Type to be ExternalName.
|
||||||
|
optional string externalName = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ServiceStatus represents the current status of a service.
|
// ServiceStatus represents the current status of a service.
|
||||||
@ -2945,6 +3057,12 @@ message VolumeSource {
|
|||||||
|
|
||||||
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
||||||
optional VsphereVirtualDiskVolumeSource vsphereVolume = 20;
|
optional VsphereVirtualDiskVolumeSource vsphereVolume = 20;
|
||||||
|
|
||||||
|
// Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
|
||||||
|
optional QuobyteVolumeSource quobyte = 21;
|
||||||
|
|
||||||
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
|
optional AzureDiskVolumeSource azureDisk = 22;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Represents a vSphere volume resource.
|
// Represents a vSphere volume resource.
|
||||||
|
@ -83,3 +83,10 @@ func (meta *ObjectMeta) SetOwnerReferences(references []metatypes.OwnerReference
|
|||||||
}
|
}
|
||||||
meta.OwnerReferences = newReferences
|
meta.OwnerReferences = newReferences
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (meta *ObjectMeta) GetClusterName() string {
|
||||||
|
return meta.ClusterName
|
||||||
|
}
|
||||||
|
func (meta *ObjectMeta) SetClusterName(clusterName string) {
|
||||||
|
meta.ClusterName = clusterName
|
||||||
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -167,7 +167,6 @@ type ObjectMeta struct {
|
|||||||
// (scope and select) objects. May match selectors of replication controllers
|
// (scope and select) objects. May match selectors of replication controllers
|
||||||
// and services.
|
// and services.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md
|
||||||
// TODO: replace map[string]string with labels.LabelSet type
|
|
||||||
Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`
|
Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`
|
||||||
|
|
||||||
// Annotations is an unstructured key value map stored with a resource that may be
|
// Annotations is an unstructured key value map stored with a resource that may be
|
||||||
@ -187,6 +186,11 @@ type ObjectMeta struct {
|
|||||||
// from the list. If the deletionTimestamp of the object is non-nil, entries
|
// from the list. If the deletionTimestamp of the object is non-nil, entries
|
||||||
// in this list can only be removed.
|
// in this list can only be removed.
|
||||||
Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"`
|
Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"`
|
||||||
|
|
||||||
|
// The name of the cluster which the object belongs to.
|
||||||
|
// This is used to distinguish resources with same name and namespace in different clusters.
|
||||||
|
// This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
|
||||||
|
ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"`
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -260,13 +264,10 @@ type VolumeSource struct {
|
|||||||
// Cinder represents a cinder volume attached and mounted on kubelets host machine
|
// Cinder represents a cinder volume attached and mounted on kubelets host machine
|
||||||
// More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
|
// More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
|
||||||
Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,13,opt,name=cinder"`
|
Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,13,opt,name=cinder"`
|
||||||
|
|
||||||
// CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
|
// CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
|
||||||
CephFS *CephFSVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,14,opt,name=cephfs"`
|
CephFS *CephFSVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,14,opt,name=cephfs"`
|
||||||
|
|
||||||
// Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
|
// Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
|
||||||
Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,15,opt,name=flocker"`
|
Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,15,opt,name=flocker"`
|
||||||
|
|
||||||
// DownwardAPI represents downward API about the pod that should populate this volume
|
// DownwardAPI represents downward API about the pod that should populate this volume
|
||||||
DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty" protobuf:"bytes,16,opt,name=downwardAPI"`
|
DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty" protobuf:"bytes,16,opt,name=downwardAPI"`
|
||||||
// FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
|
// FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
|
||||||
@ -277,6 +278,10 @@ type VolumeSource struct {
|
|||||||
ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty" protobuf:"bytes,19,opt,name=configMap"`
|
ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty" protobuf:"bytes,19,opt,name=configMap"`
|
||||||
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
||||||
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,20,opt,name=vsphereVolume"`
|
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,20,opt,name=vsphereVolume"`
|
||||||
|
// Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
|
||||||
|
Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,21,opt,name=quobyte"`
|
||||||
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
|
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,22,opt,name=azureDisk"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
|
// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
|
||||||
@ -339,6 +344,10 @@ type PersistentVolumeSource struct {
|
|||||||
AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,13,opt,name=azureFile"`
|
AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,13,opt,name=azureFile"`
|
||||||
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
||||||
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,14,opt,name=vsphereVolume"`
|
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,14,opt,name=vsphereVolume"`
|
||||||
|
// Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
|
||||||
|
Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,15,opt,name=quobyte"`
|
||||||
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
|
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,16,opt,name=azureDisk"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +genclient=true
|
// +genclient=true
|
||||||
@ -689,6 +698,30 @@ type GCEPersistentDiskVolumeSource struct {
|
|||||||
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
|
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Represents a Quobyte mount that lasts the lifetime of a pod.
|
||||||
|
// Quobyte volumes do not support ownership management or SELinux relabeling.
|
||||||
|
type QuobyteVolumeSource struct {
|
||||||
|
// Registry represents a single or multiple Quobyte Registry services
|
||||||
|
// specified as a string as host:port pair (multiple entries are separated with commas)
|
||||||
|
// which acts as the central registry for volumes
|
||||||
|
Registry string `json:"registry" protobuf:"bytes,1,opt,name=registry"`
|
||||||
|
|
||||||
|
// Volume is a string that references an already created Quobyte volume by name.
|
||||||
|
Volume string `json:"volume" protobuf:"bytes,2,opt,name=volume"`
|
||||||
|
|
||||||
|
// ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.
|
||||||
|
// Defaults to false.
|
||||||
|
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
|
||||||
|
|
||||||
|
// User to map volume access to
|
||||||
|
// Defaults to serivceaccount user
|
||||||
|
User string `json:"user,omitempty" protobuf:"bytes,4,opt,name=user"`
|
||||||
|
|
||||||
|
// Group to map volume access to
|
||||||
|
// Default is no group
|
||||||
|
Group string `json:"group,omitempty" protobuf:"bytes,5,opt,name=group"`
|
||||||
|
}
|
||||||
|
|
||||||
// FlexVolume represents a generic volume resource that is
|
// FlexVolume represents a generic volume resource that is
|
||||||
// provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.
|
// provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.
|
||||||
type FlexVolumeSource struct {
|
type FlexVolumeSource struct {
|
||||||
@ -770,8 +803,18 @@ type SecretVolumeSource struct {
|
|||||||
// the volume setup will error. Paths must be relative and may not contain
|
// the volume setup will error. Paths must be relative and may not contain
|
||||||
// the '..' path or start with '..'.
|
// the '..' path or start with '..'.
|
||||||
Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
|
Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
|
||||||
|
// Optional: mode bits to use on created files by default. Must be a
|
||||||
|
// value between 0 and 0777. Defaults to 0644.
|
||||||
|
// Directories within the path are not affected by this setting.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"bytes,3,opt,name=defaultMode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
SecretVolumeSourceDefaultMode int32 = 0644
|
||||||
|
)
|
||||||
|
|
||||||
// Represents an NFS mount that lasts the lifetime of a pod.
|
// Represents an NFS mount that lasts the lifetime of a pod.
|
||||||
// NFS volumes do not support ownership management or SELinux relabeling.
|
// NFS volumes do not support ownership management or SELinux relabeling.
|
||||||
type NFSVolumeSource struct {
|
type NFSVolumeSource struct {
|
||||||
@ -852,6 +895,30 @@ type VsphereVirtualDiskVolumeSource struct {
|
|||||||
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
|
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
|
||||||
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
|
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
|
||||||
}
|
}
|
||||||
|
type AzureDataDiskCachingMode string
|
||||||
|
|
||||||
|
const (
|
||||||
|
AzureDataDiskCachingNone AzureDataDiskCachingMode = "None"
|
||||||
|
AzureDataDiskCachingReadOnly AzureDataDiskCachingMode = "ReadOnly"
|
||||||
|
AzureDataDiskCachingReadWrite AzureDataDiskCachingMode = "ReadWrite"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
|
type AzureDiskVolumeSource struct {
|
||||||
|
// The Name of the data disk in the blob storage
|
||||||
|
DiskName string `json:"diskName" protobuf:"bytes,1,opt,name=diskName"`
|
||||||
|
// The URI the data disk in the blob storage
|
||||||
|
DataDiskURI string `json:"diskURI" protobuf:"bytes,2,opt,name=diskURI"`
|
||||||
|
// Host Caching mode: None, Read Only, Read Write.
|
||||||
|
CachingMode *AzureDataDiskCachingMode `json:"cachingMode,omitempty" protobuf:"bytes,3,opt,name=cachingMode,casttype=AzureDataDiskCachingMode"`
|
||||||
|
// Filesystem type to mount.
|
||||||
|
// Must be a filesystem type supported by the host operating system.
|
||||||
|
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
|
||||||
|
FSType *string `json:"fsType,omitempty" protobuf:"bytes,4,opt,name=fsType"`
|
||||||
|
// Defaults to false (read/write). ReadOnly here will force
|
||||||
|
// the ReadOnly setting in VolumeMounts.
|
||||||
|
ReadOnly *bool `json:"readOnly,omitempty" protobuf:"varint,5,opt,name=readOnly"`
|
||||||
|
}
|
||||||
|
|
||||||
// Adapts a ConfigMap into a volume.
|
// Adapts a ConfigMap into a volume.
|
||||||
//
|
//
|
||||||
@ -869,8 +936,18 @@ type ConfigMapVolumeSource struct {
|
|||||||
// the volume setup will error. Paths must be relative and may not contain
|
// the volume setup will error. Paths must be relative and may not contain
|
||||||
// the '..' path or start with '..'.
|
// the '..' path or start with '..'.
|
||||||
Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
|
Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
|
||||||
|
// Optional: mode bits to use on created files by default. Must be a
|
||||||
|
// value between 0 and 0777. Defaults to 0644.
|
||||||
|
// Directories within the path are not affected by this setting.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,3,opt,name=defaultMode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
ConfigMapVolumeSourceDefaultMode int32 = 0644
|
||||||
|
)
|
||||||
|
|
||||||
// Maps a string key to a path within a volume.
|
// Maps a string key to a path within a volume.
|
||||||
type KeyToPath struct {
|
type KeyToPath struct {
|
||||||
// The key to project.
|
// The key to project.
|
||||||
@ -881,6 +958,11 @@ type KeyToPath struct {
|
|||||||
// May not contain the path element '..'.
|
// May not contain the path element '..'.
|
||||||
// May not start with the string '..'.
|
// May not start with the string '..'.
|
||||||
Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
|
Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
|
||||||
|
// Optional: mode bits to use on this file, must be a value between 0
|
||||||
|
// and 0777. If not specified, the volume defaultMode will be used.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
Mode *int32 `json:"mode,omitempty" protobuf:"varint,3,opt,name=mode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContainerPort represents a network port in a single container.
|
// ContainerPort represents a network port in a single container.
|
||||||
@ -941,7 +1023,8 @@ type EnvVar struct {
|
|||||||
|
|
||||||
// EnvVarSource represents a source for the value of an EnvVar.
|
// EnvVarSource represents a source for the value of an EnvVar.
|
||||||
type EnvVarSource struct {
|
type EnvVarSource struct {
|
||||||
// Selects a field of the pod; only name and namespace are supported.
|
// Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
|
||||||
|
// spec.nodeName, spec.serviceAccountName, status.podIP.
|
||||||
FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,1,opt,name=fieldRef"`
|
FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,1,opt,name=fieldRef"`
|
||||||
// Selects a resource of the container: only resources limits and requests
|
// Selects a resource of the container: only resources limits and requests
|
||||||
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
|
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
|
||||||
@ -1089,12 +1172,12 @@ type Capabilities struct {
|
|||||||
// ResourceRequirements describes the compute resource requirements.
|
// ResourceRequirements describes the compute resource requirements.
|
||||||
type ResourceRequirements struct {
|
type ResourceRequirements struct {
|
||||||
// Limits describes the maximum amount of compute resources allowed.
|
// Limits describes the maximum amount of compute resources allowed.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications
|
// More info: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||||
Limits ResourceList `json:"limits,omitempty" protobuf:"bytes,1,rep,name=limits,casttype=ResourceList,castkey=ResourceName"`
|
Limits ResourceList `json:"limits,omitempty" protobuf:"bytes,1,rep,name=limits,casttype=ResourceList,castkey=ResourceName"`
|
||||||
// Requests describes the minimum amount of compute resources required.
|
// Requests describes the minimum amount of compute resources required.
|
||||||
// If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
|
// If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
|
||||||
// otherwise to an implementation-defined value.
|
// otherwise to an implementation-defined value.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications
|
// More info: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||||
Requests ResourceList `json:"requests,omitempty" protobuf:"bytes,2,rep,name=requests,casttype=ResourceList,castkey=ResourceName"`
|
Requests ResourceList `json:"requests,omitempty" protobuf:"bytes,2,rep,name=requests,casttype=ResourceList,castkey=ResourceName"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1655,11 +1738,17 @@ const (
|
|||||||
const (
|
const (
|
||||||
// This annotation key will be used to contain an array of v1 JSON encoded Containers
|
// This annotation key will be used to contain an array of v1 JSON encoded Containers
|
||||||
// for init containers. The annotation will be placed into the internal type and cleared.
|
// for init containers. The annotation will be placed into the internal type and cleared.
|
||||||
|
// This key is only recognized by version >= 1.4.
|
||||||
|
PodInitContainersBetaAnnotationKey = "pod.beta.kubernetes.io/init-containers"
|
||||||
|
// This annotation key will be used to contain an array of v1 JSON encoded Containers
|
||||||
|
// for init containers. The annotation will be placed into the internal type and cleared.
|
||||||
|
// This key is recognized by version >= 1.3. For version 1.4 code, this key
|
||||||
|
// will have its value copied to the beta key.
|
||||||
PodInitContainersAnnotationKey = "pod.alpha.kubernetes.io/init-containers"
|
PodInitContainersAnnotationKey = "pod.alpha.kubernetes.io/init-containers"
|
||||||
// This annotation key will be used to contain an array of v1 JSON encoded
|
// This annotation key will be used to contain an array of v1 JSON encoded
|
||||||
// ContainerStatuses for init containers. The annotation will be placed into the internal
|
// ContainerStatuses for init containers. The annotation will be placed into the internal
|
||||||
// type and cleared.
|
// type and cleared.
|
||||||
PodInitContainerStatusesAnnotationKey = "pod.alpha.kubernetes.io/init-container-statuses"
|
PodInitContainerStatusesAnnotationKey = "pod.beta.kubernetes.io/init-container-statuses"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PodSpec is a description of a pod.
|
// PodSpec is a description of a pod.
|
||||||
@ -1951,6 +2040,9 @@ type ReplicationControllerStatus struct {
|
|||||||
// The number of pods that have labels matching the labels of the pod template of the replication controller.
|
// The number of pods that have labels matching the labels of the pod template of the replication controller.
|
||||||
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
|
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
|
||||||
|
|
||||||
|
// The number of ready replicas for this replication controller.
|
||||||
|
ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`
|
||||||
|
|
||||||
// ObservedGeneration reflects the generation of the most recently observed replication controller.
|
// ObservedGeneration reflects the generation of the most recently observed replication controller.
|
||||||
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
|
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
|
||||||
}
|
}
|
||||||
@ -2017,6 +2109,11 @@ const (
|
|||||||
// external load balancer (if the cloud provider supports it), in addition
|
// external load balancer (if the cloud provider supports it), in addition
|
||||||
// to 'NodePort' type.
|
// to 'NodePort' type.
|
||||||
ServiceTypeLoadBalancer ServiceType = "LoadBalancer"
|
ServiceTypeLoadBalancer ServiceType = "LoadBalancer"
|
||||||
|
|
||||||
|
// ServiceTypeExternalName means a service consists of only a reference to
|
||||||
|
// an external name that kubedns or equivalent will return as a CNAME
|
||||||
|
// record, with no exposing or proxying of any pods involved.
|
||||||
|
ServiceTypeExternalName ServiceType = "ExternalName"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ServiceStatus represents the current status of a service.
|
// ServiceStatus represents the current status of a service.
|
||||||
@ -2051,24 +2148,39 @@ type ServiceSpec struct {
|
|||||||
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
|
||||||
Ports []ServicePort `json:"ports" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"`
|
Ports []ServicePort `json:"ports" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"`
|
||||||
|
|
||||||
// This service will route traffic to pods having labels matching this selector.
|
// Route service traffic to pods with label keys and values matching this
|
||||||
// Label keys and values that must match in order to receive traffic for this service.
|
// selector. If empty or not present, the service is assumed to have an
|
||||||
// If not specified, endpoints must be manually specified and the system will not automatically manage them.
|
// external process managing its endpoints, which Kubernetes will not
|
||||||
|
// modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
|
||||||
|
// Ignored if type is ExternalName.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
|
||||||
Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
|
Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
|
||||||
|
|
||||||
// ClusterIP is usually assigned by the master and is the IP address of the service.
|
// clusterIP is the IP address of the service and is usually assigned
|
||||||
// If specified, it will be allocated to the service if it is unused
|
// randomly by the master. If an address is specified manually and is not in
|
||||||
// or else creation of the service will fail.
|
// use by others, it will be allocated to the service; otherwise, creation
|
||||||
// Valid values are None, empty string (""), or a valid IP address.
|
// of the service will fail. This field can not be changed through updates.
|
||||||
// 'None' can be specified for a headless service when proxying is not required.
|
// Valid values are "None", empty string (""), or a valid IP address. "None"
|
||||||
// Cannot be updated.
|
// can be specified for headless services when proxying is not required.
|
||||||
|
// Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
|
||||||
|
// type is ExternalName.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies
|
||||||
ClusterIP string `json:"clusterIP,omitempty" protobuf:"bytes,3,opt,name=clusterIP"`
|
ClusterIP string `json:"clusterIP,omitempty" protobuf:"bytes,3,opt,name=clusterIP"`
|
||||||
|
|
||||||
// Type of exposed service. Must be ClusterIP, NodePort, or LoadBalancer.
|
// type determines how the Service is exposed. Defaults to ClusterIP. Valid
|
||||||
// Defaults to ClusterIP.
|
// options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#external-services
|
// "ExternalName" maps to the specified externalName.
|
||||||
|
// "ClusterIP" allocates a cluster-internal IP address for load-balancing to
|
||||||
|
// endpoints. Endpoints are determined by the selector or if that is not
|
||||||
|
// specified, by manual construction of an Endpoints object. If clusterIP is
|
||||||
|
// "None", no virtual IP is allocated and the endpoints are published as a
|
||||||
|
// set of endpoints rather than a stable IP.
|
||||||
|
// "NodePort" builds on ClusterIP and allocates a port on every node which
|
||||||
|
// routes to the clusterIP.
|
||||||
|
// "LoadBalancer" builds on NodePort and creates an
|
||||||
|
// external load-balancer (if supported in the current cloud) which routes
|
||||||
|
// to the clusterIP.
|
||||||
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview
|
||||||
Type ServiceType `json:"type,omitempty" protobuf:"bytes,4,opt,name=type,casttype=ServiceType"`
|
Type ServiceType `json:"type,omitempty" protobuf:"bytes,4,opt,name=type,casttype=ServiceType"`
|
||||||
|
|
||||||
// externalIPs is a list of IP addresses for which nodes in the cluster
|
// externalIPs is a list of IP addresses for which nodes in the cluster
|
||||||
@ -2107,6 +2219,11 @@ type ServiceSpec struct {
|
|||||||
// cloud-provider does not support the feature."
|
// cloud-provider does not support the feature."
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md
|
// More info: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md
|
||||||
LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,9,opt,name=loadBalancerSourceRanges"`
|
LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,9,opt,name=loadBalancerSourceRanges"`
|
||||||
|
|
||||||
|
// externalName is the external reference that kubedns or equivalent will
|
||||||
|
// return as a CNAME record for this service. No proxying will be involved.
|
||||||
|
// Must be a valid DNS name and requires Type to be ExternalName.
|
||||||
|
ExternalName string `json:"externalName,omitempty" protobuf:"bytes,10,opt,name=externalName"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ServicePort contains information on service's port.
|
// ServicePort contains information on service's port.
|
||||||
@ -3287,8 +3404,18 @@ type ComponentStatusList struct {
|
|||||||
type DownwardAPIVolumeSource struct {
|
type DownwardAPIVolumeSource struct {
|
||||||
// Items is a list of downward API volume file
|
// Items is a list of downward API volume file
|
||||||
Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"`
|
Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"`
|
||||||
|
// Optional: mode bits to use on created files by default. Must be a
|
||||||
|
// value between 0 and 0777. Defaults to 0644.
|
||||||
|
// Directories within the path are not affected by this setting.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,2,opt,name=defaultMode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
DownwardAPIVolumeSourceDefaultMode int32 = 0644
|
||||||
|
)
|
||||||
|
|
||||||
// DownwardAPIVolumeFile represents information to create the file containing the pod field
|
// DownwardAPIVolumeFile represents information to create the file containing the pod field
|
||||||
type DownwardAPIVolumeFile struct {
|
type DownwardAPIVolumeFile struct {
|
||||||
// Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
|
// Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
|
||||||
@ -3298,6 +3425,11 @@ type DownwardAPIVolumeFile struct {
|
|||||||
// Selects a resource of the container: only resources limits and requests
|
// Selects a resource of the container: only resources limits and requests
|
||||||
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
|
// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
|
||||||
ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,3,opt,name=resourceFieldRef"`
|
ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,3,opt,name=resourceFieldRef"`
|
||||||
|
// Optional: mode bits to use on this file, must be a value between 0
|
||||||
|
// and 0777. If not specified, the volume defaultMode will be used.
|
||||||
|
// This might be in conflict with other options that affect the file
|
||||||
|
// mode, like fsGroup, and the result can be other mode bits set.
|
||||||
|
Mode *int32 `json:"mode,omitempty" protobuf:"varint,4,opt,name=mode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SecurityContext holds security configuration that will be applied to a container.
|
// SecurityContext holds security configuration that will be applied to a container.
|
||||||
|
@ -69,6 +69,19 @@ func (AvoidPods) SwaggerDoc() map[string]string {
|
|||||||
return map_AvoidPods
|
return map_AvoidPods
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var map_AzureDiskVolumeSource = map[string]string{
|
||||||
|
"": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
|
||||||
|
"diskName": "The Name of the data disk in the blob storage",
|
||||||
|
"diskURI": "The URI the data disk in the blob storage",
|
||||||
|
"cachingMode": "Host Caching mode: None, Read Only, Read Write.",
|
||||||
|
"fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
|
||||||
|
"readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (AzureDiskVolumeSource) SwaggerDoc() map[string]string {
|
||||||
|
return map_AzureDiskVolumeSource
|
||||||
|
}
|
||||||
|
|
||||||
var map_AzureFileVolumeSource = map[string]string{
|
var map_AzureFileVolumeSource = map[string]string{
|
||||||
"": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
|
"": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
|
||||||
"secretName": "the name of secret that contains Azure Storage Account Name and Key",
|
"secretName": "the name of secret that contains Azure Storage Account Name and Key",
|
||||||
@ -189,6 +202,7 @@ func (ConfigMapList) SwaggerDoc() map[string]string {
|
|||||||
var map_ConfigMapVolumeSource = map[string]string{
|
var map_ConfigMapVolumeSource = map[string]string{
|
||||||
"": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.",
|
"": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.",
|
||||||
"items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.",
|
"items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.",
|
||||||
|
"defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ConfigMapVolumeSource) SwaggerDoc() map[string]string {
|
func (ConfigMapVolumeSource) SwaggerDoc() map[string]string {
|
||||||
@ -330,6 +344,7 @@ var map_DownwardAPIVolumeFile = map[string]string{
|
|||||||
"path": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'",
|
"path": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'",
|
||||||
"fieldRef": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.",
|
"fieldRef": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.",
|
||||||
"resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.",
|
"resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.",
|
||||||
|
"mode": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (DownwardAPIVolumeFile) SwaggerDoc() map[string]string {
|
func (DownwardAPIVolumeFile) SwaggerDoc() map[string]string {
|
||||||
@ -339,6 +354,7 @@ func (DownwardAPIVolumeFile) SwaggerDoc() map[string]string {
|
|||||||
var map_DownwardAPIVolumeSource = map[string]string{
|
var map_DownwardAPIVolumeSource = map[string]string{
|
||||||
"": "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.",
|
"": "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.",
|
||||||
"items": "Items is a list of downward API volume file",
|
"items": "Items is a list of downward API volume file",
|
||||||
|
"defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (DownwardAPIVolumeSource) SwaggerDoc() map[string]string {
|
func (DownwardAPIVolumeSource) SwaggerDoc() map[string]string {
|
||||||
@ -421,7 +437,7 @@ func (EnvVar) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_EnvVarSource = map[string]string{
|
var map_EnvVarSource = map[string]string{
|
||||||
"": "EnvVarSource represents a source for the value of an EnvVar.",
|
"": "EnvVarSource represents a source for the value of an EnvVar.",
|
||||||
"fieldRef": "Selects a field of the pod; only name and namespace are supported.",
|
"fieldRef": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP.",
|
||||||
"resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.",
|
"resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.",
|
||||||
"configMapKeyRef": "Selects a key of a ConfigMap.",
|
"configMapKeyRef": "Selects a key of a ConfigMap.",
|
||||||
"secretKeyRef": "Selects a key of a secret in the pod's namespace",
|
"secretKeyRef": "Selects a key of a secret in the pod's namespace",
|
||||||
@ -616,6 +632,7 @@ var map_KeyToPath = map[string]string{
|
|||||||
"": "Maps a string key to a path within a volume.",
|
"": "Maps a string key to a path within a volume.",
|
||||||
"key": "The key to project.",
|
"key": "The key to project.",
|
||||||
"path": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.",
|
"path": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.",
|
||||||
|
"mode": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (KeyToPath) SwaggerDoc() map[string]string {
|
func (KeyToPath) SwaggerDoc() map[string]string {
|
||||||
@ -952,6 +969,7 @@ var map_ObjectMeta = map[string]string{
|
|||||||
"annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://releases.k8s.io/HEAD/docs/user-guide/annotations.md",
|
"annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://releases.k8s.io/HEAD/docs/user-guide/annotations.md",
|
||||||
"ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.",
|
"ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.",
|
||||||
"finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.",
|
"finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.",
|
||||||
|
"clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ObjectMeta) SwaggerDoc() map[string]string {
|
func (ObjectMeta) SwaggerDoc() map[string]string {
|
||||||
@ -1077,6 +1095,8 @@ var map_PersistentVolumeSource = map[string]string{
|
|||||||
"flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.",
|
"flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.",
|
||||||
"azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
|
"azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
|
||||||
"vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
|
"vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
|
||||||
|
"quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime",
|
||||||
|
"azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (PersistentVolumeSource) SwaggerDoc() map[string]string {
|
func (PersistentVolumeSource) SwaggerDoc() map[string]string {
|
||||||
@ -1371,6 +1391,19 @@ func (Probe) SwaggerDoc() map[string]string {
|
|||||||
return map_Probe
|
return map_Probe
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var map_QuobyteVolumeSource = map[string]string{
|
||||||
|
"": "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.",
|
||||||
|
"registry": "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes",
|
||||||
|
"volume": "Volume is a string that references an already created Quobyte volume by name.",
|
||||||
|
"readOnly": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.",
|
||||||
|
"user": "User to map volume access to Defaults to serivceaccount user",
|
||||||
|
"group": "Group to map volume access to Default is no group",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (QuobyteVolumeSource) SwaggerDoc() map[string]string {
|
||||||
|
return map_QuobyteVolumeSource
|
||||||
|
}
|
||||||
|
|
||||||
var map_RBDVolumeSource = map[string]string{
|
var map_RBDVolumeSource = map[string]string{
|
||||||
"": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.",
|
"": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.",
|
||||||
"monitors": "A collection of Ceph monitors. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
|
"monitors": "A collection of Ceph monitors. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
|
||||||
@ -1434,6 +1467,7 @@ var map_ReplicationControllerStatus = map[string]string{
|
|||||||
"": "ReplicationControllerStatus represents the current status of a replication controller.",
|
"": "ReplicationControllerStatus represents the current status of a replication controller.",
|
||||||
"replicas": "Replicas is the most recently oberved number of replicas. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller",
|
"replicas": "Replicas is the most recently oberved number of replicas. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller",
|
||||||
"fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replication controller.",
|
"fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replication controller.",
|
||||||
|
"readyReplicas": "The number of ready replicas for this replication controller.",
|
||||||
"observedGeneration": "ObservedGeneration reflects the generation of the most recently observed replication controller.",
|
"observedGeneration": "ObservedGeneration reflects the generation of the most recently observed replication controller.",
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1495,8 +1529,8 @@ func (ResourceQuotaStatus) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_ResourceRequirements = map[string]string{
|
var map_ResourceRequirements = map[string]string{
|
||||||
"": "ResourceRequirements describes the compute resource requirements.",
|
"": "ResourceRequirements describes the compute resource requirements.",
|
||||||
"limits": "Limits describes the maximum amount of compute resources allowed. More info: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications",
|
"limits": "Limits describes the maximum amount of compute resources allowed. More info: http://kubernetes.io/docs/user-guide/compute-resources/",
|
||||||
"requests": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications",
|
"requests": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: http://kubernetes.io/docs/user-guide/compute-resources/",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ResourceRequirements) SwaggerDoc() map[string]string {
|
func (ResourceRequirements) SwaggerDoc() map[string]string {
|
||||||
@ -1550,6 +1584,7 @@ var map_SecretVolumeSource = map[string]string{
|
|||||||
"": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.",
|
"": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.",
|
||||||
"secretName": "Name of the secret in the pod's namespace to use. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets",
|
"secretName": "Name of the secret in the pod's namespace to use. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets",
|
||||||
"items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.",
|
"items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.",
|
||||||
|
"defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (SecretVolumeSource) SwaggerDoc() map[string]string {
|
func (SecretVolumeSource) SwaggerDoc() map[string]string {
|
||||||
@ -1646,14 +1681,15 @@ func (ServiceProxyOptions) SwaggerDoc() map[string]string {
|
|||||||
var map_ServiceSpec = map[string]string{
|
var map_ServiceSpec = map[string]string{
|
||||||
"": "ServiceSpec describes the attributes that a user creates on a service.",
|
"": "ServiceSpec describes the attributes that a user creates on a service.",
|
||||||
"ports": "The list of ports that are exposed by this service. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
|
"ports": "The list of ports that are exposed by this service. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
|
||||||
"selector": "This service will route traffic to pods having labels matching this selector. Label keys and values that must match in order to receive traffic for this service. If not specified, endpoints must be manually specified and the system will not automatically manage them. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview",
|
"selector": "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview",
|
||||||
"clusterIP": "ClusterIP is usually assigned by the master and is the IP address of the service. If specified, it will be allocated to the service if it is unused or else creation of the service will fail. Valid values are None, empty string (\"\"), or a valid IP address. 'None' can be specified for a headless service when proxying is not required. Cannot be updated. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
|
"clusterIP": "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
|
||||||
"type": "Type of exposed service. Must be ClusterIP, NodePort, or LoadBalancer. Defaults to ClusterIP. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#external-services",
|
"type": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview",
|
||||||
"externalIPs": "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. A previous form of this functionality exists as the deprecatedPublicIPs field. When using this field, callers should also clear the deprecatedPublicIPs field.",
|
"externalIPs": "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. A previous form of this functionality exists as the deprecatedPublicIPs field. When using this field, callers should also clear the deprecatedPublicIPs field.",
|
||||||
"deprecatedPublicIPs": "deprecatedPublicIPs is deprecated and replaced by the externalIPs field with almost the exact same semantics. This field is retained in the v1 API for compatibility until at least 8/20/2016. It will be removed from any new API revisions. If both deprecatedPublicIPs *and* externalIPs are set, deprecatedPublicIPs is used.",
|
"deprecatedPublicIPs": "deprecatedPublicIPs is deprecated and replaced by the externalIPs field with almost the exact same semantics. This field is retained in the v1 API for compatibility until at least 8/20/2016. It will be removed from any new API revisions. If both deprecatedPublicIPs *and* externalIPs are set, deprecatedPublicIPs is used.",
|
||||||
"sessionAffinity": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
|
"sessionAffinity": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
|
||||||
"loadBalancerIP": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.",
|
"loadBalancerIP": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.",
|
||||||
"loadBalancerSourceRanges": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md",
|
"loadBalancerSourceRanges": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md",
|
||||||
|
"externalName": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ServiceSpec) SwaggerDoc() map[string]string {
|
func (ServiceSpec) SwaggerDoc() map[string]string {
|
||||||
@ -1744,6 +1780,8 @@ var map_VolumeSource = map[string]string{
|
|||||||
"azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
|
"azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
|
||||||
"configMap": "ConfigMap represents a configMap that should populate this volume",
|
"configMap": "ConfigMap represents a configMap that should populate this volume",
|
||||||
"vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
|
"vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
|
||||||
|
"quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime",
|
||||||
|
"azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (VolumeSource) SwaggerDoc() map[string]string {
|
func (VolumeSource) SwaggerDoc() map[string]string {
|
||||||
|
@ -44,6 +44,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
|||||||
Convert_api_AttachedVolume_To_v1_AttachedVolume,
|
Convert_api_AttachedVolume_To_v1_AttachedVolume,
|
||||||
Convert_v1_AvoidPods_To_api_AvoidPods,
|
Convert_v1_AvoidPods_To_api_AvoidPods,
|
||||||
Convert_api_AvoidPods_To_v1_AvoidPods,
|
Convert_api_AvoidPods_To_v1_AvoidPods,
|
||||||
|
Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource,
|
||||||
|
Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource,
|
||||||
Convert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource,
|
Convert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource,
|
||||||
Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource,
|
Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource,
|
||||||
Convert_v1_Binding_To_api_Binding,
|
Convert_v1_Binding_To_api_Binding,
|
||||||
@ -270,6 +272,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
|||||||
Convert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm,
|
Convert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm,
|
||||||
Convert_v1_Probe_To_api_Probe,
|
Convert_v1_Probe_To_api_Probe,
|
||||||
Convert_api_Probe_To_v1_Probe,
|
Convert_api_Probe_To_v1_Probe,
|
||||||
|
Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource,
|
||||||
|
Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource,
|
||||||
Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource,
|
Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource,
|
||||||
Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource,
|
Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource,
|
||||||
Convert_v1_RangeAllocation_To_api_RangeAllocation,
|
Convert_v1_RangeAllocation_To_api_RangeAllocation,
|
||||||
@ -495,6 +499,45 @@ func Convert_api_AvoidPods_To_v1_AvoidPods(in *api.AvoidPods, out *AvoidPods, s
|
|||||||
return autoConvert_api_AvoidPods_To_v1_AvoidPods(in, out, s)
|
return autoConvert_api_AvoidPods_To_v1_AvoidPods(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in *AzureDiskVolumeSource, out *api.AzureDiskVolumeSource, s conversion.Scope) error {
|
||||||
|
SetDefaults_AzureDiskVolumeSource(in)
|
||||||
|
out.DiskName = in.DiskName
|
||||||
|
out.DataDiskURI = in.DataDiskURI
|
||||||
|
if in.CachingMode != nil {
|
||||||
|
in, out := &in.CachingMode, &out.CachingMode
|
||||||
|
*out = new(api.AzureDataDiskCachingMode)
|
||||||
|
**out = api.AzureDataDiskCachingMode(**in)
|
||||||
|
} else {
|
||||||
|
out.CachingMode = nil
|
||||||
|
}
|
||||||
|
out.FSType = in.FSType
|
||||||
|
out.ReadOnly = in.ReadOnly
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in *AzureDiskVolumeSource, out *api.AzureDiskVolumeSource, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in *api.AzureDiskVolumeSource, out *AzureDiskVolumeSource, s conversion.Scope) error {
|
||||||
|
out.DiskName = in.DiskName
|
||||||
|
out.DataDiskURI = in.DataDiskURI
|
||||||
|
if in.CachingMode != nil {
|
||||||
|
in, out := &in.CachingMode, &out.CachingMode
|
||||||
|
*out = new(AzureDataDiskCachingMode)
|
||||||
|
**out = AzureDataDiskCachingMode(**in)
|
||||||
|
} else {
|
||||||
|
out.CachingMode = nil
|
||||||
|
}
|
||||||
|
out.FSType = in.FSType
|
||||||
|
out.ReadOnly = in.ReadOnly
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in *api.AzureDiskVolumeSource, out *AzureDiskVolumeSource, s conversion.Scope) error {
|
||||||
|
return autoConvert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
func autoConvert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource(in *AzureFileVolumeSource, out *api.AzureFileVolumeSource, s conversion.Scope) error {
|
func autoConvert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource(in *AzureFileVolumeSource, out *api.AzureFileVolumeSource, s conversion.Scope) error {
|
||||||
out.SecretName = in.SecretName
|
out.SecretName = in.SecretName
|
||||||
out.ShareName = in.ShareName
|
out.ShareName = in.ShareName
|
||||||
@ -899,6 +942,7 @@ func Convert_api_ConfigMapList_To_v1_ConfigMapList(in *api.ConfigMapList, out *C
|
|||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in *ConfigMapVolumeSource, out *api.ConfigMapVolumeSource, s conversion.Scope) error {
|
func autoConvert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in *ConfigMapVolumeSource, out *api.ConfigMapVolumeSource, s conversion.Scope) error {
|
||||||
|
SetDefaults_ConfigMapVolumeSource(in)
|
||||||
if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
|
if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -913,6 +957,7 @@ func autoConvert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in *Confi
|
|||||||
} else {
|
} else {
|
||||||
out.Items = nil
|
out.Items = nil
|
||||||
}
|
}
|
||||||
|
out.DefaultMode = in.DefaultMode
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -935,6 +980,7 @@ func autoConvert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource(in *api.C
|
|||||||
} else {
|
} else {
|
||||||
out.Items = nil
|
out.Items = nil
|
||||||
}
|
}
|
||||||
|
out.DefaultMode = in.DefaultMode
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1442,6 +1488,7 @@ func autoConvert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile(in *Downw
|
|||||||
} else {
|
} else {
|
||||||
out.ResourceFieldRef = nil
|
out.ResourceFieldRef = nil
|
||||||
}
|
}
|
||||||
|
out.Mode = in.Mode
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1469,6 +1516,7 @@ func autoConvert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile(in *api.D
|
|||||||
} else {
|
} else {
|
||||||
out.ResourceFieldRef = nil
|
out.ResourceFieldRef = nil
|
||||||
}
|
}
|
||||||
|
out.Mode = in.Mode
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1477,6 +1525,7 @@ func Convert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile(in *api.Downw
|
|||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in *DownwardAPIVolumeSource, out *api.DownwardAPIVolumeSource, s conversion.Scope) error {
|
func autoConvert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in *DownwardAPIVolumeSource, out *api.DownwardAPIVolumeSource, s conversion.Scope) error {
|
||||||
|
SetDefaults_DownwardAPIVolumeSource(in)
|
||||||
if in.Items != nil {
|
if in.Items != nil {
|
||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]api.DownwardAPIVolumeFile, len(*in))
|
*out = make([]api.DownwardAPIVolumeFile, len(*in))
|
||||||
@ -1488,6 +1537,7 @@ func autoConvert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in *D
|
|||||||
} else {
|
} else {
|
||||||
out.Items = nil
|
out.Items = nil
|
||||||
}
|
}
|
||||||
|
out.DefaultMode = in.DefaultMode
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1507,6 +1557,7 @@ func autoConvert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(in *a
|
|||||||
} else {
|
} else {
|
||||||
out.Items = nil
|
out.Items = nil
|
||||||
}
|
}
|
||||||
|
out.DefaultMode = in.DefaultMode
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2420,6 +2471,7 @@ func Convert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in *api.ISCSIVolumeSo
|
|||||||
func autoConvert_v1_KeyToPath_To_api_KeyToPath(in *KeyToPath, out *api.KeyToPath, s conversion.Scope) error {
|
func autoConvert_v1_KeyToPath_To_api_KeyToPath(in *KeyToPath, out *api.KeyToPath, s conversion.Scope) error {
|
||||||
out.Key = in.Key
|
out.Key = in.Key
|
||||||
out.Path = in.Path
|
out.Path = in.Path
|
||||||
|
out.Mode = in.Mode
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2430,6 +2482,7 @@ func Convert_v1_KeyToPath_To_api_KeyToPath(in *KeyToPath, out *api.KeyToPath, s
|
|||||||
func autoConvert_api_KeyToPath_To_v1_KeyToPath(in *api.KeyToPath, out *KeyToPath, s conversion.Scope) error {
|
func autoConvert_api_KeyToPath_To_v1_KeyToPath(in *api.KeyToPath, out *KeyToPath, s conversion.Scope) error {
|
||||||
out.Key = in.Key
|
out.Key = in.Key
|
||||||
out.Path = in.Path
|
out.Path = in.Path
|
||||||
|
out.Mode = in.Mode
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3665,6 +3718,7 @@ func autoConvert_v1_ObjectMeta_To_api_ObjectMeta(in *ObjectMeta, out *api.Object
|
|||||||
out.OwnerReferences = nil
|
out.OwnerReferences = nil
|
||||||
}
|
}
|
||||||
out.Finalizers = in.Finalizers
|
out.Finalizers = in.Finalizers
|
||||||
|
out.ClusterName = in.ClusterName
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3699,6 +3753,7 @@ func autoConvert_api_ObjectMeta_To_v1_ObjectMeta(in *api.ObjectMeta, out *Object
|
|||||||
out.OwnerReferences = nil
|
out.OwnerReferences = nil
|
||||||
}
|
}
|
||||||
out.Finalizers = in.Finalizers
|
out.Finalizers = in.Finalizers
|
||||||
|
out.ClusterName = in.ClusterName
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4187,6 +4242,24 @@ func autoConvert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in *Per
|
|||||||
} else {
|
} else {
|
||||||
out.VsphereVolume = nil
|
out.VsphereVolume = nil
|
||||||
}
|
}
|
||||||
|
if in.Quobyte != nil {
|
||||||
|
in, out := &in.Quobyte, &out.Quobyte
|
||||||
|
*out = new(api.QuobyteVolumeSource)
|
||||||
|
if err := Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(*in, *out, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Quobyte = nil
|
||||||
|
}
|
||||||
|
if in.AzureDisk != nil {
|
||||||
|
in, out := &in.AzureDisk, &out.AzureDisk
|
||||||
|
*out = new(api.AzureDiskVolumeSource)
|
||||||
|
if err := Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(*in, *out, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.AzureDisk = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4249,6 +4322,15 @@ func autoConvert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api
|
|||||||
} else {
|
} else {
|
||||||
out.RBD = nil
|
out.RBD = nil
|
||||||
}
|
}
|
||||||
|
if in.Quobyte != nil {
|
||||||
|
in, out := &in.Quobyte, &out.Quobyte
|
||||||
|
*out = new(QuobyteVolumeSource)
|
||||||
|
if err := Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(*in, *out, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Quobyte = nil
|
||||||
|
}
|
||||||
if in.ISCSI != nil {
|
if in.ISCSI != nil {
|
||||||
in, out := &in.ISCSI, &out.ISCSI
|
in, out := &in.ISCSI, &out.ISCSI
|
||||||
*out = new(ISCSIVolumeSource)
|
*out = new(ISCSIVolumeSource)
|
||||||
@ -4321,6 +4403,15 @@ func autoConvert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api
|
|||||||
} else {
|
} else {
|
||||||
out.VsphereVolume = nil
|
out.VsphereVolume = nil
|
||||||
}
|
}
|
||||||
|
if in.AzureDisk != nil {
|
||||||
|
in, out := &in.AzureDisk, &out.AzureDisk
|
||||||
|
*out = new(AzureDiskVolumeSource)
|
||||||
|
if err := Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(*in, *out, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.AzureDisk = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5349,6 +5440,32 @@ func Convert_api_Probe_To_v1_Probe(in *api.Probe, out *Probe, s conversion.Scope
|
|||||||
return autoConvert_api_Probe_To_v1_Probe(in, out, s)
|
return autoConvert_api_Probe_To_v1_Probe(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in *QuobyteVolumeSource, out *api.QuobyteVolumeSource, s conversion.Scope) error {
|
||||||
|
out.Registry = in.Registry
|
||||||
|
out.Volume = in.Volume
|
||||||
|
out.ReadOnly = in.ReadOnly
|
||||||
|
out.User = in.User
|
||||||
|
out.Group = in.Group
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in *QuobyteVolumeSource, out *api.QuobyteVolumeSource, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in *api.QuobyteVolumeSource, out *QuobyteVolumeSource, s conversion.Scope) error {
|
||||||
|
out.Registry = in.Registry
|
||||||
|
out.Volume = in.Volume
|
||||||
|
out.ReadOnly = in.ReadOnly
|
||||||
|
out.User = in.User
|
||||||
|
out.Group = in.Group
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in *api.QuobyteVolumeSource, out *QuobyteVolumeSource, s conversion.Scope) error {
|
||||||
|
return autoConvert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
func autoConvert_v1_RBDVolumeSource_To_api_RBDVolumeSource(in *RBDVolumeSource, out *api.RBDVolumeSource, s conversion.Scope) error {
|
func autoConvert_v1_RBDVolumeSource_To_api_RBDVolumeSource(in *RBDVolumeSource, out *api.RBDVolumeSource, s conversion.Scope) error {
|
||||||
SetDefaults_RBDVolumeSource(in)
|
SetDefaults_RBDVolumeSource(in)
|
||||||
out.CephMonitors = in.CephMonitors
|
out.CephMonitors = in.CephMonitors
|
||||||
@ -5562,6 +5679,7 @@ func autoConvert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(i
|
|||||||
func autoConvert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(in *ReplicationControllerStatus, out *api.ReplicationControllerStatus, s conversion.Scope) error {
|
func autoConvert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(in *ReplicationControllerStatus, out *api.ReplicationControllerStatus, s conversion.Scope) error {
|
||||||
out.Replicas = in.Replicas
|
out.Replicas = in.Replicas
|
||||||
out.FullyLabeledReplicas = in.FullyLabeledReplicas
|
out.FullyLabeledReplicas = in.FullyLabeledReplicas
|
||||||
|
out.ReadyReplicas = in.ReadyReplicas
|
||||||
out.ObservedGeneration = in.ObservedGeneration
|
out.ObservedGeneration = in.ObservedGeneration
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -5573,6 +5691,7 @@ func Convert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(i
|
|||||||
func autoConvert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(in *api.ReplicationControllerStatus, out *ReplicationControllerStatus, s conversion.Scope) error {
|
func autoConvert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(in *api.ReplicationControllerStatus, out *ReplicationControllerStatus, s conversion.Scope) error {
|
||||||
out.Replicas = in.Replicas
|
out.Replicas = in.Replicas
|
||||||
out.FullyLabeledReplicas = in.FullyLabeledReplicas
|
out.FullyLabeledReplicas = in.FullyLabeledReplicas
|
||||||
|
out.ReadyReplicas = in.ReadyReplicas
|
||||||
out.ObservedGeneration = in.ObservedGeneration
|
out.ObservedGeneration = in.ObservedGeneration
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -5971,6 +6090,7 @@ func Convert_api_SecretList_To_v1_SecretList(in *api.SecretList, out *SecretList
|
|||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolumeSource, out *api.SecretVolumeSource, s conversion.Scope) error {
|
func autoConvert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolumeSource, out *api.SecretVolumeSource, s conversion.Scope) error {
|
||||||
|
SetDefaults_SecretVolumeSource(in)
|
||||||
out.SecretName = in.SecretName
|
out.SecretName = in.SecretName
|
||||||
if in.Items != nil {
|
if in.Items != nil {
|
||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
@ -5983,6 +6103,7 @@ func autoConvert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolum
|
|||||||
} else {
|
} else {
|
||||||
out.Items = nil
|
out.Items = nil
|
||||||
}
|
}
|
||||||
|
out.DefaultMode = in.DefaultMode
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6003,6 +6124,7 @@ func autoConvert_api_SecretVolumeSource_To_v1_SecretVolumeSource(in *api.SecretV
|
|||||||
} else {
|
} else {
|
||||||
out.Items = nil
|
out.Items = nil
|
||||||
}
|
}
|
||||||
|
out.DefaultMode = in.DefaultMode
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6384,6 +6506,7 @@ func autoConvert_v1_ServiceSpec_To_api_ServiceSpec(in *ServiceSpec, out *api.Ser
|
|||||||
out.SessionAffinity = api.ServiceAffinity(in.SessionAffinity)
|
out.SessionAffinity = api.ServiceAffinity(in.SessionAffinity)
|
||||||
out.LoadBalancerIP = in.LoadBalancerIP
|
out.LoadBalancerIP = in.LoadBalancerIP
|
||||||
out.LoadBalancerSourceRanges = in.LoadBalancerSourceRanges
|
out.LoadBalancerSourceRanges = in.LoadBalancerSourceRanges
|
||||||
|
out.ExternalName = in.ExternalName
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6402,6 +6525,7 @@ func autoConvert_api_ServiceSpec_To_v1_ServiceSpec(in *api.ServiceSpec, out *Ser
|
|||||||
}
|
}
|
||||||
out.Selector = in.Selector
|
out.Selector = in.Selector
|
||||||
out.ClusterIP = in.ClusterIP
|
out.ClusterIP = in.ClusterIP
|
||||||
|
out.ExternalName = in.ExternalName
|
||||||
out.ExternalIPs = in.ExternalIPs
|
out.ExternalIPs = in.ExternalIPs
|
||||||
out.LoadBalancerIP = in.LoadBalancerIP
|
out.LoadBalancerIP = in.LoadBalancerIP
|
||||||
out.SessionAffinity = ServiceAffinity(in.SessionAffinity)
|
out.SessionAffinity = ServiceAffinity(in.SessionAffinity)
|
||||||
@ -6729,6 +6853,24 @@ func autoConvert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.
|
|||||||
} else {
|
} else {
|
||||||
out.VsphereVolume = nil
|
out.VsphereVolume = nil
|
||||||
}
|
}
|
||||||
|
if in.Quobyte != nil {
|
||||||
|
in, out := &in.Quobyte, &out.Quobyte
|
||||||
|
*out = new(api.QuobyteVolumeSource)
|
||||||
|
if err := Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(*in, *out, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Quobyte = nil
|
||||||
|
}
|
||||||
|
if in.AzureDisk != nil {
|
||||||
|
in, out := &in.AzureDisk, &out.AzureDisk
|
||||||
|
*out = new(api.AzureDiskVolumeSource)
|
||||||
|
if err := Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(*in, *out, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.AzureDisk = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6836,6 +6978,15 @@ func autoConvert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *
|
|||||||
} else {
|
} else {
|
||||||
out.RBD = nil
|
out.RBD = nil
|
||||||
}
|
}
|
||||||
|
if in.Quobyte != nil {
|
||||||
|
in, out := &in.Quobyte, &out.Quobyte
|
||||||
|
*out = new(QuobyteVolumeSource)
|
||||||
|
if err := Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(*in, *out, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Quobyte = nil
|
||||||
|
}
|
||||||
if in.FlexVolume != nil {
|
if in.FlexVolume != nil {
|
||||||
in, out := &in.FlexVolume, &out.FlexVolume
|
in, out := &in.FlexVolume, &out.FlexVolume
|
||||||
*out = new(FlexVolumeSource)
|
*out = new(FlexVolumeSource)
|
||||||
@ -6917,6 +7068,15 @@ func autoConvert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *
|
|||||||
} else {
|
} else {
|
||||||
out.VsphereVolume = nil
|
out.VsphereVolume = nil
|
||||||
}
|
}
|
||||||
|
if in.AzureDisk != nil {
|
||||||
|
in, out := &in.AzureDisk, &out.AzureDisk
|
||||||
|
*out = new(AzureDiskVolumeSource)
|
||||||
|
if err := Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(*in, *out, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.AzureDisk = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
|||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Affinity, InType: reflect.TypeOf(&Affinity{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Affinity, InType: reflect.TypeOf(&Affinity{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AttachedVolume, InType: reflect.TypeOf(&AttachedVolume{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AttachedVolume, InType: reflect.TypeOf(&AttachedVolume{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AvoidPods, InType: reflect.TypeOf(&AvoidPods{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AvoidPods, InType: reflect.TypeOf(&AvoidPods{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AzureDiskVolumeSource, InType: reflect.TypeOf(&AzureDiskVolumeSource{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AzureFileVolumeSource, InType: reflect.TypeOf(&AzureFileVolumeSource{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AzureFileVolumeSource, InType: reflect.TypeOf(&AzureFileVolumeSource{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Binding, InType: reflect.TypeOf(&Binding{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Binding, InType: reflect.TypeOf(&Binding{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Capabilities, InType: reflect.TypeOf(&Capabilities{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Capabilities, InType: reflect.TypeOf(&Capabilities{})},
|
||||||
@ -153,6 +154,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
|||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PreferAvoidPodsEntry, InType: reflect.TypeOf(&PreferAvoidPodsEntry{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PreferAvoidPodsEntry, InType: reflect.TypeOf(&PreferAvoidPodsEntry{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PreferredSchedulingTerm, InType: reflect.TypeOf(&PreferredSchedulingTerm{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PreferredSchedulingTerm, InType: reflect.TypeOf(&PreferredSchedulingTerm{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Probe, InType: reflect.TypeOf(&Probe{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Probe, InType: reflect.TypeOf(&Probe{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_QuobyteVolumeSource, InType: reflect.TypeOf(&QuobyteVolumeSource{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RBDVolumeSource, InType: reflect.TypeOf(&RBDVolumeSource{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RBDVolumeSource, InType: reflect.TypeOf(&RBDVolumeSource{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RangeAllocation, InType: reflect.TypeOf(&RangeAllocation{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RangeAllocation, InType: reflect.TypeOf(&RangeAllocation{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationController, InType: reflect.TypeOf(&ReplicationController{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationController, InType: reflect.TypeOf(&ReplicationController{})},
|
||||||
@ -267,6 +269,37 @@ func DeepCopy_v1_AvoidPods(in interface{}, out interface{}, c *conversion.Cloner
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DeepCopy_v1_AzureDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*AzureDiskVolumeSource)
|
||||||
|
out := out.(*AzureDiskVolumeSource)
|
||||||
|
out.DiskName = in.DiskName
|
||||||
|
out.DataDiskURI = in.DataDiskURI
|
||||||
|
if in.CachingMode != nil {
|
||||||
|
in, out := &in.CachingMode, &out.CachingMode
|
||||||
|
*out = new(AzureDataDiskCachingMode)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.CachingMode = nil
|
||||||
|
}
|
||||||
|
if in.FSType != nil {
|
||||||
|
in, out := &in.FSType, &out.FSType
|
||||||
|
*out = new(string)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.FSType = nil
|
||||||
|
}
|
||||||
|
if in.ReadOnly != nil {
|
||||||
|
in, out := &in.ReadOnly, &out.ReadOnly
|
||||||
|
*out = new(bool)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.ReadOnly = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func DeepCopy_v1_AzureFileVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
func DeepCopy_v1_AzureFileVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
{
|
{
|
||||||
in := in.(*AzureFileVolumeSource)
|
in := in.(*AzureFileVolumeSource)
|
||||||
@ -469,11 +502,20 @@ func DeepCopy_v1_ConfigMapVolumeSource(in interface{}, out interface{}, c *conve
|
|||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]KeyToPath, len(*in))
|
*out = make([]KeyToPath, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*out)[i] = (*in)[i]
|
if err := DeepCopy_v1_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out.Items = nil
|
out.Items = nil
|
||||||
}
|
}
|
||||||
|
if in.DefaultMode != nil {
|
||||||
|
in, out := &in.DefaultMode, &out.DefaultMode
|
||||||
|
*out = new(int32)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.DefaultMode = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -754,6 +796,13 @@ func DeepCopy_v1_DownwardAPIVolumeFile(in interface{}, out interface{}, c *conve
|
|||||||
} else {
|
} else {
|
||||||
out.ResourceFieldRef = nil
|
out.ResourceFieldRef = nil
|
||||||
}
|
}
|
||||||
|
if in.Mode != nil {
|
||||||
|
in, out := &in.Mode, &out.Mode
|
||||||
|
*out = new(int32)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.Mode = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -773,6 +822,13 @@ func DeepCopy_v1_DownwardAPIVolumeSource(in interface{}, out interface{}, c *con
|
|||||||
} else {
|
} else {
|
||||||
out.Items = nil
|
out.Items = nil
|
||||||
}
|
}
|
||||||
|
if in.DefaultMode != nil {
|
||||||
|
in, out := &in.DefaultMode, &out.DefaultMode
|
||||||
|
*out = new(int32)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.DefaultMode = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1225,6 +1281,13 @@ func DeepCopy_v1_KeyToPath(in interface{}, out interface{}, c *conversion.Cloner
|
|||||||
out := out.(*KeyToPath)
|
out := out.(*KeyToPath)
|
||||||
out.Key = in.Key
|
out.Key = in.Key
|
||||||
out.Path = in.Path
|
out.Path = in.Path
|
||||||
|
if in.Mode != nil {
|
||||||
|
in, out := &in.Mode, &out.Mode
|
||||||
|
*out = new(int32)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.Mode = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1858,6 +1921,7 @@ func DeepCopy_v1_ObjectMeta(in interface{}, out interface{}, c *conversion.Clone
|
|||||||
} else {
|
} else {
|
||||||
out.Finalizers = nil
|
out.Finalizers = nil
|
||||||
}
|
}
|
||||||
|
out.ClusterName = in.ClusterName
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2149,6 +2213,22 @@ func DeepCopy_v1_PersistentVolumeSource(in interface{}, out interface{}, c *conv
|
|||||||
} else {
|
} else {
|
||||||
out.VsphereVolume = nil
|
out.VsphereVolume = nil
|
||||||
}
|
}
|
||||||
|
if in.Quobyte != nil {
|
||||||
|
in, out := &in.Quobyte, &out.Quobyte
|
||||||
|
*out = new(QuobyteVolumeSource)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.Quobyte = nil
|
||||||
|
}
|
||||||
|
if in.AzureDisk != nil {
|
||||||
|
in, out := &in.AzureDisk, &out.AzureDisk
|
||||||
|
*out = new(AzureDiskVolumeSource)
|
||||||
|
if err := DeepCopy_v1_AzureDiskVolumeSource(*in, *out, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.AzureDisk = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2752,6 +2832,19 @@ func DeepCopy_v1_Probe(in interface{}, out interface{}, c *conversion.Cloner) er
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DeepCopy_v1_QuobyteVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*QuobyteVolumeSource)
|
||||||
|
out := out.(*QuobyteVolumeSource)
|
||||||
|
out.Registry = in.Registry
|
||||||
|
out.Volume = in.Volume
|
||||||
|
out.ReadOnly = in.ReadOnly
|
||||||
|
out.User = in.User
|
||||||
|
out.Group = in.Group
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func DeepCopy_v1_RBDVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
func DeepCopy_v1_RBDVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
{
|
{
|
||||||
in := in.(*RBDVolumeSource)
|
in := in.(*RBDVolumeSource)
|
||||||
@ -2876,6 +2969,7 @@ func DeepCopy_v1_ReplicationControllerStatus(in interface{}, out interface{}, c
|
|||||||
out := out.(*ReplicationControllerStatus)
|
out := out.(*ReplicationControllerStatus)
|
||||||
out.Replicas = in.Replicas
|
out.Replicas = in.Replicas
|
||||||
out.FullyLabeledReplicas = in.FullyLabeledReplicas
|
out.FullyLabeledReplicas = in.FullyLabeledReplicas
|
||||||
|
out.ReadyReplicas = in.ReadyReplicas
|
||||||
out.ObservedGeneration = in.ObservedGeneration
|
out.ObservedGeneration = in.ObservedGeneration
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -3096,11 +3190,20 @@ func DeepCopy_v1_SecretVolumeSource(in interface{}, out interface{}, c *conversi
|
|||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]KeyToPath, len(*in))
|
*out = make([]KeyToPath, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*out)[i] = (*in)[i]
|
if err := DeepCopy_v1_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out.Items = nil
|
out.Items = nil
|
||||||
}
|
}
|
||||||
|
if in.DefaultMode != nil {
|
||||||
|
in, out := &in.DefaultMode, &out.DefaultMode
|
||||||
|
*out = new(int32)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.DefaultMode = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3327,6 +3430,7 @@ func DeepCopy_v1_ServiceSpec(in interface{}, out interface{}, c *conversion.Clon
|
|||||||
} else {
|
} else {
|
||||||
out.LoadBalancerSourceRanges = nil
|
out.LoadBalancerSourceRanges = nil
|
||||||
}
|
}
|
||||||
|
out.ExternalName = in.ExternalName
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3556,6 +3660,22 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo
|
|||||||
} else {
|
} else {
|
||||||
out.VsphereVolume = nil
|
out.VsphereVolume = nil
|
||||||
}
|
}
|
||||||
|
if in.Quobyte != nil {
|
||||||
|
in, out := &in.Quobyte, &out.Quobyte
|
||||||
|
*out = new(QuobyteVolumeSource)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.Quobyte = nil
|
||||||
|
}
|
||||||
|
if in.AzureDisk != nil {
|
||||||
|
in, out := &in.AzureDisk, &out.AzureDisk
|
||||||
|
*out = new(AzureDiskVolumeSource)
|
||||||
|
if err := DeepCopy_v1_AzureDiskVolumeSource(*in, *out, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.AzureDisk = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,13 @@ limitations under the License.
|
|||||||
package validation
|
package validation
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"k8s.io/client-go/1.4/pkg/api"
|
"k8s.io/client-go/1.4/pkg/api"
|
||||||
|
"k8s.io/client-go/1.4/pkg/api/meta"
|
||||||
|
"k8s.io/client-go/1.4/pkg/api/unversioned"
|
||||||
|
apiutil "k8s.io/client-go/1.4/pkg/api/util"
|
||||||
|
"k8s.io/client-go/1.4/pkg/apimachinery/registered"
|
||||||
"k8s.io/client-go/1.4/pkg/util/validation"
|
"k8s.io/client-go/1.4/pkg/util/validation"
|
||||||
"k8s.io/client-go/1.4/pkg/util/validation/field"
|
"k8s.io/client-go/1.4/pkg/util/validation/field"
|
||||||
)
|
)
|
||||||
@ -25,21 +31,50 @@ import (
|
|||||||
// ValidateEvent makes sure that the event makes sense.
|
// ValidateEvent makes sure that the event makes sense.
|
||||||
func ValidateEvent(event *api.Event) field.ErrorList {
|
func ValidateEvent(event *api.Event) field.ErrorList {
|
||||||
allErrs := field.ErrorList{}
|
allErrs := field.ErrorList{}
|
||||||
// There is no namespace required for node or persistent volume.
|
|
||||||
// However, older client code accidentally sets event.Namespace
|
// Make sure event.Namespace and the involvedObject.Namespace agree
|
||||||
// to api.NamespaceDefault, so we accept that too, but "" is preferred.
|
if len(event.InvolvedObject.Namespace) == 0 {
|
||||||
if (event.InvolvedObject.Kind == "Node" || event.InvolvedObject.Kind == "PersistentVolume") &&
|
// event.Namespace must also be empty (or "default", for compatibility with old clients)
|
||||||
event.Namespace != api.NamespaceDefault &&
|
if event.Namespace != api.NamespaceNone && event.Namespace != api.NamespaceDefault {
|
||||||
event.Namespace != "" {
|
allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match event.namespace"))
|
||||||
allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "not allowed for node"))
|
|
||||||
}
|
}
|
||||||
if event.InvolvedObject.Kind != "Node" &&
|
} else {
|
||||||
event.InvolvedObject.Kind != "PersistentVolume" &&
|
// event namespace must match
|
||||||
event.Namespace != event.InvolvedObject.Namespace {
|
if event.Namespace != event.InvolvedObject.Namespace {
|
||||||
allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match involvedObject"))
|
allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match event.namespace"))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// For kinds we recognize, make sure involvedObject.Namespace is set for namespaced kinds
|
||||||
|
if namespaced, err := isNamespacedKind(event.InvolvedObject.Kind, event.InvolvedObject.APIVersion); err == nil {
|
||||||
|
if namespaced && len(event.InvolvedObject.Namespace) == 0 {
|
||||||
|
allErrs = append(allErrs, field.Required(field.NewPath("involvedObject", "namespace"), fmt.Sprintf("required for kind %s", event.InvolvedObject.Kind)))
|
||||||
|
}
|
||||||
|
if !namespaced && len(event.InvolvedObject.Namespace) > 0 {
|
||||||
|
allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, fmt.Sprintf("not allowed for kind %s", event.InvolvedObject.Kind)))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for _, msg := range validation.IsDNS1123Subdomain(event.Namespace) {
|
for _, msg := range validation.IsDNS1123Subdomain(event.Namespace) {
|
||||||
allErrs = append(allErrs, field.Invalid(field.NewPath("namespace"), event.Namespace, msg))
|
allErrs = append(allErrs, field.Invalid(field.NewPath("namespace"), event.Namespace, msg))
|
||||||
}
|
}
|
||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check whether the kind in groupVersion is scoped at the root of the api hierarchy
|
||||||
|
func isNamespacedKind(kind, groupVersion string) (bool, error) {
|
||||||
|
group := apiutil.GetGroup(groupVersion)
|
||||||
|
g, err := registered.Group(group)
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
restMapping, err := g.RESTMapper.RESTMapping(unversioned.GroupKind{Group: group, Kind: kind}, apiutil.GetVersion(groupVersion))
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
scopeName := restMapping.Scope.Name()
|
||||||
|
if scopeName == meta.RESTScopeNameNamespace {
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
@ -23,6 +23,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
@ -36,6 +37,8 @@ import (
|
|||||||
"k8s.io/client-go/1.4/pkg/api/v1"
|
"k8s.io/client-go/1.4/pkg/api/v1"
|
||||||
"k8s.io/client-go/1.4/pkg/capabilities"
|
"k8s.io/client-go/1.4/pkg/capabilities"
|
||||||
"k8s.io/client-go/1.4/pkg/labels"
|
"k8s.io/client-go/1.4/pkg/labels"
|
||||||
|
"k8s.io/client-go/1.4/pkg/security/apparmor"
|
||||||
|
utilconfig "k8s.io/client-go/1.4/pkg/util/config"
|
||||||
"k8s.io/client-go/1.4/pkg/util/intstr"
|
"k8s.io/client-go/1.4/pkg/util/intstr"
|
||||||
"k8s.io/client-go/1.4/pkg/util/sets"
|
"k8s.io/client-go/1.4/pkg/util/sets"
|
||||||
"k8s.io/client-go/1.4/pkg/util/validation"
|
"k8s.io/client-go/1.4/pkg/util/validation"
|
||||||
@ -52,6 +55,7 @@ const fieldImmutableErrorMsg string = `field is immutable`
|
|||||||
const isNotIntegerErrorMsg string = `must be an integer`
|
const isNotIntegerErrorMsg string = `must be an integer`
|
||||||
|
|
||||||
var pdPartitionErrorMsg string = validation.InclusiveRangeError(1, 255)
|
var pdPartitionErrorMsg string = validation.InclusiveRangeError(1, 255)
|
||||||
|
var volumeModeErrorMsg string = "must be a number between 0 and 0777 (octal), both inclusive"
|
||||||
|
|
||||||
const totalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB
|
const totalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB
|
||||||
|
|
||||||
@ -100,7 +104,16 @@ func ValidateDNS1123Label(value string, fldPath *field.Path) field.ErrorList {
|
|||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
func ValidatePodSpecificAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
|
// ValidateDNS1123Subdomain validates that a name is a proper DNS subdomain.
|
||||||
|
func ValidateDNS1123Subdomain(value string, fldPath *field.Path) field.ErrorList {
|
||||||
|
allErrs := field.ErrorList{}
|
||||||
|
for _, msg := range validation.IsDNS1123Subdomain(value) {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath, value, msg))
|
||||||
|
}
|
||||||
|
return allErrs
|
||||||
|
}
|
||||||
|
|
||||||
|
func ValidatePodSpecificAnnotations(annotations map[string]string, spec *api.PodSpec, fldPath *field.Path) field.ErrorList {
|
||||||
allErrs := field.ErrorList{}
|
allErrs := field.ErrorList{}
|
||||||
if annotations[api.AffinityAnnotationKey] != "" {
|
if annotations[api.AffinityAnnotationKey] != "" {
|
||||||
allErrs = append(allErrs, ValidateAffinityInPodAnnotations(annotations, fldPath)...)
|
allErrs = append(allErrs, ValidateAffinityInPodAnnotations(annotations, fldPath)...)
|
||||||
@ -119,7 +132,50 @@ func ValidatePodSpecificAnnotations(annotations map[string]string, fldPath *fiel
|
|||||||
}
|
}
|
||||||
|
|
||||||
allErrs = append(allErrs, ValidateSeccompPodAnnotations(annotations, fldPath)...)
|
allErrs = append(allErrs, ValidateSeccompPodAnnotations(annotations, fldPath)...)
|
||||||
|
allErrs = append(allErrs, ValidateAppArmorPodAnnotations(annotations, spec, fldPath)...)
|
||||||
|
|
||||||
|
sysctls, err := api.SysctlsFromPodAnnotation(annotations[api.SysctlsPodAnnotationKey])
|
||||||
|
if err != nil {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Key(api.SysctlsPodAnnotationKey), annotations[api.SysctlsPodAnnotationKey], err.Error()))
|
||||||
|
} else {
|
||||||
|
allErrs = append(allErrs, validateSysctls(sysctls, fldPath.Key(api.SysctlsPodAnnotationKey))...)
|
||||||
|
}
|
||||||
|
unsafeSysctls, err := api.SysctlsFromPodAnnotation(annotations[api.UnsafeSysctlsPodAnnotationKey])
|
||||||
|
if err != nil {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Key(api.UnsafeSysctlsPodAnnotationKey), annotations[api.UnsafeSysctlsPodAnnotationKey], err.Error()))
|
||||||
|
} else {
|
||||||
|
allErrs = append(allErrs, validateSysctls(unsafeSysctls, fldPath.Key(api.UnsafeSysctlsPodAnnotationKey))...)
|
||||||
|
}
|
||||||
|
inBoth := sysctlIntersection(sysctls, unsafeSysctls)
|
||||||
|
if len(inBoth) > 0 {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Key(api.UnsafeSysctlsPodAnnotationKey), strings.Join(inBoth, ", "), "can not be safe and unsafe"))
|
||||||
|
}
|
||||||
|
|
||||||
|
return allErrs
|
||||||
|
}
|
||||||
|
|
||||||
|
func ValidatePodSpecificAnnotationUpdates(newPod, oldPod *api.Pod, fldPath *field.Path) field.ErrorList {
|
||||||
|
allErrs := field.ErrorList{}
|
||||||
|
newAnnotations := newPod.Annotations
|
||||||
|
oldAnnotations := oldPod.Annotations
|
||||||
|
for k, oldVal := range oldAnnotations {
|
||||||
|
if newAnnotations[k] == oldVal {
|
||||||
|
continue // No change.
|
||||||
|
}
|
||||||
|
if strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) {
|
||||||
|
allErrs = append(allErrs, field.Forbidden(fldPath.Key(k), "may not update AppArmor annotations"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Check for removals.
|
||||||
|
for k := range newAnnotations {
|
||||||
|
if _, ok := oldAnnotations[k]; ok {
|
||||||
|
continue // No change.
|
||||||
|
}
|
||||||
|
if strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) {
|
||||||
|
allErrs = append(allErrs, field.Forbidden(fldPath.Key(k), "may not remove AppArmor annotations"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
allErrs = append(allErrs, ValidatePodSpecificAnnotations(newAnnotations, &newPod.Spec, fldPath)...)
|
||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,6 +298,9 @@ var ValidateServiceAccountName = NameIsDNSSubdomain
|
|||||||
// trailing dashes are allowed.
|
// trailing dashes are allowed.
|
||||||
var ValidateEndpointsName = NameIsDNSSubdomain
|
var ValidateEndpointsName = NameIsDNSSubdomain
|
||||||
|
|
||||||
|
// ValidateClusterName can be used to check whether the given cluster name is valid.
|
||||||
|
var ValidateClusterName = NameIsDNS1035Label
|
||||||
|
|
||||||
// NameIsDNSSubdomain is a ValidateNameFunc for names that must be a DNS subdomain.
|
// NameIsDNSSubdomain is a ValidateNameFunc for names that must be a DNS subdomain.
|
||||||
func NameIsDNSSubdomain(name string, prefix bool) []string {
|
func NameIsDNSSubdomain(name string, prefix bool) []string {
|
||||||
if prefix {
|
if prefix {
|
||||||
@ -327,6 +386,11 @@ func ValidateObjectMeta(meta *api.ObjectMeta, requiresNamespace bool, nameFn Val
|
|||||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("namespace"), "not allowed on this type"))
|
allErrs = append(allErrs, field.Forbidden(fldPath.Child("namespace"), "not allowed on this type"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if len(meta.ClusterName) != 0 {
|
||||||
|
for _, msg := range ValidateClusterName(meta.ClusterName, false) {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Child("clusterName"), meta.ClusterName, msg))
|
||||||
|
}
|
||||||
|
}
|
||||||
allErrs = append(allErrs, ValidateNonnegativeField(meta.Generation, fldPath.Child("generation"))...)
|
allErrs = append(allErrs, ValidateNonnegativeField(meta.Generation, fldPath.Child("generation"))...)
|
||||||
allErrs = append(allErrs, unversionedvalidation.ValidateLabels(meta.Labels, fldPath.Child("labels"))...)
|
allErrs = append(allErrs, unversionedvalidation.ValidateLabels(meta.Labels, fldPath.Child("labels"))...)
|
||||||
allErrs = append(allErrs, ValidateAnnotations(meta.Annotations, fldPath.Child("annotations"))...)
|
allErrs = append(allErrs, ValidateAnnotations(meta.Annotations, fldPath.Child("annotations"))...)
|
||||||
@ -388,6 +452,7 @@ func ValidateObjectMetaUpdate(newMeta, oldMeta *api.ObjectMeta, fldPath *field.P
|
|||||||
allErrs = append(allErrs, ValidateImmutableField(newMeta.Namespace, oldMeta.Namespace, fldPath.Child("namespace"))...)
|
allErrs = append(allErrs, ValidateImmutableField(newMeta.Namespace, oldMeta.Namespace, fldPath.Child("namespace"))...)
|
||||||
allErrs = append(allErrs, ValidateImmutableField(newMeta.UID, oldMeta.UID, fldPath.Child("uid"))...)
|
allErrs = append(allErrs, ValidateImmutableField(newMeta.UID, oldMeta.UID, fldPath.Child("uid"))...)
|
||||||
allErrs = append(allErrs, ValidateImmutableField(newMeta.CreationTimestamp, oldMeta.CreationTimestamp, fldPath.Child("creationTimestamp"))...)
|
allErrs = append(allErrs, ValidateImmutableField(newMeta.CreationTimestamp, oldMeta.CreationTimestamp, fldPath.Child("creationTimestamp"))...)
|
||||||
|
allErrs = append(allErrs, ValidateImmutableField(newMeta.ClusterName, oldMeta.ClusterName, fldPath.Child("clusterName"))...)
|
||||||
|
|
||||||
allErrs = append(allErrs, unversionedvalidation.ValidateLabels(newMeta.Labels, fldPath.Child("labels"))...)
|
allErrs = append(allErrs, unversionedvalidation.ValidateLabels(newMeta.Labels, fldPath.Child("labels"))...)
|
||||||
allErrs = append(allErrs, ValidateAnnotations(newMeta.Annotations, fldPath.Child("annotations"))...)
|
allErrs = append(allErrs, ValidateAnnotations(newMeta.Annotations, fldPath.Child("annotations"))...)
|
||||||
@ -533,6 +598,14 @@ func validateVolumeSource(source *api.VolumeSource, fldPath *field.Path) field.E
|
|||||||
allErrs = append(allErrs, validateCephFSVolumeSource(source.CephFS, fldPath.Child("cephfs"))...)
|
allErrs = append(allErrs, validateCephFSVolumeSource(source.CephFS, fldPath.Child("cephfs"))...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if source.Quobyte != nil {
|
||||||
|
if numVolumes > 0 {
|
||||||
|
allErrs = append(allErrs, field.Forbidden(fldPath.Child("quobyte"), "may not specify more than 1 volume type"))
|
||||||
|
} else {
|
||||||
|
numVolumes++
|
||||||
|
allErrs = append(allErrs, validateQuobyteVolumeSource(source.Quobyte, fldPath.Child("quobyte"))...)
|
||||||
|
}
|
||||||
|
}
|
||||||
if source.DownwardAPI != nil {
|
if source.DownwardAPI != nil {
|
||||||
if numVolumes > 0 {
|
if numVolumes > 0 {
|
||||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("downwarAPI"), "may not specify more than 1 volume type"))
|
allErrs = append(allErrs, field.Forbidden(fldPath.Child("downwarAPI"), "may not specify more than 1 volume type"))
|
||||||
@ -577,6 +650,11 @@ func validateVolumeSource(source *api.VolumeSource, fldPath *field.Path) field.E
|
|||||||
allErrs = append(allErrs, validateVsphereVolumeSource(source.VsphereVolume, fldPath.Child("vsphereVolume"))...)
|
allErrs = append(allErrs, validateVsphereVolumeSource(source.VsphereVolume, fldPath.Child("vsphereVolume"))...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if source.AzureDisk != nil {
|
||||||
|
numVolumes++
|
||||||
|
allErrs = append(allErrs, validateAzureDisk(source.AzureDisk, fldPath.Child("azureDisk"))...)
|
||||||
|
}
|
||||||
|
|
||||||
if numVolumes == 0 {
|
if numVolumes == 0 {
|
||||||
allErrs = append(allErrs, field.Required(fldPath, "must specify a volume type"))
|
allErrs = append(allErrs, field.Required(fldPath, "must specify a volume type"))
|
||||||
}
|
}
|
||||||
@ -660,6 +738,12 @@ func validateSecretVolumeSource(secretSource *api.SecretVolumeSource, fldPath *f
|
|||||||
if len(secretSource.SecretName) == 0 {
|
if len(secretSource.SecretName) == 0 {
|
||||||
allErrs = append(allErrs, field.Required(fldPath.Child("secretName"), ""))
|
allErrs = append(allErrs, field.Required(fldPath.Child("secretName"), ""))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
secretMode := secretSource.DefaultMode
|
||||||
|
if secretMode != nil && (*secretMode > 0777 || *secretMode < 0) {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Child("defaultMode"), *secretMode, volumeModeErrorMsg))
|
||||||
|
}
|
||||||
|
|
||||||
itemsPath := fldPath.Child("items")
|
itemsPath := fldPath.Child("items")
|
||||||
for i, kp := range secretSource.Items {
|
for i, kp := range secretSource.Items {
|
||||||
itemPath := itemsPath.Index(i)
|
itemPath := itemsPath.Index(i)
|
||||||
@ -673,6 +757,12 @@ func validateConfigMapVolumeSource(configMapSource *api.ConfigMapVolumeSource, f
|
|||||||
if len(configMapSource.Name) == 0 {
|
if len(configMapSource.Name) == 0 {
|
||||||
allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
|
allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configMapMode := configMapSource.DefaultMode
|
||||||
|
if configMapMode != nil && (*configMapMode > 0777 || *configMapMode < 0) {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Child("defaultMode"), *configMapMode, volumeModeErrorMsg))
|
||||||
|
}
|
||||||
|
|
||||||
itemsPath := fldPath.Child("items")
|
itemsPath := fldPath.Child("items")
|
||||||
for i, kp := range configMapSource.Items {
|
for i, kp := range configMapSource.Items {
|
||||||
itemPath := itemsPath.Index(i)
|
itemPath := itemsPath.Index(i)
|
||||||
@ -690,6 +780,10 @@ func validateKeyToPath(kp *api.KeyToPath, fldPath *field.Path) field.ErrorList {
|
|||||||
allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
|
allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
|
||||||
}
|
}
|
||||||
allErrs = append(allErrs, validateLocalNonReservedPath(kp.Path, fldPath.Child("path"))...)
|
allErrs = append(allErrs, validateLocalNonReservedPath(kp.Path, fldPath.Child("path"))...)
|
||||||
|
if kp.Mode != nil && (*kp.Mode > 0777 || *kp.Mode < 0) {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Child("mode"), *kp.Mode, volumeModeErrorMsg))
|
||||||
|
}
|
||||||
|
|
||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -715,6 +809,24 @@ func validateNFSVolumeSource(nfs *api.NFSVolumeSource, fldPath *field.Path) fiel
|
|||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func validateQuobyteVolumeSource(quobyte *api.QuobyteVolumeSource, fldPath *field.Path) field.ErrorList {
|
||||||
|
allErrs := field.ErrorList{}
|
||||||
|
if len(quobyte.Registry) == 0 {
|
||||||
|
allErrs = append(allErrs, field.Required(fldPath.Child("registry"), "must be a host:port pair or multiple pairs seperated by commas"))
|
||||||
|
} else {
|
||||||
|
for _, hostPortPair := range strings.Split(quobyte.Registry, ",") {
|
||||||
|
if _, _, err := net.SplitHostPort(hostPortPair); err != nil {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Child("registry"), quobyte.Registry, "must be a host:port pair or multiple pairs seperated by commas"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(quobyte.Volume) == 0 {
|
||||||
|
allErrs = append(allErrs, field.Required(fldPath.Child("volume"), ""))
|
||||||
|
}
|
||||||
|
return allErrs
|
||||||
|
}
|
||||||
|
|
||||||
func validateGlusterfs(glusterfs *api.GlusterfsVolumeSource, fldPath *field.Path) field.ErrorList {
|
func validateGlusterfs(glusterfs *api.GlusterfsVolumeSource, fldPath *field.Path) field.ErrorList {
|
||||||
allErrs := field.ErrorList{}
|
allErrs := field.ErrorList{}
|
||||||
if len(glusterfs.EndpointsName) == 0 {
|
if len(glusterfs.EndpointsName) == 0 {
|
||||||
@ -745,6 +857,12 @@ var validDownwardAPIFieldPathExpressions = sets.NewString(
|
|||||||
|
|
||||||
func validateDownwardAPIVolumeSource(downwardAPIVolume *api.DownwardAPIVolumeSource, fldPath *field.Path) field.ErrorList {
|
func validateDownwardAPIVolumeSource(downwardAPIVolume *api.DownwardAPIVolumeSource, fldPath *field.Path) field.ErrorList {
|
||||||
allErrs := field.ErrorList{}
|
allErrs := field.ErrorList{}
|
||||||
|
|
||||||
|
downwardAPIMode := downwardAPIVolume.DefaultMode
|
||||||
|
if downwardAPIMode != nil && (*downwardAPIMode > 0777 || *downwardAPIMode < 0) {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Child("defaultMode"), *downwardAPIMode, volumeModeErrorMsg))
|
||||||
|
}
|
||||||
|
|
||||||
for _, file := range downwardAPIVolume.Items {
|
for _, file := range downwardAPIVolume.Items {
|
||||||
if len(file.Path) == 0 {
|
if len(file.Path) == 0 {
|
||||||
allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
|
allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
|
||||||
@ -760,6 +878,9 @@ func validateDownwardAPIVolumeSource(downwardAPIVolume *api.DownwardAPIVolumeSou
|
|||||||
} else {
|
} else {
|
||||||
allErrs = append(allErrs, field.Required(fldPath, "one of fieldRef and resourceFieldRef is required"))
|
allErrs = append(allErrs, field.Required(fldPath, "one of fieldRef and resourceFieldRef is required"))
|
||||||
}
|
}
|
||||||
|
if file.Mode != nil && (*file.Mode > 0777 || *file.Mode < 0) {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Child("mode"), *file.Mode, volumeModeErrorMsg))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
@ -844,6 +965,22 @@ func validateAzureFile(azure *api.AzureFileVolumeSource, fldPath *field.Path) fi
|
|||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var supportedCachingModes = sets.NewString(string(api.AzureDataDiskCachingNone), string(api.AzureDataDiskCachingReadOnly), string(api.AzureDataDiskCachingReadWrite))
|
||||||
|
|
||||||
|
func validateAzureDisk(azure *api.AzureDiskVolumeSource, fldPath *field.Path) field.ErrorList {
|
||||||
|
allErrs := field.ErrorList{}
|
||||||
|
if azure.DiskName == "" {
|
||||||
|
allErrs = append(allErrs, field.Required(fldPath.Child("diskName"), ""))
|
||||||
|
}
|
||||||
|
if azure.DataDiskURI == "" {
|
||||||
|
allErrs = append(allErrs, field.Required(fldPath.Child("diskURI"), ""))
|
||||||
|
}
|
||||||
|
if azure.CachingMode != nil && !supportedCachingModes.Has(string(*azure.CachingMode)) {
|
||||||
|
allErrs = append(allErrs, field.NotSupported(fldPath.Child("cachingMode"), *azure.CachingMode, supportedCachingModes.List()))
|
||||||
|
}
|
||||||
|
return allErrs
|
||||||
|
}
|
||||||
|
|
||||||
func validateVsphereVolumeSource(cd *api.VsphereVirtualDiskVolumeSource, fldPath *field.Path) field.ErrorList {
|
func validateVsphereVolumeSource(cd *api.VsphereVirtualDiskVolumeSource, fldPath *field.Path) field.ErrorList {
|
||||||
allErrs := field.ErrorList{}
|
allErrs := field.ErrorList{}
|
||||||
if len(cd.VolumePath) == 0 {
|
if len(cd.VolumePath) == 0 {
|
||||||
@ -858,6 +995,8 @@ var ValidatePersistentVolumeName = NameIsDNSSubdomain
|
|||||||
|
|
||||||
var supportedAccessModes = sets.NewString(string(api.ReadWriteOnce), string(api.ReadOnlyMany), string(api.ReadWriteMany))
|
var supportedAccessModes = sets.NewString(string(api.ReadWriteOnce), string(api.ReadOnlyMany), string(api.ReadWriteMany))
|
||||||
|
|
||||||
|
var supportedReclaimPolicy = sets.NewString(string(api.PersistentVolumeReclaimDelete), string(api.PersistentVolumeReclaimRecycle), string(api.PersistentVolumeReclaimRetain))
|
||||||
|
|
||||||
func ValidatePersistentVolume(pv *api.PersistentVolume) field.ErrorList {
|
func ValidatePersistentVolume(pv *api.PersistentVolume) field.ErrorList {
|
||||||
allErrs := ValidateObjectMeta(&pv.ObjectMeta, false, ValidatePersistentVolumeName, field.NewPath("metadata"))
|
allErrs := ValidateObjectMeta(&pv.ObjectMeta, false, ValidatePersistentVolumeName, field.NewPath("metadata"))
|
||||||
|
|
||||||
@ -882,6 +1021,11 @@ func ValidatePersistentVolume(pv *api.PersistentVolume) field.ErrorList {
|
|||||||
for r, qty := range pv.Spec.Capacity {
|
for r, qty := range pv.Spec.Capacity {
|
||||||
allErrs = append(allErrs, validateBasicResource(qty, capPath.Key(string(r)))...)
|
allErrs = append(allErrs, validateBasicResource(qty, capPath.Key(string(r)))...)
|
||||||
}
|
}
|
||||||
|
if len(string(pv.Spec.PersistentVolumeReclaimPolicy)) > 0 {
|
||||||
|
if !supportedReclaimPolicy.Has(string(pv.Spec.PersistentVolumeReclaimPolicy)) {
|
||||||
|
allErrs = append(allErrs, field.NotSupported(specPath.Child("persistentVolumeReclaimPolicy"), pv.Spec.PersistentVolumeReclaimPolicy, supportedReclaimPolicy.List()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
numVolumes := 0
|
numVolumes := 0
|
||||||
if pv.Spec.HostPath != nil {
|
if pv.Spec.HostPath != nil {
|
||||||
@ -940,6 +1084,14 @@ func ValidatePersistentVolume(pv *api.PersistentVolume) field.ErrorList {
|
|||||||
allErrs = append(allErrs, validateRBDVolumeSource(pv.Spec.RBD, specPath.Child("rbd"))...)
|
allErrs = append(allErrs, validateRBDVolumeSource(pv.Spec.RBD, specPath.Child("rbd"))...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if pv.Spec.Quobyte != nil {
|
||||||
|
if numVolumes > 0 {
|
||||||
|
allErrs = append(allErrs, field.Forbidden(specPath.Child("quobyte"), "may not specify more than 1 volume type"))
|
||||||
|
} else {
|
||||||
|
numVolumes++
|
||||||
|
allErrs = append(allErrs, validateQuobyteVolumeSource(pv.Spec.Quobyte, specPath.Child("quobyte"))...)
|
||||||
|
}
|
||||||
|
}
|
||||||
if pv.Spec.CephFS != nil {
|
if pv.Spec.CephFS != nil {
|
||||||
if numVolumes > 0 {
|
if numVolumes > 0 {
|
||||||
allErrs = append(allErrs, field.Forbidden(specPath.Child("cephFS"), "may not specify more than 1 volume type"))
|
allErrs = append(allErrs, field.Forbidden(specPath.Child("cephFS"), "may not specify more than 1 volume type"))
|
||||||
@ -988,9 +1140,20 @@ func ValidatePersistentVolume(pv *api.PersistentVolume) field.ErrorList {
|
|||||||
allErrs = append(allErrs, validateVsphereVolumeSource(pv.Spec.VsphereVolume, specPath.Child("vsphereVolume"))...)
|
allErrs = append(allErrs, validateVsphereVolumeSource(pv.Spec.VsphereVolume, specPath.Child("vsphereVolume"))...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if pv.Spec.AzureDisk != nil {
|
||||||
|
numVolumes++
|
||||||
|
allErrs = append(allErrs, validateAzureDisk(pv.Spec.AzureDisk, specPath.Child("azureDisk"))...)
|
||||||
|
}
|
||||||
|
|
||||||
if numVolumes == 0 {
|
if numVolumes == 0 {
|
||||||
allErrs = append(allErrs, field.Required(specPath, "must specify a volume type"))
|
allErrs = append(allErrs, field.Required(specPath, "must specify a volume type"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// do not allow hostPath mounts of '/' to have a 'recycle' reclaim policy
|
||||||
|
if pv.Spec.HostPath != nil && path.Clean(pv.Spec.HostPath.Path) == "/" && pv.Spec.PersistentVolumeReclaimPolicy == api.PersistentVolumeReclaimRecycle {
|
||||||
|
allErrs = append(allErrs, field.Forbidden(specPath.Child("persistentVolumeReclaimPolicy"), "may not be 'recycle' for a hostPath mount of '/'"))
|
||||||
|
}
|
||||||
|
|
||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1014,26 +1177,37 @@ func ValidatePersistentVolumeStatusUpdate(newPv, oldPv *api.PersistentVolume) fi
|
|||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ValidatePersistentVolumeClaim validates a PersistentVolumeClaim
|
||||||
func ValidatePersistentVolumeClaim(pvc *api.PersistentVolumeClaim) field.ErrorList {
|
func ValidatePersistentVolumeClaim(pvc *api.PersistentVolumeClaim) field.ErrorList {
|
||||||
allErrs := ValidateObjectMeta(&pvc.ObjectMeta, true, ValidatePersistentVolumeName, field.NewPath("metadata"))
|
allErrs := ValidateObjectMeta(&pvc.ObjectMeta, true, ValidatePersistentVolumeName, field.NewPath("metadata"))
|
||||||
specPath := field.NewPath("spec")
|
allErrs = append(allErrs, ValidatePersistentVolumeClaimSpec(&pvc.Spec, field.NewPath("spec"))...)
|
||||||
if len(pvc.Spec.AccessModes) == 0 {
|
return allErrs
|
||||||
allErrs = append(allErrs, field.Required(specPath.Child("accessModes"), "at least 1 accessMode is required"))
|
}
|
||||||
|
|
||||||
|
// ValidatePersistentVolumeClaimSpec validates a PersistentVolumeClaimSpec
|
||||||
|
func ValidatePersistentVolumeClaimSpec(spec *api.PersistentVolumeClaimSpec, fldPath *field.Path) field.ErrorList {
|
||||||
|
allErrs := field.ErrorList{}
|
||||||
|
if len(spec.AccessModes) == 0 {
|
||||||
|
allErrs = append(allErrs, field.Required(fldPath.Child("accessModes"), "at least 1 access mode is required"))
|
||||||
}
|
}
|
||||||
if pvc.Spec.Selector != nil {
|
if spec.Selector != nil {
|
||||||
allErrs = append(allErrs, unversionedvalidation.ValidateLabelSelector(pvc.Spec.Selector, specPath.Child("selector"))...)
|
allErrs = append(allErrs, unversionedvalidation.ValidateLabelSelector(spec.Selector, fldPath.Child("selector"))...)
|
||||||
}
|
}
|
||||||
for _, mode := range pvc.Spec.AccessModes {
|
for _, mode := range spec.AccessModes {
|
||||||
if mode != api.ReadWriteOnce && mode != api.ReadOnlyMany && mode != api.ReadWriteMany {
|
if mode != api.ReadWriteOnce && mode != api.ReadOnlyMany && mode != api.ReadWriteMany {
|
||||||
allErrs = append(allErrs, field.NotSupported(specPath.Child("accessModes"), mode, supportedAccessModes.List()))
|
allErrs = append(allErrs, field.NotSupported(fldPath.Child("accessModes"), mode, supportedAccessModes.List()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if _, ok := pvc.Spec.Resources.Requests[api.ResourceStorage]; !ok {
|
storageValue, ok := spec.Resources.Requests[api.ResourceStorage]
|
||||||
allErrs = append(allErrs, field.Required(specPath.Child("resources").Key(string(api.ResourceStorage)), ""))
|
if !ok {
|
||||||
|
allErrs = append(allErrs, field.Required(fldPath.Child("resources").Key(string(api.ResourceStorage)), ""))
|
||||||
|
} else {
|
||||||
|
allErrs = append(allErrs, ValidateResourceQuantityValue(string(api.ResourceStorage), storageValue, fldPath.Child("resources").Key(string(api.ResourceStorage)))...)
|
||||||
}
|
}
|
||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ValidatePersistentVolumeClaimUpdate validates an update to a PeristentVolumeClaim
|
||||||
func ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc *api.PersistentVolumeClaim) field.ErrorList {
|
func ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc *api.PersistentVolumeClaim) field.ErrorList {
|
||||||
allErrs := ValidateObjectMetaUpdate(&newPvc.ObjectMeta, &oldPvc.ObjectMeta, field.NewPath("metadata"))
|
allErrs := ValidateObjectMetaUpdate(&newPvc.ObjectMeta, &oldPvc.ObjectMeta, field.NewPath("metadata"))
|
||||||
allErrs = append(allErrs, ValidatePersistentVolumeClaim(newPvc)...)
|
allErrs = append(allErrs, ValidatePersistentVolumeClaim(newPvc)...)
|
||||||
@ -1054,6 +1228,7 @@ func ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc *api.PersistentVolumeCla
|
|||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ValidatePersistentVolumeClaimStatusUpdate validates an update to status of a PeristentVolumeClaim
|
||||||
func ValidatePersistentVolumeClaimStatusUpdate(newPvc, oldPvc *api.PersistentVolumeClaim) field.ErrorList {
|
func ValidatePersistentVolumeClaimStatusUpdate(newPvc, oldPvc *api.PersistentVolumeClaim) field.ErrorList {
|
||||||
allErrs := ValidateObjectMetaUpdate(&newPvc.ObjectMeta, &oldPvc.ObjectMeta, field.NewPath("metadata"))
|
allErrs := ValidateObjectMetaUpdate(&newPvc.ObjectMeta, &oldPvc.ObjectMeta, field.NewPath("metadata"))
|
||||||
if len(newPvc.ResourceVersion) == 0 {
|
if len(newPvc.ResourceVersion) == 0 {
|
||||||
@ -1127,7 +1302,7 @@ func validateEnv(vars []api.EnvVar, fldPath *field.Path) field.ErrorList {
|
|||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
var validFieldPathExpressionsEnv = sets.NewString("metadata.name", "metadata.namespace", "status.podIP")
|
var validFieldPathExpressionsEnv = sets.NewString("metadata.name", "metadata.namespace", "spec.nodeName", "spec.serviceAccountName", "status.podIP")
|
||||||
var validContainerResourceFieldPathExpressions = sets.NewString("limits.cpu", "limits.memory", "requests.cpu", "requests.memory")
|
var validContainerResourceFieldPathExpressions = sets.NewString("limits.cpu", "limits.memory", "requests.cpu", "requests.memory")
|
||||||
|
|
||||||
func validateEnvVarValueFrom(ev api.EnvVar, fldPath *field.Path) field.ErrorList {
|
func validateEnvVarValueFrom(ev api.EnvVar, fldPath *field.Path) field.ErrorList {
|
||||||
@ -1636,7 +1811,7 @@ func validateTolerations(tolerations []api.Toleration, fldPath *field.Path) fiel
|
|||||||
func ValidatePod(pod *api.Pod) field.ErrorList {
|
func ValidatePod(pod *api.Pod) field.ErrorList {
|
||||||
fldPath := field.NewPath("metadata")
|
fldPath := field.NewPath("metadata")
|
||||||
allErrs := ValidateObjectMeta(&pod.ObjectMeta, true, ValidatePodName, fldPath)
|
allErrs := ValidateObjectMeta(&pod.ObjectMeta, true, ValidatePodName, fldPath)
|
||||||
allErrs = append(allErrs, ValidatePodSpecificAnnotations(pod.ObjectMeta.Annotations, fldPath.Child("annotations"))...)
|
allErrs = append(allErrs, ValidatePodSpecificAnnotations(pod.ObjectMeta.Annotations, &pod.Spec, fldPath.Child("annotations"))...)
|
||||||
allErrs = append(allErrs, ValidatePodSpec(&pod.Spec, field.NewPath("spec"))...)
|
allErrs = append(allErrs, ValidatePodSpec(&pod.Spec, field.NewPath("spec"))...)
|
||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
@ -1952,6 +2127,77 @@ func ValidateSeccompPodAnnotations(annotations map[string]string, fldPath *field
|
|||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ValidateAppArmorPodAnnotations(annotations map[string]string, spec *api.PodSpec, fldPath *field.Path) field.ErrorList {
|
||||||
|
allErrs := field.ErrorList{}
|
||||||
|
for k, p := range annotations {
|
||||||
|
if !strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if !utilconfig.DefaultFeatureGate.AppArmor() {
|
||||||
|
allErrs = append(allErrs, field.Forbidden(fldPath.Key(k), "AppArmor is disabled by feature-gate"))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
containerName := strings.TrimPrefix(k, apparmor.ContainerAnnotationKeyPrefix)
|
||||||
|
if !podSpecHasContainer(spec, containerName) {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Key(k), containerName, "container not found"))
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := apparmor.ValidateProfileFormat(p); err != nil {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Key(k), p, err.Error()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return allErrs
|
||||||
|
}
|
||||||
|
|
||||||
|
func podSpecHasContainer(spec *api.PodSpec, containerName string) bool {
|
||||||
|
for _, c := range spec.InitContainers {
|
||||||
|
if c.Name == containerName {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, c := range spec.Containers {
|
||||||
|
if c.Name == containerName {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
// a sysctl segment regex, concatenated with dots to form a sysctl name
|
||||||
|
SysctlSegmentFmt string = "[a-z0-9]([-_a-z0-9]*[a-z0-9])?"
|
||||||
|
|
||||||
|
// a sysctl name regex
|
||||||
|
SysctlFmt string = "(" + SysctlSegmentFmt + "\\.)*" + SysctlSegmentFmt
|
||||||
|
|
||||||
|
// the maximal length of a sysctl name
|
||||||
|
SysctlMaxLength int = 253
|
||||||
|
)
|
||||||
|
|
||||||
|
var sysctlRegexp = regexp.MustCompile("^" + SysctlFmt + "$")
|
||||||
|
|
||||||
|
// IsValidSysctlName checks that the given string is a valid sysctl name,
|
||||||
|
// i.e. matches SysctlFmt.
|
||||||
|
func IsValidSysctlName(name string) bool {
|
||||||
|
if len(name) > SysctlMaxLength {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return sysctlRegexp.MatchString(name)
|
||||||
|
}
|
||||||
|
|
||||||
|
func validateSysctls(sysctls []api.Sysctl, fldPath *field.Path) field.ErrorList {
|
||||||
|
allErrs := field.ErrorList{}
|
||||||
|
for i, s := range sysctls {
|
||||||
|
if len(s.Name) == 0 {
|
||||||
|
allErrs = append(allErrs, field.Required(fldPath.Index(i).Child("name"), ""))
|
||||||
|
} else if !IsValidSysctlName(s.Name) {
|
||||||
|
allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("name"), s.Name, fmt.Sprintf("must have at most %d characters and match regex %s", SysctlMaxLength, SysctlFmt)))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return allErrs
|
||||||
|
}
|
||||||
|
|
||||||
// ValidatePodSecurityContext test that the specified PodSecurityContext has valid data.
|
// ValidatePodSecurityContext test that the specified PodSecurityContext has valid data.
|
||||||
func ValidatePodSecurityContext(securityContext *api.PodSecurityContext, spec *api.PodSpec, specPath, fldPath *field.Path) field.ErrorList {
|
func ValidatePodSecurityContext(securityContext *api.PodSecurityContext, spec *api.PodSpec, specPath, fldPath *field.Path) field.ErrorList {
|
||||||
allErrs := field.ErrorList{}
|
allErrs := field.ErrorList{}
|
||||||
@ -1978,7 +2224,7 @@ func ValidatePodSecurityContext(securityContext *api.PodSecurityContext, spec *a
|
|||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateContainerUpdates(newContainers, oldContainers []api.Container, fldPath *field.Path) (allErrs field.ErrorList, stop bool) {
|
func ValidateContainerUpdates(newContainers, oldContainers []api.Container, fldPath *field.Path) (allErrs field.ErrorList, stop bool) {
|
||||||
allErrs = field.ErrorList{}
|
allErrs = field.ErrorList{}
|
||||||
if len(newContainers) != len(oldContainers) {
|
if len(newContainers) != len(oldContainers) {
|
||||||
//TODO: Pinpoint the specific container that causes the invalid error after we have strategic merge diff
|
//TODO: Pinpoint the specific container that causes the invalid error after we have strategic merge diff
|
||||||
@ -2000,7 +2246,7 @@ func validateContainerUpdates(newContainers, oldContainers []api.Container, fldP
|
|||||||
func ValidatePodUpdate(newPod, oldPod *api.Pod) field.ErrorList {
|
func ValidatePodUpdate(newPod, oldPod *api.Pod) field.ErrorList {
|
||||||
fldPath := field.NewPath("metadata")
|
fldPath := field.NewPath("metadata")
|
||||||
allErrs := ValidateObjectMetaUpdate(&newPod.ObjectMeta, &oldPod.ObjectMeta, fldPath)
|
allErrs := ValidateObjectMetaUpdate(&newPod.ObjectMeta, &oldPod.ObjectMeta, fldPath)
|
||||||
allErrs = append(allErrs, ValidatePodSpecificAnnotations(newPod.ObjectMeta.Annotations, fldPath.Child("annotations"))...)
|
allErrs = append(allErrs, ValidatePodSpecificAnnotationUpdates(newPod, oldPod, fldPath.Child("annotations"))...)
|
||||||
specPath := field.NewPath("spec")
|
specPath := field.NewPath("spec")
|
||||||
|
|
||||||
// validate updateable fields:
|
// validate updateable fields:
|
||||||
@ -2008,12 +2254,12 @@ func ValidatePodUpdate(newPod, oldPod *api.Pod) field.ErrorList {
|
|||||||
// 2. initContainers[*].image
|
// 2. initContainers[*].image
|
||||||
// 3. spec.activeDeadlineSeconds
|
// 3. spec.activeDeadlineSeconds
|
||||||
|
|
||||||
containerErrs, stop := validateContainerUpdates(newPod.Spec.Containers, oldPod.Spec.Containers, specPath.Child("containers"))
|
containerErrs, stop := ValidateContainerUpdates(newPod.Spec.Containers, oldPod.Spec.Containers, specPath.Child("containers"))
|
||||||
allErrs = append(allErrs, containerErrs...)
|
allErrs = append(allErrs, containerErrs...)
|
||||||
if stop {
|
if stop {
|
||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
containerErrs, stop = validateContainerUpdates(newPod.Spec.InitContainers, oldPod.Spec.InitContainers, specPath.Child("initContainers"))
|
containerErrs, stop = ValidateContainerUpdates(newPod.Spec.InitContainers, oldPod.Spec.InitContainers, specPath.Child("initContainers"))
|
||||||
allErrs = append(allErrs, containerErrs...)
|
allErrs = append(allErrs, containerErrs...)
|
||||||
if stop {
|
if stop {
|
||||||
return allErrs
|
return allErrs
|
||||||
@ -2118,17 +2364,19 @@ func ValidatePodTemplateUpdate(newPod, oldPod *api.PodTemplate) field.ErrorList
|
|||||||
|
|
||||||
var supportedSessionAffinityType = sets.NewString(string(api.ServiceAffinityClientIP), string(api.ServiceAffinityNone))
|
var supportedSessionAffinityType = sets.NewString(string(api.ServiceAffinityClientIP), string(api.ServiceAffinityNone))
|
||||||
var supportedServiceType = sets.NewString(string(api.ServiceTypeClusterIP), string(api.ServiceTypeNodePort),
|
var supportedServiceType = sets.NewString(string(api.ServiceTypeClusterIP), string(api.ServiceTypeNodePort),
|
||||||
string(api.ServiceTypeLoadBalancer))
|
string(api.ServiceTypeLoadBalancer), string(api.ServiceTypeExternalName))
|
||||||
|
|
||||||
// ValidateService tests if required fields in the service are set.
|
// ValidateService tests if required fields in the service are set.
|
||||||
func ValidateService(service *api.Service) field.ErrorList {
|
func ValidateService(service *api.Service) field.ErrorList {
|
||||||
allErrs := ValidateObjectMeta(&service.ObjectMeta, true, ValidateServiceName, field.NewPath("metadata"))
|
allErrs := ValidateObjectMeta(&service.ObjectMeta, true, ValidateServiceName, field.NewPath("metadata"))
|
||||||
|
|
||||||
specPath := field.NewPath("spec")
|
specPath := field.NewPath("spec")
|
||||||
if len(service.Spec.Ports) == 0 && service.Spec.ClusterIP != api.ClusterIPNone {
|
isHeadlessService := service.Spec.ClusterIP == api.ClusterIPNone
|
||||||
|
if len(service.Spec.Ports) == 0 && !isHeadlessService && service.Spec.Type != api.ServiceTypeExternalName {
|
||||||
allErrs = append(allErrs, field.Required(specPath.Child("ports"), ""))
|
allErrs = append(allErrs, field.Required(specPath.Child("ports"), ""))
|
||||||
}
|
}
|
||||||
if service.Spec.Type == api.ServiceTypeLoadBalancer {
|
switch service.Spec.Type {
|
||||||
|
case api.ServiceTypeLoadBalancer:
|
||||||
for ix := range service.Spec.Ports {
|
for ix := range service.Spec.Ports {
|
||||||
port := &service.Spec.Ports[ix]
|
port := &service.Spec.Ports[ix]
|
||||||
// This is a workaround for broken cloud environments that
|
// This is a workaround for broken cloud environments that
|
||||||
@ -2139,9 +2387,17 @@ func ValidateService(service *api.Service) field.ErrorList {
|
|||||||
allErrs = append(allErrs, field.Invalid(portPath, port.Port, "may not expose port 10250 externally since it is used by kubelet"))
|
allErrs = append(allErrs, field.Invalid(portPath, port.Port, "may not expose port 10250 externally since it is used by kubelet"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case api.ServiceTypeExternalName:
|
||||||
|
if service.Spec.ClusterIP != "" {
|
||||||
|
allErrs = append(allErrs, field.Invalid(specPath.Child("clusterIP"), service.Spec.ClusterIP, "must be empty for ExternalName services"))
|
||||||
|
}
|
||||||
|
if len(service.Spec.ExternalName) > 0 {
|
||||||
|
allErrs = append(allErrs, ValidateDNS1123Subdomain(service.Spec.ExternalName, specPath.Child("externalName"))...)
|
||||||
|
} else {
|
||||||
|
allErrs = append(allErrs, field.Required(specPath.Child("externalName"), ""))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isHeadlessService := service.Spec.ClusterIP == api.ClusterIPNone
|
|
||||||
allPortNames := sets.String{}
|
allPortNames := sets.String{}
|
||||||
portsPath := specPath.Child("ports")
|
portsPath := specPath.Child("ports")
|
||||||
for i := range service.Spec.Ports {
|
for i := range service.Spec.Ports {
|
||||||
@ -2382,7 +2638,7 @@ func ValidatePodTemplateSpec(spec *api.PodTemplateSpec, fldPath *field.Path) fie
|
|||||||
allErrs := field.ErrorList{}
|
allErrs := field.ErrorList{}
|
||||||
allErrs = append(allErrs, unversionedvalidation.ValidateLabels(spec.Labels, fldPath.Child("labels"))...)
|
allErrs = append(allErrs, unversionedvalidation.ValidateLabels(spec.Labels, fldPath.Child("labels"))...)
|
||||||
allErrs = append(allErrs, ValidateAnnotations(spec.Annotations, fldPath.Child("annotations"))...)
|
allErrs = append(allErrs, ValidateAnnotations(spec.Annotations, fldPath.Child("annotations"))...)
|
||||||
allErrs = append(allErrs, ValidatePodSpecificAnnotations(spec.Annotations, fldPath.Child("annotations"))...)
|
allErrs = append(allErrs, ValidatePodSpecificAnnotations(spec.Annotations, &spec.Spec, fldPath.Child("annotations"))...)
|
||||||
allErrs = append(allErrs, ValidatePodSpec(&spec.Spec, fldPath.Child("spec"))...)
|
allErrs = append(allErrs, ValidatePodSpec(&spec.Spec, fldPath.Child("spec"))...)
|
||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
@ -2405,6 +2661,9 @@ func ValidateReadOnlyPersistentDisks(volumes []api.Volume, fldPath *field.Path)
|
|||||||
// validateTaints tests if given taints have valid data.
|
// validateTaints tests if given taints have valid data.
|
||||||
func validateTaints(taints []api.Taint, fldPath *field.Path) field.ErrorList {
|
func validateTaints(taints []api.Taint, fldPath *field.Path) field.ErrorList {
|
||||||
allErrors := field.ErrorList{}
|
allErrors := field.ErrorList{}
|
||||||
|
|
||||||
|
uniqueTaints := map[api.TaintEffect]sets.String{}
|
||||||
|
|
||||||
for i, currTaint := range taints {
|
for i, currTaint := range taints {
|
||||||
idxPath := fldPath.Index(i)
|
idxPath := fldPath.Index(i)
|
||||||
// validate the taint key
|
// validate the taint key
|
||||||
@ -2415,6 +2674,20 @@ func validateTaints(taints []api.Taint, fldPath *field.Path) field.ErrorList {
|
|||||||
}
|
}
|
||||||
// validate the taint effect
|
// validate the taint effect
|
||||||
allErrors = append(allErrors, validateTaintEffect(&currTaint.Effect, false, idxPath.Child("effect"))...)
|
allErrors = append(allErrors, validateTaintEffect(&currTaint.Effect, false, idxPath.Child("effect"))...)
|
||||||
|
|
||||||
|
// validate if taint is unique by <key, effect>
|
||||||
|
if len(uniqueTaints[currTaint.Effect]) > 0 && uniqueTaints[currTaint.Effect].Has(currTaint.Key) {
|
||||||
|
duplicatedError := field.Duplicate(idxPath, currTaint)
|
||||||
|
duplicatedError.Detail = "taints must be unique by key and effect pair"
|
||||||
|
allErrors = append(allErrors, duplicatedError)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// add taint to existingTaints for uniqueness check
|
||||||
|
if len(uniqueTaints[currTaint.Effect]) == 0 {
|
||||||
|
uniqueTaints[currTaint.Effect] = sets.String{}
|
||||||
|
}
|
||||||
|
uniqueTaints[currTaint.Effect].Insert(currTaint.Key)
|
||||||
}
|
}
|
||||||
return allErrors
|
return allErrors
|
||||||
}
|
}
|
||||||
@ -3272,3 +3545,17 @@ func isValidHostnamesMap(serializedPodHostNames string) bool {
|
|||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func sysctlIntersection(a []api.Sysctl, b []api.Sysctl) []string {
|
||||||
|
lookup := make(map[string]struct{}, len(a))
|
||||||
|
result := []string{}
|
||||||
|
for i := range a {
|
||||||
|
lookup[a[i].Name] = struct{}{}
|
||||||
|
}
|
||||||
|
for i := range b {
|
||||||
|
if _, found := lookup[b[i].Name]; found {
|
||||||
|
result = append(result, b[i].Name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
@ -42,6 +42,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
|||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Affinity, InType: reflect.TypeOf(&Affinity{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Affinity, InType: reflect.TypeOf(&Affinity{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AttachedVolume, InType: reflect.TypeOf(&AttachedVolume{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AttachedVolume, InType: reflect.TypeOf(&AttachedVolume{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AvoidPods, InType: reflect.TypeOf(&AvoidPods{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AvoidPods, InType: reflect.TypeOf(&AvoidPods{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AzureDiskVolumeSource, InType: reflect.TypeOf(&AzureDiskVolumeSource{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AzureFileVolumeSource, InType: reflect.TypeOf(&AzureFileVolumeSource{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AzureFileVolumeSource, InType: reflect.TypeOf(&AzureFileVolumeSource{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Binding, InType: reflect.TypeOf(&Binding{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Binding, InType: reflect.TypeOf(&Binding{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Capabilities, InType: reflect.TypeOf(&Capabilities{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Capabilities, InType: reflect.TypeOf(&Capabilities{})},
|
||||||
@ -157,6 +158,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
|||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PreferAvoidPodsEntry, InType: reflect.TypeOf(&PreferAvoidPodsEntry{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PreferAvoidPodsEntry, InType: reflect.TypeOf(&PreferAvoidPodsEntry{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PreferredSchedulingTerm, InType: reflect.TypeOf(&PreferredSchedulingTerm{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PreferredSchedulingTerm, InType: reflect.TypeOf(&PreferredSchedulingTerm{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Probe, InType: reflect.TypeOf(&Probe{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Probe, InType: reflect.TypeOf(&Probe{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_QuobyteVolumeSource, InType: reflect.TypeOf(&QuobyteVolumeSource{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_RBDVolumeSource, InType: reflect.TypeOf(&RBDVolumeSource{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_RBDVolumeSource, InType: reflect.TypeOf(&RBDVolumeSource{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_RangeAllocation, InType: reflect.TypeOf(&RangeAllocation{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_RangeAllocation, InType: reflect.TypeOf(&RangeAllocation{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationController, InType: reflect.TypeOf(&ReplicationController{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationController, InType: reflect.TypeOf(&ReplicationController{})},
|
||||||
@ -184,6 +186,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
|||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceProxyOptions, InType: reflect.TypeOf(&ServiceProxyOptions{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceProxyOptions, InType: reflect.TypeOf(&ServiceProxyOptions{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceSpec, InType: reflect.TypeOf(&ServiceSpec{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceSpec, InType: reflect.TypeOf(&ServiceSpec{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceStatus, InType: reflect.TypeOf(&ServiceStatus{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceStatus, InType: reflect.TypeOf(&ServiceStatus{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Sysctl, InType: reflect.TypeOf(&Sysctl{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_TCPSocketAction, InType: reflect.TypeOf(&TCPSocketAction{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_TCPSocketAction, InType: reflect.TypeOf(&TCPSocketAction{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Taint, InType: reflect.TypeOf(&Taint{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Taint, InType: reflect.TypeOf(&Taint{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Toleration, InType: reflect.TypeOf(&Toleration{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Toleration, InType: reflect.TypeOf(&Toleration{})},
|
||||||
@ -271,6 +274,37 @@ func DeepCopy_api_AvoidPods(in interface{}, out interface{}, c *conversion.Clone
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DeepCopy_api_AzureDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*AzureDiskVolumeSource)
|
||||||
|
out := out.(*AzureDiskVolumeSource)
|
||||||
|
out.DiskName = in.DiskName
|
||||||
|
out.DataDiskURI = in.DataDiskURI
|
||||||
|
if in.CachingMode != nil {
|
||||||
|
in, out := &in.CachingMode, &out.CachingMode
|
||||||
|
*out = new(AzureDataDiskCachingMode)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.CachingMode = nil
|
||||||
|
}
|
||||||
|
if in.FSType != nil {
|
||||||
|
in, out := &in.FSType, &out.FSType
|
||||||
|
*out = new(string)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.FSType = nil
|
||||||
|
}
|
||||||
|
if in.ReadOnly != nil {
|
||||||
|
in, out := &in.ReadOnly, &out.ReadOnly
|
||||||
|
*out = new(bool)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.ReadOnly = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func DeepCopy_api_AzureFileVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
func DeepCopy_api_AzureFileVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
{
|
{
|
||||||
in := in.(*AzureFileVolumeSource)
|
in := in.(*AzureFileVolumeSource)
|
||||||
@ -473,11 +507,20 @@ func DeepCopy_api_ConfigMapVolumeSource(in interface{}, out interface{}, c *conv
|
|||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]KeyToPath, len(*in))
|
*out = make([]KeyToPath, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*out)[i] = (*in)[i]
|
if err := DeepCopy_api_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out.Items = nil
|
out.Items = nil
|
||||||
}
|
}
|
||||||
|
if in.DefaultMode != nil {
|
||||||
|
in, out := &in.DefaultMode, &out.DefaultMode
|
||||||
|
*out = new(int32)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.DefaultMode = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -781,6 +824,13 @@ func DeepCopy_api_DownwardAPIVolumeFile(in interface{}, out interface{}, c *conv
|
|||||||
} else {
|
} else {
|
||||||
out.ResourceFieldRef = nil
|
out.ResourceFieldRef = nil
|
||||||
}
|
}
|
||||||
|
if in.Mode != nil {
|
||||||
|
in, out := &in.Mode, &out.Mode
|
||||||
|
*out = new(int32)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.Mode = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -800,6 +850,13 @@ func DeepCopy_api_DownwardAPIVolumeSource(in interface{}, out interface{}, c *co
|
|||||||
} else {
|
} else {
|
||||||
out.Items = nil
|
out.Items = nil
|
||||||
}
|
}
|
||||||
|
if in.DefaultMode != nil {
|
||||||
|
in, out := &in.DefaultMode, &out.DefaultMode
|
||||||
|
*out = new(int32)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.DefaultMode = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1252,6 +1309,13 @@ func DeepCopy_api_KeyToPath(in interface{}, out interface{}, c *conversion.Clone
|
|||||||
out := out.(*KeyToPath)
|
out := out.(*KeyToPath)
|
||||||
out.Key = in.Key
|
out.Key = in.Key
|
||||||
out.Path = in.Path
|
out.Path = in.Path
|
||||||
|
if in.Mode != nil {
|
||||||
|
in, out := &in.Mode, &out.Mode
|
||||||
|
*out = new(int32)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.Mode = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1916,6 +1980,7 @@ func DeepCopy_api_ObjectMeta(in interface{}, out interface{}, c *conversion.Clon
|
|||||||
} else {
|
} else {
|
||||||
out.Finalizers = nil
|
out.Finalizers = nil
|
||||||
}
|
}
|
||||||
|
out.ClusterName = in.ClusterName
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2145,6 +2210,13 @@ func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *con
|
|||||||
} else {
|
} else {
|
||||||
out.RBD = nil
|
out.RBD = nil
|
||||||
}
|
}
|
||||||
|
if in.Quobyte != nil {
|
||||||
|
in, out := &in.Quobyte, &out.Quobyte
|
||||||
|
*out = new(QuobyteVolumeSource)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.Quobyte = nil
|
||||||
|
}
|
||||||
if in.ISCSI != nil {
|
if in.ISCSI != nil {
|
||||||
in, out := &in.ISCSI, &out.ISCSI
|
in, out := &in.ISCSI, &out.ISCSI
|
||||||
*out = new(ISCSIVolumeSource)
|
*out = new(ISCSIVolumeSource)
|
||||||
@ -2207,6 +2279,15 @@ func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *con
|
|||||||
} else {
|
} else {
|
||||||
out.VsphereVolume = nil
|
out.VsphereVolume = nil
|
||||||
}
|
}
|
||||||
|
if in.AzureDisk != nil {
|
||||||
|
in, out := &in.AzureDisk, &out.AzureDisk
|
||||||
|
*out = new(AzureDiskVolumeSource)
|
||||||
|
if err := DeepCopy_api_AzureDiskVolumeSource(*in, *out, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.AzureDisk = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2809,6 +2890,19 @@ func DeepCopy_api_Probe(in interface{}, out interface{}, c *conversion.Cloner) e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DeepCopy_api_QuobyteVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*QuobyteVolumeSource)
|
||||||
|
out := out.(*QuobyteVolumeSource)
|
||||||
|
out.Registry = in.Registry
|
||||||
|
out.Volume = in.Volume
|
||||||
|
out.ReadOnly = in.ReadOnly
|
||||||
|
out.User = in.User
|
||||||
|
out.Group = in.Group
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func DeepCopy_api_RBDVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
func DeepCopy_api_RBDVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
{
|
{
|
||||||
in := in.(*RBDVolumeSource)
|
in := in.(*RBDVolumeSource)
|
||||||
@ -2927,6 +3021,7 @@ func DeepCopy_api_ReplicationControllerStatus(in interface{}, out interface{}, c
|
|||||||
out := out.(*ReplicationControllerStatus)
|
out := out.(*ReplicationControllerStatus)
|
||||||
out.Replicas = in.Replicas
|
out.Replicas = in.Replicas
|
||||||
out.FullyLabeledReplicas = in.FullyLabeledReplicas
|
out.FullyLabeledReplicas = in.FullyLabeledReplicas
|
||||||
|
out.ReadyReplicas = in.ReadyReplicas
|
||||||
out.ObservedGeneration = in.ObservedGeneration
|
out.ObservedGeneration = in.ObservedGeneration
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -3138,11 +3233,20 @@ func DeepCopy_api_SecretVolumeSource(in interface{}, out interface{}, c *convers
|
|||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]KeyToPath, len(*in))
|
*out = make([]KeyToPath, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*out)[i] = (*in)[i]
|
if err := DeepCopy_api_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out.Items = nil
|
out.Items = nil
|
||||||
}
|
}
|
||||||
|
if in.DefaultMode != nil {
|
||||||
|
in, out := &in.DefaultMode, &out.DefaultMode
|
||||||
|
*out = new(int32)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.DefaultMode = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3346,6 +3450,7 @@ func DeepCopy_api_ServiceSpec(in interface{}, out interface{}, c *conversion.Clo
|
|||||||
out.Selector = nil
|
out.Selector = nil
|
||||||
}
|
}
|
||||||
out.ClusterIP = in.ClusterIP
|
out.ClusterIP = in.ClusterIP
|
||||||
|
out.ExternalName = in.ExternalName
|
||||||
if in.ExternalIPs != nil {
|
if in.ExternalIPs != nil {
|
||||||
in, out := &in.ExternalIPs, &out.ExternalIPs
|
in, out := &in.ExternalIPs, &out.ExternalIPs
|
||||||
*out = make([]string, len(*in))
|
*out = make([]string, len(*in))
|
||||||
@ -3377,6 +3482,16 @@ func DeepCopy_api_ServiceStatus(in interface{}, out interface{}, c *conversion.C
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DeepCopy_api_Sysctl(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*Sysctl)
|
||||||
|
out := out.(*Sysctl)
|
||||||
|
out.Name = in.Name
|
||||||
|
out.Value = in.Value
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func DeepCopy_api_TCPSocketAction(in interface{}, out interface{}, c *conversion.Cloner) error {
|
func DeepCopy_api_TCPSocketAction(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
{
|
{
|
||||||
in := in.(*TCPSocketAction)
|
in := in.(*TCPSocketAction)
|
||||||
@ -3518,6 +3633,13 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl
|
|||||||
} else {
|
} else {
|
||||||
out.RBD = nil
|
out.RBD = nil
|
||||||
}
|
}
|
||||||
|
if in.Quobyte != nil {
|
||||||
|
in, out := &in.Quobyte, &out.Quobyte
|
||||||
|
*out = new(QuobyteVolumeSource)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.Quobyte = nil
|
||||||
|
}
|
||||||
if in.FlexVolume != nil {
|
if in.FlexVolume != nil {
|
||||||
in, out := &in.FlexVolume, &out.FlexVolume
|
in, out := &in.FlexVolume, &out.FlexVolume
|
||||||
*out = new(FlexVolumeSource)
|
*out = new(FlexVolumeSource)
|
||||||
@ -3591,6 +3713,15 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl
|
|||||||
} else {
|
} else {
|
||||||
out.VsphereVolume = nil
|
out.VsphereVolume = nil
|
||||||
}
|
}
|
||||||
|
if in.AzureDisk != nil {
|
||||||
|
in, out := &in.AzureDisk, &out.AzureDisk
|
||||||
|
*out = new(AzureDiskVolumeSource)
|
||||||
|
if err := DeepCopy_api_AzureDiskVolumeSource(*in, *out, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.AzureDisk = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,13 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
DefaultAPIRegistrationManager = NewOrDie(os.Getenv("KUBE_API_VERSIONS"))
|
||||||
|
)
|
||||||
|
|
||||||
|
// APIRegistrationManager
|
||||||
|
type APIRegistrationManager struct {
|
||||||
// registeredGroupVersions stores all API group versions for which RegisterGroup is called.
|
// registeredGroupVersions stores all API group versions for which RegisterGroup is called.
|
||||||
registeredVersions = map[unversioned.GroupVersion]struct{}{}
|
registeredVersions map[unversioned.GroupVersion]struct{}
|
||||||
|
|
||||||
// thirdPartyGroupVersions are API versions which are dynamically
|
// thirdPartyGroupVersions are API versions which are dynamically
|
||||||
// registered (and unregistered) via API calls to the apiserver
|
// registered (and unregistered) via API calls to the apiserver
|
||||||
@ -42,75 +47,99 @@ var (
|
|||||||
// enabledVersions represents all enabled API versions. It should be a
|
// enabledVersions represents all enabled API versions. It should be a
|
||||||
// subset of registeredVersions. Please call EnableVersions() to add
|
// subset of registeredVersions. Please call EnableVersions() to add
|
||||||
// enabled versions.
|
// enabled versions.
|
||||||
enabledVersions = map[unversioned.GroupVersion]struct{}{}
|
enabledVersions map[unversioned.GroupVersion]struct{}
|
||||||
|
|
||||||
// map of group meta for all groups.
|
// map of group meta for all groups.
|
||||||
groupMetaMap = map[string]*apimachinery.GroupMeta{}
|
groupMetaMap map[string]*apimachinery.GroupMeta
|
||||||
|
|
||||||
// envRequestedVersions represents the versions requested via the
|
// envRequestedVersions represents the versions requested via the
|
||||||
// KUBE_API_VERSIONS environment variable. The install package of each group
|
// KUBE_API_VERSIONS environment variable. The install package of each group
|
||||||
// checks this list before add their versions to the latest package and
|
// checks this list before add their versions to the latest package and
|
||||||
// Scheme. This list is small and order matters, so represent as a slice
|
// Scheme. This list is small and order matters, so represent as a slice
|
||||||
envRequestedVersions = []unversioned.GroupVersion{}
|
envRequestedVersions []unversioned.GroupVersion
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
loadKubeAPIVersions()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadKubeAPIVersions() {
|
// NewAPIRegistrationManager constructs a new manager. The argument ought to be
|
||||||
// Env var KUBE_API_VERSIONS is a comma separated list of API versions that
|
// the value of the KUBE_API_VERSIONS env var, or a value of this which you
|
||||||
// should be registered in the scheme.
|
// wish to test.
|
||||||
kubeAPIVersions := os.Getenv("KUBE_API_VERSIONS")
|
func NewAPIRegistrationManager(kubeAPIVersions string) (*APIRegistrationManager, error) {
|
||||||
|
m := &APIRegistrationManager{
|
||||||
|
registeredVersions: map[unversioned.GroupVersion]struct{}{},
|
||||||
|
thirdPartyGroupVersions: []unversioned.GroupVersion{},
|
||||||
|
enabledVersions: map[unversioned.GroupVersion]struct{}{},
|
||||||
|
groupMetaMap: map[string]*apimachinery.GroupMeta{},
|
||||||
|
envRequestedVersions: []unversioned.GroupVersion{},
|
||||||
|
}
|
||||||
|
|
||||||
if len(kubeAPIVersions) != 0 {
|
if len(kubeAPIVersions) != 0 {
|
||||||
for _, version := range strings.Split(kubeAPIVersions, ",") {
|
for _, version := range strings.Split(kubeAPIVersions, ",") {
|
||||||
gv, err := unversioned.ParseGroupVersion(version)
|
gv, err := unversioned.ParseGroupVersion(version)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("invalid api version: %s in KUBE_API_VERSIONS: %s.",
|
return nil, fmt.Errorf("invalid api version: %s in KUBE_API_VERSIONS: %s.",
|
||||||
version, os.Getenv("KUBE_API_VERSIONS"))
|
version, kubeAPIVersions)
|
||||||
}
|
}
|
||||||
envRequestedVersions = append(envRequestedVersions, gv)
|
m.envRequestedVersions = append(m.envRequestedVersions, gv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return m, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resets everything to clean room for the start of a test
|
func NewOrDie(kubeAPIVersions string) *APIRegistrationManager {
|
||||||
func clearForTesting() {
|
m, err := NewAPIRegistrationManager(kubeAPIVersions)
|
||||||
registeredVersions = map[unversioned.GroupVersion]struct{}{}
|
if err != nil {
|
||||||
thirdPartyGroupVersions = []unversioned.GroupVersion{}
|
glog.Fatalf("Could not construct version manager: %v (KUBE_API_VERSIONS=%q)", err, kubeAPIVersions)
|
||||||
enabledVersions = map[unversioned.GroupVersion]struct{}{}
|
}
|
||||||
groupMetaMap = map[string]*apimachinery.GroupMeta{}
|
return m
|
||||||
envRequestedVersions = []unversioned.GroupVersion{}
|
|
||||||
loadKubeAPIVersions()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// People are calling global functions. Let them continue to do that (for now).
|
||||||
|
var (
|
||||||
|
ValidateEnvRequestedVersions = DefaultAPIRegistrationManager.ValidateEnvRequestedVersions
|
||||||
|
AllPreferredGroupVersions = DefaultAPIRegistrationManager.AllPreferredGroupVersions
|
||||||
|
RESTMapper = DefaultAPIRegistrationManager.RESTMapper
|
||||||
|
GroupOrDie = DefaultAPIRegistrationManager.GroupOrDie
|
||||||
|
AddThirdPartyAPIGroupVersions = DefaultAPIRegistrationManager.AddThirdPartyAPIGroupVersions
|
||||||
|
IsThirdPartyAPIGroupVersion = DefaultAPIRegistrationManager.IsThirdPartyAPIGroupVersion
|
||||||
|
RegisteredGroupVersions = DefaultAPIRegistrationManager.RegisteredGroupVersions
|
||||||
|
IsRegisteredVersion = DefaultAPIRegistrationManager.IsRegisteredVersion
|
||||||
|
IsRegistered = DefaultAPIRegistrationManager.IsRegistered
|
||||||
|
Group = DefaultAPIRegistrationManager.Group
|
||||||
|
EnabledVersionsForGroup = DefaultAPIRegistrationManager.EnabledVersionsForGroup
|
||||||
|
EnabledVersions = DefaultAPIRegistrationManager.EnabledVersions
|
||||||
|
IsEnabledVersion = DefaultAPIRegistrationManager.IsEnabledVersion
|
||||||
|
IsAllowedVersion = DefaultAPIRegistrationManager.IsAllowedVersion
|
||||||
|
EnableVersions = DefaultAPIRegistrationManager.EnableVersions
|
||||||
|
RegisterGroup = DefaultAPIRegistrationManager.RegisterGroup
|
||||||
|
RegisterVersions = DefaultAPIRegistrationManager.RegisterVersions
|
||||||
|
)
|
||||||
|
|
||||||
// RegisterVersions adds the given group versions to the list of registered group versions.
|
// RegisterVersions adds the given group versions to the list of registered group versions.
|
||||||
func RegisterVersions(availableVersions []unversioned.GroupVersion) {
|
func (m *APIRegistrationManager) RegisterVersions(availableVersions []unversioned.GroupVersion) {
|
||||||
for _, v := range availableVersions {
|
for _, v := range availableVersions {
|
||||||
registeredVersions[v] = struct{}{}
|
m.registeredVersions[v] = struct{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterGroup adds the given group to the list of registered groups.
|
// RegisterGroup adds the given group to the list of registered groups.
|
||||||
func RegisterGroup(groupMeta apimachinery.GroupMeta) error {
|
func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) error {
|
||||||
groupName := groupMeta.GroupVersion.Group
|
groupName := groupMeta.GroupVersion.Group
|
||||||
if _, found := groupMetaMap[groupName]; found {
|
if _, found := m.groupMetaMap[groupName]; found {
|
||||||
return fmt.Errorf("group %v is already registered", groupMetaMap)
|
return fmt.Errorf("group %v is already registered", m.groupMetaMap)
|
||||||
}
|
}
|
||||||
groupMetaMap[groupName] = &groupMeta
|
m.groupMetaMap[groupName] = &groupMeta
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnableVersions adds the versions for the given group to the list of enabled versions.
|
// EnableVersions adds the versions for the given group to the list of enabled versions.
|
||||||
// Note that the caller should call RegisterGroup before calling this method.
|
// Note that the caller should call RegisterGroup before calling this method.
|
||||||
// The caller of this function is responsible to add the versions to scheme and RESTMapper.
|
// The caller of this function is responsible to add the versions to scheme and RESTMapper.
|
||||||
func EnableVersions(versions ...unversioned.GroupVersion) error {
|
func (m *APIRegistrationManager) EnableVersions(versions ...unversioned.GroupVersion) error {
|
||||||
var unregisteredVersions []unversioned.GroupVersion
|
var unregisteredVersions []unversioned.GroupVersion
|
||||||
for _, v := range versions {
|
for _, v := range versions {
|
||||||
if _, found := registeredVersions[v]; !found {
|
if _, found := m.registeredVersions[v]; !found {
|
||||||
unregisteredVersions = append(unregisteredVersions, v)
|
unregisteredVersions = append(unregisteredVersions, v)
|
||||||
}
|
}
|
||||||
enabledVersions[v] = struct{}{}
|
m.enabledVersions[v] = struct{}{}
|
||||||
}
|
}
|
||||||
if len(unregisteredVersions) != 0 {
|
if len(unregisteredVersions) != 0 {
|
||||||
return fmt.Errorf("Please register versions before enabling them: %v", unregisteredVersions)
|
return fmt.Errorf("Please register versions before enabling them: %v", unregisteredVersions)
|
||||||
@ -121,11 +150,11 @@ func EnableVersions(versions ...unversioned.GroupVersion) error {
|
|||||||
// IsAllowedVersion returns if the version is allowed by the KUBE_API_VERSIONS
|
// IsAllowedVersion returns if the version is allowed by the KUBE_API_VERSIONS
|
||||||
// environment variable. If the environment variable is empty, then it always
|
// environment variable. If the environment variable is empty, then it always
|
||||||
// returns true.
|
// returns true.
|
||||||
func IsAllowedVersion(v unversioned.GroupVersion) bool {
|
func (m *APIRegistrationManager) IsAllowedVersion(v unversioned.GroupVersion) bool {
|
||||||
if len(envRequestedVersions) == 0 {
|
if len(m.envRequestedVersions) == 0 {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
for _, envGV := range envRequestedVersions {
|
for _, envGV := range m.envRequestedVersions {
|
||||||
if v == envGV {
|
if v == envGV {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -134,24 +163,24 @@ func IsAllowedVersion(v unversioned.GroupVersion) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// IsEnabledVersion returns if a version is enabled.
|
// IsEnabledVersion returns if a version is enabled.
|
||||||
func IsEnabledVersion(v unversioned.GroupVersion) bool {
|
func (m *APIRegistrationManager) IsEnabledVersion(v unversioned.GroupVersion) bool {
|
||||||
_, found := enabledVersions[v]
|
_, found := m.enabledVersions[v]
|
||||||
return found
|
return found
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnabledVersions returns all enabled versions. Groups are randomly ordered, but versions within groups
|
// EnabledVersions returns all enabled versions. Groups are randomly ordered, but versions within groups
|
||||||
// are priority order from best to worst
|
// are priority order from best to worst
|
||||||
func EnabledVersions() []unversioned.GroupVersion {
|
func (m *APIRegistrationManager) EnabledVersions() []unversioned.GroupVersion {
|
||||||
ret := []unversioned.GroupVersion{}
|
ret := []unversioned.GroupVersion{}
|
||||||
for _, groupMeta := range groupMetaMap {
|
for _, groupMeta := range m.groupMetaMap {
|
||||||
ret = append(ret, groupMeta.GroupVersions...)
|
ret = append(ret, groupMeta.GroupVersions...)
|
||||||
}
|
}
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnabledVersionsForGroup returns all enabled versions for a group in order of best to worst
|
// EnabledVersionsForGroup returns all enabled versions for a group in order of best to worst
|
||||||
func EnabledVersionsForGroup(group string) []unversioned.GroupVersion {
|
func (m *APIRegistrationManager) EnabledVersionsForGroup(group string) []unversioned.GroupVersion {
|
||||||
groupMeta, ok := groupMetaMap[group]
|
groupMeta, ok := m.groupMetaMap[group]
|
||||||
if !ok {
|
if !ok {
|
||||||
return []unversioned.GroupVersion{}
|
return []unversioned.GroupVersion{}
|
||||||
}
|
}
|
||||||
@ -159,10 +188,10 @@ func EnabledVersionsForGroup(group string) []unversioned.GroupVersion {
|
|||||||
return append([]unversioned.GroupVersion{}, groupMeta.GroupVersions...)
|
return append([]unversioned.GroupVersion{}, groupMeta.GroupVersions...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Group returns the metadata of a group if the gruop is registered, otherwise
|
// Group returns the metadata of a group if the group is registered, otherwise
|
||||||
// an erorr is returned.
|
// an error is returned.
|
||||||
func Group(group string) (*apimachinery.GroupMeta, error) {
|
func (m *APIRegistrationManager) Group(group string) (*apimachinery.GroupMeta, error) {
|
||||||
groupMeta, found := groupMetaMap[group]
|
groupMeta, found := m.groupMetaMap[group]
|
||||||
if !found {
|
if !found {
|
||||||
return nil, fmt.Errorf("group %v has not been registered", group)
|
return nil, fmt.Errorf("group %v has not been registered", group)
|
||||||
}
|
}
|
||||||
@ -171,30 +200,30 @@ func Group(group string) (*apimachinery.GroupMeta, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// IsRegistered takes a string and determines if it's one of the registered groups
|
// IsRegistered takes a string and determines if it's one of the registered groups
|
||||||
func IsRegistered(group string) bool {
|
func (m *APIRegistrationManager) IsRegistered(group string) bool {
|
||||||
_, found := groupMetaMap[group]
|
_, found := m.groupMetaMap[group]
|
||||||
return found
|
return found
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsRegisteredVersion returns if a version is registered.
|
// IsRegisteredVersion returns if a version is registered.
|
||||||
func IsRegisteredVersion(v unversioned.GroupVersion) bool {
|
func (m *APIRegistrationManager) IsRegisteredVersion(v unversioned.GroupVersion) bool {
|
||||||
_, found := registeredVersions[v]
|
_, found := m.registeredVersions[v]
|
||||||
return found
|
return found
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisteredGroupVersions returns all registered group versions.
|
// RegisteredGroupVersions returns all registered group versions.
|
||||||
func RegisteredGroupVersions() []unversioned.GroupVersion {
|
func (m *APIRegistrationManager) RegisteredGroupVersions() []unversioned.GroupVersion {
|
||||||
ret := []unversioned.GroupVersion{}
|
ret := []unversioned.GroupVersion{}
|
||||||
for groupVersion := range registeredVersions {
|
for groupVersion := range m.registeredVersions {
|
||||||
ret = append(ret, groupVersion)
|
ret = append(ret, groupVersion)
|
||||||
}
|
}
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsThirdPartyAPIGroupVersion returns true if the api version is a user-registered group/version.
|
// IsThirdPartyAPIGroupVersion returns true if the api version is a user-registered group/version.
|
||||||
func IsThirdPartyAPIGroupVersion(gv unversioned.GroupVersion) bool {
|
func (m *APIRegistrationManager) IsThirdPartyAPIGroupVersion(gv unversioned.GroupVersion) bool {
|
||||||
for ix := range thirdPartyGroupVersions {
|
for ix := range m.thirdPartyGroupVersions {
|
||||||
if thirdPartyGroupVersions[ix] == gv {
|
if m.thirdPartyGroupVersions[ix] == gv {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -205,11 +234,11 @@ func IsThirdPartyAPIGroupVersion(gv unversioned.GroupVersion) bool {
|
|||||||
// registers them in the API machinery and enables them.
|
// registers them in the API machinery and enables them.
|
||||||
// Skips GroupVersions that are already registered.
|
// Skips GroupVersions that are already registered.
|
||||||
// Returns the list of GroupVersions that were skipped.
|
// Returns the list of GroupVersions that were skipped.
|
||||||
func AddThirdPartyAPIGroupVersions(gvs ...unversioned.GroupVersion) []unversioned.GroupVersion {
|
func (m *APIRegistrationManager) AddThirdPartyAPIGroupVersions(gvs ...unversioned.GroupVersion) []unversioned.GroupVersion {
|
||||||
filteredGVs := []unversioned.GroupVersion{}
|
filteredGVs := []unversioned.GroupVersion{}
|
||||||
skippedGVs := []unversioned.GroupVersion{}
|
skippedGVs := []unversioned.GroupVersion{}
|
||||||
for ix := range gvs {
|
for ix := range gvs {
|
||||||
if !IsRegisteredVersion(gvs[ix]) {
|
if !m.IsRegisteredVersion(gvs[ix]) {
|
||||||
filteredGVs = append(filteredGVs, gvs[ix])
|
filteredGVs = append(filteredGVs, gvs[ix])
|
||||||
} else {
|
} else {
|
||||||
glog.V(3).Infof("Skipping %s, because its already registered", gvs[ix].String())
|
glog.V(3).Infof("Skipping %s, because its already registered", gvs[ix].String())
|
||||||
@ -219,17 +248,18 @@ func AddThirdPartyAPIGroupVersions(gvs ...unversioned.GroupVersion) []unversione
|
|||||||
if len(filteredGVs) == 0 {
|
if len(filteredGVs) == 0 {
|
||||||
return skippedGVs
|
return skippedGVs
|
||||||
}
|
}
|
||||||
RegisterVersions(filteredGVs)
|
m.RegisterVersions(filteredGVs)
|
||||||
EnableVersions(filteredGVs...)
|
m.EnableVersions(filteredGVs...)
|
||||||
thirdPartyGroupVersions = append(thirdPartyGroupVersions, filteredGVs...)
|
m.thirdPartyGroupVersions = append(m.thirdPartyGroupVersions, filteredGVs...)
|
||||||
|
|
||||||
return skippedGVs
|
return skippedGVs
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This is an expedient function, because we don't check if a Group is
|
// TODO: This is an expedient function, because we don't check if a Group is
|
||||||
// supported throughout the code base. We will abandon this function and
|
// supported throughout the code base. We will abandon this function and
|
||||||
// checking the error returned by the Group() function.
|
// checking the error returned by the Group() function.
|
||||||
func GroupOrDie(group string) *apimachinery.GroupMeta {
|
func (m *APIRegistrationManager) GroupOrDie(group string) *apimachinery.GroupMeta {
|
||||||
groupMeta, found := groupMetaMap[group]
|
groupMeta, found := m.groupMetaMap[group]
|
||||||
if !found {
|
if !found {
|
||||||
if group == "" {
|
if group == "" {
|
||||||
panic("The legacy v1 API is not registered.")
|
panic("The legacy v1 API is not registered.")
|
||||||
@ -246,13 +276,13 @@ func GroupOrDie(group string) *apimachinery.GroupMeta {
|
|||||||
// 1. legacy kube group preferred version, extensions preferred version, metrics perferred version, legacy
|
// 1. legacy kube group preferred version, extensions preferred version, metrics perferred version, legacy
|
||||||
// kube any version, extensions any version, metrics any version, all other groups alphabetical preferred version,
|
// kube any version, extensions any version, metrics any version, all other groups alphabetical preferred version,
|
||||||
// all other groups alphabetical.
|
// all other groups alphabetical.
|
||||||
func RESTMapper(versionPatterns ...unversioned.GroupVersion) meta.RESTMapper {
|
func (m *APIRegistrationManager) RESTMapper(versionPatterns ...unversioned.GroupVersion) meta.RESTMapper {
|
||||||
unionMapper := meta.MultiRESTMapper{}
|
unionMapper := meta.MultiRESTMapper{}
|
||||||
unionedGroups := sets.NewString()
|
unionedGroups := sets.NewString()
|
||||||
for enabledVersion := range enabledVersions {
|
for enabledVersion := range m.enabledVersions {
|
||||||
if !unionedGroups.Has(enabledVersion.Group) {
|
if !unionedGroups.Has(enabledVersion.Group) {
|
||||||
unionedGroups.Insert(enabledVersion.Group)
|
unionedGroups.Insert(enabledVersion.Group)
|
||||||
groupMeta := groupMetaMap[enabledVersion.Group]
|
groupMeta := m.groupMetaMap[enabledVersion.Group]
|
||||||
unionMapper = append(unionMapper, groupMeta.RESTMapper)
|
unionMapper = append(unionMapper, groupMeta.RESTMapper)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -268,11 +298,11 @@ func RESTMapper(versionPatterns ...unversioned.GroupVersion) meta.RESTMapper {
|
|||||||
return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority}
|
return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(envRequestedVersions) != 0 {
|
if len(m.envRequestedVersions) != 0 {
|
||||||
resourcePriority := []unversioned.GroupVersionResource{}
|
resourcePriority := []unversioned.GroupVersionResource{}
|
||||||
kindPriority := []unversioned.GroupVersionKind{}
|
kindPriority := []unversioned.GroupVersionKind{}
|
||||||
|
|
||||||
for _, versionPriority := range envRequestedVersions {
|
for _, versionPriority := range m.envRequestedVersions {
|
||||||
resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource))
|
resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource))
|
||||||
kindPriority = append(kindPriority, versionPriority.WithKind(meta.AnyKind))
|
kindPriority = append(kindPriority, versionPriority.WithKind(meta.AnyKind))
|
||||||
}
|
}
|
||||||
@ -281,17 +311,17 @@ func RESTMapper(versionPatterns ...unversioned.GroupVersion) meta.RESTMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
prioritizedGroups := []string{"", "extensions", "metrics"}
|
prioritizedGroups := []string{"", "extensions", "metrics"}
|
||||||
resourcePriority, kindPriority := prioritiesForGroups(prioritizedGroups...)
|
resourcePriority, kindPriority := m.prioritiesForGroups(prioritizedGroups...)
|
||||||
|
|
||||||
prioritizedGroupsSet := sets.NewString(prioritizedGroups...)
|
prioritizedGroupsSet := sets.NewString(prioritizedGroups...)
|
||||||
remainingGroups := sets.String{}
|
remainingGroups := sets.String{}
|
||||||
for enabledVersion := range enabledVersions {
|
for enabledVersion := range m.enabledVersions {
|
||||||
if !prioritizedGroupsSet.Has(enabledVersion.Group) {
|
if !prioritizedGroupsSet.Has(enabledVersion.Group) {
|
||||||
remainingGroups.Insert(enabledVersion.Group)
|
remainingGroups.Insert(enabledVersion.Group)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
remainingResourcePriority, remainingKindPriority := prioritiesForGroups(remainingGroups.List()...)
|
remainingResourcePriority, remainingKindPriority := m.prioritiesForGroups(remainingGroups.List()...)
|
||||||
resourcePriority = append(resourcePriority, remainingResourcePriority...)
|
resourcePriority = append(resourcePriority, remainingResourcePriority...)
|
||||||
kindPriority = append(kindPriority, remainingKindPriority...)
|
kindPriority = append(kindPriority, remainingKindPriority...)
|
||||||
|
|
||||||
@ -300,12 +330,12 @@ func RESTMapper(versionPatterns ...unversioned.GroupVersion) meta.RESTMapper {
|
|||||||
|
|
||||||
// prioritiesForGroups returns the resource and kind priorities for a PriorityRESTMapper, preferring the preferred version of each group first,
|
// prioritiesForGroups returns the resource and kind priorities for a PriorityRESTMapper, preferring the preferred version of each group first,
|
||||||
// then any non-preferred version of the group second.
|
// then any non-preferred version of the group second.
|
||||||
func prioritiesForGroups(groups ...string) ([]unversioned.GroupVersionResource, []unversioned.GroupVersionKind) {
|
func (m *APIRegistrationManager) prioritiesForGroups(groups ...string) ([]unversioned.GroupVersionResource, []unversioned.GroupVersionKind) {
|
||||||
resourcePriority := []unversioned.GroupVersionResource{}
|
resourcePriority := []unversioned.GroupVersionResource{}
|
||||||
kindPriority := []unversioned.GroupVersionKind{}
|
kindPriority := []unversioned.GroupVersionKind{}
|
||||||
|
|
||||||
for _, group := range groups {
|
for _, group := range groups {
|
||||||
availableVersions := EnabledVersionsForGroup(group)
|
availableVersions := m.EnabledVersionsForGroup(group)
|
||||||
if len(availableVersions) > 0 {
|
if len(availableVersions) > 0 {
|
||||||
resourcePriority = append(resourcePriority, availableVersions[0].WithResource(meta.AnyResource))
|
resourcePriority = append(resourcePriority, availableVersions[0].WithResource(meta.AnyResource))
|
||||||
kindPriority = append(kindPriority, availableVersions[0].WithKind(meta.AnyKind))
|
kindPriority = append(kindPriority, availableVersions[0].WithKind(meta.AnyKind))
|
||||||
@ -321,12 +351,12 @@ func prioritiesForGroups(groups ...string) ([]unversioned.GroupVersionResource,
|
|||||||
|
|
||||||
// AllPreferredGroupVersions returns the preferred versions of all registered
|
// AllPreferredGroupVersions returns the preferred versions of all registered
|
||||||
// groups in the form of "group1/version1,group2/version2,..."
|
// groups in the form of "group1/version1,group2/version2,..."
|
||||||
func AllPreferredGroupVersions() string {
|
func (m *APIRegistrationManager) AllPreferredGroupVersions() string {
|
||||||
if len(groupMetaMap) == 0 {
|
if len(m.groupMetaMap) == 0 {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
var defaults []string
|
var defaults []string
|
||||||
for _, groupMeta := range groupMetaMap {
|
for _, groupMeta := range m.groupMetaMap {
|
||||||
defaults = append(defaults, groupMeta.GroupVersion.String())
|
defaults = append(defaults, groupMeta.GroupVersion.String())
|
||||||
}
|
}
|
||||||
sort.Strings(defaults)
|
sort.Strings(defaults)
|
||||||
@ -335,21 +365,12 @@ func AllPreferredGroupVersions() string {
|
|||||||
|
|
||||||
// ValidateEnvRequestedVersions returns a list of versions that are requested in
|
// ValidateEnvRequestedVersions returns a list of versions that are requested in
|
||||||
// the KUBE_API_VERSIONS environment variable, but not enabled.
|
// the KUBE_API_VERSIONS environment variable, but not enabled.
|
||||||
func ValidateEnvRequestedVersions() []unversioned.GroupVersion {
|
func (m *APIRegistrationManager) ValidateEnvRequestedVersions() []unversioned.GroupVersion {
|
||||||
var missingVersions []unversioned.GroupVersion
|
var missingVersions []unversioned.GroupVersion
|
||||||
for _, v := range envRequestedVersions {
|
for _, v := range m.envRequestedVersions {
|
||||||
if _, found := enabledVersions[v]; !found {
|
if _, found := m.enabledVersions[v]; !found {
|
||||||
missingVersions = append(missingVersions, v)
|
missingVersions = append(missingVersions, v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return missingVersions
|
return missingVersions
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resets the state.
|
|
||||||
// Should not be used by anyone else than tests.
|
|
||||||
func reset() {
|
|
||||||
registeredVersions = map[unversioned.GroupVersion]struct{}{}
|
|
||||||
enabledVersions = map[unversioned.GroupVersion]struct{}{}
|
|
||||||
groupMetaMap = map[string]*apimachinery.GroupMeta{}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
@ -33,12 +33,12 @@ const GroupName = "apps"
|
|||||||
// SchemeGroupVersion is group version used to register these objects
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
||||||
|
|
||||||
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
|
// Kind takes an unqualified kind and returns a Group qualified GroupKind
|
||||||
func Kind(kind string) unversioned.GroupKind {
|
func Kind(kind string) unversioned.GroupKind {
|
||||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resource takes an unqualified resource and returns back a Group qualified GroupResource
|
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||||
func Resource(resource string) unversioned.GroupResource {
|
func Resource(resource string) unversioned.GroupResource {
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||||
}
|
}
|
||||||
|
@ -1431,7 +1431,7 @@ func (x codecSelfer1234) decSliceapi_PersistentVolumeClaim(v *[]pkg2_api.Persist
|
|||||||
|
|
||||||
yyrg121 := len(yyv121) > 0
|
yyrg121 := len(yyv121) > 0
|
||||||
yyv2121 := yyv121
|
yyv2121 := yyv121
|
||||||
yyrl121, yyrt121 = z.DecInferLen(yyl121, z.DecBasicHandle().MaxInitLen, 352)
|
yyrl121, yyrt121 = z.DecInferLen(yyl121, z.DecBasicHandle().MaxInitLen, 368)
|
||||||
if yyrt121 {
|
if yyrt121 {
|
||||||
if yyrl121 <= cap(yyv121) {
|
if yyrl121 <= cap(yyv121) {
|
||||||
yyv121 = yyv121[:yyrl121]
|
yyv121 = yyv121[:yyrl121]
|
||||||
@ -1547,7 +1547,7 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
|
|||||||
|
|
||||||
yyrg127 := len(yyv127) > 0
|
yyrg127 := len(yyv127) > 0
|
||||||
yyv2127 := yyv127
|
yyv2127 := yyv127
|
||||||
yyrl127, yyrt127 = z.DecInferLen(yyl127, z.DecBasicHandle().MaxInitLen, 744)
|
yyrl127, yyrt127 = z.DecInferLen(yyl127, z.DecBasicHandle().MaxInitLen, 776)
|
||||||
if yyrt127 {
|
if yyrt127 {
|
||||||
if yyrl127 <= cap(yyv127) {
|
if yyrl127 <= cap(yyv127) {
|
||||||
yyv127 = yyv127[:yyrl127]
|
yyv127 = yyv127[:yyrl127]
|
||||||
|
@ -1461,7 +1461,7 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten
|
|||||||
|
|
||||||
yyrg125 := len(yyv125) > 0
|
yyrg125 := len(yyv125) > 0
|
||||||
yyv2125 := yyv125
|
yyv2125 := yyv125
|
||||||
yyrl125, yyrt125 = z.DecInferLen(yyl125, z.DecBasicHandle().MaxInitLen, 352)
|
yyrl125, yyrt125 = z.DecInferLen(yyl125, z.DecBasicHandle().MaxInitLen, 368)
|
||||||
if yyrt125 {
|
if yyrt125 {
|
||||||
if yyrl125 <= cap(yyv125) {
|
if yyrl125 <= cap(yyv125) {
|
||||||
yyv125 = yyv125[:yyrl125]
|
yyv125 = yyv125[:yyrl125]
|
||||||
@ -1577,7 +1577,7 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
|
|||||||
|
|
||||||
yyrg131 := len(yyv131) > 0
|
yyrg131 := len(yyv131) > 0
|
||||||
yyv2131 := yyv131
|
yyv2131 := yyv131
|
||||||
yyrl131, yyrt131 = z.DecInferLen(yyl131, z.DecBasicHandle().MaxInitLen, 768)
|
yyrl131, yyrt131 = z.DecInferLen(yyl131, z.DecBasicHandle().MaxInitLen, 800)
|
||||||
if yyrt131 {
|
if yyrt131 {
|
||||||
if yyrl131 <= cap(yyv131) {
|
if yyrl131 <= cap(yyv131) {
|
||||||
yyv131 = yyv131[:yyrl131]
|
yyv131 = yyv131[:yyrl131]
|
||||||
|
@ -28,12 +28,12 @@ const GroupName = "authentication.k8s.io"
|
|||||||
// SchemeGroupVersion is group version used to register these objects
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
||||||
|
|
||||||
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
|
// Kind takes an unqualified kind and returns a Group qualified GroupKind
|
||||||
func Kind(kind string) unversioned.GroupKind {
|
func Kind(kind string) unversioned.GroupKind {
|
||||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resource takes an unqualified resource and returns back a Group qualified GroupResource
|
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||||
func Resource(resource string) unversioned.GroupResource {
|
func Resource(resource string) unversioned.GroupResource {
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -21,6 +21,21 @@ import (
|
|||||||
"k8s.io/client-go/1.4/pkg/api/unversioned"
|
"k8s.io/client-go/1.4/pkg/api/unversioned"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// ImpersonateUserHeader is used to impersonate a particular user during an API server request
|
||||||
|
ImpersonateUserHeader = "Impersonate-User"
|
||||||
|
|
||||||
|
// ImpersonateGroupHeader is used to impersonate a particular group during an API server request.
|
||||||
|
// It can be repeated multiplied times for multiple groups.
|
||||||
|
ImpersonateGroupHeader = "Impersonate-Group"
|
||||||
|
|
||||||
|
// ImpersonateUserExtraHeaderPrefix is a prefix for any header used to impersonate an entry in the
|
||||||
|
// extra map[string][]string for user.Info. The key will be every after the prefix.
|
||||||
|
// It can be repeated multiplied times for multiple map keys and the same key can be repeated multiple
|
||||||
|
// times to have multiple elements in the slice under a single key
|
||||||
|
ImpersonateUserExtraHeaderPrefix = "Impersonate-Extra-"
|
||||||
|
)
|
||||||
|
|
||||||
// +genclient=true
|
// +genclient=true
|
||||||
// +nonNamespaced=true
|
// +nonNamespaced=true
|
||||||
// +noMethods=true
|
// +noMethods=true
|
||||||
|
@ -27,12 +27,12 @@ const GroupName = "authorization.k8s.io"
|
|||||||
// SchemeGroupVersion is group version used to register these objects
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
||||||
|
|
||||||
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
|
// Kind takes an unqualified kind and returns a Group qualified GroupKind
|
||||||
func Kind(kind string) unversioned.GroupKind {
|
func Kind(kind string) unversioned.GroupKind {
|
||||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resource takes an unqualified resource and returns back a Group qualified GroupResource
|
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||||
func Resource(resource string) unversioned.GroupResource {
|
func Resource(resource string) unversioned.GroupResource {
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -28,12 +28,12 @@ const GroupName = "autoscaling"
|
|||||||
// SchemeGroupVersion is group version used to register these objects
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
||||||
|
|
||||||
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
|
// Kind takes an unqualified kind and returns a Group qualified GroupKind
|
||||||
func Kind(kind string) unversioned.GroupKind {
|
func Kind(kind string) unversioned.GroupKind {
|
||||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resource takes an unqualified resource and returns back a Group qualified GroupResource
|
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||||
func Resource(resource string) unversioned.GroupResource {
|
func Resource(resource string) unversioned.GroupResource {
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||||
}
|
}
|
||||||
|
@ -2575,7 +2575,7 @@ func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutos
|
|||||||
|
|
||||||
yyrg220 := len(yyv220) > 0
|
yyrg220 := len(yyv220) > 0
|
||||||
yyv2220 := yyv220
|
yyv2220 := yyv220
|
||||||
yyrl220, yyrt220 = z.DecInferLen(yyl220, z.DecBasicHandle().MaxInitLen, 344)
|
yyrl220, yyrt220 = z.DecInferLen(yyl220, z.DecBasicHandle().MaxInitLen, 360)
|
||||||
if yyrt220 {
|
if yyrt220 {
|
||||||
if yyrl220 <= cap(yyv220) {
|
if yyrl220 <= cap(yyv220) {
|
||||||
yyv220 = yyv220[:yyrl220]
|
yyv220 = yyv220[:yyrl220]
|
||||||
|
@ -2575,7 +2575,7 @@ func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutos
|
|||||||
|
|
||||||
yyrg220 := len(yyv220) > 0
|
yyrg220 := len(yyv220) > 0
|
||||||
yyv2220 := yyv220
|
yyv2220 := yyv220
|
||||||
yyrl220, yyrt220 = z.DecInferLen(yyl220, z.DecBasicHandle().MaxInitLen, 344)
|
yyrl220, yyrt220 = z.DecInferLen(yyl220, z.DecBasicHandle().MaxInitLen, 360)
|
||||||
if yyrt220 {
|
if yyrt220 {
|
||||||
if yyrl220 <= cap(yyv220) {
|
if yyrl220 <= cap(yyv220) {
|
||||||
yyv220 = yyv220[:yyrl220]
|
yyv220 = yyv220[:yyrl220]
|
||||||
|
@ -28,12 +28,12 @@ const GroupName = "batch"
|
|||||||
// SchemeGroupVersion is group version used to register these objects
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
||||||
|
|
||||||
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
|
// Kind takes an unqualified kind and returns a Group qualified GroupKind
|
||||||
func Kind(kind string) unversioned.GroupKind {
|
func Kind(kind string) unversioned.GroupKind {
|
||||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resource takes an unqualified resource and returns back a Group qualified GroupResource
|
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||||
func Resource(resource string) unversioned.GroupResource {
|
func Resource(resource string) unversioned.GroupResource {
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||||
}
|
}
|
||||||
|
@ -4247,7 +4247,7 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) {
|
|||||||
|
|
||||||
yyrg370 := len(yyv370) > 0
|
yyrg370 := len(yyv370) > 0
|
||||||
yyv2370 := yyv370
|
yyv2370 := yyv370
|
||||||
yyrl370, yyrt370 = z.DecInferLen(yyl370, z.DecBasicHandle().MaxInitLen, 768)
|
yyrl370, yyrt370 = z.DecInferLen(yyl370, z.DecBasicHandle().MaxInitLen, 800)
|
||||||
if yyrt370 {
|
if yyrt370 {
|
||||||
if yyrl370 <= cap(yyv370) {
|
if yyrl370 <= cap(yyv370) {
|
||||||
yyv370 = yyv370[:yyrl370]
|
yyv370 = yyv370[:yyrl370]
|
||||||
@ -4479,7 +4479,7 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
|||||||
|
|
||||||
yyrg382 := len(yyv382) > 0
|
yyrg382 := len(yyv382) > 0
|
||||||
yyv2382 := yyv382
|
yyv2382 := yyv382
|
||||||
yyrl382, yyrt382 = z.DecInferLen(yyl382, z.DecBasicHandle().MaxInitLen, 1000)
|
yyrl382, yyrt382 = z.DecInferLen(yyl382, z.DecBasicHandle().MaxInitLen, 1048)
|
||||||
if yyrt382 {
|
if yyrt382 {
|
||||||
if yyrl382 <= cap(yyv382) {
|
if yyrl382 <= cap(yyv382) {
|
||||||
yyv382 = yyv382[:yyrl382]
|
yyv382 = yyv382[:yyrl382]
|
||||||
|
@ -2872,7 +2872,7 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) {
|
|||||||
|
|
||||||
yyrg245 := len(yyv245) > 0
|
yyrg245 := len(yyv245) > 0
|
||||||
yyv2245 := yyv245
|
yyv2245 := yyv245
|
||||||
yyrl245, yyrt245 = z.DecInferLen(yyl245, z.DecBasicHandle().MaxInitLen, 792)
|
yyrl245, yyrt245 = z.DecInferLen(yyl245, z.DecBasicHandle().MaxInitLen, 824)
|
||||||
if yyrt245 {
|
if yyrt245 {
|
||||||
if yyrl245 <= cap(yyv245) {
|
if yyrl245 <= cap(yyv245) {
|
||||||
yyv245 = yyv245[:yyrl245]
|
yyv245 = yyv245[:yyrl245]
|
||||||
|
@ -4767,7 +4767,7 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) {
|
|||||||
|
|
||||||
yyrg409 := len(yyv409) > 0
|
yyrg409 := len(yyv409) > 0
|
||||||
yyv2409 := yyv409
|
yyv2409 := yyv409
|
||||||
yyrl409, yyrt409 = z.DecInferLen(yyl409, z.DecBasicHandle().MaxInitLen, 792)
|
yyrl409, yyrt409 = z.DecInferLen(yyl409, z.DecBasicHandle().MaxInitLen, 824)
|
||||||
if yyrt409 {
|
if yyrt409 {
|
||||||
if yyrl409 <= cap(yyv409) {
|
if yyrl409 <= cap(yyv409) {
|
||||||
yyv409 = yyv409[:yyrl409]
|
yyv409 = yyv409[:yyrl409]
|
||||||
@ -4999,7 +4999,7 @@ func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.De
|
|||||||
|
|
||||||
yyrg421 := len(yyv421) > 0
|
yyrg421 := len(yyv421) > 0
|
||||||
yyv2421 := yyv421
|
yyv2421 := yyv421
|
||||||
yyrl421, yyrt421 = z.DecInferLen(yyl421, z.DecBasicHandle().MaxInitLen, 1024)
|
yyrl421, yyrt421 = z.DecInferLen(yyl421, z.DecBasicHandle().MaxInitLen, 1072)
|
||||||
if yyrt421 {
|
if yyrt421 {
|
||||||
if yyrl421 <= cap(yyv421) {
|
if yyrl421 <= cap(yyv421) {
|
||||||
yyv421 = yyv421[:yyrl421]
|
yyv421 = yyv421[:yyrl421]
|
||||||
|
@ -33,12 +33,12 @@ const GroupName = "certificates"
|
|||||||
// SchemeGroupVersion is group version used to register these objects
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
||||||
|
|
||||||
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
|
// Kind takes an unqualified kind and returns a Group qualified GroupKind
|
||||||
func Kind(kind string) unversioned.GroupKind {
|
func Kind(kind string) unversioned.GroupKind {
|
||||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resource takes an unqualified resource and returns back a Group qualified GroupResource
|
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||||
func Resource(resource string) unversioned.GroupResource {
|
func Resource(resource string) unversioned.GroupResource {
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||||
}
|
}
|
||||||
|
@ -1876,7 +1876,7 @@ func (x codecSelfer1234) decSliceCertificateSigningRequest(v *[]CertificateSigni
|
|||||||
|
|
||||||
yyrg152 := len(yyv152) > 0
|
yyrg152 := len(yyv152) > 0
|
||||||
yyv2152 := yyv152
|
yyv2152 := yyv152
|
||||||
yyrl152, yyrt152 = z.DecInferLen(yyl152, z.DecBasicHandle().MaxInitLen, 368)
|
yyrl152, yyrt152 = z.DecInferLen(yyl152, z.DecBasicHandle().MaxInitLen, 384)
|
||||||
if yyrt152 {
|
if yyrt152 {
|
||||||
if yyrl152 <= cap(yyv152) {
|
if yyrl152 <= cap(yyv152) {
|
||||||
yyv152 = yyv152[:yyrl152]
|
yyv152 = yyv152[:yyrl152]
|
||||||
|
@ -29,7 +29,7 @@ type CertificateSigningRequest struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// The certificate request itself and any additonal information.
|
// The certificate request itself and any additional information.
|
||||||
Spec CertificateSigningRequestSpec `json:"spec,omitempty"`
|
Spec CertificateSigningRequestSpec `json:"spec,omitempty"`
|
||||||
|
|
||||||
// Derived information about the request.
|
// Derived information about the request.
|
||||||
|
@ -16,9 +16,24 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1alpha1
|
package v1alpha1
|
||||||
|
|
||||||
import "k8s.io/client-go/1.4/pkg/runtime"
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"k8s.io/client-go/1.4/pkg/api"
|
||||||
|
"k8s.io/client-go/1.4/pkg/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
func addConversionFuncs(scheme *runtime.Scheme) error {
|
func addConversionFuncs(scheme *runtime.Scheme) error {
|
||||||
// Add non-generated conversion functions here. Currently there are none.
|
// Add non-generated conversion functions here. Currently there are none.
|
||||||
return nil
|
|
||||||
|
return api.Scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.String(), "CertificateSigningRequest",
|
||||||
|
func(label, value string) (string, string, error) {
|
||||||
|
switch label {
|
||||||
|
case "metadata.name":
|
||||||
|
return label, value, nil
|
||||||
|
default:
|
||||||
|
return "", "", fmt.Errorf("field label not supported: %s", label)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ option go_package = "v1alpha1";
|
|||||||
message CertificateSigningRequest {
|
message CertificateSigningRequest {
|
||||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||||
|
|
||||||
// The certificate request itself and any additonal information.
|
// The certificate request itself and any additional information.
|
||||||
optional CertificateSigningRequestSpec spec = 2;
|
optional CertificateSigningRequestSpec spec = 2;
|
||||||
|
|
||||||
// Derived information about the request.
|
// Derived information about the request.
|
||||||
|
@ -29,12 +29,12 @@ const GroupName = "certificates"
|
|||||||
// SchemeGroupVersion is group version used to register these objects
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"}
|
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"}
|
||||||
|
|
||||||
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
|
// Kind takes an unqualified kind and returns a Group qualified GroupKind
|
||||||
func Kind(kind string) unversioned.GroupKind {
|
func Kind(kind string) unversioned.GroupKind {
|
||||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resource takes an unqualified resource and returns back a Group qualified GroupResource
|
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||||
func Resource(resource string) unversioned.GroupResource {
|
func Resource(resource string) unversioned.GroupResource {
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||||
}
|
}
|
||||||
|
@ -1869,7 +1869,7 @@ func (x codecSelfer1234) decSliceCertificateSigningRequest(v *[]CertificateSigni
|
|||||||
|
|
||||||
yyrg152 := len(yyv152) > 0
|
yyrg152 := len(yyv152) > 0
|
||||||
yyv2152 := yyv152
|
yyv2152 := yyv152
|
||||||
yyrl152, yyrt152 = z.DecInferLen(yyl152, z.DecBasicHandle().MaxInitLen, 368)
|
yyrl152, yyrt152 = z.DecInferLen(yyl152, z.DecBasicHandle().MaxInitLen, 384)
|
||||||
if yyrt152 {
|
if yyrt152 {
|
||||||
if yyrl152 <= cap(yyv152) {
|
if yyrl152 <= cap(yyv152) {
|
||||||
yyv152 = yyv152[:yyrl152]
|
yyv152 = yyv152[:yyrl152]
|
||||||
|
@ -29,7 +29,7 @@ type CertificateSigningRequest struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// The certificate request itself and any additonal information.
|
// The certificate request itself and any additional information.
|
||||||
Spec CertificateSigningRequestSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec CertificateSigningRequestSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Derived information about the request.
|
// Derived information about the request.
|
||||||
|
@ -29,7 +29,7 @@ package v1alpha1
|
|||||||
// AUTO-GENERATED FUNCTIONS START HERE
|
// AUTO-GENERATED FUNCTIONS START HERE
|
||||||
var map_CertificateSigningRequest = map[string]string{
|
var map_CertificateSigningRequest = map[string]string{
|
||||||
"": "Describes a certificate signing request",
|
"": "Describes a certificate signing request",
|
||||||
"spec": "The certificate request itself and any additonal information.",
|
"spec": "The certificate request itself and any additional information.",
|
||||||
"status": "Derived information about the request.",
|
"status": "Derived information about the request.",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,12 +32,12 @@ const GroupName = "componentconfig"
|
|||||||
// SchemeGroupVersion is group version used to register these objects
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
||||||
|
|
||||||
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
|
// Kind takes an unqualified kind and returns a Group qualified GroupKind
|
||||||
func Kind(kind string) unversioned.GroupKind {
|
func Kind(kind string) unversioned.GroupKind {
|
||||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resource takes an unqualified resource and returns back a Group qualified GroupResource
|
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||||
func Resource(resource string) unversioned.GroupResource {
|
func Resource(resource string) unversioned.GroupResource {
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user