diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json
index a1d851e20cc..05479d04ef8 100644
--- a/api/openapi-spec/swagger.json
+++ b/api/openapi-spec/swagger.json
@@ -35583,6 +35583,808 @@
}
]
},
+ "/apis/settings.k8s.io/": {
+ "get": {
+ "description": "get information of a group",
+ "consumes": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings"
+ ],
+ "operationId": "getSettingsAPIGroup",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ }
+ },
+ "/apis/settings.k8s.io/v1alpha1/": {
+ "get": {
+ "description": "get available resources",
+ "consumes": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings_v1alpha1"
+ ],
+ "operationId": "getSettingsV1alpha1APIResources",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ }
+ },
+ "/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets": {
+ "get": {
+ "description": "list or watch objects of kind PodPreset",
+ "consumes": [
+ "*/*"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf",
+ "application/json;stream=watch",
+ "application/vnd.kubernetes.protobuf;stream=watch"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings_v1alpha1"
+ ],
+ "operationId": "listSettingsV1alpha1NamespacedPodPreset",
+ "parameters": [
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "name": "fieldSelector",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "name": "labelSelector",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "name": "resourceVersion",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "integer",
+ "description": "Timeout for the list/watch call.",
+ "name": "timeoutSeconds",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "boolean",
+ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "name": "watch",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPresetList"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ },
+ "post": {
+ "description": "create a PodPreset",
+ "consumes": [
+ "*/*"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings_v1alpha1"
+ ],
+ "operationId": "createSettingsV1alpha1NamespacedPodPreset",
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPreset"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPreset"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ },
+ "delete": {
+ "description": "delete collection of PodPreset",
+ "consumes": [
+ "*/*"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings_v1alpha1"
+ ],
+ "operationId": "deleteSettingsV1alpha1CollectionNamespacedPodPreset",
+ "parameters": [
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "name": "fieldSelector",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "name": "labelSelector",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "name": "resourceVersion",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "integer",
+ "description": "Timeout for the list/watch call.",
+ "name": "timeoutSeconds",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "boolean",
+ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "name": "watch",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "object name and auth scope, such as for teams and projects",
+ "name": "namespace",
+ "in": "path",
+ "required": true
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "If 'true', then the output is pretty printed.",
+ "name": "pretty",
+ "in": "query"
+ }
+ ]
+ },
+ "/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}": {
+ "get": {
+ "description": "read the specified PodPreset",
+ "consumes": [
+ "*/*"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings_v1alpha1"
+ ],
+ "operationId": "readSettingsV1alpha1NamespacedPodPreset",
+ "parameters": [
+ {
+ "uniqueItems": true,
+ "type": "boolean",
+ "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.",
+ "name": "exact",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "boolean",
+ "description": "Should this value be exported. Export strips fields that a user can not specify.",
+ "name": "export",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPreset"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ },
+ "put": {
+ "description": "replace the specified PodPreset",
+ "consumes": [
+ "*/*"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings_v1alpha1"
+ ],
+ "operationId": "replaceSettingsV1alpha1NamespacedPodPreset",
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPreset"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPreset"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ },
+ "delete": {
+ "description": "delete a PodPreset",
+ "consumes": [
+ "*/*"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings_v1alpha1"
+ ],
+ "operationId": "deleteSettingsV1alpha1NamespacedPodPreset",
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions"
+ }
+ },
+ {
+ "uniqueItems": true,
+ "type": "integer",
+ "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
+ "name": "gracePeriodSeconds",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "boolean",
+ "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.",
+ "name": "orphanDependents",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "Whether and how garbage collection will be performed. Defaults to Default. Either this field or OrphanDependents may be set, but not both.",
+ "name": "propagationPolicy",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ },
+ "patch": {
+ "description": "partially update the specified PodPreset",
+ "consumes": [
+ "application/json-patch+json",
+ "application/merge-patch+json",
+ "application/strategic-merge-patch+json"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings_v1alpha1"
+ ],
+ "operationId": "patchSettingsV1alpha1NamespacedPodPreset",
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPreset"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "name of the PodPreset",
+ "name": "name",
+ "in": "path",
+ "required": true
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "object name and auth scope, such as for teams and projects",
+ "name": "namespace",
+ "in": "path",
+ "required": true
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "If 'true', then the output is pretty printed.",
+ "name": "pretty",
+ "in": "query"
+ }
+ ]
+ },
+ "/apis/settings.k8s.io/v1alpha1/podpresets": {
+ "get": {
+ "description": "list or watch objects of kind PodPreset",
+ "consumes": [
+ "*/*"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf",
+ "application/json;stream=watch",
+ "application/vnd.kubernetes.protobuf;stream=watch"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings_v1alpha1"
+ ],
+ "operationId": "listSettingsV1alpha1PodPresetForAllNamespaces",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPresetList"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "name": "fieldSelector",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "name": "labelSelector",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "If 'true', then the output is pretty printed.",
+ "name": "pretty",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "name": "resourceVersion",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "integer",
+ "description": "Timeout for the list/watch call.",
+ "name": "timeoutSeconds",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "boolean",
+ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "name": "watch",
+ "in": "query"
+ }
+ ]
+ },
+ "/apis/settings.k8s.io/v1alpha1/watch/namespaces/{namespace}/podpresets": {
+ "get": {
+ "description": "watch individual changes to a list of PodPreset",
+ "consumes": [
+ "*/*"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf",
+ "application/json;stream=watch",
+ "application/vnd.kubernetes.protobuf;stream=watch"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings_v1alpha1"
+ ],
+ "operationId": "watchSettingsV1alpha1NamespacedPodPresetList",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "name": "fieldSelector",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "name": "labelSelector",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "object name and auth scope, such as for teams and projects",
+ "name": "namespace",
+ "in": "path",
+ "required": true
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "If 'true', then the output is pretty printed.",
+ "name": "pretty",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "name": "resourceVersion",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "integer",
+ "description": "Timeout for the list/watch call.",
+ "name": "timeoutSeconds",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "boolean",
+ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "name": "watch",
+ "in": "query"
+ }
+ ]
+ },
+ "/apis/settings.k8s.io/v1alpha1/watch/namespaces/{namespace}/podpresets/{name}": {
+ "get": {
+ "description": "watch changes to an object of kind PodPreset",
+ "consumes": [
+ "*/*"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf",
+ "application/json;stream=watch",
+ "application/vnd.kubernetes.protobuf;stream=watch"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings_v1alpha1"
+ ],
+ "operationId": "watchSettingsV1alpha1NamespacedPodPreset",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "name": "fieldSelector",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "name": "labelSelector",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "name of the PodPreset",
+ "name": "name",
+ "in": "path",
+ "required": true
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "object name and auth scope, such as for teams and projects",
+ "name": "namespace",
+ "in": "path",
+ "required": true
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "If 'true', then the output is pretty printed.",
+ "name": "pretty",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "name": "resourceVersion",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "integer",
+ "description": "Timeout for the list/watch call.",
+ "name": "timeoutSeconds",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "boolean",
+ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "name": "watch",
+ "in": "query"
+ }
+ ]
+ },
+ "/apis/settings.k8s.io/v1alpha1/watch/podpresets": {
+ "get": {
+ "description": "watch individual changes to a list of PodPreset",
+ "consumes": [
+ "*/*"
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf",
+ "application/json;stream=watch",
+ "application/vnd.kubernetes.protobuf;stream=watch"
+ ],
+ "schemes": [
+ "https"
+ ],
+ "tags": [
+ "settings_v1alpha1"
+ ],
+ "operationId": "watchSettingsV1alpha1PodPresetListForAllNamespaces",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "name": "fieldSelector",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "name": "labelSelector",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "If 'true', then the output is pretty printed.",
+ "name": "pretty",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "string",
+ "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "name": "resourceVersion",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "integer",
+ "description": "Timeout for the list/watch call.",
+ "name": "timeoutSeconds",
+ "in": "query"
+ },
+ {
+ "uniqueItems": true,
+ "type": "boolean",
+ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "name": "watch",
+ "in": "query"
+ }
+ ]
+ },
"/apis/storage.k8s.io/": {
"get": {
"description": "get information of a group",
@@ -45240,6 +46042,103 @@
}
}
},
+ "io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPreset": {
+ "description": "PodPreset is a policy resource that defines additional runtime requirements for a Pod.",
+ "properties": {
+ "apiVersion": {
+ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources",
+ "type": "string"
+ },
+ "kind": {
+ "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "type": "string"
+ },
+ "metadata": {
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPresetSpec"
+ }
+ },
+ "x-kubernetes-group-version-kind": [
+ {
+ "Group": "settings.k8s.io",
+ "Version": "v1alpha1",
+ "Kind": "PodPreset"
+ }
+ ]
+ },
+ "io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPresetList": {
+ "description": "PodPresetList is a list of PodPreset objects.",
+ "required": [
+ "items"
+ ],
+ "properties": {
+ "apiVersion": {
+ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources",
+ "type": "string"
+ },
+ "items": {
+ "description": "Items is a list of schema objects.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPreset"
+ }
+ },
+ "kind": {
+ "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ "type": "string"
+ },
+ "metadata": {
+ "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"
+ }
+ },
+ "x-kubernetes-group-version-kind": [
+ {
+ "Group": "settings.k8s.io",
+ "Version": "v1alpha1",
+ "Kind": "PodPresetList"
+ }
+ ]
+ },
+ "io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPresetSpec": {
+ "description": "PodPresetSpec is a description of a pod injection policy.",
+ "properties": {
+ "env": {
+ "description": "Env defines the collection of EnvVar to inject into containers.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.EnvVar"
+ }
+ },
+ "envFrom": {
+ "description": "EnvFrom defines the collection of EnvFromSource to inject into containers.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.EnvFromSource"
+ }
+ },
+ "selector": {
+ "description": "Selector is a label query over a set of resources, in this case pods. Required.",
+ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
+ },
+ "volumeMounts": {
+ "description": "VolumeMounts defines the collection of VolumeMount to inject into containers.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.VolumeMount"
+ }
+ },
+ "volumes": {
+ "description": "Volumes defines the collection of Volume to inject into the pod.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.Volume"
+ }
+ }
+ }
+ },
"io.k8s.kubernetes.pkg.apis.storage.v1beta1.StorageClass": {
"description": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.",
"required": [
diff --git a/api/swagger-spec/resourceListing.json b/api/swagger-spec/resourceListing.json
index 7c543669bba..5dd4883febf 100644
--- a/api/swagger-spec/resourceListing.json
+++ b/api/swagger-spec/resourceListing.json
@@ -120,6 +120,14 @@
{
"path": "/apis/storage.k8s.io",
"description": "get information of a group"
+ },
+ {
+ "path": "/apis/settings.k8s.io/v1alpha1",
+ "description": "API at /apis/settings.k8s.io/v1alpha1"
+ },
+ {
+ "path": "/apis/settings.k8s.io",
+ "description": "get information of a group"
}
],
"apiVersion": "",
diff --git a/api/swagger-spec/settings.k8s.io.json b/api/swagger-spec/settings.k8s.io.json
new file mode 100644
index 00000000000..33f73d76805
--- /dev/null
+++ b/api/swagger-spec/settings.k8s.io.json
@@ -0,0 +1,114 @@
+{
+ "swaggerVersion": "1.2",
+ "apiVersion": "",
+ "basePath": "https://10.10.10.10:6443",
+ "resourcePath": "/apis/settings.k8s.io",
+ "info": {
+ "title": "",
+ "description": ""
+ },
+ "apis": [
+ {
+ "path": "/apis/settings.k8s.io",
+ "description": "get information of a group",
+ "operations": [
+ {
+ "type": "v1.APIGroup",
+ "method": "GET",
+ "summary": "get information of a group",
+ "nickname": "getAPIGroup",
+ "parameters": [],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "consumes": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ]
+ }
+ ]
+ }
+ ],
+ "models": {
+ "v1.APIGroup": {
+ "id": "v1.APIGroup",
+ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
+ "required": [
+ "name",
+ "versions",
+ "serverAddressByClientCIDRs"
+ ],
+ "properties": {
+ "kind": {
+ "type": "string",
+ "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ },
+ "apiVersion": {
+ "type": "string",
+ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
+ },
+ "name": {
+ "type": "string",
+ "description": "name is the name of the group."
+ },
+ "versions": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.GroupVersionForDiscovery"
+ },
+ "description": "versions are the versions supported in this group."
+ },
+ "preferredVersion": {
+ "$ref": "v1.GroupVersionForDiscovery",
+ "description": "preferredVersion is the version preferred by the API server, which probably is the storage version."
+ },
+ "serverAddressByClientCIDRs": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.ServerAddressByClientCIDR"
+ },
+ "description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP."
+ }
+ }
+ },
+ "v1.GroupVersionForDiscovery": {
+ "id": "v1.GroupVersionForDiscovery",
+ "description": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.",
+ "required": [
+ "groupVersion",
+ "version"
+ ],
+ "properties": {
+ "groupVersion": {
+ "type": "string",
+ "description": "groupVersion specifies the API group and version in the form \"group/version\""
+ },
+ "version": {
+ "type": "string",
+ "description": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion."
+ }
+ }
+ },
+ "v1.ServerAddressByClientCIDR": {
+ "id": "v1.ServerAddressByClientCIDR",
+ "description": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.",
+ "required": [
+ "clientCIDR",
+ "serverAddress"
+ ],
+ "properties": {
+ "clientCIDR": {
+ "type": "string",
+ "description": "The CIDR with which clients can match their IP to figure out the server address that they should use."
+ },
+ "serverAddress": {
+ "type": "string",
+ "description": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port."
+ }
+ }
+ }
+ }
+ }
diff --git a/api/swagger-spec/settings.k8s.io_v1alpha1.json b/api/swagger-spec/settings.k8s.io_v1alpha1.json
new file mode 100644
index 00000000000..c0b660bfdcc
--- /dev/null
+++ b/api/swagger-spec/settings.k8s.io_v1alpha1.json
@@ -0,0 +1,2372 @@
+{
+ "swaggerVersion": "1.2",
+ "apiVersion": "settings.k8s.io/v1alpha1",
+ "basePath": "https://10.10.10.10:6443",
+ "resourcePath": "/apis/settings.k8s.io/v1alpha1",
+ "info": {
+ "title": "",
+ "description": ""
+ },
+ "apis": [
+ {
+ "path": "/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets",
+ "description": "API at /apis/settings.k8s.io/v1alpha1",
+ "operations": [
+ {
+ "type": "v1alpha1.PodPresetList",
+ "method": "GET",
+ "summary": "list or watch objects of kind PodPreset",
+ "nickname": "listNamespacedPodPreset",
+ "parameters": [
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "pretty",
+ "description": "If 'true', then the output is pretty printed.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "labelSelector",
+ "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "fieldSelector",
+ "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "boolean",
+ "paramType": "query",
+ "name": "watch",
+ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "resourceVersion",
+ "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "integer",
+ "paramType": "query",
+ "name": "timeoutSeconds",
+ "description": "Timeout for the list/watch call.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "namespace",
+ "description": "object name and auth scope, such as for teams and projects",
+ "required": true,
+ "allowMultiple": false
+ }
+ ],
+ "responseMessages": [
+ {
+ "code": 200,
+ "message": "OK",
+ "responseModel": "v1alpha1.PodPresetList"
+ }
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf",
+ "application/json;stream=watch",
+ "application/vnd.kubernetes.protobuf;stream=watch"
+ ],
+ "consumes": [
+ "*/*"
+ ]
+ },
+ {
+ "type": "v1alpha1.PodPreset",
+ "method": "POST",
+ "summary": "create a PodPreset",
+ "nickname": "createNamespacedPodPreset",
+ "parameters": [
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "pretty",
+ "description": "If 'true', then the output is pretty printed.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "v1alpha1.PodPreset",
+ "paramType": "body",
+ "name": "body",
+ "description": "",
+ "required": true,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "namespace",
+ "description": "object name and auth scope, such as for teams and projects",
+ "required": true,
+ "allowMultiple": false
+ }
+ ],
+ "responseMessages": [
+ {
+ "code": 200,
+ "message": "OK",
+ "responseModel": "v1alpha1.PodPreset"
+ }
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "consumes": [
+ "*/*"
+ ]
+ },
+ {
+ "type": "v1.Status",
+ "method": "DELETE",
+ "summary": "delete collection of PodPreset",
+ "nickname": "deletecollectionNamespacedPodPreset",
+ "parameters": [
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "pretty",
+ "description": "If 'true', then the output is pretty printed.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "labelSelector",
+ "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "fieldSelector",
+ "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "boolean",
+ "paramType": "query",
+ "name": "watch",
+ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "resourceVersion",
+ "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "integer",
+ "paramType": "query",
+ "name": "timeoutSeconds",
+ "description": "Timeout for the list/watch call.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "namespace",
+ "description": "object name and auth scope, such as for teams and projects",
+ "required": true,
+ "allowMultiple": false
+ }
+ ],
+ "responseMessages": [
+ {
+ "code": 200,
+ "message": "OK",
+ "responseModel": "v1.Status"
+ }
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "consumes": [
+ "*/*"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "/apis/settings.k8s.io/v1alpha1/watch/namespaces/{namespace}/podpresets",
+ "description": "API at /apis/settings.k8s.io/v1alpha1",
+ "operations": [
+ {
+ "type": "v1.WatchEvent",
+ "method": "GET",
+ "summary": "watch individual changes to a list of PodPreset",
+ "nickname": "watchNamespacedPodPresetList",
+ "parameters": [
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "pretty",
+ "description": "If 'true', then the output is pretty printed.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "labelSelector",
+ "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "fieldSelector",
+ "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "boolean",
+ "paramType": "query",
+ "name": "watch",
+ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "resourceVersion",
+ "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "integer",
+ "paramType": "query",
+ "name": "timeoutSeconds",
+ "description": "Timeout for the list/watch call.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "namespace",
+ "description": "object name and auth scope, such as for teams and projects",
+ "required": true,
+ "allowMultiple": false
+ }
+ ],
+ "responseMessages": [
+ {
+ "code": 200,
+ "message": "OK",
+ "responseModel": "v1.WatchEvent"
+ }
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf",
+ "application/json;stream=watch",
+ "application/vnd.kubernetes.protobuf;stream=watch"
+ ],
+ "consumes": [
+ "*/*"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}",
+ "description": "API at /apis/settings.k8s.io/v1alpha1",
+ "operations": [
+ {
+ "type": "v1alpha1.PodPreset",
+ "method": "GET",
+ "summary": "read the specified PodPreset",
+ "nickname": "readNamespacedPodPreset",
+ "parameters": [
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "pretty",
+ "description": "If 'true', then the output is pretty printed.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "boolean",
+ "paramType": "query",
+ "name": "export",
+ "description": "Should this value be exported. Export strips fields that a user can not specify.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "boolean",
+ "paramType": "query",
+ "name": "exact",
+ "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "namespace",
+ "description": "object name and auth scope, such as for teams and projects",
+ "required": true,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "name",
+ "description": "name of the PodPreset",
+ "required": true,
+ "allowMultiple": false
+ }
+ ],
+ "responseMessages": [
+ {
+ "code": 200,
+ "message": "OK",
+ "responseModel": "v1alpha1.PodPreset"
+ }
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "consumes": [
+ "*/*"
+ ]
+ },
+ {
+ "type": "v1alpha1.PodPreset",
+ "method": "PUT",
+ "summary": "replace the specified PodPreset",
+ "nickname": "replaceNamespacedPodPreset",
+ "parameters": [
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "pretty",
+ "description": "If 'true', then the output is pretty printed.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "v1alpha1.PodPreset",
+ "paramType": "body",
+ "name": "body",
+ "description": "",
+ "required": true,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "namespace",
+ "description": "object name and auth scope, such as for teams and projects",
+ "required": true,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "name",
+ "description": "name of the PodPreset",
+ "required": true,
+ "allowMultiple": false
+ }
+ ],
+ "responseMessages": [
+ {
+ "code": 200,
+ "message": "OK",
+ "responseModel": "v1alpha1.PodPreset"
+ }
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "consumes": [
+ "*/*"
+ ]
+ },
+ {
+ "type": "v1alpha1.PodPreset",
+ "method": "PATCH",
+ "summary": "partially update the specified PodPreset",
+ "nickname": "patchNamespacedPodPreset",
+ "parameters": [
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "pretty",
+ "description": "If 'true', then the output is pretty printed.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "v1.Patch",
+ "paramType": "body",
+ "name": "body",
+ "description": "",
+ "required": true,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "namespace",
+ "description": "object name and auth scope, such as for teams and projects",
+ "required": true,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "name",
+ "description": "name of the PodPreset",
+ "required": true,
+ "allowMultiple": false
+ }
+ ],
+ "responseMessages": [
+ {
+ "code": 200,
+ "message": "OK",
+ "responseModel": "v1alpha1.PodPreset"
+ }
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "consumes": [
+ "application/json-patch+json",
+ "application/merge-patch+json",
+ "application/strategic-merge-patch+json"
+ ]
+ },
+ {
+ "type": "v1.Status",
+ "method": "DELETE",
+ "summary": "delete a PodPreset",
+ "nickname": "deleteNamespacedPodPreset",
+ "parameters": [
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "pretty",
+ "description": "If 'true', then the output is pretty printed.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "v1.DeleteOptions",
+ "paramType": "body",
+ "name": "body",
+ "description": "",
+ "required": true,
+ "allowMultiple": false
+ },
+ {
+ "type": "integer",
+ "paramType": "query",
+ "name": "gracePeriodSeconds",
+ "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "boolean",
+ "paramType": "query",
+ "name": "orphanDependents",
+ "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "propagationPolicy",
+ "description": "Whether and how garbage collection will be performed. Defaults to Default. Either this field or OrphanDependents may be set, but not both.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "namespace",
+ "description": "object name and auth scope, such as for teams and projects",
+ "required": true,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "name",
+ "description": "name of the PodPreset",
+ "required": true,
+ "allowMultiple": false
+ }
+ ],
+ "responseMessages": [
+ {
+ "code": 200,
+ "message": "OK",
+ "responseModel": "v1.Status"
+ }
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "consumes": [
+ "*/*"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "/apis/settings.k8s.io/v1alpha1/watch/namespaces/{namespace}/podpresets/{name}",
+ "description": "API at /apis/settings.k8s.io/v1alpha1",
+ "operations": [
+ {
+ "type": "v1.WatchEvent",
+ "method": "GET",
+ "summary": "watch changes to an object of kind PodPreset",
+ "nickname": "watchNamespacedPodPreset",
+ "parameters": [
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "pretty",
+ "description": "If 'true', then the output is pretty printed.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "labelSelector",
+ "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "fieldSelector",
+ "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "boolean",
+ "paramType": "query",
+ "name": "watch",
+ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "resourceVersion",
+ "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "integer",
+ "paramType": "query",
+ "name": "timeoutSeconds",
+ "description": "Timeout for the list/watch call.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "namespace",
+ "description": "object name and auth scope, such as for teams and projects",
+ "required": true,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "path",
+ "name": "name",
+ "description": "name of the PodPreset",
+ "required": true,
+ "allowMultiple": false
+ }
+ ],
+ "responseMessages": [
+ {
+ "code": 200,
+ "message": "OK",
+ "responseModel": "v1.WatchEvent"
+ }
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf",
+ "application/json;stream=watch",
+ "application/vnd.kubernetes.protobuf;stream=watch"
+ ],
+ "consumes": [
+ "*/*"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "/apis/settings.k8s.io/v1alpha1/podpresets",
+ "description": "API at /apis/settings.k8s.io/v1alpha1",
+ "operations": [
+ {
+ "type": "v1alpha1.PodPresetList",
+ "method": "GET",
+ "summary": "list or watch objects of kind PodPreset",
+ "nickname": "listPodPresetForAllNamespaces",
+ "parameters": [
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "pretty",
+ "description": "If 'true', then the output is pretty printed.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "labelSelector",
+ "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "fieldSelector",
+ "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "boolean",
+ "paramType": "query",
+ "name": "watch",
+ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "resourceVersion",
+ "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "integer",
+ "paramType": "query",
+ "name": "timeoutSeconds",
+ "description": "Timeout for the list/watch call.",
+ "required": false,
+ "allowMultiple": false
+ }
+ ],
+ "responseMessages": [
+ {
+ "code": 200,
+ "message": "OK",
+ "responseModel": "v1alpha1.PodPresetList"
+ }
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf",
+ "application/json;stream=watch",
+ "application/vnd.kubernetes.protobuf;stream=watch"
+ ],
+ "consumes": [
+ "*/*"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "/apis/settings.k8s.io/v1alpha1/watch/podpresets",
+ "description": "API at /apis/settings.k8s.io/v1alpha1",
+ "operations": [
+ {
+ "type": "v1.WatchEvent",
+ "method": "GET",
+ "summary": "watch individual changes to a list of PodPreset",
+ "nickname": "watchPodPresetListForAllNamespaces",
+ "parameters": [
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "pretty",
+ "description": "If 'true', then the output is pretty printed.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "labelSelector",
+ "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "fieldSelector",
+ "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "boolean",
+ "paramType": "query",
+ "name": "watch",
+ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "string",
+ "paramType": "query",
+ "name": "resourceVersion",
+ "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "required": false,
+ "allowMultiple": false
+ },
+ {
+ "type": "integer",
+ "paramType": "query",
+ "name": "timeoutSeconds",
+ "description": "Timeout for the list/watch call.",
+ "required": false,
+ "allowMultiple": false
+ }
+ ],
+ "responseMessages": [
+ {
+ "code": 200,
+ "message": "OK",
+ "responseModel": "v1.WatchEvent"
+ }
+ ],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf",
+ "application/json;stream=watch",
+ "application/vnd.kubernetes.protobuf;stream=watch"
+ ],
+ "consumes": [
+ "*/*"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "/apis/settings.k8s.io/v1alpha1",
+ "description": "API at /apis/settings.k8s.io/v1alpha1",
+ "operations": [
+ {
+ "type": "v1.APIResourceList",
+ "method": "GET",
+ "summary": "get available resources",
+ "nickname": "getAPIResources",
+ "parameters": [],
+ "produces": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ],
+ "consumes": [
+ "application/json",
+ "application/yaml",
+ "application/vnd.kubernetes.protobuf"
+ ]
+ }
+ ]
+ }
+ ],
+ "models": {
+ "v1alpha1.PodPresetList": {
+ "id": "v1alpha1.PodPresetList",
+ "description": "PodPresetList is a list of PodPreset objects.",
+ "required": [
+ "items"
+ ],
+ "properties": {
+ "kind": {
+ "type": "string",
+ "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ },
+ "apiVersion": {
+ "type": "string",
+ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
+ },
+ "metadata": {
+ "$ref": "v1.ListMeta",
+ "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata"
+ },
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "v1alpha1.PodPreset"
+ },
+ "description": "Items is a list of schema objects."
+ }
+ }
+ },
+ "v1.ListMeta": {
+ "id": "v1.ListMeta",
+ "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.",
+ "properties": {
+ "selfLink": {
+ "type": "string",
+ "description": "SelfLink is a URL representing this object. Populated by the system. Read-only."
+ },
+ "resourceVersion": {
+ "type": "string",
+ "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency"
+ }
+ }
+ },
+ "v1alpha1.PodPreset": {
+ "id": "v1alpha1.PodPreset",
+ "description": "PodPreset is a policy resource that defines additional runtime requirements for a Pod.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ },
+ "apiVersion": {
+ "type": "string",
+ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
+ },
+ "metadata": {
+ "$ref": "v1.ObjectMeta"
+ },
+ "spec": {
+ "$ref": "v1alpha1.PodPresetSpec"
+ }
+ }
+ },
+ "v1.ObjectMeta": {
+ "id": "v1.ObjectMeta",
+ "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
+ },
+ "generateName": {
+ "type": "string",
+ "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency"
+ },
+ "namespace": {
+ "type": "string",
+ "description": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces"
+ },
+ "selfLink": {
+ "type": "string",
+ "description": "SelfLink is a URL representing this object. Populated by the system. Read-only."
+ },
+ "uid": {
+ "type": "string",
+ "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids"
+ },
+ "resourceVersion": {
+ "type": "string",
+ "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency"
+ },
+ "generation": {
+ "type": "integer",
+ "format": "int64",
+ "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."
+ },
+ "creationTimestamp": {
+ "type": "string",
+ "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata"
+ },
+ "deletionTimestamp": {
+ "type": "string",
+ "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata"
+ },
+ "deletionGracePeriodSeconds": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only."
+ },
+ "labels": {
+ "type": "object",
+ "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels"
+ },
+ "annotations": {
+ "type": "object",
+ "description": "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://kubernetes.io/docs/user-guide/annotations"
+ },
+ "ownerReferences": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.OwnerReference"
+ },
+ "description": "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": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "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": {
+ "type": "string",
+ "description": "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."
+ }
+ }
+ },
+ "v1.OwnerReference": {
+ "id": "v1.OwnerReference",
+ "description": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.",
+ "required": [
+ "apiVersion",
+ "kind",
+ "name",
+ "uid"
+ ],
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "API version of the referent."
+ },
+ "kind": {
+ "type": "string",
+ "description": "Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
+ },
+ "uid": {
+ "type": "string",
+ "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids"
+ },
+ "controller": {
+ "type": "boolean",
+ "description": "If true, this reference points to the managing controller."
+ },
+ "blockOwnerDeletion": {
+ "type": "boolean",
+ "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned."
+ }
+ }
+ },
+ "v1alpha1.PodPresetSpec": {
+ "id": "v1alpha1.PodPresetSpec",
+ "description": "PodPresetSpec is a description of a pod injection policy.",
+ "properties": {
+ "selector": {
+ "$ref": "v1.LabelSelector",
+ "description": "Selector is a label query over a set of resources, in this case pods. Required."
+ },
+ "env": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.EnvVar"
+ },
+ "description": "Env defines the collection of EnvVar to inject into containers."
+ },
+ "envFrom": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.EnvFromSource"
+ },
+ "description": "EnvFrom defines the collection of EnvFromSource to inject into containers."
+ },
+ "volumes": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.Volume"
+ },
+ "description": "Volumes defines the collection of Volume to inject into the pod."
+ },
+ "volumeMounts": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.VolumeMount"
+ },
+ "description": "VolumeMounts defines the collection of VolumeMount to inject into containers."
+ }
+ }
+ },
+ "v1.LabelSelector": {
+ "id": "v1.LabelSelector",
+ "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.",
+ "properties": {
+ "matchLabels": {
+ "type": "object",
+ "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed."
+ },
+ "matchExpressions": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.LabelSelectorRequirement"
+ },
+ "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed."
+ }
+ }
+ },
+ "v1.LabelSelectorRequirement": {
+ "id": "v1.LabelSelectorRequirement",
+ "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
+ "required": [
+ "key",
+ "operator"
+ ],
+ "properties": {
+ "key": {
+ "type": "string",
+ "description": "key is the label key that the selector applies to."
+ },
+ "operator": {
+ "type": "string",
+ "description": "operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist."
+ },
+ "values": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch."
+ }
+ }
+ },
+ "v1.EnvVar": {
+ "id": "v1.EnvVar",
+ "description": "EnvVar represents an environment variable present in a Container.",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the environment variable. Must be a C_IDENTIFIER."
+ },
+ "value": {
+ "type": "string",
+ "description": "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\"."
+ },
+ "valueFrom": {
+ "$ref": "v1.EnvVarSource",
+ "description": "Source for the environment variable's value. Cannot be used if value is not empty."
+ }
+ }
+ },
+ "v1.EnvVarSource": {
+ "id": "v1.EnvVarSource",
+ "description": "EnvVarSource represents a source for the value of an EnvVar.",
+ "properties": {
+ "fieldRef": {
+ "$ref": "v1.ObjectFieldSelector",
+ "description": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP."
+ },
+ "resourceFieldRef": {
+ "$ref": "v1.ResourceFieldSelector",
+ "description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."
+ },
+ "configMapKeyRef": {
+ "$ref": "v1.ConfigMapKeySelector",
+ "description": "Selects a key of a ConfigMap."
+ },
+ "secretKeyRef": {
+ "$ref": "v1.SecretKeySelector",
+ "description": "Selects a key of a secret in the pod's namespace"
+ }
+ }
+ },
+ "v1.ObjectFieldSelector": {
+ "id": "v1.ObjectFieldSelector",
+ "description": "ObjectFieldSelector selects an APIVersioned field of an object.",
+ "required": [
+ "fieldPath"
+ ],
+ "properties": {
+ "apiVersion": {
+ "type": "string",
+ "description": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\"."
+ },
+ "fieldPath": {
+ "type": "string",
+ "description": "Path of the field to select in the specified API version."
+ }
+ }
+ },
+ "v1.ResourceFieldSelector": {
+ "id": "v1.ResourceFieldSelector",
+ "description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format",
+ "required": [
+ "resource"
+ ],
+ "properties": {
+ "containerName": {
+ "type": "string",
+ "description": "Container name: required for volumes, optional for env vars"
+ },
+ "resource": {
+ "type": "string",
+ "description": "Required: resource to select"
+ },
+ "divisor": {
+ "type": "string",
+ "description": "Specifies the output format of the exposed resources, defaults to \"1\""
+ }
+ }
+ },
+ "v1.ConfigMapKeySelector": {
+ "id": "v1.ConfigMapKeySelector",
+ "description": "Selects a key from a ConfigMap.",
+ "required": [
+ "key"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
+ },
+ "key": {
+ "type": "string",
+ "description": "The key to select."
+ },
+ "optional": {
+ "type": "boolean",
+ "description": "Specify whether the ConfigMap or it's key must be defined"
+ }
+ }
+ },
+ "v1.SecretKeySelector": {
+ "id": "v1.SecretKeySelector",
+ "description": "SecretKeySelector selects a key of a Secret.",
+ "required": [
+ "key"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
+ },
+ "key": {
+ "type": "string",
+ "description": "The key of the secret to select from. Must be a valid secret key."
+ },
+ "optional": {
+ "type": "boolean",
+ "description": "Specify whether the Secret or it's key must be defined"
+ }
+ }
+ },
+ "v1.EnvFromSource": {
+ "id": "v1.EnvFromSource",
+ "description": "EnvFromSource represents the source of a set of ConfigMaps",
+ "properties": {
+ "prefix": {
+ "type": "string",
+ "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER."
+ },
+ "configMapRef": {
+ "$ref": "v1.ConfigMapEnvSource",
+ "description": "The ConfigMap to select from"
+ },
+ "secretRef": {
+ "$ref": "v1.SecretEnvSource",
+ "description": "The Secret to select from"
+ }
+ }
+ },
+ "v1.ConfigMapEnvSource": {
+ "id": "v1.ConfigMapEnvSource",
+ "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
+ },
+ "optional": {
+ "type": "boolean",
+ "description": "Specify whether the ConfigMap must be defined"
+ }
+ }
+ },
+ "v1.SecretEnvSource": {
+ "id": "v1.SecretEnvSource",
+ "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
+ },
+ "optional": {
+ "type": "boolean",
+ "description": "Specify whether the Secret must be defined"
+ }
+ }
+ },
+ "v1.Volume": {
+ "id": "v1.Volume",
+ "description": "Volume represents a named volume in a pod that may be accessed by any container in the pod.",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
+ },
+ "hostPath": {
+ "$ref": "v1.HostPathVolumeSource",
+ "description": "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: http://kubernetes.io/docs/user-guide/volumes#hostpath"
+ },
+ "emptyDir": {
+ "$ref": "v1.EmptyDirVolumeSource",
+ "description": "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir"
+ },
+ "gcePersistentDisk": {
+ "$ref": "v1.GCEPersistentDiskVolumeSource",
+ "description": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk"
+ },
+ "awsElasticBlockStore": {
+ "$ref": "v1.AWSElasticBlockStoreVolumeSource",
+ "description": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore"
+ },
+ "gitRepo": {
+ "$ref": "v1.GitRepoVolumeSource",
+ "description": "GitRepo represents a git repository at a particular revision."
+ },
+ "secret": {
+ "$ref": "v1.SecretVolumeSource",
+ "description": "Secret represents a secret that should populate this volume. More info: http://kubernetes.io/docs/user-guide/volumes#secrets"
+ },
+ "nfs": {
+ "$ref": "v1.NFSVolumeSource",
+ "description": "NFS represents an NFS mount on the host that shares a pod's lifetime More info: http://kubernetes.io/docs/user-guide/volumes#nfs"
+ },
+ "iscsi": {
+ "$ref": "v1.ISCSIVolumeSource",
+ "description": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md"
+ },
+ "glusterfs": {
+ "$ref": "v1.GlusterfsVolumeSource",
+ "description": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md"
+ },
+ "persistentVolumeClaim": {
+ "$ref": "v1.PersistentVolumeClaimVolumeSource",
+ "description": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims"
+ },
+ "rbd": {
+ "$ref": "v1.RBDVolumeSource",
+ "description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md"
+ },
+ "flexVolume": {
+ "$ref": "v1.FlexVolumeSource",
+ "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future."
+ },
+ "cinder": {
+ "$ref": "v1.CinderVolumeSource",
+ "description": "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"
+ },
+ "cephfs": {
+ "$ref": "v1.CephFSVolumeSource",
+ "description": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime"
+ },
+ "flocker": {
+ "$ref": "v1.FlockerVolumeSource",
+ "description": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running"
+ },
+ "downwardAPI": {
+ "$ref": "v1.DownwardAPIVolumeSource",
+ "description": "DownwardAPI represents downward API about the pod that should populate this volume"
+ },
+ "fc": {
+ "$ref": "v1.FCVolumeSource",
+ "description": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod."
+ },
+ "azureFile": {
+ "$ref": "v1.AzureFileVolumeSource",
+ "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod."
+ },
+ "configMap": {
+ "$ref": "v1.ConfigMapVolumeSource",
+ "description": "ConfigMap represents a configMap that should populate this volume"
+ },
+ "vsphereVolume": {
+ "$ref": "v1.VsphereVirtualDiskVolumeSource",
+ "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine"
+ },
+ "quobyte": {
+ "$ref": "v1.QuobyteVolumeSource",
+ "description": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime"
+ },
+ "azureDisk": {
+ "$ref": "v1.AzureDiskVolumeSource",
+ "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod."
+ },
+ "photonPersistentDisk": {
+ "$ref": "v1.PhotonPersistentDiskVolumeSource",
+ "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine"
+ },
+ "projected": {
+ "$ref": "v1.ProjectedVolumeSource",
+ "description": "Items for all in one resources secrets, configmaps, and downward API"
+ },
+ "portworxVolume": {
+ "$ref": "v1.PortworxVolumeSource",
+ "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine"
+ }
+ }
+ },
+ "v1.HostPathVolumeSource": {
+ "id": "v1.HostPathVolumeSource",
+ "description": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.",
+ "required": [
+ "path"
+ ],
+ "properties": {
+ "path": {
+ "type": "string",
+ "description": "Path of the directory on the host. More info: http://kubernetes.io/docs/user-guide/volumes#hostpath"
+ }
+ }
+ },
+ "v1.EmptyDirVolumeSource": {
+ "id": "v1.EmptyDirVolumeSource",
+ "description": "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.",
+ "properties": {
+ "medium": {
+ "type": "string",
+ "description": "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir"
+ }
+ }
+ },
+ "v1.GCEPersistentDiskVolumeSource": {
+ "id": "v1.GCEPersistentDiskVolumeSource",
+ "description": "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.",
+ "required": [
+ "pdName"
+ ],
+ "properties": {
+ "pdName": {
+ "type": "string",
+ "description": "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk"
+ },
+ "fsType": {
+ "type": "string",
+ "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk"
+ },
+ "partition": {
+ "type": "integer",
+ "format": "int32",
+ "description": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk"
+ }
+ }
+ },
+ "v1.AWSElasticBlockStoreVolumeSource": {
+ "id": "v1.AWSElasticBlockStoreVolumeSource",
+ "description": "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.",
+ "required": [
+ "volumeID"
+ ],
+ "properties": {
+ "volumeID": {
+ "type": "string",
+ "description": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore"
+ },
+ "fsType": {
+ "type": "string",
+ "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore"
+ },
+ "partition": {
+ "type": "integer",
+ "format": "int32",
+ "description": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty)."
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore"
+ }
+ }
+ },
+ "v1.GitRepoVolumeSource": {
+ "id": "v1.GitRepoVolumeSource",
+ "description": "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.",
+ "required": [
+ "repository"
+ ],
+ "properties": {
+ "repository": {
+ "type": "string",
+ "description": "Repository URL"
+ },
+ "revision": {
+ "type": "string",
+ "description": "Commit hash for the specified revision."
+ },
+ "directory": {
+ "type": "string",
+ "description": "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name."
+ }
+ }
+ },
+ "v1.SecretVolumeSource": {
+ "id": "v1.SecretVolumeSource",
+ "description": "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.",
+ "properties": {
+ "secretName": {
+ "type": "string",
+ "description": "Name of the secret in the pod's namespace to use. More info: http://kubernetes.io/docs/user-guide/volumes#secrets"
+ },
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.KeyToPath"
+ },
+ "description": "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 unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'."
+ },
+ "defaultMode": {
+ "type": "integer",
+ "format": "int32",
+ "description": "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": {
+ "type": "boolean",
+ "description": "Specify whether the Secret or it's keys must be defined"
+ }
+ }
+ },
+ "v1.KeyToPath": {
+ "id": "v1.KeyToPath",
+ "description": "Maps a string key to a path within a volume.",
+ "required": [
+ "key",
+ "path"
+ ],
+ "properties": {
+ "key": {
+ "type": "string",
+ "description": "The key to project."
+ },
+ "path": {
+ "type": "string",
+ "description": "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": {
+ "type": "integer",
+ "format": "int32",
+ "description": "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."
+ }
+ }
+ },
+ "v1.NFSVolumeSource": {
+ "id": "v1.NFSVolumeSource",
+ "description": "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.",
+ "required": [
+ "server",
+ "path"
+ ],
+ "properties": {
+ "server": {
+ "type": "string",
+ "description": "Server is the hostname or IP address of the NFS server. More info: http://kubernetes.io/docs/user-guide/volumes#nfs"
+ },
+ "path": {
+ "type": "string",
+ "description": "Path that is exported by the NFS server. More info: http://kubernetes.io/docs/user-guide/volumes#nfs"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: http://kubernetes.io/docs/user-guide/volumes#nfs"
+ }
+ }
+ },
+ "v1.ISCSIVolumeSource": {
+ "id": "v1.ISCSIVolumeSource",
+ "description": "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.",
+ "required": [
+ "targetPortal",
+ "iqn",
+ "lun"
+ ],
+ "properties": {
+ "targetPortal": {
+ "type": "string",
+ "description": "iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260)."
+ },
+ "iqn": {
+ "type": "string",
+ "description": "Target iSCSI Qualified Name."
+ },
+ "lun": {
+ "type": "integer",
+ "format": "int32",
+ "description": "iSCSI target lun number."
+ },
+ "iscsiInterface": {
+ "type": "string",
+ "description": "Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport."
+ },
+ "fsType": {
+ "type": "string",
+ "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#iscsi"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false."
+ },
+ "portals": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260)."
+ }
+ }
+ },
+ "v1.GlusterfsVolumeSource": {
+ "id": "v1.GlusterfsVolumeSource",
+ "description": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.",
+ "required": [
+ "endpoints",
+ "path"
+ ],
+ "properties": {
+ "endpoints": {
+ "type": "string",
+ "description": "EndpointsName is the endpoint name that details Glusterfs topology. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod"
+ },
+ "path": {
+ "type": "string",
+ "description": "Path is the Glusterfs volume path. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod"
+ }
+ }
+ },
+ "v1.PersistentVolumeClaimVolumeSource": {
+ "id": "v1.PersistentVolumeClaimVolumeSource",
+ "description": "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).",
+ "required": [
+ "claimName"
+ ],
+ "properties": {
+ "claimName": {
+ "type": "string",
+ "description": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "Will force the ReadOnly setting in VolumeMounts. Default false."
+ }
+ }
+ },
+ "v1.RBDVolumeSource": {
+ "id": "v1.RBDVolumeSource",
+ "description": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.",
+ "required": [
+ "monitors",
+ "image"
+ ],
+ "properties": {
+ "monitors": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "A collection of Ceph monitors. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it"
+ },
+ "image": {
+ "type": "string",
+ "description": "The rados image name. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it"
+ },
+ "fsType": {
+ "type": "string",
+ "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#rbd"
+ },
+ "pool": {
+ "type": "string",
+ "description": "The rados pool name. Default is rbd. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it."
+ },
+ "user": {
+ "type": "string",
+ "description": "The rados user name. Default is admin. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it"
+ },
+ "keyring": {
+ "type": "string",
+ "description": "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it"
+ },
+ "secretRef": {
+ "$ref": "v1.LocalObjectReference",
+ "description": "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it"
+ }
+ }
+ },
+ "v1.LocalObjectReference": {
+ "id": "v1.LocalObjectReference",
+ "description": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
+ }
+ }
+ },
+ "v1.FlexVolumeSource": {
+ "id": "v1.FlexVolumeSource",
+ "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.",
+ "required": [
+ "driver"
+ ],
+ "properties": {
+ "driver": {
+ "type": "string",
+ "description": "Driver is the name of the driver to use for this volume."
+ },
+ "fsType": {
+ "type": "string",
+ "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script."
+ },
+ "secretRef": {
+ "$ref": "v1.LocalObjectReference",
+ "description": "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts."
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts."
+ },
+ "options": {
+ "type": "object",
+ "description": "Optional: Extra command options if any."
+ }
+ }
+ },
+ "v1.CinderVolumeSource": {
+ "id": "v1.CinderVolumeSource",
+ "description": "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.",
+ "required": [
+ "volumeID"
+ ],
+ "properties": {
+ "volumeID": {
+ "type": "string",
+ "description": "volume id used to identify the volume in cinder More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md"
+ },
+ "fsType": {
+ "type": "string",
+ "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md"
+ }
+ }
+ },
+ "v1.CephFSVolumeSource": {
+ "id": "v1.CephFSVolumeSource",
+ "description": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.",
+ "required": [
+ "monitors"
+ ],
+ "properties": {
+ "monitors": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Required: Monitors is a collection of Ceph monitors More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it"
+ },
+ "path": {
+ "type": "string",
+ "description": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /"
+ },
+ "user": {
+ "type": "string",
+ "description": "Optional: User is the rados user name, default is admin More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it"
+ },
+ "secretFile": {
+ "type": "string",
+ "description": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it"
+ },
+ "secretRef": {
+ "$ref": "v1.LocalObjectReference",
+ "description": "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it"
+ }
+ }
+ },
+ "v1.FlockerVolumeSource": {
+ "id": "v1.FlockerVolumeSource",
+ "description": "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.",
+ "properties": {
+ "datasetName": {
+ "type": "string",
+ "description": "Name of the dataset stored as metadata -\u003e name on the dataset for Flocker should be considered as deprecated"
+ },
+ "datasetUUID": {
+ "type": "string",
+ "description": "UUID of the dataset. This is unique identifier of a Flocker dataset"
+ }
+ }
+ },
+ "v1.DownwardAPIVolumeSource": {
+ "id": "v1.DownwardAPIVolumeSource",
+ "description": "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.",
+ "properties": {
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.DownwardAPIVolumeFile"
+ },
+ "description": "Items is a list of downward API volume file"
+ },
+ "defaultMode": {
+ "type": "integer",
+ "format": "int32",
+ "description": "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."
+ }
+ }
+ },
+ "v1.DownwardAPIVolumeFile": {
+ "id": "v1.DownwardAPIVolumeFile",
+ "description": "DownwardAPIVolumeFile represents information to create the file containing the pod field",
+ "required": [
+ "path"
+ ],
+ "properties": {
+ "path": {
+ "type": "string",
+ "description": "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": {
+ "$ref": "v1.ObjectFieldSelector",
+ "description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported."
+ },
+ "resourceFieldRef": {
+ "$ref": "v1.ResourceFieldSelector",
+ "description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."
+ },
+ "mode": {
+ "type": "integer",
+ "format": "int32",
+ "description": "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."
+ }
+ }
+ },
+ "v1.FCVolumeSource": {
+ "id": "v1.FCVolumeSource",
+ "description": "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.",
+ "required": [
+ "targetWWNs",
+ "lun"
+ ],
+ "properties": {
+ "targetWWNs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Required: FC target worldwide names (WWNs)"
+ },
+ "lun": {
+ "type": "integer",
+ "format": "int32",
+ "description": "Required: FC target lun number"
+ },
+ "fsType": {
+ "type": "string",
+ "description": "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": {
+ "type": "boolean",
+ "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts."
+ }
+ }
+ },
+ "v1.AzureFileVolumeSource": {
+ "id": "v1.AzureFileVolumeSource",
+ "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
+ "required": [
+ "secretName",
+ "shareName"
+ ],
+ "properties": {
+ "secretName": {
+ "type": "string",
+ "description": "the name of secret that contains Azure Storage Account Name and Key"
+ },
+ "shareName": {
+ "type": "string",
+ "description": "Share Name"
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts."
+ }
+ }
+ },
+ "v1.ConfigMapVolumeSource": {
+ "id": "v1.ConfigMapVolumeSource",
+ "description": "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.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
+ },
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.KeyToPath"
+ },
+ "description": "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 unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'."
+ },
+ "defaultMode": {
+ "type": "integer",
+ "format": "int32",
+ "description": "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": {
+ "type": "boolean",
+ "description": "Specify whether the ConfigMap or it's keys must be defined"
+ }
+ }
+ },
+ "v1.VsphereVirtualDiskVolumeSource": {
+ "id": "v1.VsphereVirtualDiskVolumeSource",
+ "description": "Represents a vSphere volume resource.",
+ "required": [
+ "volumePath"
+ ],
+ "properties": {
+ "volumePath": {
+ "type": "string",
+ "description": "Path that identifies vSphere volume vmdk"
+ },
+ "fsType": {
+ "type": "string",
+ "description": "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."
+ }
+ }
+ },
+ "v1.QuobyteVolumeSource": {
+ "id": "v1.QuobyteVolumeSource",
+ "description": "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.",
+ "required": [
+ "registry",
+ "volume"
+ ],
+ "properties": {
+ "registry": {
+ "type": "string",
+ "description": "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": {
+ "type": "string",
+ "description": "Volume is a string that references an already created Quobyte volume by name."
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false."
+ },
+ "user": {
+ "type": "string",
+ "description": "User to map volume access to Defaults to serivceaccount user"
+ },
+ "group": {
+ "type": "string",
+ "description": "Group to map volume access to Default is no group"
+ }
+ }
+ },
+ "v1.AzureDiskVolumeSource": {
+ "id": "v1.AzureDiskVolumeSource",
+ "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
+ "required": [
+ "diskName",
+ "diskURI"
+ ],
+ "properties": {
+ "diskName": {
+ "type": "string",
+ "description": "The Name of the data disk in the blob storage"
+ },
+ "diskURI": {
+ "type": "string",
+ "description": "The URI the data disk in the blob storage"
+ },
+ "cachingMode": {
+ "$ref": "v1.AzureDataDiskCachingMode",
+ "description": "Host Caching mode: None, Read Only, Read Write."
+ },
+ "fsType": {
+ "type": "string",
+ "description": "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": {
+ "type": "boolean",
+ "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts."
+ }
+ }
+ },
+ "v1.AzureDataDiskCachingMode": {
+ "id": "v1.AzureDataDiskCachingMode",
+ "properties": {}
+ },
+ "v1.PhotonPersistentDiskVolumeSource": {
+ "id": "v1.PhotonPersistentDiskVolumeSource",
+ "description": "Represents a Photon Controller persistent disk resource.",
+ "required": [
+ "pdID"
+ ],
+ "properties": {
+ "pdID": {
+ "type": "string",
+ "description": "ID that identifies Photon Controller persistent disk"
+ },
+ "fsType": {
+ "type": "string",
+ "description": "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."
+ }
+ }
+ },
+ "v1.ProjectedVolumeSource": {
+ "id": "v1.ProjectedVolumeSource",
+ "description": "Represents a projected volume source",
+ "required": [
+ "sources"
+ ],
+ "properties": {
+ "sources": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.VolumeProjection"
+ },
+ "description": "list of volume projections"
+ },
+ "defaultMode": {
+ "type": "integer",
+ "format": "int32",
+ "description": "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."
+ }
+ }
+ },
+ "v1.VolumeProjection": {
+ "id": "v1.VolumeProjection",
+ "description": "Projection that may be projected along with other supported volume types",
+ "properties": {
+ "secret": {
+ "$ref": "v1.SecretProjection",
+ "description": "information about the secret data to project"
+ },
+ "downwardAPI": {
+ "$ref": "v1.DownwardAPIProjection",
+ "description": "information about the downwardAPI data to project"
+ },
+ "configMap": {
+ "$ref": "v1.ConfigMapProjection",
+ "description": "information about the configMap data to project"
+ }
+ }
+ },
+ "v1.SecretProjection": {
+ "id": "v1.SecretProjection",
+ "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
+ },
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.KeyToPath"
+ },
+ "description": "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 unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'."
+ },
+ "optional": {
+ "type": "boolean",
+ "description": "Specify whether the Secret or its key must be defined"
+ }
+ }
+ },
+ "v1.DownwardAPIProjection": {
+ "id": "v1.DownwardAPIProjection",
+ "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.",
+ "properties": {
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.DownwardAPIVolumeFile"
+ },
+ "description": "Items is a list of DownwardAPIVolume file"
+ }
+ }
+ },
+ "v1.ConfigMapProjection": {
+ "id": "v1.ConfigMapProjection",
+ "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected 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. Note that this is identical to a configmap volume source without the default mode.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
+ },
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.KeyToPath"
+ },
+ "description": "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 unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'."
+ },
+ "optional": {
+ "type": "boolean",
+ "description": "Specify whether the ConfigMap or it's keys must be defined"
+ }
+ }
+ },
+ "v1.PortworxVolumeSource": {
+ "id": "v1.PortworxVolumeSource",
+ "description": "PortworxVolumeSource represents a Portworx volume resource.",
+ "required": [
+ "volumeID"
+ ],
+ "properties": {
+ "volumeID": {
+ "type": "string",
+ "description": "VolumeID uniquely identifies a Portworx volume"
+ },
+ "fsType": {
+ "type": "string",
+ "description": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified."
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts."
+ }
+ }
+ },
+ "v1.VolumeMount": {
+ "id": "v1.VolumeMount",
+ "description": "VolumeMount describes a mounting of a Volume within a container.",
+ "required": [
+ "name",
+ "mountPath"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "This must match the Name of a Volume."
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false."
+ },
+ "mountPath": {
+ "type": "string",
+ "description": "Path within the container at which the volume should be mounted. Must not contain ':'."
+ },
+ "subPath": {
+ "type": "string",
+ "description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
+ }
+ }
+ },
+ "v1.Status": {
+ "id": "v1.Status",
+ "description": "Status is a return value for calls that don't return other objects.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ },
+ "apiVersion": {
+ "type": "string",
+ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
+ },
+ "metadata": {
+ "$ref": "v1.ListMeta",
+ "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ },
+ "status": {
+ "type": "string",
+ "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status"
+ },
+ "message": {
+ "type": "string",
+ "description": "A human-readable description of the status of this operation."
+ },
+ "reason": {
+ "type": "string",
+ "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it."
+ },
+ "details": {
+ "$ref": "v1.StatusDetails",
+ "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type."
+ },
+ "code": {
+ "type": "integer",
+ "format": "int32",
+ "description": "Suggested HTTP return code for this status, 0 if not set."
+ }
+ }
+ },
+ "v1.StatusDetails": {
+ "id": "v1.StatusDetails",
+ "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described)."
+ },
+ "group": {
+ "type": "string",
+ "description": "The group attribute of the resource associated with the status StatusReason."
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ },
+ "causes": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.StatusCause"
+ },
+ "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes."
+ },
+ "retryAfterSeconds": {
+ "type": "integer",
+ "format": "int32",
+ "description": "If specified, the time in seconds before the operation should be retried."
+ }
+ }
+ },
+ "v1.StatusCause": {
+ "id": "v1.StatusCause",
+ "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.",
+ "properties": {
+ "reason": {
+ "type": "string",
+ "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available."
+ },
+ "message": {
+ "type": "string",
+ "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader."
+ },
+ "field": {
+ "type": "string",
+ "description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\""
+ }
+ }
+ },
+ "v1.WatchEvent": {
+ "id": "v1.WatchEvent",
+ "required": [
+ "type",
+ "object"
+ ],
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "object": {
+ "type": "string"
+ }
+ }
+ },
+ "v1.Patch": {
+ "id": "v1.Patch",
+ "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.",
+ "properties": {}
+ },
+ "v1.DeleteOptions": {
+ "id": "v1.DeleteOptions",
+ "description": "DeleteOptions may be provided when deleting an API object.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ },
+ "apiVersion": {
+ "type": "string",
+ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
+ },
+ "gracePeriodSeconds": {
+ "type": "integer",
+ "format": "int64",
+ "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately."
+ },
+ "preconditions": {
+ "$ref": "v1.Preconditions",
+ "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned."
+ },
+ "orphanDependents": {
+ "type": "boolean",
+ "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both."
+ },
+ "propagationPolicy": {
+ "$ref": "v1.DeletionPropagation",
+ "description": "Whether and how garbage collection will be performed. Defaults to Default. Either this field or OrphanDependents may be set, but not both."
+ }
+ }
+ },
+ "v1.Preconditions": {
+ "id": "v1.Preconditions",
+ "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.",
+ "properties": {
+ "uid": {
+ "$ref": "types.UID",
+ "description": "Specifies the target UID."
+ }
+ }
+ },
+ "types.UID": {
+ "id": "types.UID",
+ "properties": {}
+ },
+ "v1.DeletionPropagation": {
+ "id": "v1.DeletionPropagation",
+ "properties": {}
+ },
+ "v1.APIResourceList": {
+ "id": "v1.APIResourceList",
+ "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.",
+ "required": [
+ "groupVersion",
+ "resources"
+ ],
+ "properties": {
+ "kind": {
+ "type": "string",
+ "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
+ },
+ "apiVersion": {
+ "type": "string",
+ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
+ },
+ "groupVersion": {
+ "type": "string",
+ "description": "groupVersion is the group and version this APIResourceList is for."
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "$ref": "v1.APIResource"
+ },
+ "description": "resources contains the name of the resources and if they are namespaced."
+ }
+ }
+ },
+ "v1.APIResource": {
+ "id": "v1.APIResource",
+ "description": "APIResource specifies the name of a resource and whether it is namespaced.",
+ "required": [
+ "name",
+ "namespaced",
+ "kind",
+ "verbs"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "name is the name of the resource."
+ },
+ "namespaced": {
+ "type": "boolean",
+ "description": "namespaced indicates if a resource is namespaced or not."
+ },
+ "kind": {
+ "type": "string",
+ "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')"
+ },
+ "verbs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)"
+ },
+ "shortNames": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "shortNames is a list of suggested short names of the resource."
+ }
+ }
+ }
+ }
+ }
diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh
index 2905476add4..0ffc30e208d 100755
--- a/cluster/gce/config-test.sh
+++ b/cluster/gce/config-test.sh
@@ -191,7 +191,7 @@ fi
ENABLE_RESCHEDULER="${KUBE_ENABLE_RESCHEDULER:-true}"
# If we included ResourceQuota, we should keep it at the end of the list to prevent incrementing quota usage prematurely.
-ADMISSION_CONTROL="${KUBE_ADMISSION_CONTROL:-NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota,DefaultTolerationSeconds}"
+ADMISSION_CONTROL="${KUBE_ADMISSION_CONTROL:-NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota,DefaultTolerationSeconds,PodPreset}"
# Optional: if set to true kube-up will automatically check for existing resources and clean them up.
KUBE_UP_AUTOMATIC_CLEANUP=${KUBE_UP_AUTOMATIC_CLEANUP:-false}
diff --git a/cmd/kube-apiserver/app/BUILD b/cmd/kube-apiserver/app/BUILD
index 475731f5e99..99e35b57919 100644
--- a/cmd/kube-apiserver/app/BUILD
+++ b/cmd/kube-apiserver/app/BUILD
@@ -49,6 +49,7 @@ go_library(
"//plugin/pkg/admission/namespace/lifecycle:go_default_library",
"//plugin/pkg/admission/persistentvolume/label:go_default_library",
"//plugin/pkg/admission/podnodeselector:go_default_library",
+ "//plugin/pkg/admission/podpreset:go_default_library",
"//plugin/pkg/admission/resourcequota:go_default_library",
"//plugin/pkg/admission/security/podsecuritypolicy:go_default_library",
"//plugin/pkg/admission/securitycontext/scdeny:go_default_library",
diff --git a/cmd/kube-apiserver/app/plugins.go b/cmd/kube-apiserver/app/plugins.go
index 4e8057b4cc9..ad85f1e51d0 100644
--- a/cmd/kube-apiserver/app/plugins.go
+++ b/cmd/kube-apiserver/app/plugins.go
@@ -39,6 +39,7 @@ import (
_ "k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle"
_ "k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label"
_ "k8s.io/kubernetes/plugin/pkg/admission/podnodeselector"
+ _ "k8s.io/kubernetes/plugin/pkg/admission/podpreset"
_ "k8s.io/kubernetes/plugin/pkg/admission/resourcequota"
_ "k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy"
_ "k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny"
diff --git a/cmd/libs/go2idl/client-gen/main.go b/cmd/libs/go2idl/client-gen/main.go
index 1f3c0b9e0e8..f525554cbd1 100644
--- a/cmd/libs/go2idl/client-gen/main.go
+++ b/cmd/libs/go2idl/client-gen/main.go
@@ -46,6 +46,7 @@ var (
"storage/",
"apps/",
"policy/",
+ "settings/",
}, "group/versions that client-gen will generate clients for. At most one version per group is allowed. Specified in the format \"group1/version1,group2/version2...\". Default to \"api/,extensions/,autoscaling/,batch/,rbac/\"")
includedTypesOverrides = flag.StringSlice("included-types-overrides", []string{}, "list of group/version/type for which client should be generated. By default, client is generated for all types which have genclient=true in types.go. This overrides that. For each groupVersion in this list, only the types mentioned here will be included. The default check of genclient=true will be used for other group versions.")
basePath = flag.String("input-base", "k8s.io/kubernetes/pkg/apis", "base path to look for the api group. Default to \"k8s.io/kubernetes/pkg/apis\"")
diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go
index 39cc2c7c655..51414fbdbc2 100644
--- a/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go
+++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go
@@ -85,6 +85,7 @@ func New() *Generator {
`k8s.io/kubernetes/federation/apis/federation/v1beta1`,
`k8s.io/kubernetes/pkg/apis/certificates/v1beta1`,
`k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1`,
+ `k8s.io/kubernetes/pkg/apis/settings/v1alpha1`,
`k8s.io/kubernetes/pkg/apis/storage/v1beta1`,
}, ","),
DropEmbeddedFields: "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta",
diff --git a/docs/api-reference/settings.k8s.io/v1alpha1/definitions.html b/docs/api-reference/settings.k8s.io/v1alpha1/definitions.html
new file mode 100755
index 00000000000..344aa3e3a30
--- /dev/null
+++ b/docs/api-reference/settings.k8s.io/v1alpha1/definitions.html
@@ -0,0 +1,3702 @@
+
+
+
+
+
+
+Top Level API Objects
+
+
+
+
+
+
+
Top Level API Objects
+
+
+
+
Definitions
+
+
+
v1.APIResourceList
+
+
APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+kind |
+Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds |
+false |
+string |
+ |
+
+
+apiVersion |
+APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources |
+false |
+string |
+ |
+
+
+groupVersion |
+groupVersion is the group and version this APIResourceList is for. |
+true |
+string |
+ |
+
+
+resources |
+resources contains the name of the resources and if they are namespaced. |
+true |
+v1.APIResource array |
+ |
+
+
+
+
+
+
+
v1.ConfigMapProjection
+
+
Adapts a ConfigMap into a projected volume.
+
+
+
The contents of the target ConfigMap’s Data field will be presented in a projected 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. Note that this is identical to a configmap volume source without the default mode.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+name |
+Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names |
+false |
+string |
+ |
+
+
+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 unless it is marked optional. Paths must be relative and may not contain the .. path or start with ... |
+false |
+v1.KeyToPath array |
+ |
+
+
+optional |
+Specify whether the ConfigMap or it’s keys must be defined |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.PhotonPersistentDiskVolumeSource
+
+
Represents a Photon Controller persistent disk resource.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+pdID |
+ID that identifies Photon Controller persistent disk |
+true |
+string |
+ |
+
+
+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. |
+false |
+string |
+ |
+
+
+
+
+
+
+
v1alpha1.PodPresetList
+
+
PodPresetList is a list of PodPreset objects.
+
+
+
+
+
+
v1.Preconditions
+
+
Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+uid |
+Specifies the target UID. |
+false |
+types.UID |
+ |
+
+
+
+
+
+
+
v1.Status
+
+
Status is a return value for calls that don’t return other objects.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+kind |
+Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds |
+false |
+string |
+ |
+
+
+apiVersion |
+APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources |
+false |
+string |
+ |
+
+
+metadata |
+Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds |
+false |
+v1.ListMeta |
+ |
+
+
+status |
+Status of the operation. One of: "Success" or "Failure". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status |
+false |
+string |
+ |
+
+
+message |
+A human-readable description of the status of this operation. |
+false |
+string |
+ |
+
+
+reason |
+A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. |
+false |
+string |
+ |
+
+
+details |
+Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type. |
+false |
+v1.StatusDetails |
+ |
+
+
+code |
+Suggested HTTP return code for this status, 0 if not set. |
+false |
+integer (int32) |
+ |
+
+
+
+
+
+
+
v1.ObjectFieldSelector
+
+
ObjectFieldSelector selects an APIVersioned field of an object.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+apiVersion |
+Version of the schema the FieldPath is written in terms of, defaults to "v1". |
+false |
+string |
+ |
+
+
+fieldPath |
+Path of the field to select in the specified API version. |
+true |
+string |
+ |
+
+
+
+
+
+
+
v1.VolumeMount
+
+
VolumeMount describes a mounting of a Volume within a container.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+name |
+This must match the Name of a Volume. |
+true |
+string |
+ |
+
+
+readOnly |
+Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. |
+false |
+boolean |
+false |
+
+
+mountPath |
+Path within the container at which the volume should be mounted. Must not contain :. |
+true |
+string |
+ |
+
+
+subPath |
+Path within the volume from which the container’s volume should be mounted. Defaults to "" (volume’s root). |
+false |
+string |
+ |
+
+
+
+
+
+
+
v1.DownwardAPIProjection
+
+
Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+items |
+Items is a list of DownwardAPIVolume file |
+false |
+v1.DownwardAPIVolumeFile array |
+ |
+
+
+
+
+
+
+
v1.NFSVolumeSource
+
+
Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.
+
+
+
+
+
+
v1.LabelSelector
+
+
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+matchLabels |
+matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. |
+false |
+object |
+ |
+
+
+matchExpressions |
+matchExpressions is a list of label selector requirements. The requirements are ANDed. |
+false |
+v1.LabelSelectorRequirement array |
+ |
+
+
+
+
+
+
+
v1.CephFSVolumeSource
+
+
Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.
+
+
+
+
+
+
v1.FCVolumeSource
+
+
Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+targetWWNs |
+Required: FC target worldwide names (WWNs) |
+true |
+string array |
+ |
+
+
+lun |
+Required: FC target lun number |
+true |
+integer (int32) |
+ |
+
+
+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. |
+false |
+string |
+ |
+
+
+readOnly |
+Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.DownwardAPIVolumeSource
+
+
DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+items |
+Items is a list of downward API volume file |
+false |
+v1.DownwardAPIVolumeFile array |
+ |
+
+
+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. |
+false |
+integer (int32) |
+ |
+
+
+
+
+
+
+
v1.DeletionPropagation
+
+
+
+
v1.GCEPersistentDiskVolumeSource
+
+
Represents a Persistent Disk resource in Google Compute Engine.
+
+
+
A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.
+
+
+
+
+
+
v1.ConfigMapVolumeSource
+
+
Adapts a ConfigMap into a volume.
+
+
+
The 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.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+name |
+Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names |
+false |
+string |
+ |
+
+
+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 unless it is marked optional. Paths must be relative and may not contain the .. path or start with ... |
+false |
+v1.KeyToPath array |
+ |
+
+
+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. |
+false |
+integer (int32) |
+ |
+
+
+optional |
+Specify whether the ConfigMap or it’s keys must be defined |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.GitRepoVolumeSource
+
+
Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+repository |
+Repository URL |
+true |
+string |
+ |
+
+
+revision |
+Commit hash for the specified revision. |
+false |
+string |
+ |
+
+
+directory |
+Target directory name. Must not contain or start with ... If . is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. |
+false |
+string |
+ |
+
+
+
+
+
+
+
v1.SecretEnvSource
+
+
SecretEnvSource selects a Secret to populate the environment variables with.
+
+
+
The contents of the target Secret’s Data field will represent the key-value pairs as environment variables.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+name |
+Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names |
+false |
+string |
+ |
+
+
+optional |
+Specify whether the Secret must be defined |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.StatusDetails
+
+
StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+name |
+The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). |
+false |
+string |
+ |
+
+
+group |
+The group attribute of the resource associated with the status StatusReason. |
+false |
+string |
+ |
+
+
+kind |
+The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds |
+false |
+string |
+ |
+
+
+causes |
+The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. |
+false |
+v1.StatusCause array |
+ |
+
+
+retryAfterSeconds |
+If specified, the time in seconds before the operation should be retried. |
+false |
+integer (int32) |
+ |
+
+
+
+
+
+
+
v1.PortworxVolumeSource
+
+
PortworxVolumeSource represents a Portworx volume resource.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+volumeID |
+VolumeID uniquely identifies a Portworx volume |
+true |
+string |
+ |
+
+
+fsType |
+FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. |
+false |
+string |
+ |
+
+
+readOnly |
+Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.LocalObjectReference
+
+
LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
+
+
+
+
+
+
v1.ProjectedVolumeSource
+
+
Represents a projected volume source
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+sources |
+list of volume projections |
+true |
+v1.VolumeProjection array |
+ |
+
+
+defaultMode |
+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. |
+false |
+integer (int32) |
+ |
+
+
+
+
+
+
+
+
+
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+name |
+Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names |
+false |
+string |
+ |
+
+
+generateName |
+GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
+
+If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).
+
+Applied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency |
+false |
+string |
+ |
+
+
+namespace |
+Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
+
+Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces |
+false |
+string |
+ |
+
+
+selfLink |
+SelfLink is a URL representing this object. Populated by the system. Read-only. |
+false |
+string |
+ |
+
+
+uid |
+UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
+
+Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids |
+false |
+string |
+ |
+
+
+resourceVersion |
+An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
+
+Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency |
+false |
+string |
+ |
+
+
+generation |
+A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. |
+false |
+integer (int64) |
+ |
+
+
+creationTimestamp |
+CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
+
+Populated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata |
+false |
+string |
+ |
+
+
+deletionTimestamp |
+DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.
+
+Populated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata |
+false |
+string |
+ |
+
+
+deletionGracePeriodSeconds |
+Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only. |
+false |
+integer (int64) |
+ |
+
+
+labels |
+Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels |
+false |
+object |
+ |
+
+
+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://kubernetes.io/docs/user-guide/annotations |
+false |
+object |
+ |
+
+
+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. |
+false |
+v1.OwnerReference array |
+ |
+
+
+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. |
+false |
+string array |
+ |
+
+
+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. |
+false |
+string |
+ |
+
+
+
+
+
+
+
v1.OwnerReference
+
+
OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+apiVersion |
+API version of the referent. |
+true |
+string |
+ |
+
+
+kind |
+Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds |
+true |
+string |
+ |
+
+
+name |
+Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names |
+true |
+string |
+ |
+
+
+uid |
+UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids |
+true |
+string |
+ |
+
+
+controller |
+If true, this reference points to the managing controller. |
+false |
+boolean |
+false |
+
+
+blockOwnerDeletion |
+If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.APIResource
+
+
APIResource specifies the name of a resource and whether it is namespaced.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+name |
+name is the name of the resource. |
+true |
+string |
+ |
+
+
+namespaced |
+namespaced indicates if a resource is namespaced or not. |
+true |
+boolean |
+false |
+
+
+kind |
+kind is the kind for the resource (e.g. Foo is the kind for a resource foo) |
+true |
+string |
+ |
+
+
+verbs |
+verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) |
+true |
+string array |
+ |
+
+
+shortNames |
+shortNames is a list of suggested short names of the resource. |
+false |
+string array |
+ |
+
+
+
+
+
+
+
types.UID
+
+
+
+
v1.HostPathVolumeSource
+
+
Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.
+
+
+
+
+
+
v1.AzureFileVolumeSource
+
+
AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+secretName |
+the name of secret that contains Azure Storage Account Name and Key |
+true |
+string |
+ |
+
+
+shareName |
+Share Name |
+true |
+string |
+ |
+
+
+readOnly |
+Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.ISCSIVolumeSource
+
+
Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+targetPortal |
+iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). |
+true |
+string |
+ |
+
+
+iqn |
+Target iSCSI Qualified Name. |
+true |
+string |
+ |
+
+
+lun |
+iSCSI target lun number. |
+true |
+integer (int32) |
+ |
+
+
+iscsiInterface |
+Optional: Defaults to default (tcp). iSCSI interface name that uses an iSCSI transport. |
+false |
+string |
+ |
+
+
+fsType |
+Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#iscsi |
+false |
+string |
+ |
+
+
+readOnly |
+ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. |
+false |
+boolean |
+false |
+
+
+portals |
+iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). |
+false |
+string array |
+ |
+
+
+
+
+
+
+
v1.SecretProjection
+
+
Adapts a secret into a projected volume.
+
+
+
The contents of the target Secret’s Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+name |
+Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names |
+false |
+string |
+ |
+
+
+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 unless it is marked optional. Paths must be relative and may not contain the .. path or start with ... |
+false |
+v1.KeyToPath array |
+ |
+
+
+optional |
+Specify whether the Secret or its key must be defined |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.EmptyDirVolumeSource
+
+
Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+medium |
+What type of storage medium should back this directory. The default is "" which means to use the node’s default medium. Must be an empty string (default) or Memory. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir |
+false |
+string |
+ |
+
+
+
+
+
+
+
v1.EnvFromSource
+
+
EnvFromSource represents the source of a set of ConfigMaps
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+prefix |
+An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. |
+false |
+string |
+ |
+
+
+configMapRef |
+The ConfigMap to select from |
+false |
+v1.ConfigMapEnvSource |
+ |
+
+
+secretRef |
+The Secret to select from |
+false |
+v1.SecretEnvSource |
+ |
+
+
+
+
+
+
+
v1.CinderVolumeSource
+
+
Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.
+
+
+
+
+
+
v1.AWSElasticBlockStoreVolumeSource
+
+
Represents a Persistent Disk resource in AWS.
+
+
+
An AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+volumeID |
+Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore |
+true |
+string |
+ |
+
+
+fsType |
+Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore |
+false |
+string |
+ |
+
+
+partition |
+The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). |
+false |
+integer (int32) |
+ |
+
+
+readOnly |
+Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
+
+
ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+selfLink |
+SelfLink is a URL representing this object. Populated by the system. Read-only. |
+false |
+string |
+ |
+
+
+resourceVersion |
+String that identifies the server’s internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency |
+false |
+string |
+ |
+
+
+
+
+
+
+
v1.PersistentVolumeClaimVolumeSource
+
+
PersistentVolumeClaimVolumeSource references the user’s PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+claimName |
+ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims |
+true |
+string |
+ |
+
+
+readOnly |
+Will force the ReadOnly setting in VolumeMounts. Default false. |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.FlockerVolumeSource
+
+
Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+datasetName |
+Name of the dataset stored as metadata → name on the dataset for Flocker should be considered as deprecated |
+false |
+string |
+ |
+
+
+datasetUUID |
+UUID of the dataset. This is unique identifier of a Flocker dataset |
+false |
+string |
+ |
+
+
+
+
+
+
+
v1.QuobyteVolumeSource
+
+
Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+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 |
+true |
+string |
+ |
+
+
+volume |
+Volume is a string that references an already created Quobyte volume by name. |
+true |
+string |
+ |
+
+
+readOnly |
+ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. |
+false |
+boolean |
+false |
+
+
+user |
+User to map volume access to Defaults to serivceaccount user |
+false |
+string |
+ |
+
+
+group |
+Group to map volume access to Default is no group |
+false |
+string |
+ |
+
+
+
+
+
+
+
v1alpha1.PodPresetSpec
+
+
PodPresetSpec is a description of a pod injection policy.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+selector |
+Selector is a label query over a set of resources, in this case pods. Required. |
+false |
+v1.LabelSelector |
+ |
+
+
+env |
+Env defines the collection of EnvVar to inject into containers. |
+false |
+v1.EnvVar array |
+ |
+
+
+envFrom |
+EnvFrom defines the collection of EnvFromSource to inject into containers. |
+false |
+v1.EnvFromSource array |
+ |
+
+
+volumes |
+Volumes defines the collection of Volume to inject into the pod. |
+false |
+v1.Volume array |
+ |
+
+
+volumeMounts |
+VolumeMounts defines the collection of VolumeMount to inject into containers. |
+false |
+v1.VolumeMount array |
+ |
+
+
+
+
+
+
+
v1alpha1.PodPreset
+
+
PodPreset is a policy resource that defines additional runtime requirements for a Pod.
+
+
+
+
+
+
v1.WatchEvent
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+type |
+ |
+true |
+string |
+ |
+
+
+object |
+ |
+true |
+string |
+ |
+
+
+
+
+
+
+
v1.SecretVolumeSource
+
+
Adapts a Secret into a volume.
+
+
+
The 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.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+secretName |
+Name of the secret in the pod’s namespace to use. More info: http://kubernetes.io/docs/user-guide/volumes#secrets |
+false |
+string |
+ |
+
+
+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 unless it is marked optional. Paths must be relative and may not contain the .. path or start with ... |
+false |
+v1.KeyToPath array |
+ |
+
+
+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. |
+false |
+integer (int32) |
+ |
+
+
+optional |
+Specify whether the Secret or it’s keys must be defined |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.LabelSelectorRequirement
+
+
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+key |
+key is the label key that the selector applies to. |
+true |
+string |
+ |
+
+
+operator |
+operator represents a key’s relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist. |
+true |
+string |
+ |
+
+
+values |
+values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. |
+false |
+string array |
+ |
+
+
+
+
+
+
+
v1.EnvVar
+
+
EnvVar represents an environment variable present in a Container.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+name |
+Name of the environment variable. Must be a C_IDENTIFIER. |
+true |
+string |
+ |
+
+
+value |
+Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". |
+false |
+string |
+ |
+
+
+valueFrom |
+Source for the environment variable’s value. Cannot be used if value is not empty. |
+false |
+v1.EnvVarSource |
+ |
+
+
+
+
+
+
+
v1.EnvVarSource
+
+
EnvVarSource represents a source for the value of an EnvVar.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+fieldRef |
+Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP. |
+false |
+v1.ObjectFieldSelector |
+ |
+
+
+resourceFieldRef |
+Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. |
+false |
+v1.ResourceFieldSelector |
+ |
+
+
+configMapKeyRef |
+Selects a key of a ConfigMap. |
+false |
+v1.ConfigMapKeySelector |
+ |
+
+
+secretKeyRef |
+Selects a key of a secret in the pod’s namespace |
+false |
+v1.SecretKeySelector |
+ |
+
+
+
+
+
+
+
v1.FlexVolumeSource
+
+
FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+driver |
+Driver is the name of the driver to use for this volume. |
+true |
+string |
+ |
+
+
+fsType |
+Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. |
+false |
+string |
+ |
+
+
+secretRef |
+Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. |
+false |
+v1.LocalObjectReference |
+ |
+
+
+readOnly |
+Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. |
+false |
+boolean |
+false |
+
+
+options |
+Optional: Extra command options if any. |
+false |
+object |
+ |
+
+
+
+
+
+
+
v1.KeyToPath
+
+
Maps a string key to a path within a volume.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+key |
+The key to project. |
+true |
+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 ... |
+true |
+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. |
+false |
+integer (int32) |
+ |
+
+
+
+
+
+
+
v1.AzureDiskVolumeSource
+
+
AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+diskName |
+The Name of the data disk in the blob storage |
+true |
+string |
+ |
+
+
+diskURI |
+The URI the data disk in the blob storage |
+true |
+string |
+ |
+
+
+cachingMode |
+Host Caching mode: None, Read Only, Read Write. |
+false |
+v1.AzureDataDiskCachingMode |
+ |
+
+
+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. |
+false |
+string |
+ |
+
+
+readOnly |
+Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.VsphereVirtualDiskVolumeSource
+
+
Represents a vSphere volume resource.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+volumePath |
+Path that identifies vSphere volume vmdk |
+true |
+string |
+ |
+
+
+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. |
+false |
+string |
+ |
+
+
+
+
+
+
+
v1.Patch
+
+
Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.
+
+
+
+
v1.DeleteOptions
+
+
DeleteOptions may be provided when deleting an API object.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+kind |
+Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds |
+false |
+string |
+ |
+
+
+apiVersion |
+APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources |
+false |
+string |
+ |
+
+
+gracePeriodSeconds |
+The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. |
+false |
+integer (int64) |
+ |
+
+
+preconditions |
+Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. |
+false |
+v1.Preconditions |
+ |
+
+
+orphanDependents |
+Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list. Either this field or PropagationPolicy may be set, but not both. |
+false |
+boolean |
+false |
+
+
+propagationPolicy |
+Whether and how garbage collection will be performed. Defaults to Default. Either this field or OrphanDependents may be set, but not both. |
+false |
+v1.DeletionPropagation |
+ |
+
+
+
+
+
+
+
v1.Volume
+
+
Volume represents a named volume in a pod that may be accessed by any container in the pod.
+
+
+
+
+
+
v1.ConfigMapEnvSource
+
+
ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.
+
+
+
The contents of the target ConfigMap’s Data field will represent the key-value pairs as environment variables.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+name |
+Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names |
+false |
+string |
+ |
+
+
+optional |
+Specify whether the ConfigMap must be defined |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.ResourceFieldSelector
+
+
ResourceFieldSelector represents container resources (cpu, memory) and their output format
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+containerName |
+Container name: required for volumes, optional for env vars |
+false |
+string |
+ |
+
+
+resource |
+Required: resource to select |
+true |
+string |
+ |
+
+
+divisor |
+Specifies the output format of the exposed resources, defaults to "1" |
+false |
+string |
+ |
+
+
+
+
+
+
+
v1.VolumeProjection
+
+
Projection that may be projected along with other supported volume types
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+secret |
+information about the secret data to project |
+false |
+v1.SecretProjection |
+ |
+
+
+downwardAPI |
+information about the downwardAPI data to project |
+false |
+v1.DownwardAPIProjection |
+ |
+
+
+configMap |
+information about the configMap data to project |
+false |
+v1.ConfigMapProjection |
+ |
+
+
+
+
+
+
+
v1.SecretKeySelector
+
+
SecretKeySelector selects a key of a Secret.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+name |
+Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names |
+false |
+string |
+ |
+
+
+key |
+The key of the secret to select from. Must be a valid secret key. |
+true |
+string |
+ |
+
+
+optional |
+Specify whether the Secret or it’s key must be defined |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.DownwardAPIVolumeFile
+
+
DownwardAPIVolumeFile represents information to create the file containing the pod field
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+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 .. |
+true |
+string |
+ |
+
+
+fieldRef |
+Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. |
+false |
+v1.ObjectFieldSelector |
+ |
+
+
+resourceFieldRef |
+Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. |
+false |
+v1.ResourceFieldSelector |
+ |
+
+
+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. |
+false |
+integer (int32) |
+ |
+
+
+
+
+
+
+
v1.ConfigMapKeySelector
+
+
Selects a key from a ConfigMap.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+name |
+Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names |
+false |
+string |
+ |
+
+
+key |
+The key to select. |
+true |
+string |
+ |
+
+
+optional |
+Specify whether the ConfigMap or it’s key must be defined |
+false |
+boolean |
+false |
+
+
+
+
+
+
+
v1.GlusterfsVolumeSource
+
+
Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.
+
+
+
+
+
+
v1.StatusCause
+
+
StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.
+
+
+
+
+
+
+
+
+
+
+
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+reason |
+A machine-readable description of the cause of the error. If this value is empty there is no information available. |
+false |
+string |
+ |
+
+
+message |
+A human-readable description of the cause of the error. This field may be presented as-is to a reader. |
+false |
+string |
+ |
+
+
+field |
+The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
+
+Examples:
+ "name" - the field "name" on the current resource
+ "items[0].name" - the field "name" on the first array entry in "items" |
+false |
+string |
+ |
+
+
+
+
+
+
+
v1.AzureDataDiskCachingMode
+
+
+
+
v1.RBDVolumeSource
+
+
Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.
+
+
+
+
+
+
any
+
+
Represents an untyped JSON map - see the description of the field for more info about the structure of this object.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/api-reference/settings.k8s.io/v1alpha1/operations.html b/docs/api-reference/settings.k8s.io/v1alpha1/operations.html
new file mode 100755
index 00000000000..88561cef055
--- /dev/null
+++ b/docs/api-reference/settings.k8s.io/v1alpha1/operations.html
@@ -0,0 +1,2047 @@
+
+
+
+
+
+
+Operations
+
+
+
+
+
+
+
Operations
+
+
+
get available resources
+
+
+
GET /apis/settings.k8s.io/v1alpha1
+
+
+
+
Responses
+
+
+
+
+
+
+
+
+HTTP Code |
+Description |
+Schema |
+
+
+
+
+default |
+success |
+v1.APIResourceList |
+
+
+
+
+
+
+
+
+
+
+
list or watch objects of kind PodPreset
+
+
+
GET /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets
+
+
+
+
Parameters
+
+
+
+
+
+
+
+
+
+
+
+Type |
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+QueryParameter |
+pretty |
+If true, then the output is pretty printed. |
+false |
+string |
+ |
+
+
+QueryParameter |
+labelSelector |
+A selector to restrict the list of returned objects by their labels. Defaults to everything. |
+false |
+string |
+ |
+
+
+QueryParameter |
+fieldSelector |
+A selector to restrict the list of returned objects by their fields. Defaults to everything. |
+false |
+string |
+ |
+
+
+QueryParameter |
+watch |
+Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
+false |
+boolean |
+ |
+
+
+QueryParameter |
+resourceVersion |
+When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. |
+false |
+string |
+ |
+
+
+QueryParameter |
+timeoutSeconds |
+Timeout for the list/watch call. |
+false |
+integer (int32) |
+ |
+
+
+PathParameter |
+namespace |
+object name and auth scope, such as for teams and projects |
+true |
+string |
+ |
+
+
+
+
+
+
+
+
+
Produces
+
+
+-
+
application/json
+
+-
+
application/yaml
+
+-
+
application/vnd.kubernetes.protobuf
+
+-
+
application/json;stream=watch
+
+-
+
application/vnd.kubernetes.protobuf;stream=watch
+
+
+
+
+
+
+
+
delete collection of PodPreset
+
+
+
DELETE /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets
+
+
+
+
Parameters
+
+
+
+
+
+
+
+
+
+
+
+Type |
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+QueryParameter |
+pretty |
+If true, then the output is pretty printed. |
+false |
+string |
+ |
+
+
+QueryParameter |
+labelSelector |
+A selector to restrict the list of returned objects by their labels. Defaults to everything. |
+false |
+string |
+ |
+
+
+QueryParameter |
+fieldSelector |
+A selector to restrict the list of returned objects by their fields. Defaults to everything. |
+false |
+string |
+ |
+
+
+QueryParameter |
+watch |
+Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
+false |
+boolean |
+ |
+
+
+QueryParameter |
+resourceVersion |
+When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. |
+false |
+string |
+ |
+
+
+QueryParameter |
+timeoutSeconds |
+Timeout for the list/watch call. |
+false |
+integer (int32) |
+ |
+
+
+PathParameter |
+namespace |
+object name and auth scope, such as for teams and projects |
+true |
+string |
+ |
+
+
+
+
+
+
+
Responses
+
+
+
+
+
+
+
+
+HTTP Code |
+Description |
+Schema |
+
+
+
+
+200 |
+success |
+v1.Status |
+
+
+
+
+
+
+
+
+
+
+
create a PodPreset
+
+
+
POST /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets
+
+
+
+
Parameters
+
+
+
+
+
+
+
+
+
+
+
+Type |
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+QueryParameter |
+pretty |
+If true, then the output is pretty printed. |
+false |
+string |
+ |
+
+
+BodyParameter |
+body |
+ |
+true |
+v1alpha1.PodPreset |
+ |
+
+
+PathParameter |
+namespace |
+object name and auth scope, such as for teams and projects |
+true |
+string |
+ |
+
+
+
+
+
+
+
Responses
+
+
+
+
+
+
+
+
+HTTP Code |
+Description |
+Schema |
+
+
+
+
+200 |
+success |
+v1alpha1.PodPreset |
+
+
+
+
+
+
+
+
+
+
+
read the specified PodPreset
+
+
+
GET /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}
+
+
+
+
Parameters
+
+
+
+
+
+
+
+
+
+
+
+Type |
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+QueryParameter |
+pretty |
+If true, then the output is pretty printed. |
+false |
+string |
+ |
+
+
+QueryParameter |
+export |
+Should this value be exported. Export strips fields that a user can not specify. |
+false |
+boolean |
+ |
+
+
+QueryParameter |
+exact |
+Should the export be exact. Exact export maintains cluster-specific fields like Namespace. |
+false |
+boolean |
+ |
+
+
+PathParameter |
+namespace |
+object name and auth scope, such as for teams and projects |
+true |
+string |
+ |
+
+
+PathParameter |
+name |
+name of the PodPreset |
+true |
+string |
+ |
+
+
+
+
+
+
+
Responses
+
+
+
+
+
+
+
+
+HTTP Code |
+Description |
+Schema |
+
+
+
+
+200 |
+success |
+v1alpha1.PodPreset |
+
+
+
+
+
+
+
+
+
+
+
replace the specified PodPreset
+
+
+
PUT /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}
+
+
+
+
Parameters
+
+
+
+
+
+
+
+
+
+
+
+Type |
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+QueryParameter |
+pretty |
+If true, then the output is pretty printed. |
+false |
+string |
+ |
+
+
+BodyParameter |
+body |
+ |
+true |
+v1alpha1.PodPreset |
+ |
+
+
+PathParameter |
+namespace |
+object name and auth scope, such as for teams and projects |
+true |
+string |
+ |
+
+
+PathParameter |
+name |
+name of the PodPreset |
+true |
+string |
+ |
+
+
+
+
+
+
+
Responses
+
+
+
+
+
+
+
+
+HTTP Code |
+Description |
+Schema |
+
+
+
+
+200 |
+success |
+v1alpha1.PodPreset |
+
+
+
+
+
+
+
+
+
+
+
delete a PodPreset
+
+
+
DELETE /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}
+
+
+
+
Parameters
+
+
+
+
+
+
+
+
+
+
+
+Type |
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+QueryParameter |
+pretty |
+If true, then the output is pretty printed. |
+false |
+string |
+ |
+
+
+BodyParameter |
+body |
+ |
+true |
+v1.DeleteOptions |
+ |
+
+
+QueryParameter |
+gracePeriodSeconds |
+The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. |
+false |
+integer (int32) |
+ |
+
+
+QueryParameter |
+orphanDependents |
+Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list. Either this field or PropagationPolicy may be set, but not both. |
+false |
+boolean |
+ |
+
+
+QueryParameter |
+propagationPolicy |
+Whether and how garbage collection will be performed. Defaults to Default. Either this field or OrphanDependents may be set, but not both. |
+false |
+string |
+ |
+
+
+PathParameter |
+namespace |
+object name and auth scope, such as for teams and projects |
+true |
+string |
+ |
+
+
+PathParameter |
+name |
+name of the PodPreset |
+true |
+string |
+ |
+
+
+
+
+
+
+
Responses
+
+
+
+
+
+
+
+
+HTTP Code |
+Description |
+Schema |
+
+
+
+
+200 |
+success |
+v1.Status |
+
+
+
+
+
+
+
+
+
+
+
partially update the specified PodPreset
+
+
+
PATCH /apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}
+
+
+
+
Parameters
+
+
+
+
+
+
+
+
+
+
+
+Type |
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+QueryParameter |
+pretty |
+If true, then the output is pretty printed. |
+false |
+string |
+ |
+
+
+BodyParameter |
+body |
+ |
+true |
+v1.Patch |
+ |
+
+
+PathParameter |
+namespace |
+object name and auth scope, such as for teams and projects |
+true |
+string |
+ |
+
+
+PathParameter |
+name |
+name of the PodPreset |
+true |
+string |
+ |
+
+
+
+
+
+
+
Responses
+
+
+
+
+
+
+
+
+HTTP Code |
+Description |
+Schema |
+
+
+
+
+200 |
+success |
+v1alpha1.PodPreset |
+
+
+
+
+
+
+
Consumes
+
+
+-
+
application/json-patch+json
+
+-
+
application/merge-patch+json
+
+-
+
application/strategic-merge-patch+json
+
+
+
+
+
+
+
+
+
list or watch objects of kind PodPreset
+
+
+
GET /apis/settings.k8s.io/v1alpha1/podpresets
+
+
+
+
Parameters
+
+
+
+
+
+
+
+
+
+
+
+Type |
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+QueryParameter |
+pretty |
+If true, then the output is pretty printed. |
+false |
+string |
+ |
+
+
+QueryParameter |
+labelSelector |
+A selector to restrict the list of returned objects by their labels. Defaults to everything. |
+false |
+string |
+ |
+
+
+QueryParameter |
+fieldSelector |
+A selector to restrict the list of returned objects by their fields. Defaults to everything. |
+false |
+string |
+ |
+
+
+QueryParameter |
+watch |
+Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
+false |
+boolean |
+ |
+
+
+QueryParameter |
+resourceVersion |
+When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. |
+false |
+string |
+ |
+
+
+QueryParameter |
+timeoutSeconds |
+Timeout for the list/watch call. |
+false |
+integer (int32) |
+ |
+
+
+
+
+
+
+
+
+
Produces
+
+
+-
+
application/json
+
+-
+
application/yaml
+
+-
+
application/vnd.kubernetes.protobuf
+
+-
+
application/json;stream=watch
+
+-
+
application/vnd.kubernetes.protobuf;stream=watch
+
+
+
+
+
+
+
+
watch individual changes to a list of PodPreset
+
+
+
GET /apis/settings.k8s.io/v1alpha1/watch/namespaces/{namespace}/podpresets
+
+
+
+
Parameters
+
+
+
+
+
+
+
+
+
+
+
+Type |
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+QueryParameter |
+pretty |
+If true, then the output is pretty printed. |
+false |
+string |
+ |
+
+
+QueryParameter |
+labelSelector |
+A selector to restrict the list of returned objects by their labels. Defaults to everything. |
+false |
+string |
+ |
+
+
+QueryParameter |
+fieldSelector |
+A selector to restrict the list of returned objects by their fields. Defaults to everything. |
+false |
+string |
+ |
+
+
+QueryParameter |
+watch |
+Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
+false |
+boolean |
+ |
+
+
+QueryParameter |
+resourceVersion |
+When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. |
+false |
+string |
+ |
+
+
+QueryParameter |
+timeoutSeconds |
+Timeout for the list/watch call. |
+false |
+integer (int32) |
+ |
+
+
+PathParameter |
+namespace |
+object name and auth scope, such as for teams and projects |
+true |
+string |
+ |
+
+
+
+
+
+
+
Responses
+
+
+
+
+
+
+
+
+HTTP Code |
+Description |
+Schema |
+
+
+
+
+200 |
+success |
+v1.WatchEvent |
+
+
+
+
+
+
+
+
Produces
+
+
+-
+
application/json
+
+-
+
application/yaml
+
+-
+
application/vnd.kubernetes.protobuf
+
+-
+
application/json;stream=watch
+
+-
+
application/vnd.kubernetes.protobuf;stream=watch
+
+
+
+
+
+
+
+
watch changes to an object of kind PodPreset
+
+
+
GET /apis/settings.k8s.io/v1alpha1/watch/namespaces/{namespace}/podpresets/{name}
+
+
+
+
Parameters
+
+
+
+
+
+
+
+
+
+
+
+Type |
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+QueryParameter |
+pretty |
+If true, then the output is pretty printed. |
+false |
+string |
+ |
+
+
+QueryParameter |
+labelSelector |
+A selector to restrict the list of returned objects by their labels. Defaults to everything. |
+false |
+string |
+ |
+
+
+QueryParameter |
+fieldSelector |
+A selector to restrict the list of returned objects by their fields. Defaults to everything. |
+false |
+string |
+ |
+
+
+QueryParameter |
+watch |
+Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
+false |
+boolean |
+ |
+
+
+QueryParameter |
+resourceVersion |
+When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. |
+false |
+string |
+ |
+
+
+QueryParameter |
+timeoutSeconds |
+Timeout for the list/watch call. |
+false |
+integer (int32) |
+ |
+
+
+PathParameter |
+namespace |
+object name and auth scope, such as for teams and projects |
+true |
+string |
+ |
+
+
+PathParameter |
+name |
+name of the PodPreset |
+true |
+string |
+ |
+
+
+
+
+
+
+
Responses
+
+
+
+
+
+
+
+
+HTTP Code |
+Description |
+Schema |
+
+
+
+
+200 |
+success |
+v1.WatchEvent |
+
+
+
+
+
+
+
+
Produces
+
+
+-
+
application/json
+
+-
+
application/yaml
+
+-
+
application/vnd.kubernetes.protobuf
+
+-
+
application/json;stream=watch
+
+-
+
application/vnd.kubernetes.protobuf;stream=watch
+
+
+
+
+
+
+
+
watch individual changes to a list of PodPreset
+
+
+
GET /apis/settings.k8s.io/v1alpha1/watch/podpresets
+
+
+
+
Parameters
+
+
+
+
+
+
+
+
+
+
+
+Type |
+Name |
+Description |
+Required |
+Schema |
+Default |
+
+
+
+
+QueryParameter |
+pretty |
+If true, then the output is pretty printed. |
+false |
+string |
+ |
+
+
+QueryParameter |
+labelSelector |
+A selector to restrict the list of returned objects by their labels. Defaults to everything. |
+false |
+string |
+ |
+
+
+QueryParameter |
+fieldSelector |
+A selector to restrict the list of returned objects by their fields. Defaults to everything. |
+false |
+string |
+ |
+
+
+QueryParameter |
+watch |
+Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
+false |
+boolean |
+ |
+
+
+QueryParameter |
+resourceVersion |
+When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. |
+false |
+string |
+ |
+
+
+QueryParameter |
+timeoutSeconds |
+Timeout for the list/watch call. |
+false |
+integer (int32) |
+ |
+
+
+
+
+
+
+
Responses
+
+
+
+
+
+
+
+
+HTTP Code |
+Description |
+Schema |
+
+
+
+
+200 |
+success |
+v1.WatchEvent |
+
+
+
+
+
+
+
+
Produces
+
+
+-
+
application/json
+
+-
+
application/yaml
+
+-
+
application/vnd.kubernetes.protobuf
+
+-
+
application/json;stream=watch
+
+-
+
application/vnd.kubernetes.protobuf;stream=watch
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hack/.linted_packages b/hack/.linted_packages
index a8b492d6918..8bd58f93057 100644
--- a/hack/.linted_packages
+++ b/hack/.linted_packages
@@ -79,6 +79,8 @@ pkg/apis/imagepolicy/install
pkg/apis/policy/install
pkg/apis/rbac/install
pkg/apis/rbac/v1alpha1
+pkg/apis/settings/install
+pkg/apis/settings/validation
pkg/apis/storage/install
pkg/apis/storage/validation
pkg/bootstrap/api
@@ -103,6 +105,8 @@ pkg/client/informers/informers_generated/externalversions/policy/v1beta1
pkg/client/informers/informers_generated/externalversions/rbac
pkg/client/informers/informers_generated/externalversions/rbac/v1alpha1
pkg/client/informers/informers_generated/externalversions/rbac/v1beta1
+pkg/client/informers/informers_generated/externalversions/settings
+pkg/client/informers/informers_generated/externalversions/settings/v1alpha1
pkg/client/informers/informers_generated/externalversions/storage
pkg/client/informers/informers_generated/externalversions/storage/v1beta1
pkg/client/informers/informers_generated/internalversion
@@ -122,6 +126,8 @@ pkg/client/informers/informers_generated/internalversion/policy
pkg/client/informers/informers_generated/internalversion/policy/internalversion
pkg/client/informers/informers_generated/internalversion/rbac
pkg/client/informers/informers_generated/internalversion/rbac/internalversion
+pkg/client/informers/informers_generated/internalversion/settings
+pkg/client/informers/informers_generated/internalversion/settings/internalversion
pkg/client/informers/informers_generated/internalversion/storage
pkg/client/informers/informers_generated/internalversion/storage/internalversion
pkg/client/listers/apps/internalversion
@@ -152,6 +158,8 @@ pkg/client/listers/policy/v1beta1
pkg/client/listers/rbac/internalversion
pkg/client/listers/rbac/v1alpha1
pkg/client/listers/rbac/v1beta1
+pkg/client/listers/settings/internalversion
+pkg/client/listers/settings/v1alpha1
pkg/client/listers/storage/internalversion
pkg/client/listers/storage/v1beta1
pkg/client/metrics
@@ -334,6 +342,8 @@ staging/src/k8s.io/client-go/informers/policy/v1beta1
staging/src/k8s.io/client-go/informers/rbac
staging/src/k8s.io/client-go/informers/rbac/v1alpha1
staging/src/k8s.io/client-go/informers/rbac/v1beta1
+staging/src/k8s.io/client-go/informers/settings
+staging/src/k8s.io/client-go/informers/settings/v1alpha1
staging/src/k8s.io/client-go/informers/storage
staging/src/k8s.io/client-go/informers/storage/v1beta1
staging/src/k8s.io/client-go/listers/apps/v1beta1
@@ -347,6 +357,7 @@ staging/src/k8s.io/client-go/listers/extensions/v1beta1
staging/src/k8s.io/client-go/listers/policy/v1beta1
staging/src/k8s.io/client-go/listers/rbac/v1alpha1
staging/src/k8s.io/client-go/listers/rbac/v1beta1
+staging/src/k8s.io/client-go/listers/settings/v1alpha1
staging/src/k8s.io/client-go/listers/storage/v1beta1
staging/src/k8s.io/client-go/plugin/pkg/client/auth
staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp
diff --git a/hack/lib/init.sh b/hack/lib/init.sh
index 68af35d2c39..812c8682b03 100644
--- a/hack/lib/init.sh
+++ b/hack/lib/init.sh
@@ -29,7 +29,7 @@ KUBE_OUTPUT_BINPATH="${KUBE_OUTPUT}/bin"
# compression for build container
KUBE_RSYNC_COMPRESS="${KUBE_RSYNC_COMPRESS:-0}"
-# Set no_proxy for localhost if behind a proxy, otherwise,
+# Set no_proxy for localhost if behind a proxy, otherwise,
# the connections to localhost in scripts will time out
export no_proxy=127.0.0.1,localhost
@@ -68,7 +68,8 @@ imagepolicy.k8s.io/v1alpha1 \
policy/v1beta1 \
rbac.authorization.k8s.io/v1beta1 \
rbac.authorization.k8s.io/v1alpha1 \
-storage.k8s.io/v1beta1\
+settings.k8s.io/v1alpha1 \
+storage.k8s.io/v1beta1 \
}"
# not all group versions are exposed by the server. This list contains those
diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh
index 0f407cce5a1..9bf1b35de08 100755
--- a/hack/update-codegen.sh
+++ b/hack/update-codegen.sh
@@ -43,7 +43,7 @@ GV_DIRS=()
for gv in "${GROUP_VERSIONS[@]}"; do
# add items, but strip off any leading apis/ you find to match command expectations
api_dir=$(kube::util::group-version-to-pkg-path "${gv}")
- nopkg_dir=${api_dir#pkg/}
+ nopkg_dir=${api_dir#pkg/}
pkg_dir=${nopkg_dir#apis/}
# skip groups that aren't being served, clients for these don't matter
diff --git a/pkg/BUILD b/pkg/BUILD
index a6c0784555b..3f3bc758b94 100644
--- a/pkg/BUILD
+++ b/pkg/BUILD
@@ -28,6 +28,7 @@ filegroup(
"//pkg/apis/meta/v1:all-srcs",
"//pkg/apis/policy:all-srcs",
"//pkg/apis/rbac:all-srcs",
+ "//pkg/apis/settings:all-srcs",
"//pkg/apis/storage:all-srcs",
"//pkg/auth/authorizer/abac:all-srcs",
"//pkg/auth/user:all-srcs",
@@ -68,6 +69,8 @@ filegroup(
"//pkg/client/listers/rbac/internalversion:all-srcs",
"//pkg/client/listers/rbac/v1alpha1:all-srcs",
"//pkg/client/listers/rbac/v1beta1:all-srcs",
+ "//pkg/client/listers/settings/internalversion:all-srcs",
+ "//pkg/client/listers/settings/v1alpha1:all-srcs",
"//pkg/client/listers/storage/internalversion:all-srcs",
"//pkg/client/listers/storage/v1beta1:all-srcs",
"//pkg/client/metrics:all-srcs",
diff --git a/pkg/api/testapi/BUILD b/pkg/api/testapi/BUILD
index 101b254c101..6bf86f51c98 100644
--- a/pkg/api/testapi/BUILD
+++ b/pkg/api/testapi/BUILD
@@ -37,6 +37,8 @@ go_library(
"//pkg/apis/policy/install:go_default_library",
"//pkg/apis/rbac:go_default_library",
"//pkg/apis/rbac/install:go_default_library",
+ "//pkg/apis/settings:go_default_library",
+ "//pkg/apis/settings/install:go_default_library",
"//pkg/apis/storage:go_default_library",
"//pkg/apis/storage/install:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/api/meta",
diff --git a/pkg/api/testapi/testapi.go b/pkg/api/testapi/testapi.go
index c567f09f170..b03b1528c87 100644
--- a/pkg/api/testapi/testapi.go
+++ b/pkg/api/testapi/testapi.go
@@ -45,6 +45,7 @@ import (
"k8s.io/kubernetes/pkg/apis/imagepolicy"
"k8s.io/kubernetes/pkg/apis/policy"
"k8s.io/kubernetes/pkg/apis/rbac"
+ "k8s.io/kubernetes/pkg/apis/settings"
"k8s.io/kubernetes/pkg/apis/storage"
_ "k8s.io/kubernetes/federation/apis/federation/install"
@@ -60,6 +61,7 @@ import (
_ "k8s.io/kubernetes/pkg/apis/imagepolicy/install"
_ "k8s.io/kubernetes/pkg/apis/policy/install"
_ "k8s.io/kubernetes/pkg/apis/rbac/install"
+ _ "k8s.io/kubernetes/pkg/apis/settings/install"
_ "k8s.io/kubernetes/pkg/apis/storage/install"
)
@@ -75,6 +77,7 @@ var (
Federation TestGroup
Rbac TestGroup
Certificates TestGroup
+ Settings TestGroup
Storage TestGroup
ImagePolicy TestGroup
@@ -230,6 +233,15 @@ func init() {
externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
}
}
+ if _, ok := Groups[settings.GroupName]; !ok {
+ externalGroupVersion := schema.GroupVersion{Group: settings.GroupName, Version: api.Registry.GroupOrDie(settings.GroupName).GroupVersion.Version}
+ Groups[settings.GroupName] = TestGroup{
+ externalGroupVersion: externalGroupVersion,
+ internalGroupVersion: settings.SchemeGroupVersion,
+ internalTypes: api.Scheme.KnownTypes(settings.SchemeGroupVersion),
+ externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
+ }
+ }
if _, ok := Groups[storage.GroupName]; !ok {
externalGroupVersion := schema.GroupVersion{Group: storage.GroupName, Version: api.Registry.GroupOrDie(storage.GroupName).GroupVersion.Version}
Groups[storage.GroupName] = TestGroup{
@@ -276,6 +288,7 @@ func init() {
Extensions = Groups[extensions.GroupName]
Federation = Groups[federation.GroupName]
Rbac = Groups[rbac.GroupName]
+ Settings = Groups[settings.GroupName]
Storage = Groups[storage.GroupName]
ImagePolicy = Groups[imagepolicy.GroupName]
Authorization = Groups[authorization.GroupName]
diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go
index 0b50197866b..6a525d8b22d 100644
--- a/pkg/api/validation/validation.go
+++ b/pkg/api/validation/validation.go
@@ -319,7 +319,7 @@ func ValidateNoNewFinalizers(newFinalizers []string, oldFinalizers []string, fld
return genericvalidation.ValidateNoNewFinalizers(newFinalizers, oldFinalizers, fldPath)
}
-func validateVolumes(volumes []api.Volume, fldPath *field.Path) (sets.String, field.ErrorList) {
+func ValidateVolumes(volumes []api.Volume, fldPath *field.Path) (sets.String, field.ErrorList) {
allErrs := field.ErrorList{}
allNames := sets.String{}
@@ -1330,7 +1330,7 @@ func validateContainerPorts(ports []api.ContainerPort, fldPath *field.Path) fiel
return allErrs
}
-func validateEnv(vars []api.EnvVar, fldPath *field.Path) field.ErrorList {
+func ValidateEnv(vars []api.EnvVar, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
for i, ev := range vars {
@@ -1422,7 +1422,7 @@ func validateContainerResourceFieldSelector(fs *api.ResourceFieldSelector, expre
return allErrs
}
-func validateEnvFrom(vars []api.EnvFromSource, fldPath *field.Path) field.ErrorList {
+func ValidateEnvFrom(vars []api.EnvFromSource, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
for i, ev := range vars {
idxPath := fldPath.Index(i)
@@ -1523,7 +1523,7 @@ func validateSecretKeySelector(s *api.SecretKeySelector, fldPath *field.Path) fi
return allErrs
}
-func validateVolumeMounts(mounts []api.VolumeMount, volumes sets.String, fldPath *field.Path) field.ErrorList {
+func ValidateVolumeMounts(mounts []api.VolumeMount, volumes sets.String, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
mountpoints := sets.NewString()
@@ -1778,8 +1778,8 @@ func validateContainers(containers []api.Container, volumes sets.String, fldPath
allErrs = append(allErrs, validateProbe(ctr.ReadinessProbe, idxPath.Child("readinessProbe"))...)
allErrs = append(allErrs, validateContainerPorts(ctr.Ports, idxPath.Child("ports"))...)
- allErrs = append(allErrs, validateEnv(ctr.Env, idxPath.Child("env"))...)
- allErrs = append(allErrs, validateVolumeMounts(ctr.VolumeMounts, volumes, idxPath.Child("volumeMounts"))...)
+ allErrs = append(allErrs, ValidateEnv(ctr.Env, idxPath.Child("env"))...)
+ allErrs = append(allErrs, ValidateVolumeMounts(ctr.VolumeMounts, volumes, idxPath.Child("volumeMounts"))...)
allErrs = append(allErrs, validatePullPolicy(ctr.ImagePullPolicy, idxPath.Child("imagePullPolicy"))...)
allErrs = append(allErrs, ValidateResourceRequirements(&ctr.Resources, idxPath.Child("resources"))...)
allErrs = append(allErrs, ValidateSecurityContext(ctr.SecurityContext, idxPath.Child("securityContext"))...)
@@ -1988,7 +1988,7 @@ func ValidatePod(pod *api.Pod) field.ErrorList {
func ValidatePodSpec(spec *api.PodSpec, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
- allVolumes, vErrs := validateVolumes(spec.Volumes, fldPath.Child("volumes"))
+ allVolumes, vErrs := ValidateVolumes(spec.Volumes, fldPath.Child("volumes"))
allErrs = append(allErrs, vErrs...)
allErrs = append(allErrs, validateContainers(spec.Containers, allVolumes, fldPath.Child("containers"))...)
allErrs = append(allErrs, validateInitContainers(spec.InitContainers, spec.Containers, allVolumes, fldPath.Child("initContainers"))...)
diff --git a/pkg/api/validation/validation_test.go b/pkg/api/validation/validation_test.go
index 60d385a41c1..c96c0349f76 100644
--- a/pkg/api/validation/validation_test.go
+++ b/pkg/api/validation/validation_test.go
@@ -1931,7 +1931,7 @@ func TestValidateVolumes(t *testing.T) {
}
for i, tc := range testCases {
- names, errs := validateVolumes([]api.Volume{tc.vol}, field.NewPath("field"))
+ names, errs := ValidateVolumes([]api.Volume{tc.vol}, field.NewPath("field"))
if len(errs) > 0 && tc.errtype == "" {
t.Errorf("[%d: %q] unexpected error(s): %v", i, tc.name, errs)
} else if len(errs) > 1 {
@@ -1957,7 +1957,7 @@ func TestValidateVolumes(t *testing.T) {
{Name: "abc", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
{Name: "abc", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
}
- _, errs := validateVolumes(dupsCase, field.NewPath("field"))
+ _, errs := ValidateVolumes(dupsCase, field.NewPath("field"))
if len(errs) == 0 {
t.Errorf("expected error")
} else if len(errs) != 1 {
@@ -2121,7 +2121,7 @@ func TestValidateEnv(t *testing.T) {
},
},
}
- if errs := validateEnv(successCase, field.NewPath("field")); len(errs) != 0 {
+ if errs := ValidateEnv(successCase, field.NewPath("field")); len(errs) != 0 {
t.Errorf("expected success: %v", errs)
}
@@ -2303,7 +2303,7 @@ func TestValidateEnv(t *testing.T) {
},
}
for _, tc := range errorCases {
- if errs := validateEnv(tc.envs, field.NewPath("field")); len(errs) == 0 {
+ if errs := ValidateEnv(tc.envs, field.NewPath("field")); len(errs) == 0 {
t.Errorf("expected failure for %s", tc.name)
} else {
for i := range errs {
@@ -2341,7 +2341,7 @@ func TestValidateEnvFrom(t *testing.T) {
},
},
}
- if errs := validateEnvFrom(successCase, field.NewPath("field")); len(errs) != 0 {
+ if errs := ValidateEnvFrom(successCase, field.NewPath("field")); len(errs) != 0 {
t.Errorf("expected success: %v", errs)
}
@@ -2413,7 +2413,7 @@ func TestValidateEnvFrom(t *testing.T) {
},
}
for _, tc := range errorCases {
- if errs := validateEnvFrom(tc.envs, field.NewPath("field")); len(errs) == 0 {
+ if errs := ValidateEnvFrom(tc.envs, field.NewPath("field")); len(errs) == 0 {
t.Errorf("expected failure for %s", tc.name)
} else {
for i := range errs {
@@ -2439,7 +2439,7 @@ func TestValidateVolumeMounts(t *testing.T) {
{Name: "abc-123", MountPath: "/bad", SubPath: "..baz"},
{Name: "abc", MountPath: "c:/foo/bar"},
}
- if errs := validateVolumeMounts(successCase, volumes, field.NewPath("field")); len(errs) != 0 {
+ if errs := ValidateVolumeMounts(successCase, volumes, field.NewPath("field")); len(errs) != 0 {
t.Errorf("expected success: %v", errs)
}
@@ -2454,7 +2454,7 @@ func TestValidateVolumeMounts(t *testing.T) {
"subpath ends in ..": {{Name: "abc", MountPath: "/bar", SubPath: "./.."}},
}
for k, v := range errorCases {
- if errs := validateVolumeMounts(v, volumes, field.NewPath("field")); len(errs) == 0 {
+ if errs := ValidateVolumeMounts(v, volumes, field.NewPath("field")); len(errs) == 0 {
t.Errorf("expected failure for %s", k)
}
}
diff --git a/pkg/apis/settings/BUILD b/pkg/apis/settings/BUILD
new file mode 100644
index 00000000000..a97c56d55a3
--- /dev/null
+++ b/pkg/apis/settings/BUILD
@@ -0,0 +1,44 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ "doc.go",
+ "register.go",
+ "types.go",
+ "zz_generated.deepcopy.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/api:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/conversion",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [
+ ":package-srcs",
+ "//pkg/apis/settings/install:all-srcs",
+ "//pkg/apis/settings/v1alpha1:all-srcs",
+ "//pkg/apis/settings/validation:all-srcs",
+ ],
+ tags = ["automanaged"],
+)
diff --git a/pkg/apis/settings/doc.go b/pkg/apis/settings/doc.go
new file mode 100644
index 00000000000..292cb6b244f
--- /dev/null
+++ b/pkg/apis/settings/doc.go
@@ -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.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +groupName=settings.k8s.io
+package settings // import "k8s.io/kubernetes/pkg/apis/settings"
diff --git a/pkg/apis/settings/install/BUILD b/pkg/apis/settings/install/BUILD
new file mode 100644
index 00000000000..b0c7f6e203c
--- /dev/null
+++ b/pkg/apis/settings/install/BUILD
@@ -0,0 +1,35 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = ["install.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/api:go_default_library",
+ "//pkg/apis/settings:go_default_library",
+ "//pkg/apis/settings/v1alpha1:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced",
+ "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)
diff --git a/pkg/apis/settings/install/install.go b/pkg/apis/settings/install/install.go
new file mode 100644
index 00000000000..105a78d8648
--- /dev/null
+++ b/pkg/apis/settings/install/install.go
@@ -0,0 +1,49 @@
+/*
+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 install installs the settings API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/settings"
+ "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: settings.GroupName,
+ VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/apis/settings",
+ AddInternalObjectsToScheme: settings.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/pkg/apis/settings/register.go b/pkg/apis/settings/register.go
new file mode 100644
index 00000000000..85847012793
--- /dev/null
+++ b/pkg/apis/settings/register.go
@@ -0,0 +1,52 @@
+/*
+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 settings
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// GroupName is the group name use in this package
+const GroupName = "settings.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodPreset{},
+ &PodPresetList{},
+ )
+ return nil
+}
diff --git a/pkg/apis/settings/types.go b/pkg/apis/settings/types.go
new file mode 100644
index 00000000000..910143e2a38
--- /dev/null
+++ b/pkg/apis/settings/types.go
@@ -0,0 +1,63 @@
+/*
+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 settings
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/api"
+)
+
+// +genclient=true
+
+// PodPreset is a policy resource that defines additional runtime
+// requirements for a Pod.
+type PodPreset struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // +optional
+ Spec PodPresetSpec
+}
+
+// PodPresetSpec is a description of a pod injection policy.
+type PodPresetSpec struct {
+ // Selector is a label query over a set of resources, in this case pods.
+ // Required.
+ Selector metav1.LabelSelector
+ // Env defines the collection of EnvVar to inject into containers.
+ // +optional
+ Env []api.EnvVar
+ // EnvFrom defines the collection of EnvFromSource to inject into containers.
+ // +optional
+ EnvFrom []api.EnvFromSource
+ // Volumes defines the collection of Volume to inject into the pod.
+ // +optional
+ Volumes []api.Volume
+ // VolumeMounts defines the collection of VolumeMount to inject into containers.
+ // +optional
+ VolumeMounts []api.VolumeMount
+}
+
+// PodPresetList is a list of PodPreset objects.
+type PodPresetList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []PodPreset
+}
diff --git a/pkg/apis/settings/v1alpha1/BUILD b/pkg/apis/settings/v1alpha1/BUILD
new file mode 100644
index 00000000000..82160919fa8
--- /dev/null
+++ b/pkg/apis/settings/v1alpha1/BUILD
@@ -0,0 +1,46 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ "doc.go",
+ "generated.pb.go",
+ "register.go",
+ "types.go",
+ "types_swagger_doc_generated.go",
+ "zz_generated.conversion.go",
+ "zz_generated.deepcopy.go",
+ "zz_generated.defaults.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/api:go_default_library",
+ "//pkg/api/v1:go_default_library",
+ "//pkg/apis/settings:go_default_library",
+ "//vendor:github.com/gogo/protobuf/proto",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/conversion",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)
diff --git a/pkg/apis/settings/v1alpha1/doc.go b/pkg/apis/settings/v1alpha1/doc.go
new file mode 100644
index 00000000000..df04c846b39
--- /dev/null
+++ b/pkg/apis/settings/v1alpha1/doc.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2017 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.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/settings
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+// +groupName=settings.k8s.io
+package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
diff --git a/pkg/apis/settings/v1alpha1/generated.pb.go b/pkg/apis/settings/v1alpha1/generated.pb.go
new file mode 100644
index 00000000000..fb206e12ee5
--- /dev/null
+++ b/pkg/apis/settings/v1alpha1/generated.pb.go
@@ -0,0 +1,924 @@
+/*
+Copyright 2017 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.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ PodPreset
+ PodPresetList
+ PodPresetSpec
+*/
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+const _ = proto.GoGoProtoPackageIsVersion1
+
+func (m *PodPreset) Reset() { *m = PodPreset{} }
+func (*PodPreset) ProtoMessage() {}
+func (*PodPreset) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *PodPresetList) Reset() { *m = PodPresetList{} }
+func (*PodPresetList) ProtoMessage() {}
+func (*PodPresetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *PodPresetSpec) Reset() { *m = PodPresetSpec{} }
+func (*PodPresetSpec) ProtoMessage() {}
+func (*PodPresetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func init() {
+ proto.RegisterType((*PodPreset)(nil), "k8s.io.kubernetes.pkg.apis.settings.v1alpha1.PodPreset")
+ proto.RegisterType((*PodPresetList)(nil), "k8s.io.kubernetes.pkg.apis.settings.v1alpha1.PodPresetList")
+ proto.RegisterType((*PodPresetSpec)(nil), "k8s.io.kubernetes.pkg.apis.settings.v1alpha1.PodPresetSpec")
+}
+func (m *PodPreset) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PodPreset) MarshalTo(data []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ data[i] = 0xa
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ return i, nil
+}
+
+func (m *PodPresetList) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PodPresetList) MarshalTo(data []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ data[i] = 0xa
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size()))
+ n3, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodPresetSpec) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PodPresetSpec) MarshalTo(data []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ data[i] = 0xa
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Selector.Size()))
+ n4, err := m.Selector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ if len(m.Env) > 0 {
+ for _, msg := range m.Env {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.EnvFrom) > 0 {
+ for _, msg := range m.EnvFrom {
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Volumes) > 0 {
+ for _, msg := range m.Volumes {
+ data[i] = 0x22
+ i++
+ i = encodeVarintGenerated(data, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.VolumeMounts) > 0 {
+ for _, msg := range m.VolumeMounts {
+ data[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(data []byte, offset int, v uint64) int {
+ data[offset] = uint8(v)
+ data[offset+1] = uint8(v >> 8)
+ data[offset+2] = uint8(v >> 16)
+ data[offset+3] = uint8(v >> 24)
+ data[offset+4] = uint8(v >> 32)
+ data[offset+5] = uint8(v >> 40)
+ data[offset+6] = uint8(v >> 48)
+ data[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(data []byte, offset int, v uint32) int {
+ data[offset] = uint8(v)
+ data[offset+1] = uint8(v >> 8)
+ data[offset+2] = uint8(v >> 16)
+ data[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(data []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ data[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ data[offset] = uint8(v)
+ return offset + 1
+}
+func (m *PodPreset) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodPresetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodPresetSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Env) > 0 {
+ for _, e := range m.Env {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.EnvFrom) > 0 {
+ for _, e := range m.EnvFrom {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Volumes) > 0 {
+ for _, e := range m.Volumes {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.VolumeMounts) > 0 {
+ for _, e := range m.VolumeMounts {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *PodPreset) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPreset{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodPresetSpec", "PodPresetSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodPresetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPresetList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodPreset", "PodPreset", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodPresetSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPresetSpec{`,
+ `Selector:` + strings.Replace(strings.Replace(this.Selector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
+ `Env:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Env), "EnvVar", "k8s_io_kubernetes_pkg_api_v1.EnvVar", 1), `&`, ``, 1) + `,`,
+ `EnvFrom:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EnvFrom), "EnvFromSource", "k8s_io_kubernetes_pkg_api_v1.EnvFromSource", 1), `&`, ``, 1) + `,`,
+ `Volumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Volumes), "Volume", "k8s_io_kubernetes_pkg_api_v1.Volume", 1), `&`, ``, 1) + `,`,
+ `VolumeMounts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeMounts), "VolumeMount", "k8s_io_kubernetes_pkg_api_v1.VolumeMount", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *PodPreset) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPreset: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPreset: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodPresetList) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPresetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPresetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PodPreset{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodPresetSpec) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPresetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPresetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Env = append(m.Env, k8s_io_kubernetes_pkg_api_v1.EnvVar{})
+ if err := m.Env[len(m.Env)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EnvFrom", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EnvFrom = append(m.EnvFrom, k8s_io_kubernetes_pkg_api_v1.EnvFromSource{})
+ if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Volumes = append(m.Volumes, k8s_io_kubernetes_pkg_api_v1.Volume{})
+ if err := m.Volumes[len(m.Volumes)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeMounts", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeMounts = append(m.VolumeMounts, k8s_io_kubernetes_pkg_api_v1.VolumeMount{})
+ if err := m.VolumeMounts[len(m.VolumeMounts)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(data []byte) (n int, err error) {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if data[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(data[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+var fileDescriptorGenerated = []byte{
+ // 550 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x8b, 0xd3, 0x40,
+ 0x14, 0xc7, 0x9b, 0x6d, 0x4b, 0xeb, 0xb4, 0x8b, 0x12, 0x3c, 0x84, 0x1e, 0xb2, 0x4b, 0xf1, 0xb0,
+ 0xea, 0x3a, 0xb1, 0xab, 0xa8, 0xa0, 0xa7, 0xc8, 0x0a, 0x82, 0xcb, 0x2e, 0x29, 0xf4, 0x20, 0x2b,
+ 0x38, 0x4d, 0x9f, 0x69, 0x6c, 0x93, 0x09, 0x33, 0x93, 0xa0, 0x37, 0x3f, 0x82, 0x5f, 0x4a, 0x28,
+ 0xe8, 0x61, 0x8f, 0x9e, 0x16, 0x5b, 0xbf, 0x88, 0xcc, 0x74, 0xd2, 0x44, 0xba, 0x65, 0xab, 0xb7,
+ 0x79, 0x8f, 0xf7, 0xff, 0xbd, 0xff, 0x3f, 0x2f, 0xe8, 0xc5, 0xe4, 0x19, 0xc7, 0x21, 0x75, 0x26,
+ 0xe9, 0x10, 0x58, 0x0c, 0x02, 0xb8, 0x93, 0x4c, 0x02, 0x87, 0x24, 0x21, 0x77, 0x38, 0x08, 0x11,
+ 0xc6, 0x01, 0x77, 0xb2, 0x1e, 0x99, 0x26, 0x63, 0xd2, 0x73, 0x02, 0x88, 0x81, 0x11, 0x01, 0x23,
+ 0x9c, 0x30, 0x2a, 0xa8, 0x79, 0xb8, 0x54, 0xe3, 0x42, 0x8d, 0x93, 0x49, 0x80, 0xa5, 0x1a, 0xe7,
+ 0x6a, 0x9c, 0xab, 0x3b, 0x0f, 0x82, 0x50, 0x8c, 0xd3, 0x21, 0xf6, 0x69, 0xe4, 0x04, 0x34, 0xa0,
+ 0x8e, 0x82, 0x0c, 0xd3, 0x0f, 0xaa, 0x52, 0x85, 0x7a, 0x2d, 0xe1, 0x9d, 0xc7, 0xda, 0x1a, 0x49,
+ 0xc2, 0x88, 0xf8, 0xe3, 0x30, 0x06, 0xf6, 0xb9, 0x30, 0x17, 0x81, 0x20, 0x4e, 0xb6, 0x66, 0xa9,
+ 0xe3, 0x6c, 0x52, 0xb1, 0x34, 0x16, 0x61, 0x04, 0x6b, 0x82, 0x27, 0xd7, 0x09, 0xb8, 0x3f, 0x86,
+ 0x88, 0xac, 0xe9, 0x4a, 0xf6, 0x38, 0xb0, 0x0c, 0x58, 0xe1, 0x0d, 0x3e, 0x91, 0x28, 0x99, 0xc2,
+ 0x55, 0xf6, 0x0e, 0x37, 0x7e, 0xef, 0x2b, 0xa6, 0xbb, 0x3f, 0x0c, 0x74, 0xe3, 0x8c, 0x8e, 0xce,
+ 0x18, 0x70, 0x10, 0xe6, 0x7b, 0xd4, 0x94, 0xa9, 0x47, 0x44, 0x10, 0xcb, 0xd8, 0x37, 0x0e, 0x5a,
+ 0x47, 0x0f, 0xb1, 0x3e, 0x40, 0xd9, 0x7c, 0x71, 0x02, 0x39, 0x8d, 0xb3, 0x1e, 0x3e, 0x1d, 0x7e,
+ 0x04, 0x5f, 0x9c, 0x80, 0x20, 0xae, 0x39, 0xbb, 0xdc, 0xab, 0x2c, 0x2e, 0xf7, 0x50, 0xd1, 0xf3,
+ 0x56, 0x54, 0xf3, 0x1d, 0xaa, 0xf1, 0x04, 0x7c, 0x6b, 0x47, 0xd1, 0x9f, 0xe3, 0x7f, 0x39, 0x2f,
+ 0x5e, 0x19, 0xed, 0x27, 0xe0, 0xbb, 0x6d, 0xbd, 0xa8, 0x26, 0x2b, 0x4f, 0x61, 0xbb, 0xdf, 0x0d,
+ 0xb4, 0xbb, 0x9a, 0x7a, 0x13, 0x72, 0x61, 0x9e, 0xaf, 0x45, 0xc2, 0xdb, 0x45, 0x92, 0x6a, 0x15,
+ 0xe8, 0x96, 0xde, 0xd3, 0xcc, 0x3b, 0xa5, 0x38, 0xe7, 0xa8, 0x1e, 0x0a, 0x88, 0xb8, 0xb5, 0xb3,
+ 0x5f, 0x3d, 0x68, 0x1d, 0x3d, 0xfd, 0xcf, 0x3c, 0xee, 0xae, 0xde, 0x51, 0x7f, 0x2d, 0x69, 0xde,
+ 0x12, 0xda, 0xfd, 0x56, 0x2d, 0xa5, 0x91, 0x29, 0x4d, 0x82, 0x9a, 0x1c, 0xa6, 0xe0, 0x0b, 0xca,
+ 0x74, 0x9a, 0x47, 0x5b, 0xa6, 0x21, 0x43, 0x98, 0xf6, 0xb5, 0xb4, 0x88, 0x94, 0x77, 0xbc, 0x15,
+ 0xd6, 0x7c, 0x89, 0xaa, 0x10, 0x67, 0x3a, 0xd0, 0x9d, 0xcd, 0x81, 0x24, 0xf5, 0x38, 0xce, 0x06,
+ 0x84, 0xb9, 0x2d, 0x8d, 0xab, 0x1e, 0xc7, 0x99, 0x27, 0xd5, 0xe6, 0x00, 0x35, 0x20, 0xce, 0x5e,
+ 0x31, 0x1a, 0x59, 0x55, 0x05, 0xba, 0x7f, 0x2d, 0x48, 0x0e, 0xf7, 0x69, 0xca, 0x7c, 0x70, 0x6f,
+ 0x6a, 0x5e, 0x43, 0xb7, 0xbd, 0x1c, 0x66, 0x9e, 0xa2, 0x46, 0x46, 0xa7, 0x69, 0x04, 0xdc, 0xaa,
+ 0x6d, 0x63, 0x70, 0xa0, 0x86, 0x0b, 0xe0, 0xb2, 0xe6, 0x5e, 0x4e, 0x31, 0x7d, 0xd4, 0x5e, 0x3e,
+ 0x4f, 0x68, 0x1a, 0x0b, 0x6e, 0xd5, 0x15, 0xf5, 0xee, 0x36, 0x54, 0xa5, 0x70, 0x6f, 0x6b, 0x74,
+ 0xbb, 0xd4, 0xe4, 0xde, 0x5f, 0x50, 0xf7, 0xde, 0x6c, 0x6e, 0x57, 0x2e, 0xe6, 0x76, 0xe5, 0xe7,
+ 0xdc, 0xae, 0x7c, 0x59, 0xd8, 0xc6, 0x6c, 0x61, 0x1b, 0x17, 0x0b, 0xdb, 0xf8, 0xb5, 0xb0, 0x8d,
+ 0xaf, 0xbf, 0xed, 0xca, 0xdb, 0x66, 0xfe, 0x4f, 0xfc, 0x09, 0x00, 0x00, 0xff, 0xff, 0x91, 0x84,
+ 0x03, 0x10, 0x2f, 0x05, 0x00, 0x00,
+}
diff --git a/pkg/apis/settings/v1alpha1/generated.proto b/pkg/apis/settings/v1alpha1/generated.proto
new file mode 100644
index 00000000000..b5a80fa637f
--- /dev/null
+++ b/pkg/apis/settings/v1alpha1/generated.proto
@@ -0,0 +1,76 @@
+/*
+Copyright 2017 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 file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.settings.v1alpha1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// PodPreset is a policy resource that defines additional runtime
+// requirements for a Pod.
+message PodPreset {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // +optional
+ optional PodPresetSpec spec = 2;
+}
+
+// PodPresetList is a list of PodPreset objects.
+message PodPresetList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of schema objects.
+ repeated PodPreset items = 2;
+}
+
+// PodPresetSpec is a description of a pod injection policy.
+message PodPresetSpec {
+ // Selector is a label query over a set of resources, in this case pods.
+ // Required.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
+
+ // Env defines the collection of EnvVar to inject into containers.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.EnvVar env = 2;
+
+ // EnvFrom defines the collection of EnvFromSource to inject into containers.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.EnvFromSource envFrom = 3;
+
+ // Volumes defines the collection of Volume to inject into the pod.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.Volume volumes = 4;
+
+ // VolumeMounts defines the collection of VolumeMount to inject into containers.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.VolumeMount volumeMounts = 5;
+}
+
diff --git a/pkg/apis/settings/v1alpha1/register.go b/pkg/apis/settings/v1alpha1/register.go
new file mode 100644
index 00000000000..45afb50ca9a
--- /dev/null
+++ b/pkg/apis/settings/v1alpha1/register.go
@@ -0,0 +1,49 @@
+/*
+Copyright 2017 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 (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "settings.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodPreset{},
+ &PodPresetList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/pkg/apis/settings/v1alpha1/types.go b/pkg/apis/settings/v1alpha1/types.go
new file mode 100644
index 00000000000..fbfffd13605
--- /dev/null
+++ b/pkg/apis/settings/v1alpha1/types.go
@@ -0,0 +1,67 @@
+/*
+Copyright 2017 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 (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// +genclient=true
+
+// PodPreset is a policy resource that defines additional runtime
+// requirements for a Pod.
+type PodPreset struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // +optional
+ Spec PodPresetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// PodPresetSpec is a description of a pod injection policy.
+type PodPresetSpec struct {
+ // Selector is a label query over a set of resources, in this case pods.
+ // Required.
+ Selector metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
+
+ // Env defines the collection of EnvVar to inject into containers.
+ // +optional
+ Env []v1.EnvVar `json:"env,omitempty" protobuf:"bytes,2,rep,name=env"`
+ // EnvFrom defines the collection of EnvFromSource to inject into containers.
+ // +optional
+ EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,3,rep,name=envFrom"`
+ // Volumes defines the collection of Volume to inject into the pod.
+ // +optional
+ Volumes []v1.Volume `json:"volumes,omitempty" protobuf:"bytes,4,rep,name=volumes"`
+ // VolumeMounts defines the collection of VolumeMount to inject into containers.
+ // +optional
+ VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty" protobuf:"bytes,5,rep,name=volumeMounts"`
+}
+
+// PodPresetList is a list of PodPreset objects.
+type PodPresetList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of schema objects.
+ Items []PodPreset `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go b/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 00000000000..5b4dc665de8
--- /dev/null
+++ b/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,61 @@
+/*
+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
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_PodPreset = map[string]string{
+ "": "PodPreset is a policy resource that defines additional runtime requirements for a Pod.",
+}
+
+func (PodPreset) SwaggerDoc() map[string]string {
+ return map_PodPreset
+}
+
+var map_PodPresetList = map[string]string{
+ "": "PodPresetList is a list of PodPreset objects.",
+ "metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "items": "Items is a list of schema objects.",
+}
+
+func (PodPresetList) SwaggerDoc() map[string]string {
+ return map_PodPresetList
+}
+
+var map_PodPresetSpec = map[string]string{
+ "": "PodPresetSpec is a description of a pod injection policy.",
+ "selector": "Selector is a label query over a set of resources, in this case pods. Required.",
+ "env": "Env defines the collection of EnvVar to inject into containers.",
+ "envFrom": "EnvFrom defines the collection of EnvFromSource to inject into containers.",
+ "volumes": "Volumes defines the collection of Volume to inject into the pod.",
+ "volumeMounts": "VolumeMounts defines the collection of VolumeMount to inject into containers.",
+}
+
+func (PodPresetSpec) SwaggerDoc() map[string]string {
+ return map_PodPresetSpec
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/pkg/apis/settings/v1alpha1/zz_generated.conversion.go b/pkg/apis/settings/v1alpha1/zz_generated.conversion.go
new file mode 100644
index 00000000000..b719f063a37
--- /dev/null
+++ b/pkg/apis/settings/v1alpha1/zz_generated.conversion.go
@@ -0,0 +1,159 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 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 file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/kubernetes/pkg/api"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ settings "k8s.io/kubernetes/pkg/apis/settings"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_PodPreset_To_settings_PodPreset,
+ Convert_settings_PodPreset_To_v1alpha1_PodPreset,
+ Convert_v1alpha1_PodPresetList_To_settings_PodPresetList,
+ Convert_settings_PodPresetList_To_v1alpha1_PodPresetList,
+ Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec,
+ Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec,
+ )
+}
+
+func autoConvert_v1alpha1_PodPreset_To_settings_PodPreset(in *PodPreset, out *settings.PodPreset, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1alpha1_PodPreset_To_settings_PodPreset(in *PodPreset, out *settings.PodPreset, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodPreset_To_settings_PodPreset(in, out, s)
+}
+
+func autoConvert_settings_PodPreset_To_v1alpha1_PodPreset(in *settings.PodPreset, out *PodPreset, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_settings_PodPreset_To_v1alpha1_PodPreset(in *settings.PodPreset, out *PodPreset, s conversion.Scope) error {
+ return autoConvert_settings_PodPreset_To_v1alpha1_PodPreset(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodPresetList_To_settings_PodPresetList(in *PodPresetList, out *settings.PodPresetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]settings.PodPreset, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_PodPreset_To_settings_PodPreset(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_v1alpha1_PodPresetList_To_settings_PodPresetList(in *PodPresetList, out *settings.PodPresetList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodPresetList_To_settings_PodPresetList(in, out, s)
+}
+
+func autoConvert_settings_PodPresetList_To_v1alpha1_PodPresetList(in *settings.PodPresetList, out *PodPresetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodPreset, len(*in))
+ for i := range *in {
+ if err := Convert_settings_PodPreset_To_v1alpha1_PodPreset(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_settings_PodPresetList_To_v1alpha1_PodPresetList(in *settings.PodPresetList, out *PodPresetList, s conversion.Scope) error {
+ return autoConvert_settings_PodPresetList_To_v1alpha1_PodPresetList(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in *PodPresetSpec, out *settings.PodPresetSpec, s conversion.Scope) error {
+ out.Selector = in.Selector
+ out.Env = *(*[]api.EnvVar)(unsafe.Pointer(&in.Env))
+ out.EnvFrom = *(*[]api.EnvFromSource)(unsafe.Pointer(&in.EnvFrom))
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api.Volume, len(*in))
+ for i := range *in {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.VolumeMounts = *(*[]api.VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
+ return nil
+}
+
+func Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in *PodPresetSpec, out *settings.PodPresetSpec, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in, out, s)
+}
+
+func autoConvert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in *settings.PodPresetSpec, out *PodPresetSpec, s conversion.Scope) error {
+ out.Selector = in.Selector
+ out.Env = *(*[]v1.EnvVar)(unsafe.Pointer(&in.Env))
+ out.EnvFrom = *(*[]v1.EnvFromSource)(unsafe.Pointer(&in.EnvFrom))
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]v1.Volume, len(*in))
+ for i := range *in {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.VolumeMounts = *(*[]v1.VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
+ return nil
+}
+
+func Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in *settings.PodPresetSpec, out *PodPresetSpec, s conversion.Scope) error {
+ return autoConvert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in, out, s)
+}
diff --git a/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 00000000000..86dc3dc0668
--- /dev/null
+++ b/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,124 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 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 file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPreset, InType: reflect.TypeOf(&PodPreset{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPresetList, InType: reflect.TypeOf(&PodPresetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPresetSpec, InType: reflect.TypeOf(&PodPresetSpec{})},
+ )
+}
+
+func DeepCopy_v1alpha1_PodPreset(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPreset)
+ out := out.(*PodPreset)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1alpha1_PodPresetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+func DeepCopy_v1alpha1_PodPresetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetList)
+ out := out.(*PodPresetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodPreset, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_PodPreset(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+func DeepCopy_v1alpha1_PodPresetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetSpec)
+ out := out.(*PodPresetSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.Selector); err != nil {
+ return err
+ } else {
+ out.Selector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]api_v1.EnvVar, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]api_v1.EnvFromSource, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api_v1.Volume, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_Volume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]api_v1.VolumeMount, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/pkg/apis/settings/v1alpha1/zz_generated.defaults.go b/pkg/apis/settings/v1alpha1/zz_generated.defaults.go
new file mode 100644
index 00000000000..ccf1df95f96
--- /dev/null
+++ b/pkg/apis/settings/v1alpha1/zz_generated.defaults.go
@@ -0,0 +1,95 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 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 file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&PodPreset{}, func(obj interface{}) { SetObjectDefaults_PodPreset(obj.(*PodPreset)) })
+ scheme.AddTypeDefaultingFunc(&PodPresetList{}, func(obj interface{}) { SetObjectDefaults_PodPresetList(obj.(*PodPresetList)) })
+ return nil
+}
+
+func SetObjectDefaults_PodPreset(in *PodPreset) {
+ for i := range in.Spec.Env {
+ a := &in.Spec.Env[i]
+ if a.ValueFrom != nil {
+ if a.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(a.ValueFrom.FieldRef)
+ }
+ }
+ }
+ for i := range in.Spec.Volumes {
+ a := &in.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_PodPresetList(in *PodPresetList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_PodPreset(a)
+ }
+}
diff --git a/pkg/apis/settings/validation/BUILD b/pkg/apis/settings/validation/BUILD
new file mode 100644
index 00000000000..e16077c2e55
--- /dev/null
+++ b/pkg/apis/settings/validation/BUILD
@@ -0,0 +1,46 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+ "go_test",
+)
+
+go_test(
+ name = "go_default_test",
+ srcs = ["validation_test.go"],
+ library = ":go_default_library",
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/api:go_default_library",
+ "//pkg/apis/settings:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ ],
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = ["validation.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/api/validation:go_default_library",
+ "//pkg/apis/settings:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1/validation",
+ "//vendor:k8s.io/apimachinery/pkg/util/validation/field",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)
diff --git a/pkg/apis/settings/validation/validation.go b/pkg/apis/settings/validation/validation.go
new file mode 100644
index 00000000000..f38f07e7a81
--- /dev/null
+++ b/pkg/apis/settings/validation/validation.go
@@ -0,0 +1,68 @@
+/*
+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 validation
+
+import (
+ unversionedvalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation"
+ "k8s.io/apimachinery/pkg/util/validation/field"
+ apivalidation "k8s.io/kubernetes/pkg/api/validation"
+ "k8s.io/kubernetes/pkg/apis/settings"
+)
+
+// ValidatePodPresetName can be used to check whether the given PodPreset name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+func ValidatePodPresetName(name string, prefix bool) []string {
+ // TODO: Validate that there's name for the suffix inserted by the pods.
+ // Currently this is just "-index". In the future we may allow a user
+ // specified list of suffixes and we need to validate the longest one.
+ return apivalidation.NameIsDNSSubdomain(name, prefix)
+}
+
+// ValidatePodPresetSpec tests if required fields in the PodPreset spec are set.
+func ValidatePodPresetSpec(spec *settings.PodPresetSpec, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ allErrs = append(allErrs, unversionedvalidation.ValidateLabelSelector(&spec.Selector, fldPath.Child("selector"))...)
+
+ if spec.Env == nil && spec.EnvFrom == nil && spec.VolumeMounts == nil && spec.Volumes == nil {
+ allErrs = append(allErrs, field.Required(fldPath.Child("volumes", "env", "envFrom", "volumeMounts"), "must specify at least one"))
+ }
+
+ volumes, vErrs := apivalidation.ValidateVolumes(spec.Volumes, fldPath.Child("volumes"))
+ allErrs = append(allErrs, vErrs...)
+ allErrs = append(allErrs, apivalidation.ValidateEnv(spec.Env, fldPath.Child("env"))...)
+ allErrs = append(allErrs, apivalidation.ValidateEnvFrom(spec.EnvFrom, fldPath.Child("envFrom"))...)
+ allErrs = append(allErrs, apivalidation.ValidateVolumeMounts(spec.VolumeMounts, volumes, fldPath.Child("volumeMounts"))...)
+
+ return allErrs
+}
+
+// ValidatePodPreset validates a PodPreset.
+func ValidatePodPreset(pip *settings.PodPreset) field.ErrorList {
+ allErrs := apivalidation.ValidateObjectMeta(&pip.ObjectMeta, true, ValidatePodPresetName, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidatePodPresetSpec(&pip.Spec, field.NewPath("spec"))...)
+ return allErrs
+}
+
+// ValidatePodPresetUpdate tests if required fields in the PodPreset are set.
+func ValidatePodPresetUpdate(pip, oldPip *settings.PodPreset) field.ErrorList {
+ allErrs := apivalidation.ValidateObjectMetaUpdate(&pip.ObjectMeta, &oldPip.ObjectMeta, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidatePodPresetSpec(&pip.Spec, field.NewPath("spec"))...)
+
+ return allErrs
+}
diff --git a/pkg/apis/settings/validation/validation_test.go b/pkg/apis/settings/validation/validation_test.go
new file mode 100644
index 00000000000..343f6465c0c
--- /dev/null
+++ b/pkg/apis/settings/validation/validation_test.go
@@ -0,0 +1,190 @@
+/*
+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 validation
+
+import (
+ "strings"
+ "testing"
+
+ "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/settings"
+)
+
+func TestValidateEmptyPodPreset(t *testing.T) {
+ emptyPodPreset := &settings.PodPreset{
+ Spec: settings.PodPresetSpec{},
+ }
+
+ errList := ValidatePodPreset(emptyPodPreset)
+ if errList == nil {
+ t.Fatal("empty pod preset should return an error")
+ }
+}
+
+func TestValidateEmptyPodPresetItems(t *testing.T) {
+ emptyPodPreset := &settings.PodPreset{
+ ObjectMeta: v1.ObjectMeta{
+ Name: "hello",
+ Namespace: "sample",
+ },
+ Spec: settings.PodPresetSpec{
+ Selector: v1.LabelSelector{
+ MatchExpressions: []v1.LabelSelectorRequirement{
+ {
+ Key: "security",
+ Operator: v1.LabelSelectorOpIn,
+ Values: []string{"S2"},
+ },
+ },
+ },
+ },
+ }
+
+ errList := ValidatePodPreset(emptyPodPreset)
+ if !strings.Contains(errList.ToAggregate().Error(), "must specify at least one") {
+ t.Fatal("empty pod preset with label selector should return an error")
+ }
+}
+
+func TestValidatePodPresets(t *testing.T) {
+ p := &settings.PodPreset{
+ ObjectMeta: v1.ObjectMeta{
+ Name: "hello",
+ Namespace: "sample",
+ },
+ Spec: settings.PodPresetSpec{
+ Selector: v1.LabelSelector{
+ MatchExpressions: []v1.LabelSelectorRequirement{
+ {
+ Key: "security",
+ Operator: v1.LabelSelectorOpIn,
+ Values: []string{"S2"},
+ },
+ },
+ },
+ Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}},
+ Env: []api.EnvVar{{Name: "abc", Value: "value"}, {Name: "ABC", Value: "value"}},
+ EnvFrom: []api.EnvFromSource{
+ {
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ {
+ Prefix: "pre_",
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ },
+ },
+ }
+
+ errList := ValidatePodPreset(p)
+ if errList != nil {
+ if errList.ToAggregate() != nil {
+ t.Fatalf("errors: %#v", errList.ToAggregate().Error())
+ }
+ }
+
+ p = &settings.PodPreset{
+ ObjectMeta: v1.ObjectMeta{
+ Name: "hello",
+ Namespace: "sample",
+ },
+ Spec: settings.PodPresetSpec{
+ Selector: v1.LabelSelector{
+ MatchExpressions: []v1.LabelSelectorRequirement{
+ {
+ Key: "security",
+ Operator: v1.LabelSelectorOpIn,
+ Values: []string{"S2"},
+ },
+ },
+ },
+ Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}},
+ Env: []api.EnvVar{{Name: "abc", Value: "value"}, {Name: "ABC", Value: "value"}},
+ VolumeMounts: []api.VolumeMount{
+ {Name: "vol", MountPath: "/foo"},
+ },
+ EnvFrom: []api.EnvFromSource{
+ {
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ {
+ Prefix: "pre_",
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ },
+ },
+ }
+
+ errList = ValidatePodPreset(p)
+ if errList != nil {
+ if errList.ToAggregate() != nil {
+ t.Fatalf("errors: %#v", errList.ToAggregate().Error())
+ }
+ }
+}
+
+func TestValidatePodPresetsiVolumeMountError(t *testing.T) {
+ p := &settings.PodPreset{
+ ObjectMeta: v1.ObjectMeta{
+ Name: "hello",
+ Namespace: "sample",
+ },
+ Spec: settings.PodPresetSpec{
+ Selector: v1.LabelSelector{
+ MatchExpressions: []v1.LabelSelectorRequirement{
+ {
+ Key: "security",
+ Operator: v1.LabelSelectorOpIn,
+ Values: []string{"S2"},
+ },
+ },
+ },
+ Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}},
+ VolumeMounts: []api.VolumeMount{
+ {Name: "dne", MountPath: "/foo"},
+ },
+ Env: []api.EnvVar{{Name: "abc", Value: "value"}, {Name: "ABC", Value: "value"}},
+ EnvFrom: []api.EnvFromSource{
+ {
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ {
+ Prefix: "pre_",
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ },
+ },
+ }
+
+ errList := ValidatePodPreset(p)
+ if !strings.Contains(errList.ToAggregate().Error(), "spec.volumeMounts[0].name: Not found") {
+ t.Fatal("should have returned error for volume that does not exist")
+ }
+}
diff --git a/pkg/apis/settings/zz_generated.deepcopy.go b/pkg/apis/settings/zz_generated.deepcopy.go
new file mode 100644
index 00000000000..c124fb2f944
--- /dev/null
+++ b/pkg/apis/settings/zz_generated.deepcopy.go
@@ -0,0 +1,124 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 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 file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package settings
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/kubernetes/pkg/api"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPreset, InType: reflect.TypeOf(&PodPreset{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPresetList, InType: reflect.TypeOf(&PodPresetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPresetSpec, InType: reflect.TypeOf(&PodPresetSpec{})},
+ )
+}
+
+func DeepCopy_settings_PodPreset(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPreset)
+ out := out.(*PodPreset)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_settings_PodPresetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+func DeepCopy_settings_PodPresetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetList)
+ out := out.(*PodPresetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodPreset, len(*in))
+ for i := range *in {
+ if err := DeepCopy_settings_PodPreset(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+func DeepCopy_settings_PodPresetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetSpec)
+ out := out.(*PodPresetSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.Selector); err != nil {
+ return err
+ } else {
+ out.Selector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]api.EnvVar, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]api.EnvFromSource, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api.Volume, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_Volume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]api.VolumeMount, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/pkg/client/clientset_generated/clientset/BUILD b/pkg/client/clientset_generated/clientset/BUILD
index 9c7145e514b..f95631c030a 100644
--- a/pkg/client/clientset_generated/clientset/BUILD
+++ b/pkg/client/clientset_generated/clientset/BUILD
@@ -27,6 +27,7 @@ go_library(
"//pkg/apis/extensions/install:go_default_library",
"//pkg/apis/policy/install:go_default_library",
"//pkg/apis/rbac/install:go_default_library",
+ "//pkg/apis/settings/install:go_default_library",
"//pkg/apis/storage/install:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/apps/v1beta1:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/authentication/v1:go_default_library",
@@ -43,6 +44,7 @@ go_library(
"//pkg/client/clientset_generated/clientset/typed/policy/v1beta1:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:go_default_library",
+ "//pkg/client/clientset_generated/clientset/typed/settings/v1alpha1:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/client-go/discovery",
@@ -79,6 +81,7 @@ filegroup(
"//pkg/client/clientset_generated/clientset/typed/policy/v1beta1:all-srcs",
"//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:all-srcs",
"//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:all-srcs",
+ "//pkg/client/clientset_generated/clientset/typed/settings/v1alpha1:all-srcs",
"//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:all-srcs",
],
tags = ["automanaged"],
diff --git a/pkg/client/clientset_generated/clientset/clientset.go b/pkg/client/clientset_generated/clientset/clientset.go
index f6644a0cd63..88a44feff05 100644
--- a/pkg/client/clientset_generated/clientset/clientset.go
+++ b/pkg/client/clientset_generated/clientset/clientset.go
@@ -36,6 +36,7 @@ import (
policyv1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1"
rbacv1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1"
rbacv1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1"
+ settingsv1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1"
storagev1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1"
)
@@ -76,6 +77,9 @@ type Interface interface {
// Deprecated: please explicitly pick a version if possible.
Rbac() rbacv1beta1.RbacV1beta1Interface
RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
+ SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Settings() settingsv1alpha1.SettingsV1alpha1Interface
StorageV1beta1() storagev1beta1.StorageV1beta1Interface
// Deprecated: please explicitly pick a version if possible.
Storage() storagev1beta1.StorageV1beta1Interface
@@ -100,6 +104,7 @@ type Clientset struct {
*policyv1beta1.PolicyV1beta1Client
*rbacv1beta1.RbacV1beta1Client
*rbacv1alpha1.RbacV1alpha1Client
+ *settingsv1alpha1.SettingsV1alpha1Client
*storagev1beta1.StorageV1beta1Client
}
@@ -313,6 +318,23 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return c.RbacV1alpha1Client
}
+// SettingsV1alpha1 retrieves the SettingsV1alpha1Client
+func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.SettingsV1alpha1Client
+}
+
+// Deprecated: Settings retrieves the default version of SettingsClient.
+// Please explicitly pick a version.
+func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.SettingsV1alpha1Client
+}
+
// StorageV1beta1 retrieves the StorageV1beta1Client
func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
if c == nil {
@@ -406,6 +428,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
+ cs.SettingsV1alpha1Client, err = settingsv1alpha1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
cs.StorageV1beta1Client, err = storagev1beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@@ -438,6 +464,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
cs.PolicyV1beta1Client = policyv1beta1.NewForConfigOrDie(c)
cs.RbacV1beta1Client = rbacv1beta1.NewForConfigOrDie(c)
cs.RbacV1alpha1Client = rbacv1alpha1.NewForConfigOrDie(c)
+ cs.SettingsV1alpha1Client = settingsv1alpha1.NewForConfigOrDie(c)
cs.StorageV1beta1Client = storagev1beta1.NewForConfigOrDie(c)
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
@@ -462,6 +489,7 @@ func New(c rest.Interface) *Clientset {
cs.PolicyV1beta1Client = policyv1beta1.New(c)
cs.RbacV1beta1Client = rbacv1beta1.New(c)
cs.RbacV1alpha1Client = rbacv1alpha1.New(c)
+ cs.SettingsV1alpha1Client = settingsv1alpha1.New(c)
cs.StorageV1beta1Client = storagev1beta1.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
diff --git a/pkg/client/clientset_generated/clientset/fake/BUILD b/pkg/client/clientset_generated/clientset/fake/BUILD
index c1a10a96b20..f8bf3c20b49 100644
--- a/pkg/client/clientset_generated/clientset/fake/BUILD
+++ b/pkg/client/clientset_generated/clientset/fake/BUILD
@@ -26,6 +26,7 @@ go_library(
"//pkg/apis/extensions/install:go_default_library",
"//pkg/apis/policy/install:go_default_library",
"//pkg/apis/rbac/install:go_default_library",
+ "//pkg/apis/settings/install:go_default_library",
"//pkg/apis/storage/install:go_default_library",
"//pkg/client/clientset_generated/clientset:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/apps/v1beta1:go_default_library",
@@ -58,6 +59,8 @@ go_library(
"//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake:go_default_library",
+ "//pkg/client/clientset_generated/clientset/typed/settings/v1alpha1:go_default_library",
+ "//pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apimachinery/announced",
diff --git a/pkg/client/clientset_generated/clientset/fake/clientset_generated.go b/pkg/client/clientset_generated/clientset/fake/clientset_generated.go
index 9be6be9f3a0..afa7f7c58d3 100644
--- a/pkg/client/clientset_generated/clientset/fake/clientset_generated.go
+++ b/pkg/client/clientset_generated/clientset/fake/clientset_generated.go
@@ -53,6 +53,8 @@ import (
fakerbacv1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake"
rbacv1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1"
fakerbacv1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake"
+ settingsv1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1"
+ fakesettingsv1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake"
storagev1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1"
fakestoragev1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake"
)
@@ -215,6 +217,16 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake}
}
+// SettingsV1alpha1 retrieves the SettingsV1alpha1Client
+func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
+ return &fakesettingsv1alpha1.FakeSettingsV1alpha1{Fake: &c.Fake}
+}
+
+// Settings retrieves the SettingsV1alpha1Client
+func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface {
+ return &fakesettingsv1alpha1.FakeSettingsV1alpha1{Fake: &c.Fake}
+}
+
// StorageV1beta1 retrieves the StorageV1beta1Client
func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
return &fakestoragev1beta1.FakeStorageV1beta1{Fake: &c.Fake}
diff --git a/pkg/client/clientset_generated/clientset/fake/register.go b/pkg/client/clientset_generated/clientset/fake/register.go
index b1651791963..c66b6d8be9d 100644
--- a/pkg/client/clientset_generated/clientset/fake/register.go
+++ b/pkg/client/clientset_generated/clientset/fake/register.go
@@ -33,6 +33,7 @@ import (
extensions "k8s.io/kubernetes/pkg/apis/extensions/install"
policy "k8s.io/kubernetes/pkg/apis/policy/install"
rbac "k8s.io/kubernetes/pkg/apis/rbac/install"
+ settings "k8s.io/kubernetes/pkg/apis/settings/install"
storage "k8s.io/kubernetes/pkg/apis/storage/install"
os "os"
)
@@ -61,6 +62,7 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
extensions.Install(groupFactoryRegistry, registry, scheme)
policy.Install(groupFactoryRegistry, registry, scheme)
rbac.Install(groupFactoryRegistry, registry, scheme)
+ settings.Install(groupFactoryRegistry, registry, scheme)
storage.Install(groupFactoryRegistry, registry, scheme)
}
diff --git a/pkg/client/clientset_generated/clientset/import_known_versions.go b/pkg/client/clientset_generated/clientset/import_known_versions.go
index 9cd90c556a5..061c2af6d59 100644
--- a/pkg/client/clientset_generated/clientset/import_known_versions.go
+++ b/pkg/client/clientset_generated/clientset/import_known_versions.go
@@ -31,6 +31,7 @@ import (
_ "k8s.io/kubernetes/pkg/apis/extensions/install"
_ "k8s.io/kubernetes/pkg/apis/policy/install"
_ "k8s.io/kubernetes/pkg/apis/rbac/install"
+ _ "k8s.io/kubernetes/pkg/apis/settings/install"
_ "k8s.io/kubernetes/pkg/apis/storage/install"
)
diff --git a/pkg/client/clientset_generated/clientset/scheme/BUILD b/pkg/client/clientset_generated/clientset/scheme/BUILD
index 9d5a7e4c63d..25accf27cf0 100644
--- a/pkg/client/clientset_generated/clientset/scheme/BUILD
+++ b/pkg/client/clientset_generated/clientset/scheme/BUILD
@@ -30,6 +30,7 @@ go_library(
"//pkg/apis/policy/v1beta1:go_default_library",
"//pkg/apis/rbac/v1alpha1:go_default_library",
"//pkg/apis/rbac/v1beta1:go_default_library",
+ "//pkg/apis/settings/v1alpha1:go_default_library",
"//pkg/apis/storage/v1beta1:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
diff --git a/pkg/client/clientset_generated/clientset/scheme/register.go b/pkg/client/clientset_generated/clientset/scheme/register.go
index 5eb779d5c2b..409abe6b0a0 100644
--- a/pkg/client/clientset_generated/clientset/scheme/register.go
+++ b/pkg/client/clientset_generated/clientset/scheme/register.go
@@ -36,6 +36,7 @@ import (
policyv1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
rbacv1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
rbacv1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1"
+ settingsv1alpha1 "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
storagev1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1"
)
@@ -78,6 +79,7 @@ func AddToScheme(scheme *runtime.Scheme) {
policyv1beta1.AddToScheme(scheme)
rbacv1beta1.AddToScheme(scheme)
rbacv1alpha1.AddToScheme(scheme)
+ settingsv1alpha1.AddToScheme(scheme)
storagev1beta1.AddToScheme(scheme)
}
diff --git a/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/BUILD b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/BUILD
new file mode 100644
index 00000000000..150ee381b1f
--- /dev/null
+++ b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/BUILD
@@ -0,0 +1,44 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ "doc.go",
+ "generated_expansion.go",
+ "podpreset.go",
+ "settings_client.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/apis/settings/v1alpha1:go_default_library",
+ "//pkg/client/clientset_generated/clientset/scheme:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
+ "//vendor:k8s.io/apimachinery/pkg/types",
+ "//vendor:k8s.io/apimachinery/pkg/watch",
+ "//vendor:k8s.io/client-go/rest",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [
+ ":package-srcs",
+ "//pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake:all-srcs",
+ ],
+ tags = ["automanaged"],
+)
diff --git a/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/doc.go b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/doc.go
new file mode 100644
index 00000000000..ba8d10d3b66
--- /dev/null
+++ b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 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 custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1alpha1
diff --git a/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake/BUILD b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake/BUILD
new file mode 100644
index 00000000000..0ccf1ee2896
--- /dev/null
+++ b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake/BUILD
@@ -0,0 +1,42 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ "doc.go",
+ "fake_podpreset.go",
+ "fake_settings_client.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/apis/settings/v1alpha1:go_default_library",
+ "//pkg/client/clientset_generated/clientset/typed/settings/v1alpha1:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/labels",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ "//vendor:k8s.io/apimachinery/pkg/types",
+ "//vendor:k8s.io/apimachinery/pkg/watch",
+ "//vendor:k8s.io/client-go/rest",
+ "//vendor:k8s.io/client-go/testing",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)
diff --git a/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake/doc.go b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake/doc.go
new file mode 100644
index 00000000000..c6548330a0d
--- /dev/null
+++ b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 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 custom arguments.
+
+// Package fake has the automatically generated clients.
+package fake
diff --git a/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake/fake_podpreset.go b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake/fake_podpreset.go
new file mode 100644
index 00000000000..328197893c3
--- /dev/null
+++ b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake/fake_podpreset.go
@@ -0,0 +1,118 @@
+/*
+Copyright 2017 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 (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ labels "k8s.io/apimachinery/pkg/labels"
+ schema "k8s.io/apimachinery/pkg/runtime/schema"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ testing "k8s.io/client-go/testing"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
+)
+
+// FakePodPresets implements PodPresetInterface
+type FakePodPresets struct {
+ Fake *FakeSettingsV1alpha1
+ ns string
+}
+
+var podpresetsResource = schema.GroupVersionResource{Group: "settings.k8s.io", Version: "v1alpha1", Resource: "podpresets"}
+
+func (c *FakePodPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewCreateAction(podpresetsResource, c.ns, podPreset), &v1alpha1.PodPreset{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.PodPreset), err
+}
+
+func (c *FakePodPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewUpdateAction(podpresetsResource, c.ns, podPreset), &v1alpha1.PodPreset{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.PodPreset), err
+}
+
+func (c *FakePodPresets) Delete(name string, options *v1.DeleteOptions) error {
+ _, err := c.Fake.
+ Invokes(testing.NewDeleteAction(podpresetsResource, c.ns, name), &v1alpha1.PodPreset{})
+
+ return err
+}
+
+func (c *FakePodPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ action := testing.NewDeleteCollectionAction(podpresetsResource, c.ns, listOptions)
+
+ _, err := c.Fake.Invokes(action, &v1alpha1.PodPresetList{})
+ return err
+}
+
+func (c *FakePodPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewGetAction(podpresetsResource, c.ns, name), &v1alpha1.PodPreset{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.PodPreset), err
+}
+
+func (c *FakePodPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewListAction(podpresetsResource, c.ns, opts), &v1alpha1.PodPresetList{})
+
+ if obj == nil {
+ return nil, err
+ }
+
+ label, _, _ := testing.ExtractFromListOptions(opts)
+ if label == nil {
+ label = labels.Everything()
+ }
+ list := &v1alpha1.PodPresetList{}
+ for _, item := range obj.(*v1alpha1.PodPresetList).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 podPresets.
+func (c *FakePodPresets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ return c.Fake.
+ InvokesWatch(testing.NewWatchAction(podpresetsResource, c.ns, opts))
+
+}
+
+// Patch applies the patch and returns the patched podPreset.
+func (c *FakePodPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewPatchSubresourceAction(podpresetsResource, c.ns, name, data, subresources...), &v1alpha1.PodPreset{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.PodPreset), err
+}
diff --git a/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake/fake_settings_client.go b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake/fake_settings_client.go
new file mode 100644
index 00000000000..30431e55da1
--- /dev/null
+++ b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/fake/fake_settings_client.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2017 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 (
+ rest "k8s.io/client-go/rest"
+ testing "k8s.io/client-go/testing"
+ v1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1"
+)
+
+type FakeSettingsV1alpha1 struct {
+ *testing.Fake
+}
+
+func (c *FakeSettingsV1alpha1) PodPresets(namespace string) v1alpha1.PodPresetInterface {
+ return &FakePodPresets{c, namespace}
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *FakeSettingsV1alpha1) RESTClient() rest.Interface {
+ var ret *rest.RESTClient
+ return ret
+}
diff --git a/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/generated_expansion.go b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/generated_expansion.go
new file mode 100644
index 00000000000..d599b2935c2
--- /dev/null
+++ b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 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 PodPresetExpansion interface{}
diff --git a/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/podpreset.go b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/podpreset.go
new file mode 100644
index 00000000000..f94f98a7668
--- /dev/null
+++ b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/podpreset.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 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 (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// PodPresetsGetter has a method to return a PodPresetInterface.
+// A group's client should implement this interface.
+type PodPresetsGetter interface {
+ PodPresets(namespace string) PodPresetInterface
+}
+
+// PodPresetInterface has methods to work with PodPreset resources.
+type PodPresetInterface interface {
+ Create(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error)
+ Update(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.PodPreset, error)
+ List(opts v1.ListOptions) (*v1alpha1.PodPresetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error)
+ PodPresetExpansion
+}
+
+// podPresets implements PodPresetInterface
+type podPresets struct {
+ client rest.Interface
+ ns string
+}
+
+// newPodPresets returns a PodPresets
+func newPodPresets(c *SettingsV1alpha1Client, namespace string) *podPresets {
+ return &podPresets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any.
+func (c *podPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Body(podPreset).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any.
+func (c *podPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(podPreset.Name).
+ Body(podPreset).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the podPreset and deletes it. Returns an error if one occurs.
+func (c *podPresets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *podPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the podPreset, and returns the corresponding podPreset object, and an error if there is any.
+func (c *podPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PodPresets that match those selectors.
+func (c *podPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) {
+ result = &v1alpha1.PodPresetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested podPresets.
+func (c *podPresets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched podPreset.
+func (c *podPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("podpresets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/settings_client.go b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/settings_client.go
new file mode 100644
index 00000000000..1d6dc46c1a4
--- /dev/null
+++ b/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/settings_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 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 (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type SettingsV1alpha1Interface interface {
+ RESTClient() rest.Interface
+ PodPresetsGetter
+}
+
+// SettingsV1alpha1Client is used to interact with features provided by the settings.k8s.io group.
+type SettingsV1alpha1Client struct {
+ restClient rest.Interface
+}
+
+func (c *SettingsV1alpha1Client) PodPresets(namespace string) PodPresetInterface {
+ return newPodPresets(c, namespace)
+}
+
+// NewForConfig creates a new SettingsV1alpha1Client for the given config.
+func NewForConfig(c *rest.Config) (*SettingsV1alpha1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &SettingsV1alpha1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new SettingsV1alpha1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *SettingsV1alpha1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new SettingsV1alpha1Client for the given RESTClient.
+func New(c rest.Interface) *SettingsV1alpha1Client {
+ return &SettingsV1alpha1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1alpha1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *SettingsV1alpha1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/pkg/client/clientset_generated/internalclientset/BUILD b/pkg/client/clientset_generated/internalclientset/BUILD
index 28a55833e58..b9156818929 100644
--- a/pkg/client/clientset_generated/internalclientset/BUILD
+++ b/pkg/client/clientset_generated/internalclientset/BUILD
@@ -25,6 +25,7 @@ go_library(
"//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library",
"//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library",
"//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:go_default_library",
+ "//pkg/client/clientset_generated/internalclientset/typed/settings/internalversion:go_default_library",
"//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/client-go/discovery",
@@ -56,6 +57,7 @@ filegroup(
"//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:all-srcs",
"//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:all-srcs",
"//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:all-srcs",
+ "//pkg/client/clientset_generated/internalclientset/typed/settings/internalversion:all-srcs",
"//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:all-srcs",
],
tags = ["automanaged"],
diff --git a/pkg/client/clientset_generated/internalclientset/clientset.go b/pkg/client/clientset_generated/internalclientset/clientset.go
index dfba4a8166b..406531c16bc 100644
--- a/pkg/client/clientset_generated/internalclientset/clientset.go
+++ b/pkg/client/clientset_generated/internalclientset/clientset.go
@@ -31,6 +31,7 @@ import (
extensionsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion"
policyinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion"
rbacinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion"
+ settingsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion"
storageinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion"
)
@@ -46,6 +47,7 @@ type Interface interface {
Extensions() extensionsinternalversion.ExtensionsInterface
Policy() policyinternalversion.PolicyInterface
Rbac() rbacinternalversion.RbacInterface
+ Settings() settingsinternalversion.SettingsInterface
Storage() storageinternalversion.StorageInterface
}
@@ -63,6 +65,7 @@ type Clientset struct {
*extensionsinternalversion.ExtensionsClient
*policyinternalversion.PolicyClient
*rbacinternalversion.RbacClient
+ *settingsinternalversion.SettingsClient
*storageinternalversion.StorageClient
}
@@ -146,6 +149,14 @@ func (c *Clientset) Rbac() rbacinternalversion.RbacInterface {
return c.RbacClient
}
+// Settings retrieves the SettingsClient
+func (c *Clientset) Settings() settingsinternalversion.SettingsInterface {
+ if c == nil {
+ return nil
+ }
+ return c.SettingsClient
+}
+
// Storage retrieves the StorageClient
func (c *Clientset) Storage() storageinternalversion.StorageInterface {
if c == nil {
@@ -210,6 +221,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
+ cs.SettingsClient, err = settingsinternalversion.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
cs.StorageClient, err = storageinternalversion.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@@ -237,6 +252,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
cs.ExtensionsClient = extensionsinternalversion.NewForConfigOrDie(c)
cs.PolicyClient = policyinternalversion.NewForConfigOrDie(c)
cs.RbacClient = rbacinternalversion.NewForConfigOrDie(c)
+ cs.SettingsClient = settingsinternalversion.NewForConfigOrDie(c)
cs.StorageClient = storageinternalversion.NewForConfigOrDie(c)
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
@@ -256,6 +272,7 @@ func New(c rest.Interface) *Clientset {
cs.ExtensionsClient = extensionsinternalversion.New(c)
cs.PolicyClient = policyinternalversion.New(c)
cs.RbacClient = rbacinternalversion.New(c)
+ cs.SettingsClient = settingsinternalversion.New(c)
cs.StorageClient = storageinternalversion.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
diff --git a/pkg/client/clientset_generated/internalclientset/fake/BUILD b/pkg/client/clientset_generated/internalclientset/fake/BUILD
index e5c450213fe..1d4b31da62b 100644
--- a/pkg/client/clientset_generated/internalclientset/fake/BUILD
+++ b/pkg/client/clientset_generated/internalclientset/fake/BUILD
@@ -26,6 +26,7 @@ go_library(
"//pkg/apis/extensions/install:go_default_library",
"//pkg/apis/policy/install:go_default_library",
"//pkg/apis/rbac/install:go_default_library",
+ "//pkg/apis/settings/install:go_default_library",
"//pkg/apis/storage/install:go_default_library",
"//pkg/client/clientset_generated/internalclientset:go_default_library",
"//pkg/client/clientset_generated/internalclientset/typed/apps/internalversion:go_default_library",
@@ -48,6 +49,8 @@ go_library(
"//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake:go_default_library",
"//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:go_default_library",
"//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake:go_default_library",
+ "//pkg/client/clientset_generated/internalclientset/typed/settings/internalversion:go_default_library",
+ "//pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake:go_default_library",
"//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:go_default_library",
"//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apimachinery/announced",
diff --git a/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go b/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go
index 090fb7fe446..3d3c2295bd5 100644
--- a/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go
+++ b/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go
@@ -43,6 +43,8 @@ import (
fakepolicyinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake"
rbacinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion"
fakerbacinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake"
+ settingsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion"
+ fakesettingsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake"
storageinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion"
fakestorageinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake"
)
@@ -130,6 +132,11 @@ func (c *Clientset) Rbac() rbacinternalversion.RbacInterface {
return &fakerbacinternalversion.FakeRbac{Fake: &c.Fake}
}
+// Settings retrieves the SettingsClient
+func (c *Clientset) Settings() settingsinternalversion.SettingsInterface {
+ return &fakesettingsinternalversion.FakeSettings{Fake: &c.Fake}
+}
+
// Storage retrieves the StorageClient
func (c *Clientset) Storage() storageinternalversion.StorageInterface {
return &fakestorageinternalversion.FakeStorage{Fake: &c.Fake}
diff --git a/pkg/client/clientset_generated/internalclientset/fake/register.go b/pkg/client/clientset_generated/internalclientset/fake/register.go
index b1651791963..c66b6d8be9d 100644
--- a/pkg/client/clientset_generated/internalclientset/fake/register.go
+++ b/pkg/client/clientset_generated/internalclientset/fake/register.go
@@ -33,6 +33,7 @@ import (
extensions "k8s.io/kubernetes/pkg/apis/extensions/install"
policy "k8s.io/kubernetes/pkg/apis/policy/install"
rbac "k8s.io/kubernetes/pkg/apis/rbac/install"
+ settings "k8s.io/kubernetes/pkg/apis/settings/install"
storage "k8s.io/kubernetes/pkg/apis/storage/install"
os "os"
)
@@ -61,6 +62,7 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
extensions.Install(groupFactoryRegistry, registry, scheme)
policy.Install(groupFactoryRegistry, registry, scheme)
rbac.Install(groupFactoryRegistry, registry, scheme)
+ settings.Install(groupFactoryRegistry, registry, scheme)
storage.Install(groupFactoryRegistry, registry, scheme)
}
diff --git a/pkg/client/clientset_generated/internalclientset/scheme/BUILD b/pkg/client/clientset_generated/internalclientset/scheme/BUILD
index ad71b89d38e..0ab0c324c2e 100644
--- a/pkg/client/clientset_generated/internalclientset/scheme/BUILD
+++ b/pkg/client/clientset_generated/internalclientset/scheme/BUILD
@@ -27,6 +27,7 @@ go_library(
"//pkg/apis/extensions/install:go_default_library",
"//pkg/apis/policy/install:go_default_library",
"//pkg/apis/rbac/install:go_default_library",
+ "//pkg/apis/settings/install:go_default_library",
"//pkg/apis/storage/install:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apimachinery/announced",
"//vendor:k8s.io/apimachinery/pkg/apimachinery/registered",
diff --git a/pkg/client/clientset_generated/internalclientset/scheme/register.go b/pkg/client/clientset_generated/internalclientset/scheme/register.go
index f4140bf9f07..e524195a5db 100644
--- a/pkg/client/clientset_generated/internalclientset/scheme/register.go
+++ b/pkg/client/clientset_generated/internalclientset/scheme/register.go
@@ -33,6 +33,7 @@ import (
extensions "k8s.io/kubernetes/pkg/apis/extensions/install"
policy "k8s.io/kubernetes/pkg/apis/policy/install"
rbac "k8s.io/kubernetes/pkg/apis/rbac/install"
+ settings "k8s.io/kubernetes/pkg/apis/settings/install"
storage "k8s.io/kubernetes/pkg/apis/storage/install"
os "os"
)
@@ -61,6 +62,7 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
extensions.Install(groupFactoryRegistry, registry, scheme)
policy.Install(groupFactoryRegistry, registry, scheme)
rbac.Install(groupFactoryRegistry, registry, scheme)
+ settings.Install(groupFactoryRegistry, registry, scheme)
storage.Install(groupFactoryRegistry, registry, scheme)
ExtraInstall(groupFactoryRegistry, registry, scheme)
diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/BUILD
new file mode 100644
index 00000000000..6cec2ffe9d8
--- /dev/null
+++ b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/BUILD
@@ -0,0 +1,43 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ "doc.go",
+ "generated_expansion.go",
+ "podpreset.go",
+ "settings_client.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/apis/settings:go_default_library",
+ "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/types",
+ "//vendor:k8s.io/apimachinery/pkg/watch",
+ "//vendor:k8s.io/client-go/rest",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [
+ ":package-srcs",
+ "//pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake:all-srcs",
+ ],
+ tags = ["automanaged"],
+)
diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/doc.go
new file mode 100644
index 00000000000..0a27970fbb3
--- /dev/null
+++ b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 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 the default arguments.
+
+// This package has the automatically generated typed clients.
+package internalversion
diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/BUILD
new file mode 100644
index 00000000000..0f6a8b68e2a
--- /dev/null
+++ b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/BUILD
@@ -0,0 +1,42 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ "doc.go",
+ "fake_podpreset.go",
+ "fake_settings_client.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/apis/settings:go_default_library",
+ "//pkg/client/clientset_generated/internalclientset/typed/settings/internalversion:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/labels",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ "//vendor:k8s.io/apimachinery/pkg/types",
+ "//vendor:k8s.io/apimachinery/pkg/watch",
+ "//vendor:k8s.io/client-go/rest",
+ "//vendor:k8s.io/client-go/testing",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)
diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/doc.go
new file mode 100644
index 00000000000..a0ecb96ba17
--- /dev/null
+++ b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 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 the default arguments.
+
+// Package fake has the automatically generated clients.
+package fake
diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/fake_podpreset.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/fake_podpreset.go
new file mode 100644
index 00000000000..6ac0b9bdbe3
--- /dev/null
+++ b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/fake_podpreset.go
@@ -0,0 +1,118 @@
+/*
+Copyright 2017 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 (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ labels "k8s.io/apimachinery/pkg/labels"
+ schema "k8s.io/apimachinery/pkg/runtime/schema"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ testing "k8s.io/client-go/testing"
+ settings "k8s.io/kubernetes/pkg/apis/settings"
+)
+
+// FakePodPresets implements PodPresetInterface
+type FakePodPresets struct {
+ Fake *FakeSettings
+ ns string
+}
+
+var podpresetsResource = schema.GroupVersionResource{Group: "settings.k8s.io", Version: "", Resource: "podpresets"}
+
+func (c *FakePodPresets) Create(podPreset *settings.PodPreset) (result *settings.PodPreset, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewCreateAction(podpresetsResource, c.ns, podPreset), &settings.PodPreset{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*settings.PodPreset), err
+}
+
+func (c *FakePodPresets) Update(podPreset *settings.PodPreset) (result *settings.PodPreset, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewUpdateAction(podpresetsResource, c.ns, podPreset), &settings.PodPreset{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*settings.PodPreset), err
+}
+
+func (c *FakePodPresets) Delete(name string, options *v1.DeleteOptions) error {
+ _, err := c.Fake.
+ Invokes(testing.NewDeleteAction(podpresetsResource, c.ns, name), &settings.PodPreset{})
+
+ return err
+}
+
+func (c *FakePodPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ action := testing.NewDeleteCollectionAction(podpresetsResource, c.ns, listOptions)
+
+ _, err := c.Fake.Invokes(action, &settings.PodPresetList{})
+ return err
+}
+
+func (c *FakePodPresets) Get(name string, options v1.GetOptions) (result *settings.PodPreset, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewGetAction(podpresetsResource, c.ns, name), &settings.PodPreset{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*settings.PodPreset), err
+}
+
+func (c *FakePodPresets) List(opts v1.ListOptions) (result *settings.PodPresetList, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewListAction(podpresetsResource, c.ns, opts), &settings.PodPresetList{})
+
+ if obj == nil {
+ return nil, err
+ }
+
+ label, _, _ := testing.ExtractFromListOptions(opts)
+ if label == nil {
+ label = labels.Everything()
+ }
+ list := &settings.PodPresetList{}
+ for _, item := range obj.(*settings.PodPresetList).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 podPresets.
+func (c *FakePodPresets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ return c.Fake.
+ InvokesWatch(testing.NewWatchAction(podpresetsResource, c.ns, opts))
+
+}
+
+// Patch applies the patch and returns the patched podPreset.
+func (c *FakePodPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *settings.PodPreset, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewPatchSubresourceAction(podpresetsResource, c.ns, name, data, subresources...), &settings.PodPreset{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*settings.PodPreset), err
+}
diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/fake_settings_client.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/fake_settings_client.go
new file mode 100644
index 00000000000..04776e59dda
--- /dev/null
+++ b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/fake_settings_client.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2017 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 (
+ rest "k8s.io/client-go/rest"
+ testing "k8s.io/client-go/testing"
+ internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion"
+)
+
+type FakeSettings struct {
+ *testing.Fake
+}
+
+func (c *FakeSettings) PodPresets(namespace string) internalversion.PodPresetInterface {
+ return &FakePodPresets{c, namespace}
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *FakeSettings) RESTClient() rest.Interface {
+ var ret *rest.RESTClient
+ return ret
+}
diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/generated_expansion.go
new file mode 100644
index 00000000000..b82b5f75184
--- /dev/null
+++ b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 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 internalversion
+
+type PodPresetExpansion interface{}
diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/podpreset.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/podpreset.go
new file mode 100644
index 00000000000..3adb95cc44f
--- /dev/null
+++ b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/podpreset.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 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 internalversion
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ settings "k8s.io/kubernetes/pkg/apis/settings"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme"
+)
+
+// PodPresetsGetter has a method to return a PodPresetInterface.
+// A group's client should implement this interface.
+type PodPresetsGetter interface {
+ PodPresets(namespace string) PodPresetInterface
+}
+
+// PodPresetInterface has methods to work with PodPreset resources.
+type PodPresetInterface interface {
+ Create(*settings.PodPreset) (*settings.PodPreset, error)
+ Update(*settings.PodPreset) (*settings.PodPreset, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*settings.PodPreset, error)
+ List(opts v1.ListOptions) (*settings.PodPresetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *settings.PodPreset, err error)
+ PodPresetExpansion
+}
+
+// podPresets implements PodPresetInterface
+type podPresets struct {
+ client rest.Interface
+ ns string
+}
+
+// newPodPresets returns a PodPresets
+func newPodPresets(c *SettingsClient, namespace string) *podPresets {
+ return &podPresets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any.
+func (c *podPresets) Create(podPreset *settings.PodPreset) (result *settings.PodPreset, err error) {
+ result = &settings.PodPreset{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Body(podPreset).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any.
+func (c *podPresets) Update(podPreset *settings.PodPreset) (result *settings.PodPreset, err error) {
+ result = &settings.PodPreset{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(podPreset.Name).
+ Body(podPreset).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the podPreset and deletes it. Returns an error if one occurs.
+func (c *podPresets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *podPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the podPreset, and returns the corresponding podPreset object, and an error if there is any.
+func (c *podPresets) Get(name string, options v1.GetOptions) (result *settings.PodPreset, err error) {
+ result = &settings.PodPreset{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PodPresets that match those selectors.
+func (c *podPresets) List(opts v1.ListOptions) (result *settings.PodPresetList, err error) {
+ result = &settings.PodPresetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested podPresets.
+func (c *podPresets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched podPreset.
+func (c *podPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *settings.PodPreset, err error) {
+ result = &settings.PodPreset{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("podpresets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/settings_client.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/settings_client.go
new file mode 100644
index 00000000000..448280d54b4
--- /dev/null
+++ b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/settings_client.go
@@ -0,0 +1,99 @@
+/*
+Copyright 2017 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 internalversion
+
+import (
+ rest "k8s.io/client-go/rest"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme"
+)
+
+type SettingsInterface interface {
+ RESTClient() rest.Interface
+ PodPresetsGetter
+}
+
+// SettingsClient is used to interact with features provided by the settings.k8s.io group.
+type SettingsClient struct {
+ restClient rest.Interface
+}
+
+func (c *SettingsClient) PodPresets(namespace string) PodPresetInterface {
+ return newPodPresets(c, namespace)
+}
+
+// NewForConfig creates a new SettingsClient for the given config.
+func NewForConfig(c *rest.Config) (*SettingsClient, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &SettingsClient{client}, nil
+}
+
+// NewForConfigOrDie creates a new SettingsClient for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *SettingsClient {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new SettingsClient for the given RESTClient.
+func New(c rest.Interface) *SettingsClient {
+ return &SettingsClient{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ g, err := scheme.Registry.Group("settings.k8s.io")
+ if err != nil {
+ return err
+ }
+
+ config.APIPath = "/apis"
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+ if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group {
+ gv := g.GroupVersion
+ config.GroupVersion = &gv
+ }
+ config.NegotiatedSerializer = scheme.Codecs
+
+ if config.QPS == 0 {
+ config.QPS = 5
+ }
+ if config.Burst == 0 {
+ config.Burst = 10
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *SettingsClient) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/pkg/client/informers/informers_generated/externalversions/BUILD b/pkg/client/informers/informers_generated/externalversions/BUILD
index 34c5ad22506..93d3e56077a 100644
--- a/pkg/client/informers/informers_generated/externalversions/BUILD
+++ b/pkg/client/informers/informers_generated/externalversions/BUILD
@@ -26,6 +26,7 @@ go_library(
"//pkg/apis/policy/v1beta1:go_default_library",
"//pkg/apis/rbac/v1alpha1:go_default_library",
"//pkg/apis/rbac/v1beta1:go_default_library",
+ "//pkg/apis/settings/v1alpha1:go_default_library",
"//pkg/apis/storage/v1beta1:go_default_library",
"//pkg/client/clientset_generated/clientset:go_default_library",
"//pkg/client/informers/informers_generated/externalversions/apps:go_default_library",
@@ -37,6 +38,7 @@ go_library(
"//pkg/client/informers/informers_generated/externalversions/internalinterfaces:go_default_library",
"//pkg/client/informers/informers_generated/externalversions/policy:go_default_library",
"//pkg/client/informers/informers_generated/externalversions/rbac:go_default_library",
+ "//pkg/client/informers/informers_generated/externalversions/settings:go_default_library",
"//pkg/client/informers/informers_generated/externalversions/storage:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
@@ -64,6 +66,7 @@ filegroup(
"//pkg/client/informers/informers_generated/externalversions/internalinterfaces:all-srcs",
"//pkg/client/informers/informers_generated/externalversions/policy:all-srcs",
"//pkg/client/informers/informers_generated/externalversions/rbac:all-srcs",
+ "//pkg/client/informers/informers_generated/externalversions/settings:all-srcs",
"//pkg/client/informers/informers_generated/externalversions/storage:all-srcs",
],
tags = ["automanaged"],
diff --git a/pkg/client/informers/informers_generated/externalversions/factory.go b/pkg/client/informers/informers_generated/externalversions/factory.go
index 3ec297d019b..761d756313d 100644
--- a/pkg/client/informers/informers_generated/externalversions/factory.go
+++ b/pkg/client/informers/informers_generated/externalversions/factory.go
@@ -32,6 +32,7 @@ import (
internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/internalinterfaces"
policy "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/policy"
rbac "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/rbac"
+ settings "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/settings"
storage "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/storage"
reflect "reflect"
sync "sync"
@@ -103,6 +104,7 @@ type SharedInformerFactory interface {
Extensions() extensions.Interface
Policy() policy.Interface
Rbac() rbac.Interface
+ Settings() settings.Interface
Storage() storage.Interface
}
@@ -138,6 +140,10 @@ func (f *sharedInformerFactory) Rbac() rbac.Interface {
return rbac.New(f)
}
+func (f *sharedInformerFactory) Settings() settings.Interface {
+ return settings.New(f)
+}
+
func (f *sharedInformerFactory) Storage() storage.Interface {
return storage.New(f)
}
diff --git a/pkg/client/informers/informers_generated/externalversions/generic.go b/pkg/client/informers/informers_generated/externalversions/generic.go
index c598256f2b7..c3892299bc3 100644
--- a/pkg/client/informers/informers_generated/externalversions/generic.go
+++ b/pkg/client/informers/informers_generated/externalversions/generic.go
@@ -33,6 +33,7 @@ import (
policy_v1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
rbac_v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1"
+ settings_v1alpha1 "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
storage_v1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1"
)
@@ -162,6 +163,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case rbac_v1beta1.SchemeGroupVersion.WithResource("rolebindings"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
+ // Group=Settings, Version=V1alpha1
+ case settings_v1alpha1.SchemeGroupVersion.WithResource("podpresets"):
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Settings().V1alpha1().PodPresets().Informer()}, nil
+
// Group=Storage, Version=V1beta1
case storage_v1beta1.SchemeGroupVersion.WithResource("storageclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().StorageClasses().Informer()}, nil
diff --git a/pkg/client/informers/informers_generated/externalversions/settings/BUILD b/pkg/client/informers/informers_generated/externalversions/settings/BUILD
new file mode 100644
index 00000000000..0f21c912f94
--- /dev/null
+++ b/pkg/client/informers/informers_generated/externalversions/settings/BUILD
@@ -0,0 +1,34 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = ["interface.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/client/informers/informers_generated/externalversions/internalinterfaces:go_default_library",
+ "//pkg/client/informers/informers_generated/externalversions/settings/v1alpha1:go_default_library",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [
+ ":package-srcs",
+ "//pkg/client/informers/informers_generated/externalversions/settings/v1alpha1:all-srcs",
+ ],
+ tags = ["automanaged"],
+)
diff --git a/pkg/client/informers/informers_generated/externalversions/settings/interface.go b/pkg/client/informers/informers_generated/externalversions/settings/interface.go
new file mode 100644
index 00000000000..5aa5655045a
--- /dev/null
+++ b/pkg/client/informers/informers_generated/externalversions/settings/interface.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 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 file was automatically generated by informer-gen
+
+package settings
+
+import (
+ internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/internalinterfaces"
+ v1alpha1 "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/settings/v1alpha1"
+)
+
+// Interface provides access to each of this group's versions.
+type Interface interface {
+ // V1alpha1 provides access to shared informers for resources in V1alpha1.
+ V1alpha1() v1alpha1.Interface
+}
+
+type group struct {
+ internalinterfaces.SharedInformerFactory
+}
+
+// New returns a new Interface.
+func New(f internalinterfaces.SharedInformerFactory) Interface {
+ return &group{f}
+}
+
+// V1alpha1 returns a new v1alpha1.Interface.
+func (g *group) V1alpha1() v1alpha1.Interface {
+ return v1alpha1.New(g.SharedInformerFactory)
+}
diff --git a/pkg/client/informers/informers_generated/externalversions/settings/v1alpha1/BUILD b/pkg/client/informers/informers_generated/externalversions/settings/v1alpha1/BUILD
new file mode 100644
index 00000000000..4ad41ba9b88
--- /dev/null
+++ b/pkg/client/informers/informers_generated/externalversions/settings/v1alpha1/BUILD
@@ -0,0 +1,40 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ "interface.go",
+ "podpreset.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/apis/settings/v1alpha1:go_default_library",
+ "//pkg/client/clientset_generated/clientset:go_default_library",
+ "//pkg/client/informers/informers_generated/externalversions/internalinterfaces:go_default_library",
+ "//pkg/client/listers/settings/v1alpha1:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/watch",
+ "//vendor:k8s.io/client-go/tools/cache",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)
diff --git a/pkg/client/informers/informers_generated/externalversions/settings/v1alpha1/interface.go b/pkg/client/informers/informers_generated/externalversions/settings/v1alpha1/interface.go
new file mode 100644
index 00000000000..57a65109a3a
--- /dev/null
+++ b/pkg/client/informers/informers_generated/externalversions/settings/v1alpha1/interface.go
@@ -0,0 +1,43 @@
+/*
+Copyright 2017 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 file was automatically generated by informer-gen
+
+package v1alpha1
+
+import (
+ internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/internalinterfaces"
+)
+
+// Interface provides access to all the informers in this group version.
+type Interface interface {
+ // PodPresets returns a PodPresetInformer.
+ PodPresets() PodPresetInformer
+}
+
+type version struct {
+ internalinterfaces.SharedInformerFactory
+}
+
+// New returns a new Interface.
+func New(f internalinterfaces.SharedInformerFactory) Interface {
+ return &version{f}
+}
+
+// PodPresets returns a PodPresetInformer.
+func (v *version) PodPresets() PodPresetInformer {
+ return &podPresetInformer{factory: v.SharedInformerFactory}
+}
diff --git a/pkg/client/informers/informers_generated/externalversions/settings/v1alpha1/podpreset.go b/pkg/client/informers/informers_generated/externalversions/settings/v1alpha1/podpreset.go
new file mode 100644
index 00000000000..aba0c77c061
--- /dev/null
+++ b/pkg/client/informers/informers_generated/externalversions/settings/v1alpha1/podpreset.go
@@ -0,0 +1,68 @@
+/*
+Copyright 2017 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 file was automatically generated by informer-gen
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ watch "k8s.io/apimachinery/pkg/watch"
+ cache "k8s.io/client-go/tools/cache"
+ settings_v1alpha1 "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
+ clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
+ internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions/internalinterfaces"
+ v1alpha1 "k8s.io/kubernetes/pkg/client/listers/settings/v1alpha1"
+ time "time"
+)
+
+// PodPresetInformer provides access to a shared informer and lister for
+// PodPresets.
+type PodPresetInformer interface {
+ Informer() cache.SharedIndexInformer
+ Lister() v1alpha1.PodPresetLister
+}
+
+type podPresetInformer struct {
+ factory internalinterfaces.SharedInformerFactory
+}
+
+func newPodPresetInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
+ sharedIndexInformer := cache.NewSharedIndexInformer(
+ &cache.ListWatch{
+ ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
+ return client.SettingsV1alpha1().PodPresets(v1.NamespaceAll).List(options)
+ },
+ WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
+ return client.SettingsV1alpha1().PodPresets(v1.NamespaceAll).Watch(options)
+ },
+ },
+ &settings_v1alpha1.PodPreset{},
+ resyncPeriod,
+ cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
+ )
+
+ return sharedIndexInformer
+}
+
+func (f *podPresetInformer) Informer() cache.SharedIndexInformer {
+ return f.factory.InformerFor(&settings_v1alpha1.PodPreset{}, newPodPresetInformer)
+}
+
+func (f *podPresetInformer) Lister() v1alpha1.PodPresetLister {
+ return v1alpha1.NewPodPresetLister(f.Informer().GetIndexer())
+}
diff --git a/pkg/client/informers/informers_generated/internalversion/BUILD b/pkg/client/informers/informers_generated/internalversion/BUILD
index 44c7c03b49d..12c21d5430d 100644
--- a/pkg/client/informers/informers_generated/internalversion/BUILD
+++ b/pkg/client/informers/informers_generated/internalversion/BUILD
@@ -23,6 +23,7 @@ go_library(
"//pkg/apis/extensions:go_default_library",
"//pkg/apis/policy:go_default_library",
"//pkg/apis/rbac:go_default_library",
+ "//pkg/apis/settings:go_default_library",
"//pkg/apis/storage:go_default_library",
"//pkg/client/clientset_generated/internalclientset:go_default_library",
"//pkg/client/informers/informers_generated/internalversion/apps:go_default_library",
@@ -34,6 +35,7 @@ go_library(
"//pkg/client/informers/informers_generated/internalversion/internalinterfaces:go_default_library",
"//pkg/client/informers/informers_generated/internalversion/policy:go_default_library",
"//pkg/client/informers/informers_generated/internalversion/rbac:go_default_library",
+ "//pkg/client/informers/informers_generated/internalversion/settings:go_default_library",
"//pkg/client/informers/informers_generated/internalversion/storage:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
@@ -61,6 +63,7 @@ filegroup(
"//pkg/client/informers/informers_generated/internalversion/internalinterfaces:all-srcs",
"//pkg/client/informers/informers_generated/internalversion/policy:all-srcs",
"//pkg/client/informers/informers_generated/internalversion/rbac:all-srcs",
+ "//pkg/client/informers/informers_generated/internalversion/settings:all-srcs",
"//pkg/client/informers/informers_generated/internalversion/storage:all-srcs",
],
tags = ["automanaged"],
diff --git a/pkg/client/informers/informers_generated/internalversion/factory.go b/pkg/client/informers/informers_generated/internalversion/factory.go
index aecc1f68d7a..5e0798f57c9 100644
--- a/pkg/client/informers/informers_generated/internalversion/factory.go
+++ b/pkg/client/informers/informers_generated/internalversion/factory.go
@@ -32,6 +32,7 @@ import (
internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/internalinterfaces"
policy "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/policy"
rbac "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/rbac"
+ settings "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/settings"
storage "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/storage"
reflect "reflect"
sync "sync"
@@ -103,6 +104,7 @@ type SharedInformerFactory interface {
Extensions() extensions.Interface
Policy() policy.Interface
Rbac() rbac.Interface
+ Settings() settings.Interface
Storage() storage.Interface
}
@@ -138,6 +140,10 @@ func (f *sharedInformerFactory) Rbac() rbac.Interface {
return rbac.New(f)
}
+func (f *sharedInformerFactory) Settings() settings.Interface {
+ return settings.New(f)
+}
+
func (f *sharedInformerFactory) Storage() storage.Interface {
return storage.New(f)
}
diff --git a/pkg/client/informers/informers_generated/internalversion/generic.go b/pkg/client/informers/informers_generated/internalversion/generic.go
index 6608a1400f9..f12c17b5bd0 100644
--- a/pkg/client/informers/informers_generated/internalversion/generic.go
+++ b/pkg/client/informers/informers_generated/internalversion/generic.go
@@ -30,6 +30,7 @@ import (
extensions "k8s.io/kubernetes/pkg/apis/extensions"
policy "k8s.io/kubernetes/pkg/apis/policy"
rbac "k8s.io/kubernetes/pkg/apis/rbac"
+ settings "k8s.io/kubernetes/pkg/apis/settings"
storage "k8s.io/kubernetes/pkg/apis/storage"
)
@@ -141,6 +142,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case rbac.SchemeGroupVersion.WithResource("rolebindings"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().InternalVersion().RoleBindings().Informer()}, nil
+ // Group=Settings, Version=InternalVersion
+ case settings.SchemeGroupVersion.WithResource("podpresets"):
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Settings().InternalVersion().PodPresets().Informer()}, nil
+
// Group=Storage, Version=InternalVersion
case storage.SchemeGroupVersion.WithResource("storageclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().InternalVersion().StorageClasses().Informer()}, nil
diff --git a/pkg/client/informers/informers_generated/internalversion/settings/BUILD b/pkg/client/informers/informers_generated/internalversion/settings/BUILD
new file mode 100644
index 00000000000..90dd81154f1
--- /dev/null
+++ b/pkg/client/informers/informers_generated/internalversion/settings/BUILD
@@ -0,0 +1,34 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = ["interface.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/client/informers/informers_generated/internalversion/internalinterfaces:go_default_library",
+ "//pkg/client/informers/informers_generated/internalversion/settings/internalversion:go_default_library",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [
+ ":package-srcs",
+ "//pkg/client/informers/informers_generated/internalversion/settings/internalversion:all-srcs",
+ ],
+ tags = ["automanaged"],
+)
diff --git a/pkg/client/informers/informers_generated/internalversion/settings/interface.go b/pkg/client/informers/informers_generated/internalversion/settings/interface.go
new file mode 100644
index 00000000000..2c4321439a2
--- /dev/null
+++ b/pkg/client/informers/informers_generated/internalversion/settings/interface.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 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 file was automatically generated by informer-gen
+
+package settings
+
+import (
+ internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/internalinterfaces"
+ internalversion "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/settings/internalversion"
+)
+
+// Interface provides access to each of this group's versions.
+type Interface interface {
+ // InternalVersion provides access to shared informers for resources in InternalVersion.
+ InternalVersion() internalversion.Interface
+}
+
+type group struct {
+ internalinterfaces.SharedInformerFactory
+}
+
+// New returns a new Interface.
+func New(f internalinterfaces.SharedInformerFactory) Interface {
+ return &group{f}
+}
+
+// InternalVersion returns a new internalversion.Interface.
+func (g *group) InternalVersion() internalversion.Interface {
+ return internalversion.New(g.SharedInformerFactory)
+}
diff --git a/pkg/client/informers/informers_generated/internalversion/settings/internalversion/BUILD b/pkg/client/informers/informers_generated/internalversion/settings/internalversion/BUILD
new file mode 100644
index 00000000000..5f384953b0d
--- /dev/null
+++ b/pkg/client/informers/informers_generated/internalversion/settings/internalversion/BUILD
@@ -0,0 +1,40 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ "interface.go",
+ "podpreset.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/apis/settings:go_default_library",
+ "//pkg/client/clientset_generated/internalclientset:go_default_library",
+ "//pkg/client/informers/informers_generated/internalversion/internalinterfaces:go_default_library",
+ "//pkg/client/listers/settings/internalversion:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/watch",
+ "//vendor:k8s.io/client-go/tools/cache",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)
diff --git a/pkg/client/informers/informers_generated/internalversion/settings/internalversion/interface.go b/pkg/client/informers/informers_generated/internalversion/settings/internalversion/interface.go
new file mode 100644
index 00000000000..d8f7c341867
--- /dev/null
+++ b/pkg/client/informers/informers_generated/internalversion/settings/internalversion/interface.go
@@ -0,0 +1,43 @@
+/*
+Copyright 2017 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 file was automatically generated by informer-gen
+
+package internalversion
+
+import (
+ internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/internalinterfaces"
+)
+
+// Interface provides access to all the informers in this group version.
+type Interface interface {
+ // PodPresets returns a PodPresetInformer.
+ PodPresets() PodPresetInformer
+}
+
+type version struct {
+ internalinterfaces.SharedInformerFactory
+}
+
+// New returns a new Interface.
+func New(f internalinterfaces.SharedInformerFactory) Interface {
+ return &version{f}
+}
+
+// PodPresets returns a PodPresetInformer.
+func (v *version) PodPresets() PodPresetInformer {
+ return &podPresetInformer{factory: v.SharedInformerFactory}
+}
diff --git a/pkg/client/informers/informers_generated/internalversion/settings/internalversion/podpreset.go b/pkg/client/informers/informers_generated/internalversion/settings/internalversion/podpreset.go
new file mode 100644
index 00000000000..db32fa33f4e
--- /dev/null
+++ b/pkg/client/informers/informers_generated/internalversion/settings/internalversion/podpreset.go
@@ -0,0 +1,68 @@
+/*
+Copyright 2017 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 file was automatically generated by informer-gen
+
+package internalversion
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ watch "k8s.io/apimachinery/pkg/watch"
+ cache "k8s.io/client-go/tools/cache"
+ settings "k8s.io/kubernetes/pkg/apis/settings"
+ internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
+ internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/internalinterfaces"
+ internalversion "k8s.io/kubernetes/pkg/client/listers/settings/internalversion"
+ time "time"
+)
+
+// PodPresetInformer provides access to a shared informer and lister for
+// PodPresets.
+type PodPresetInformer interface {
+ Informer() cache.SharedIndexInformer
+ Lister() internalversion.PodPresetLister
+}
+
+type podPresetInformer struct {
+ factory internalinterfaces.SharedInformerFactory
+}
+
+func newPodPresetInformer(client internalclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
+ sharedIndexInformer := cache.NewSharedIndexInformer(
+ &cache.ListWatch{
+ ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
+ return client.Settings().PodPresets(v1.NamespaceAll).List(options)
+ },
+ WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
+ return client.Settings().PodPresets(v1.NamespaceAll).Watch(options)
+ },
+ },
+ &settings.PodPreset{},
+ resyncPeriod,
+ cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
+ )
+
+ return sharedIndexInformer
+}
+
+func (f *podPresetInformer) Informer() cache.SharedIndexInformer {
+ return f.factory.InformerFor(&settings.PodPreset{}, newPodPresetInformer)
+}
+
+func (f *podPresetInformer) Lister() internalversion.PodPresetLister {
+ return internalversion.NewPodPresetLister(f.Informer().GetIndexer())
+}
diff --git a/pkg/client/listers/settings/internalversion/BUILD b/pkg/client/listers/settings/internalversion/BUILD
new file mode 100644
index 00000000000..093d767aebb
--- /dev/null
+++ b/pkg/client/listers/settings/internalversion/BUILD
@@ -0,0 +1,36 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ "expansion_generated.go",
+ "podpreset.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/apis/settings:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/api/errors",
+ "//vendor:k8s.io/apimachinery/pkg/labels",
+ "//vendor:k8s.io/client-go/tools/cache",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)
diff --git a/pkg/client/listers/settings/internalversion/expansion_generated.go b/pkg/client/listers/settings/internalversion/expansion_generated.go
new file mode 100644
index 00000000000..1063e8a1a5e
--- /dev/null
+++ b/pkg/client/listers/settings/internalversion/expansion_generated.go
@@ -0,0 +1,27 @@
+/*
+Copyright 2017 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 file was automatically generated by lister-gen
+
+package internalversion
+
+// PodPresetListerExpansion allows custom methods to be added to
+// PodPresetLister.
+type PodPresetListerExpansion interface{}
+
+// PodPresetNamespaceListerExpansion allows custom methods to be added to
+// PodPresetNamespaeLister.
+type PodPresetNamespaceListerExpansion interface{}
diff --git a/pkg/client/listers/settings/internalversion/podpreset.go b/pkg/client/listers/settings/internalversion/podpreset.go
new file mode 100644
index 00000000000..024b599625b
--- /dev/null
+++ b/pkg/client/listers/settings/internalversion/podpreset.go
@@ -0,0 +1,94 @@
+/*
+Copyright 2017 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 file was automatically generated by lister-gen
+
+package internalversion
+
+import (
+ "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/tools/cache"
+ settings "k8s.io/kubernetes/pkg/apis/settings"
+)
+
+// PodPresetLister helps list PodPresets.
+type PodPresetLister interface {
+ // List lists all PodPresets in the indexer.
+ List(selector labels.Selector) (ret []*settings.PodPreset, err error)
+ // PodPresets returns an object that can list and get PodPresets.
+ PodPresets(namespace string) PodPresetNamespaceLister
+ PodPresetListerExpansion
+}
+
+// podPresetLister implements the PodPresetLister interface.
+type podPresetLister struct {
+ indexer cache.Indexer
+}
+
+// NewPodPresetLister returns a new PodPresetLister.
+func NewPodPresetLister(indexer cache.Indexer) PodPresetLister {
+ return &podPresetLister{indexer: indexer}
+}
+
+// List lists all PodPresets in the indexer.
+func (s *podPresetLister) List(selector labels.Selector) (ret []*settings.PodPreset, err error) {
+ err = cache.ListAll(s.indexer, selector, func(m interface{}) {
+ ret = append(ret, m.(*settings.PodPreset))
+ })
+ return ret, err
+}
+
+// PodPresets returns an object that can list and get PodPresets.
+func (s *podPresetLister) PodPresets(namespace string) PodPresetNamespaceLister {
+ return podPresetNamespaceLister{indexer: s.indexer, namespace: namespace}
+}
+
+// PodPresetNamespaceLister helps list and get PodPresets.
+type PodPresetNamespaceLister interface {
+ // List lists all PodPresets in the indexer for a given namespace.
+ List(selector labels.Selector) (ret []*settings.PodPreset, err error)
+ // Get retrieves the PodPreset from the indexer for a given namespace and name.
+ Get(name string) (*settings.PodPreset, error)
+ PodPresetNamespaceListerExpansion
+}
+
+// podPresetNamespaceLister implements the PodPresetNamespaceLister
+// interface.
+type podPresetNamespaceLister struct {
+ indexer cache.Indexer
+ namespace string
+}
+
+// List lists all PodPresets in the indexer for a given namespace.
+func (s podPresetNamespaceLister) List(selector labels.Selector) (ret []*settings.PodPreset, err error) {
+ err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
+ ret = append(ret, m.(*settings.PodPreset))
+ })
+ return ret, err
+}
+
+// Get retrieves the PodPreset from the indexer for a given namespace and name.
+func (s podPresetNamespaceLister) Get(name string) (*settings.PodPreset, error) {
+ obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
+ if err != nil {
+ return nil, err
+ }
+ if !exists {
+ return nil, errors.NewNotFound(settings.Resource("podpreset"), name)
+ }
+ return obj.(*settings.PodPreset), nil
+}
diff --git a/pkg/client/listers/settings/v1alpha1/BUILD b/pkg/client/listers/settings/v1alpha1/BUILD
new file mode 100644
index 00000000000..b27022764e3
--- /dev/null
+++ b/pkg/client/listers/settings/v1alpha1/BUILD
@@ -0,0 +1,37 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ "expansion_generated.go",
+ "podpreset.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/apis/settings:go_default_library",
+ "//pkg/apis/settings/v1alpha1:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/api/errors",
+ "//vendor:k8s.io/apimachinery/pkg/labels",
+ "//vendor:k8s.io/client-go/tools/cache",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)
diff --git a/pkg/client/listers/settings/v1alpha1/expansion_generated.go b/pkg/client/listers/settings/v1alpha1/expansion_generated.go
new file mode 100644
index 00000000000..5334612fff1
--- /dev/null
+++ b/pkg/client/listers/settings/v1alpha1/expansion_generated.go
@@ -0,0 +1,27 @@
+/*
+Copyright 2017 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 file was automatically generated by lister-gen
+
+package v1alpha1
+
+// PodPresetListerExpansion allows custom methods to be added to
+// PodPresetLister.
+type PodPresetListerExpansion interface{}
+
+// PodPresetNamespaceListerExpansion allows custom methods to be added to
+// PodPresetNamespaeLister.
+type PodPresetNamespaceListerExpansion interface{}
diff --git a/pkg/client/listers/settings/v1alpha1/podpreset.go b/pkg/client/listers/settings/v1alpha1/podpreset.go
new file mode 100644
index 00000000000..b6b6deb50c8
--- /dev/null
+++ b/pkg/client/listers/settings/v1alpha1/podpreset.go
@@ -0,0 +1,95 @@
+/*
+Copyright 2017 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 file was automatically generated by lister-gen
+
+package v1alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/tools/cache"
+ settings "k8s.io/kubernetes/pkg/apis/settings"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
+)
+
+// PodPresetLister helps list PodPresets.
+type PodPresetLister interface {
+ // List lists all PodPresets in the indexer.
+ List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error)
+ // PodPresets returns an object that can list and get PodPresets.
+ PodPresets(namespace string) PodPresetNamespaceLister
+ PodPresetListerExpansion
+}
+
+// podPresetLister implements the PodPresetLister interface.
+type podPresetLister struct {
+ indexer cache.Indexer
+}
+
+// NewPodPresetLister returns a new PodPresetLister.
+func NewPodPresetLister(indexer cache.Indexer) PodPresetLister {
+ return &podPresetLister{indexer: indexer}
+}
+
+// List lists all PodPresets in the indexer.
+func (s *podPresetLister) List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error) {
+ err = cache.ListAll(s.indexer, selector, func(m interface{}) {
+ ret = append(ret, m.(*v1alpha1.PodPreset))
+ })
+ return ret, err
+}
+
+// PodPresets returns an object that can list and get PodPresets.
+func (s *podPresetLister) PodPresets(namespace string) PodPresetNamespaceLister {
+ return podPresetNamespaceLister{indexer: s.indexer, namespace: namespace}
+}
+
+// PodPresetNamespaceLister helps list and get PodPresets.
+type PodPresetNamespaceLister interface {
+ // List lists all PodPresets in the indexer for a given namespace.
+ List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error)
+ // Get retrieves the PodPreset from the indexer for a given namespace and name.
+ Get(name string) (*v1alpha1.PodPreset, error)
+ PodPresetNamespaceListerExpansion
+}
+
+// podPresetNamespaceLister implements the PodPresetNamespaceLister
+// interface.
+type podPresetNamespaceLister struct {
+ indexer cache.Indexer
+ namespace string
+}
+
+// List lists all PodPresets in the indexer for a given namespace.
+func (s podPresetNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error) {
+ err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
+ ret = append(ret, m.(*v1alpha1.PodPreset))
+ })
+ return ret, err
+}
+
+// Get retrieves the PodPreset from the indexer for a given namespace and name.
+func (s podPresetNamespaceLister) Get(name string) (*v1alpha1.PodPreset, error) {
+ obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
+ if err != nil {
+ return nil, err
+ }
+ if !exists {
+ return nil, errors.NewNotFound(settings.Resource("podpreset"), name)
+ }
+ return obj.(*v1alpha1.PodPreset), nil
+}
diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go
index 37ff83207ca..c87a3ea0afb 100644
--- a/pkg/generated/openapi/zz_generated.openapi.go
+++ b/pkg/generated/openapi/zz_generated.openapi.go
@@ -17691,6 +17691,155 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope
},
Dependencies: []string{},
},
+ "k8s.io/kubernetes/pkg/apis/settings/v1alpha1.PodPreset": {
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "PodPreset is a policy resource that defines additional runtime requirements for a Pod.",
+ Properties: map[string]spec.Schema{
+ "kind": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "apiVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "metadata": {
+ SchemaProps: spec.SchemaProps{
+ Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
+ },
+ },
+ "spec": {
+ SchemaProps: spec.SchemaProps{
+ Ref: ref("k8s.io/kubernetes/pkg/apis/settings/v1alpha1.PodPresetSpec"),
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kubernetes/pkg/apis/settings/v1alpha1.PodPresetSpec"},
+ },
+ "k8s.io/kubernetes/pkg/apis/settings/v1alpha1.PodPresetList": {
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "PodPresetList is a list of PodPreset objects.",
+ Properties: map[string]spec.Schema{
+ "kind": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "apiVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "metadata": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
+ },
+ },
+ "items": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Items is a list of schema objects.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Ref: ref("k8s.io/kubernetes/pkg/apis/settings/v1alpha1.PodPreset"),
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"items"},
+ },
+ },
+ Dependencies: []string{
+ "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kubernetes/pkg/apis/settings/v1alpha1.PodPreset"},
+ },
+ "k8s.io/kubernetes/pkg/apis/settings/v1alpha1.PodPresetSpec": {
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "PodPresetSpec is a description of a pod injection policy.",
+ Properties: map[string]spec.Schema{
+ "selector": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Selector is a label query over a set of resources, in this case pods. Required.",
+ Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"),
+ },
+ },
+ "env": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Env defines the collection of EnvVar to inject into containers.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Ref: ref("k8s.io/kubernetes/pkg/api/v1.EnvVar"),
+ },
+ },
+ },
+ },
+ },
+ "envFrom": {
+ SchemaProps: spec.SchemaProps{
+ Description: "EnvFrom defines the collection of EnvFromSource to inject into containers.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Ref: ref("k8s.io/kubernetes/pkg/api/v1.EnvFromSource"),
+ },
+ },
+ },
+ },
+ },
+ "volumes": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Volumes defines the collection of Volume to inject into the pod.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Ref: ref("k8s.io/kubernetes/pkg/api/v1.Volume"),
+ },
+ },
+ },
+ },
+ },
+ "volumeMounts": {
+ SchemaProps: spec.SchemaProps{
+ Description: "VolumeMounts defines the collection of VolumeMount to inject into containers.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Ref: ref("k8s.io/kubernetes/pkg/api/v1.VolumeMount"),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/kubernetes/pkg/api/v1.EnvFromSource", "k8s.io/kubernetes/pkg/api/v1.EnvVar", "k8s.io/kubernetes/pkg/api/v1.Volume", "k8s.io/kubernetes/pkg/api/v1.VolumeMount"},
+ },
"k8s.io/kubernetes/pkg/apis/storage/v1beta1.StorageClass": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
diff --git a/pkg/master/BUILD b/pkg/master/BUILD
index 24daf75f882..8563986d180 100644
--- a/pkg/master/BUILD
+++ b/pkg/master/BUILD
@@ -48,6 +48,8 @@ go_library(
"//pkg/apis/rbac/install:go_default_library",
"//pkg/apis/rbac/v1alpha1:go_default_library",
"//pkg/apis/rbac/v1beta1:go_default_library",
+ "//pkg/apis/settings/install:go_default_library",
+ "//pkg/apis/settings/v1alpha1:go_default_library",
"//pkg/apis/storage/install:go_default_library",
"//pkg/apis/storage/v1beta1:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library",
@@ -69,6 +71,7 @@ go_library(
"//pkg/registry/extensions/rest:go_default_library",
"//pkg/registry/policy/rest:go_default_library",
"//pkg/registry/rbac/rest:go_default_library",
+ "//pkg/registry/settings/rest:go_default_library",
"//pkg/registry/storage/rest:go_default_library",
"//pkg/routes:go_default_library",
"//pkg/util/async:go_default_library",
diff --git a/pkg/master/import_known_versions.go b/pkg/master/import_known_versions.go
index 61e44ab9b79..30a4420b966 100644
--- a/pkg/master/import_known_versions.go
+++ b/pkg/master/import_known_versions.go
@@ -33,6 +33,7 @@ import (
_ "k8s.io/kubernetes/pkg/apis/imagepolicy/install"
_ "k8s.io/kubernetes/pkg/apis/policy/install"
_ "k8s.io/kubernetes/pkg/apis/rbac/install"
+ _ "k8s.io/kubernetes/pkg/apis/settings/install"
_ "k8s.io/kubernetes/pkg/apis/storage/install"
)
diff --git a/pkg/master/master.go b/pkg/master/master.go
index 66c0f5757d9..c50b5224ec5 100644
--- a/pkg/master/master.go
+++ b/pkg/master/master.go
@@ -45,6 +45,7 @@ import (
policyapiv1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
rbacapi "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
rbacv1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1"
+ settingsapi "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
storageapiv1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1"
corev1client "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1"
coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion"
@@ -68,6 +69,7 @@ import (
extensionsrest "k8s.io/kubernetes/pkg/registry/extensions/rest"
policyrest "k8s.io/kubernetes/pkg/registry/policy/rest"
rbacrest "k8s.io/kubernetes/pkg/registry/rbac/rest"
+ settingsrest "k8s.io/kubernetes/pkg/registry/settings/rest"
storagerest "k8s.io/kubernetes/pkg/registry/storage/rest"
)
@@ -248,6 +250,7 @@ func (c completedConfig) New() (*Master, error) {
policyrest.RESTStorageProvider{},
rbacrest.RESTStorageProvider{Authorizer: c.GenericConfig.Authorizer},
storagerest.RESTStorageProvider{},
+ settingsrest.RESTStorageProvider{},
}
m.InstallAPIs(c.Config.APIResourceConfigSource, c.Config.GenericConfig.RESTOptionsGetter, restStorageProviders...)
@@ -371,6 +374,7 @@ func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig {
policyapiv1beta1.SchemeGroupVersion,
rbacv1beta1.SchemeGroupVersion,
rbacapi.SchemeGroupVersion,
+ settingsapi.SchemeGroupVersion,
storageapiv1beta1.SchemeGroupVersion,
certificatesapiv1beta1.SchemeGroupVersion,
authorizationapiv1.SchemeGroupVersion,
diff --git a/pkg/registry/BUILD b/pkg/registry/BUILD
index f66843f6d35..5aa7c79d628 100644
--- a/pkg/registry/BUILD
+++ b/pkg/registry/BUILD
@@ -73,6 +73,8 @@ filegroup(
"//pkg/registry/policy/rest:all-srcs",
"//pkg/registry/rbac:all-srcs",
"//pkg/registry/registrytest:all-srcs",
+ "//pkg/registry/settings/podpreset:all-srcs",
+ "//pkg/registry/settings/rest:all-srcs",
"//pkg/registry/storage/rest:all-srcs",
"//pkg/registry/storage/storageclass:all-srcs",
],
diff --git a/pkg/registry/settings/podpreset/BUILD b/pkg/registry/settings/podpreset/BUILD
new file mode 100644
index 00000000000..bdb9f074d50
--- /dev/null
+++ b/pkg/registry/settings/podpreset/BUILD
@@ -0,0 +1,51 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ "doc.go",
+ "registry.go",
+ "strategy.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/api:go_default_library",
+ "//pkg/apis/settings:go_default_library",
+ "//pkg/apis/settings/validation:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/fields",
+ "//vendor:k8s.io/apimachinery/pkg/labels",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/util/validation/field",
+ "//vendor:k8s.io/apimachinery/pkg/watch",
+ "//vendor:k8s.io/apiserver/pkg/endpoints/request",
+ "//vendor:k8s.io/apiserver/pkg/registry/generic",
+ "//vendor:k8s.io/apiserver/pkg/registry/rest",
+ "//vendor:k8s.io/apiserver/pkg/storage",
+ "//vendor:k8s.io/apiserver/pkg/storage/names",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [
+ ":package-srcs",
+ "//pkg/registry/settings/podpreset/storage:all-srcs",
+ ],
+ tags = ["automanaged"],
+)
diff --git a/pkg/registry/settings/podpreset/doc.go b/pkg/registry/settings/podpreset/doc.go
new file mode 100644
index 00000000000..30c955a50dc
--- /dev/null
+++ b/pkg/registry/settings/podpreset/doc.go
@@ -0,0 +1,17 @@
+/*
+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 podpreset // import "k8s.io/kubernetes/pkg/registry/settings/podpreset"
diff --git a/pkg/registry/settings/podpreset/registry.go b/pkg/registry/settings/podpreset/registry.go
new file mode 100644
index 00000000000..a6225de3b93
--- /dev/null
+++ b/pkg/registry/settings/podpreset/registry.go
@@ -0,0 +1,84 @@
+/*
+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 podpreset
+
+import (
+ metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/watch"
+ genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
+ "k8s.io/apiserver/pkg/registry/rest"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/settings"
+)
+
+// Registry is an interface for things that know how to store PodPresets.
+type Registry interface {
+ ListPodPresets(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*settings.PodPresetList, error)
+ CreatePodPreset(ctx genericapirequest.Context, pp *settings.PodPreset) error
+ UpdatePodPreset(ctx genericapirequest.Context, pp *settings.PodPreset) error
+ GetPodPreset(ctx genericapirequest.Context, ppID string, options *metav1.GetOptions) (*settings.PodPreset, error)
+ DeletePodPreset(ctx genericapirequest.Context, ppID string) error
+ WatchPodPresets(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error)
+}
+
+// storage puts strong typing around storage calls
+type storage struct {
+ rest.StandardStorage
+}
+
+// NewRegistry returns a new Registry interface for the given Storage. Any mismatched
+// types will panic.
+func NewRegistry(s rest.StandardStorage) Registry {
+ return &storage{s}
+}
+
+func (s *storage) ListPodPresets(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*settings.PodPresetList, error) {
+ obj, err := s.List(ctx, options)
+ if err != nil {
+ return nil, err
+ }
+
+ return obj.(*settings.PodPresetList), nil
+}
+
+func (s *storage) CreatePodPreset(ctx genericapirequest.Context, pp *settings.PodPreset) error {
+ _, err := s.Create(ctx, pp)
+ return err
+}
+
+func (s *storage) UpdatePodPreset(ctx genericapirequest.Context, pp *settings.PodPreset) error {
+ _, _, err := s.Update(ctx, pp.Name, rest.DefaultUpdatedObjectInfo(pp, api.Scheme))
+ return err
+}
+
+func (s *storage) WatchPodPresets(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) {
+ return s.Watch(ctx, options)
+}
+
+func (s *storage) GetPodPreset(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*settings.PodPreset, error) {
+ obj, err := s.Get(ctx, name, options)
+ if err != nil {
+ return nil, err
+ }
+ return obj.(*settings.PodPreset), nil
+}
+
+func (s *storage) DeletePodPreset(ctx genericapirequest.Context, name string) error {
+ _, _, err := s.Delete(ctx, name, nil)
+ return err
+}
diff --git a/pkg/registry/settings/podpreset/storage/BUILD b/pkg/registry/settings/podpreset/storage/BUILD
new file mode 100644
index 00000000000..d1a7e6b5f81
--- /dev/null
+++ b/pkg/registry/settings/podpreset/storage/BUILD
@@ -0,0 +1,36 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = ["storage.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/api:go_default_library",
+ "//pkg/apis/settings:go_default_library",
+ "//pkg/registry/cachesize:go_default_library",
+ "//pkg/registry/settings/podpreset:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apiserver/pkg/registry/generic",
+ "//vendor:k8s.io/apiserver/pkg/registry/generic/registry",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)
diff --git a/pkg/registry/settings/podpreset/storage/storage.go b/pkg/registry/settings/podpreset/storage/storage.go
new file mode 100644
index 00000000000..a5216d2882c
--- /dev/null
+++ b/pkg/registry/settings/podpreset/storage/storage.go
@@ -0,0 +1,57 @@
+/*
+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 storage
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apiserver/pkg/registry/generic"
+ genericregistry "k8s.io/apiserver/pkg/registry/generic/registry"
+ "k8s.io/kubernetes/pkg/api"
+ settingsapi "k8s.io/kubernetes/pkg/apis/settings"
+ "k8s.io/kubernetes/pkg/registry/cachesize"
+ "k8s.io/kubernetes/pkg/registry/settings/podpreset"
+)
+
+// rest implements a RESTStorage for replication controllers against etcd
+type REST struct {
+ *genericregistry.Store
+}
+
+// NewREST returns a RESTStorage object that will work against replication controllers.
+func NewREST(optsGetter generic.RESTOptionsGetter) *REST {
+ store := &genericregistry.Store{
+ Copier: api.Scheme,
+ NewFunc: func() runtime.Object { return &settingsapi.PodPreset{} },
+ NewListFunc: func() runtime.Object { return &settingsapi.PodPresetList{} },
+ ObjectNameFunc: func(obj runtime.Object) (string, error) {
+ return obj.(*settingsapi.PodPreset).GetName(), nil
+ },
+ PredicateFunc: podpreset.Matcher,
+ QualifiedResource: settingsapi.Resource("podpresets"),
+ WatchCacheSize: cachesize.GetWatchCacheSizeByResource("podpresets"),
+
+ CreateStrategy: podpreset.Strategy,
+ UpdateStrategy: podpreset.Strategy,
+ DeleteStrategy: podpreset.Strategy,
+ }
+ options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: podpreset.GetAttrs}
+ if err := store.CompleteWithOptions(options); err != nil {
+ panic(err) // TODO: Propagate error up
+ }
+
+ return &REST{store}
+}
diff --git a/pkg/registry/settings/podpreset/strategy.go b/pkg/registry/settings/podpreset/strategy.go
new file mode 100644
index 00000000000..5bbb4583f68
--- /dev/null
+++ b/pkg/registry/settings/podpreset/strategy.go
@@ -0,0 +1,112 @@
+/*
+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 podpreset
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/validation/field"
+ genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
+ "k8s.io/apiserver/pkg/registry/generic"
+ apistorage "k8s.io/apiserver/pkg/storage"
+ "k8s.io/apiserver/pkg/storage/names"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/settings"
+ "k8s.io/kubernetes/pkg/apis/settings/validation"
+)
+
+// podPresetStrategy implements verification logic for Pod Injection Policies.
+type podPresetStrategy struct {
+ runtime.ObjectTyper
+ names.NameGenerator
+}
+
+// Strategy is the default logic that applies when creating and updating Pod Injection Policy objects.
+var Strategy = podPresetStrategy{api.Scheme, names.SimpleNameGenerator}
+
+// NamespaceScoped returns true because all Pod Injection Policies need to be within a namespace.
+func (podPresetStrategy) NamespaceScoped() bool {
+ return true
+}
+
+// PrepareForCreate clears the status of a Pod Injection Policy before creation.
+func (podPresetStrategy) PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) {
+ pip := obj.(*settings.PodPreset)
+ pip.Generation = 1
+}
+
+// PrepareForUpdate clears fields that are not allowed to be set by end users on update.
+func (podPresetStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj, old runtime.Object) {
+ newPodPreset := obj.(*settings.PodPreset)
+ oldPodPreset := old.(*settings.PodPreset)
+
+ // Update is not allowed
+ newPodPreset.Spec = oldPodPreset.Spec
+}
+
+// Validate validates a new PodPreset.
+func (podPresetStrategy) Validate(ctx genericapirequest.Context, obj runtime.Object) field.ErrorList {
+ pip := obj.(*settings.PodPreset)
+ return validation.ValidatePodPreset(pip)
+}
+
+// Canonicalize normalizes the object after validation.
+func (podPresetStrategy) Canonicalize(obj runtime.Object) {}
+
+// AllowCreateOnUpdate is false for PodPreset; this means POST is needed to create one.
+func (podPresetStrategy) AllowCreateOnUpdate() bool {
+ return false
+}
+
+// ValidateUpdate is the default update validation for an end user.
+func (podPresetStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList {
+ validationErrorList := validation.ValidatePodPreset(obj.(*settings.PodPreset))
+ updateErrorList := validation.ValidatePodPresetUpdate(obj.(*settings.PodPreset), old.(*settings.PodPreset))
+ return append(validationErrorList, updateErrorList...)
+}
+
+// AllowUnconditionalUpdate is the default update policy for Pod Injection Policy objects.
+func (podPresetStrategy) AllowUnconditionalUpdate() bool {
+ return true
+}
+
+// SelectableFields returns a field set that represents the object.
+func SelectableFields(pip *settings.PodPreset) fields.Set {
+ return generic.ObjectMetaFieldsSet(&pip.ObjectMeta, true)
+}
+
+// GetAttrs returns labels and fields of a given object for filtering purposes.
+func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) {
+ pip, ok := obj.(*settings.PodPreset)
+ if !ok {
+ return nil, nil, fmt.Errorf("given object is not a PodPreset.")
+ }
+ return labels.Set(pip.ObjectMeta.Labels), SelectableFields(pip), nil
+}
+
+// Matcher is the filter used by the generic etcd backend to watch events
+// from etcd to clients of the apiserver only interested in specific labels/fields.
+func Matcher(label labels.Selector, field fields.Selector) apistorage.SelectionPredicate {
+ return apistorage.SelectionPredicate{
+ Label: label,
+ Field: field,
+ GetAttrs: GetAttrs,
+ }
+}
diff --git a/pkg/registry/settings/rest/BUILD b/pkg/registry/settings/rest/BUILD
new file mode 100644
index 00000000000..8f2bbc67cf8
--- /dev/null
+++ b/pkg/registry/settings/rest/BUILD
@@ -0,0 +1,37 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = ["storage_settings.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/api:go_default_library",
+ "//pkg/apis/settings:go_default_library",
+ "//pkg/apis/settings/v1alpha1:go_default_library",
+ "//pkg/registry/settings/podpreset/storage:go_default_library",
+ "//vendor:k8s.io/apiserver/pkg/registry/generic",
+ "//vendor:k8s.io/apiserver/pkg/registry/rest",
+ "//vendor:k8s.io/apiserver/pkg/server",
+ "//vendor:k8s.io/apiserver/pkg/server/storage",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)
diff --git a/pkg/registry/settings/rest/storage_settings.go b/pkg/registry/settings/rest/storage_settings.go
new file mode 100644
index 00000000000..8e9a41b4db4
--- /dev/null
+++ b/pkg/registry/settings/rest/storage_settings.go
@@ -0,0 +1,56 @@
+/*
+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 rest
+
+import (
+ "k8s.io/apiserver/pkg/registry/generic"
+ "k8s.io/apiserver/pkg/registry/rest"
+ genericapiserver "k8s.io/apiserver/pkg/server"
+ serverstorage "k8s.io/apiserver/pkg/server/storage"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/settings"
+ settingsapiv1alpha1 "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
+ podpresetstore "k8s.io/kubernetes/pkg/registry/settings/podpreset/storage"
+)
+
+type RESTStorageProvider struct{}
+
+func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool) {
+ apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(settings.GroupName, api.Registry, api.Scheme, api.ParameterCodec, api.Codecs)
+
+ if apiResourceConfigSource.AnyResourcesForVersionEnabled(settingsapiv1alpha1.SchemeGroupVersion) {
+ apiGroupInfo.VersionedResourcesStorageMap[settingsapiv1alpha1.SchemeGroupVersion.Version] = p.v1alpha1Storage(apiResourceConfigSource, restOptionsGetter)
+ apiGroupInfo.GroupMeta.GroupVersion = settingsapiv1alpha1.SchemeGroupVersion
+ }
+
+ return apiGroupInfo, true
+}
+
+func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage {
+ version := settingsapiv1alpha1.SchemeGroupVersion
+
+ storage := map[string]rest.Storage{}
+ if apiResourceConfigSource.ResourceEnabled(version.WithResource("podpresets")) {
+ podPresetStorage := podpresetstore.NewREST(restOptionsGetter)
+ storage["podpresets"] = podPresetStorage
+ }
+ return storage
+}
+
+func (p RESTStorageProvider) GroupName() string {
+ return settings.GroupName
+}
diff --git a/plugin/BUILD b/plugin/BUILD
index a7604f7d1f7..41840c11cc9 100644
--- a/plugin/BUILD
+++ b/plugin/BUILD
@@ -29,6 +29,7 @@ filegroup(
"//plugin/pkg/admission/namespace/lifecycle:all-srcs",
"//plugin/pkg/admission/persistentvolume/label:all-srcs",
"//plugin/pkg/admission/podnodeselector:all-srcs",
+ "//plugin/pkg/admission/podpreset:all-srcs",
"//plugin/pkg/admission/resourcequota:all-srcs",
"//plugin/pkg/admission/security:all-srcs",
"//plugin/pkg/admission/securitycontext/scdeny:all-srcs",
diff --git a/plugin/pkg/admission/podpreset/BUILD b/plugin/pkg/admission/podpreset/BUILD
new file mode 100644
index 00000000000..d276e215106
--- /dev/null
+++ b/plugin/pkg/admission/podpreset/BUILD
@@ -0,0 +1,60 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+load(
+ "@io_bazel_rules_go//go:def.bzl",
+ "go_library",
+ "go_test",
+)
+
+go_test(
+ name = "go_default_test",
+ srcs = ["admission_test.go"],
+ library = ":go_default_library",
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/api:go_default_library",
+ "//pkg/apis/settings:go_default_library",
+ "//pkg/client/clientset_generated/internalclientset/fake:go_default_library",
+ "//pkg/client/informers/informers_generated/internalversion:go_default_library",
+ "//pkg/client/listers/settings/internalversion:go_default_library",
+ "//pkg/controller:go_default_library",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apiserver/pkg/admission",
+ "//vendor:k8s.io/apiserver/pkg/authentication/user",
+ ],
+)
+
+go_library(
+ name = "go_default_library",
+ srcs = ["admission.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//pkg/api:go_default_library",
+ "//pkg/apis/settings:go_default_library",
+ "//pkg/client/clientset_generated/internalclientset:go_default_library",
+ "//pkg/client/informers/informers_generated/internalversion:go_default_library",
+ "//pkg/client/listers/settings/internalversion:go_default_library",
+ "//pkg/kubeapiserver/admission:go_default_library",
+ "//vendor:github.com/golang/glog",
+ "//vendor:k8s.io/apimachinery/pkg/api/errors",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/labels",
+ "//vendor:k8s.io/apiserver/pkg/admission",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)
diff --git a/plugin/pkg/admission/podpreset/admission.go b/plugin/pkg/admission/podpreset/admission.go
new file mode 100644
index 00000000000..0fd98c7e9b1
--- /dev/null
+++ b/plugin/pkg/admission/podpreset/admission.go
@@ -0,0 +1,320 @@
+/*
+Copyright 2017 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 admission
+
+import (
+ "fmt"
+ "io"
+ "reflect"
+
+ "github.com/golang/glog"
+
+ "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apiserver/pkg/admission"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/settings"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
+ informers "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion"
+ settingslisters "k8s.io/kubernetes/pkg/client/listers/settings/internalversion"
+ kubeapiserveradmission "k8s.io/kubernetes/pkg/kubeapiserver/admission"
+)
+
+const (
+ annotationPrefix = "podpreset.admission.kubernetes.io"
+ pluginName = "PodPreset"
+)
+
+func init() {
+ admission.RegisterPlugin(pluginName, func(config io.Reader) (admission.Interface, error) {
+ return NewPlugin(), nil
+ })
+}
+
+// podPresetPlugin is an implementation of admission.Interface.
+type podPresetPlugin struct {
+ *admission.Handler
+ client internalclientset.Interface
+
+ lister settingslisters.PodPresetLister
+}
+
+var _ = kubeapiserveradmission.WantsInformerFactory(&podPresetPlugin{})
+var _ = kubeapiserveradmission.WantsInternalClientSet(&podPresetPlugin{})
+
+// NewPlugin creates a new pod preset admission plugin.
+func NewPlugin() *podPresetPlugin {
+ return &podPresetPlugin{
+ Handler: admission.NewHandler(admission.Create, admission.Update),
+ }
+}
+
+func (plugin *podPresetPlugin) Validate() error {
+ if plugin.client == nil {
+ return fmt.Errorf("%s requires a client", pluginName)
+ }
+ if plugin.lister == nil {
+ return fmt.Errorf("%s requires a lister", pluginName)
+ }
+ return nil
+}
+
+func (a *podPresetPlugin) SetInternalClientSet(client internalclientset.Interface) {
+ a.client = client
+}
+
+func (a *podPresetPlugin) SetInformerFactory(f informers.SharedInformerFactory) {
+ podPresetInformer := f.Settings().InternalVersion().PodPresets()
+ a.lister = podPresetInformer.Lister()
+ a.SetReadyFunc(podPresetInformer.Informer().HasSynced)
+}
+
+// Admit injects a pod with the specific fields for each pod preset it matches.
+func (c *podPresetPlugin) Admit(a admission.Attributes) error {
+ // Ignore all calls to subresources or resources other than pods.
+ // Ignore all operations other than CREATE.
+ if len(a.GetSubresource()) != 0 || a.GetResource().GroupResource() != api.Resource("pods") || a.GetOperation() != admission.Create {
+ return nil
+ }
+
+ pod, ok := a.GetObject().(*api.Pod)
+ if !ok {
+ return errors.NewBadRequest("Resource was marked with kind Pod but was unable to be converted")
+ }
+ list, err := c.lister.PodPresets(pod.GetNamespace()).List(labels.Everything())
+ if err != nil {
+ return fmt.Errorf("listing pod presets failed: %v", err)
+ }
+
+ // get the pod presets and iterate over them
+ for _, pip := range list {
+ selector, err := metav1.LabelSelectorAsSelector(&pip.Spec.Selector)
+ if err != nil {
+ return fmt.Errorf("listing pod presets for namespace:%s failed: %v", pod.GetNamespace(), err)
+ }
+
+ // check if the pod labels match the selector
+ if !selector.Matches(labels.Set(pod.Labels)) {
+ continue
+ }
+
+ glog.V(4).Infof("PodPreset %s matches pod %s labels", pip.GetName(), pod.GetName())
+
+ // merge in policy for Env
+ if pip.Spec.Env != nil {
+ for i, ctr := range pod.Spec.Containers {
+ r, err := mergeEnv(pip, ctr.Env)
+ if err != nil {
+ // add event to pod
+ c.addEvent(pod, pip, err.Error())
+
+ return nil
+ }
+ pod.Spec.Containers[i].Env = r
+ }
+ }
+
+ // merge in policy for EnvFrom
+ if pip.Spec.EnvFrom != nil {
+ for i, ctr := range pod.Spec.Containers {
+ r, err := mergeEnvFrom(pip, ctr.EnvFrom)
+ if err != nil {
+ // add event to pod
+ c.addEvent(pod, pip, err.Error())
+
+ return nil
+ }
+ pod.Spec.Containers[i].EnvFrom = r
+ }
+ }
+
+ // merge in policy for VolumeMounts
+ if pip.Spec.VolumeMounts != nil {
+ for i, ctr := range pod.Spec.Containers {
+ r, err := mergeVolumeMounts(pip, ctr.VolumeMounts)
+ if err != nil {
+ // add event to pod
+ c.addEvent(pod, pip, err.Error())
+
+ return nil
+ }
+ pod.Spec.Containers[i].VolumeMounts = r
+ }
+ }
+
+ // merge in policy for Volumes
+ if pip.Spec.Volumes != nil {
+ r, err := mergeVolumes(pip, pod.Spec.Volumes)
+ if err != nil {
+ // add event to pod
+ c.addEvent(pod, pip, err.Error())
+
+ return nil
+ }
+ pod.Spec.Volumes = r
+ }
+
+ glog.V(4).Infof("PodPreset %s merged with pod %s successfully", pip.GetName(), pod.GetName())
+
+ // add annotation
+ if pod.ObjectMeta.Annotations == nil {
+ pod.ObjectMeta.Annotations = map[string]string{}
+ }
+ pod.ObjectMeta.Annotations[fmt.Sprintf("%s/%s", annotationPrefix, pip.GetName())] = pip.GetResourceVersion()
+ }
+
+ return nil
+}
+
+func mergeEnv(pip *settings.PodPreset, original []api.EnvVar) ([]api.EnvVar, error) {
+ // if there were no original envvar just return the pip envvar
+ if original == nil {
+ return pip.Spec.Env, nil
+ }
+
+ orig := map[string]interface{}{}
+ for _, v := range original {
+ orig[v.Name] = v
+ }
+
+ // check for conflicts.
+ for _, v := range pip.Spec.Env {
+ found, ok := orig[v.Name]
+ if !ok {
+ // if we don't already have it append it and continue
+ original = append(original, v)
+ continue
+ }
+
+ // make sure they are identical or throw an error
+ if !reflect.DeepEqual(found, v) {
+ return nil, fmt.Errorf("merging env for %s has a conflict on %s: \n%#v\ndoes not match\n%#v\n in container", pip.GetName(), v.Name, v, found)
+ }
+ }
+
+ return original, nil
+}
+
+func mergeEnvFrom(pip *settings.PodPreset, original []api.EnvFromSource) ([]api.EnvFromSource, error) {
+ // if there were no original envfrom just return the pip envfrom
+ if original == nil {
+ return pip.Spec.EnvFrom, nil
+ }
+
+ return append(original, pip.Spec.EnvFrom...), nil
+}
+
+func mergeVolumeMounts(pip *settings.PodPreset, original []api.VolumeMount) ([]api.VolumeMount, error) {
+ // if there were no original volume mount just return the pip volume mount
+ if original == nil {
+ return pip.Spec.VolumeMounts, nil
+ }
+
+ // first key by name
+ orig := map[string]interface{}{}
+ for _, v := range original {
+ orig[v.Name] = v
+ }
+
+ // check for conflicts.
+ for _, v := range pip.Spec.VolumeMounts {
+ found, ok := orig[v.Name]
+ if !ok {
+ // if we don't already have it continue
+ continue
+ }
+
+ // make sure they are identical or throw an error
+ if !reflect.DeepEqual(found, v) {
+ return nil, fmt.Errorf("merging volume mounts for %s has a conflict on %s: \n%#v\ndoes not match\n%#v\n in container", pip.GetName(), v.Name, v, found)
+ }
+ }
+
+ // key by mount path
+ orig = map[string]interface{}{}
+ for _, v := range original {
+ orig[v.MountPath] = v
+ }
+
+ // check for conflicts.
+ for _, v := range pip.Spec.VolumeMounts {
+ found, ok := orig[v.MountPath]
+ if !ok {
+ // if we don't already have it append it and continue
+ original = append(original, v)
+ continue
+ }
+
+ // make sure they are identical or throw an error
+ if !reflect.DeepEqual(found, v) {
+ return nil, fmt.Errorf("merging volume mounts for %s has a conflict on mount path %s: \n%#v\ndoes not match\n%#v\n in container", pip.GetName(), v.MountPath, v, found)
+ }
+ }
+
+ return original, nil
+}
+
+func mergeVolumes(pip *settings.PodPreset, original []api.Volume) ([]api.Volume, error) {
+ // if there were no original volumes just return the pip volumes
+ if original == nil {
+ return pip.Spec.Volumes, nil
+ }
+
+ orig := map[string]api.Volume{}
+ for _, v := range original {
+ orig[v.Name] = v
+ }
+
+ // check for conflicts.
+ for _, v := range pip.Spec.Volumes {
+ found, ok := orig[v.Name]
+ if !ok {
+ // if we don't already have it append it and continue
+ original = append(original, v)
+ continue
+ }
+
+ if !reflect.DeepEqual(found, v) {
+ return nil, fmt.Errorf("merging volumes for %s has a conflict on %s: \n%#v\ndoes not match\n%#v\nin pod spec", pip.GetName(), v.Name, v, found)
+ }
+ }
+
+ return original, nil
+}
+
+func (c *podPresetPlugin) addEvent(pod *api.Pod, pip *settings.PodPreset, message string) {
+ ref, err := api.GetReference(api.Scheme, pod)
+ if err != nil {
+ glog.Errorf("pip %s: get reference for pod %s failed: %v", pip.GetName(), pod.GetName(), err)
+ return
+ }
+
+ e := &api.Event{
+ InvolvedObject: *ref,
+ Message: message,
+ Source: api.EventSource{
+ Component: fmt.Sprintf("pip %s", pip.GetName()),
+ },
+ Type: "Warning",
+ }
+
+ if _, err := c.client.Core().Events(pod.GetNamespace()).Create(e); err != nil {
+ glog.Errorf("pip %s: creating pod event failed: %v", pip.GetName(), err)
+ return
+ }
+}
diff --git a/plugin/pkg/admission/podpreset/admission_test.go b/plugin/pkg/admission/podpreset/admission_test.go
new file mode 100644
index 00000000000..43f378cd6f8
--- /dev/null
+++ b/plugin/pkg/admission/podpreset/admission_test.go
@@ -0,0 +1,582 @@
+/*
+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 admission
+
+import (
+ "reflect"
+ "testing"
+
+ "k8s.io/apimachinery/pkg/apis/meta/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ kadmission "k8s.io/apiserver/pkg/admission"
+ "k8s.io/apiserver/pkg/authentication/user"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/settings"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake"
+ informers "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion"
+ settingslisters "k8s.io/kubernetes/pkg/client/listers/settings/internalversion"
+ "k8s.io/kubernetes/pkg/controller"
+)
+
+func TestMergeEnv(t *testing.T) {
+ tests := map[string]struct {
+ orig []api.EnvVar
+ mod []api.EnvVar
+ result []api.EnvVar
+ shouldFail bool
+ }{
+ "empty original": {
+ mod: []api.EnvVar{{Name: "abc", Value: "value2"}, {Name: "ABC", Value: "value3"}},
+ result: []api.EnvVar{{Name: "abc", Value: "value2"}, {Name: "ABC", Value: "value3"}},
+ shouldFail: false,
+ },
+ "good merge": {
+ orig: []api.EnvVar{{Name: "abcd", Value: "value2"}, {Name: "hello", Value: "value3"}},
+ mod: []api.EnvVar{{Name: "abc", Value: "value2"}, {Name: "ABC", Value: "value3"}},
+ result: []api.EnvVar{{Name: "abcd", Value: "value2"}, {Name: "hello", Value: "value3"}, {Name: "abc", Value: "value2"}, {Name: "ABC", Value: "value3"}},
+ shouldFail: false,
+ },
+ "conflict": {
+ orig: []api.EnvVar{{Name: "abc", Value: "value3"}},
+ mod: []api.EnvVar{{Name: "abc", Value: "value2"}, {Name: "ABC", Value: "value3"}},
+ shouldFail: true,
+ },
+ "one is exact same": {
+ orig: []api.EnvVar{{Name: "abc", Value: "value2"}, {Name: "hello", Value: "value3"}},
+ mod: []api.EnvVar{{Name: "abc", Value: "value2"}, {Name: "ABC", Value: "value3"}},
+ result: []api.EnvVar{{Name: "abc", Value: "value2"}, {Name: "hello", Value: "value3"}, {Name: "ABC", Value: "value3"}},
+ shouldFail: false,
+ },
+ }
+
+ for name, test := range tests {
+ result, err := mergeEnv(
+ &settings.PodPreset{Spec: settings.PodPresetSpec{Env: test.mod}},
+ test.orig,
+ )
+ if test.shouldFail && err == nil {
+ t.Fatalf("expected test %q to fail but got nil", name)
+ }
+ if !test.shouldFail && err != nil {
+ t.Fatalf("test %q failed: %v", name, err)
+ }
+ if !reflect.DeepEqual(test.result, result) {
+ t.Fatalf("results were not equal for test %q: got %#v; expected: %#v", name, result, test.result)
+ }
+ }
+}
+
+func TestMergeEnvFrom(t *testing.T) {
+ tests := map[string]struct {
+ orig []api.EnvFromSource
+ mod []api.EnvFromSource
+ result []api.EnvFromSource
+ shouldFail bool
+ }{
+ "empty original": {
+ mod: []api.EnvFromSource{
+ {
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ {
+ Prefix: "pre_",
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ },
+ result: []api.EnvFromSource{
+ {
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ {
+ Prefix: "pre_",
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ },
+ shouldFail: false,
+ },
+ "good merge": {
+ orig: []api.EnvFromSource{
+ {
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "thing"},
+ },
+ },
+ },
+ mod: []api.EnvFromSource{
+ {
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ {
+ Prefix: "pre_",
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ },
+ result: []api.EnvFromSource{
+ {
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "thing"},
+ },
+ },
+ {
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ {
+ Prefix: "pre_",
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ },
+ shouldFail: false,
+ },
+ }
+
+ for name, test := range tests {
+ result, err := mergeEnvFrom(
+ &settings.PodPreset{Spec: settings.PodPresetSpec{EnvFrom: test.mod}},
+ test.orig,
+ )
+ if test.shouldFail && err == nil {
+ t.Fatalf("expected test %q to fail but got nil", name)
+ }
+ if !test.shouldFail && err != nil {
+ t.Fatalf("test %q failed: %v", name, err)
+ }
+ if !reflect.DeepEqual(test.result, result) {
+ t.Fatalf("results were not equal for test %q: got %#v; expected: %#v", name, result, test.result)
+ }
+ }
+}
+
+func TestMergeVolumeMounts(t *testing.T) {
+ tests := map[string]struct {
+ orig []api.VolumeMount
+ mod []api.VolumeMount
+ result []api.VolumeMount
+ shouldFail bool
+ }{
+ "empty original": {
+ mod: []api.VolumeMount{
+ {
+ Name: "simply-mounted-volume",
+ MountPath: "/opt/",
+ },
+ },
+ result: []api.VolumeMount{
+ {
+ Name: "simply-mounted-volume",
+ MountPath: "/opt/",
+ },
+ },
+ shouldFail: false,
+ },
+ "good merge": {
+ mod: []api.VolumeMount{
+ {
+ Name: "simply-mounted-volume",
+ MountPath: "/opt/",
+ },
+ },
+ orig: []api.VolumeMount{
+ {
+ Name: "etc-volume",
+ MountPath: "/etc/",
+ },
+ },
+ result: []api.VolumeMount{
+ {
+ Name: "etc-volume",
+ MountPath: "/etc/",
+ },
+ {
+ Name: "simply-mounted-volume",
+ MountPath: "/opt/",
+ },
+ },
+ shouldFail: false,
+ },
+ "conflict": {
+ mod: []api.VolumeMount{
+ {
+ Name: "simply-mounted-volume",
+ MountPath: "/opt/",
+ },
+ {
+ Name: "etc-volume",
+ MountPath: "/things/",
+ },
+ },
+ orig: []api.VolumeMount{
+ {
+ Name: "etc-volume",
+ MountPath: "/etc/",
+ },
+ },
+ shouldFail: true,
+ },
+ "conflict on mount path": {
+ mod: []api.VolumeMount{
+ {
+ Name: "simply-mounted-volume",
+ MountPath: "/opt/",
+ },
+ {
+ Name: "things-volume",
+ MountPath: "/etc/",
+ },
+ },
+ orig: []api.VolumeMount{
+ {
+ Name: "etc-volume",
+ MountPath: "/etc/",
+ },
+ },
+ shouldFail: true,
+ },
+ "one is exact same": {
+ mod: []api.VolumeMount{
+ {
+ Name: "simply-mounted-volume",
+ MountPath: "/opt/",
+ },
+ {
+ Name: "etc-volume",
+ MountPath: "/etc/",
+ },
+ },
+ orig: []api.VolumeMount{
+ {
+ Name: "etc-volume",
+ MountPath: "/etc/",
+ },
+ },
+ result: []api.VolumeMount{
+ {
+ Name: "etc-volume",
+ MountPath: "/etc/",
+ },
+ {
+ Name: "simply-mounted-volume",
+ MountPath: "/opt/",
+ },
+ },
+ shouldFail: false,
+ },
+ }
+
+ for name, test := range tests {
+ result, err := mergeVolumeMounts(
+ &settings.PodPreset{Spec: settings.PodPresetSpec{VolumeMounts: test.mod}},
+ test.orig,
+ )
+ if test.shouldFail && err == nil {
+ t.Fatalf("expected test %q to fail but got nil", name)
+ }
+ if !test.shouldFail && err != nil {
+ t.Fatalf("test %q failed: %v", name, err)
+ }
+ if !reflect.DeepEqual(test.result, result) {
+ t.Fatalf("results were not equal for test %q: got %#v; expected: %#v", name, result, test.result)
+ }
+ }
+}
+
+func TestMergeVolumes(t *testing.T) {
+ tests := map[string]struct {
+ orig []api.Volume
+ mod []api.Volume
+ result []api.Volume
+ shouldFail bool
+ }{
+ "empty original": {
+ mod: []api.Volume{
+ {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ {Name: "vol2", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ },
+ result: []api.Volume{
+ {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ {Name: "vol2", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ },
+ shouldFail: false,
+ },
+ "good merge": {
+ orig: []api.Volume{
+ {Name: "vol3", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ {Name: "vol4", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ },
+ mod: []api.Volume{
+ {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ {Name: "vol2", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ },
+ result: []api.Volume{
+ {Name: "vol3", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ {Name: "vol4", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ {Name: "vol2", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ },
+ shouldFail: false,
+ },
+ "conflict": {
+ orig: []api.Volume{
+ {Name: "vol3", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ {Name: "vol4", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ },
+ mod: []api.Volume{
+ {Name: "vol3", VolumeSource: api.VolumeSource{HostPath: &api.HostPathVolumeSource{Path: "/etc/apparmor.d"}}},
+ {Name: "vol2", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ },
+ shouldFail: true,
+ },
+ "one is exact same": {
+ orig: []api.Volume{
+ {Name: "vol3", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ {Name: "vol4", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ },
+ mod: []api.Volume{
+ {Name: "vol3", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ {Name: "vol2", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ },
+ result: []api.Volume{
+ {Name: "vol3", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ {Name: "vol4", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ {Name: "vol2", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
+ },
+ shouldFail: false,
+ },
+ }
+
+ for name, test := range tests {
+ result, err := mergeVolumes(
+ &settings.PodPreset{Spec: settings.PodPresetSpec{Volumes: test.mod}},
+ test.orig,
+ )
+ if test.shouldFail && err == nil {
+ t.Fatalf("expected test %q to fail but got nil", name)
+ }
+ if !test.shouldFail && err != nil {
+ t.Fatalf("test %q failed: %v", name, err)
+ }
+ if !reflect.DeepEqual(test.result, result) {
+ t.Fatalf("results were not equal for test %q: got %#v; expected: %#v", name, result, test.result)
+ }
+ }
+}
+
+// NewTestAdmission provides an admission plugin with test implementations of internal structs. It uses
+// an authorizer that always returns true.
+func NewTestAdmission(lister settingslisters.PodPresetLister, objects ...runtime.Object) kadmission.Interface {
+ // Build a test client that the admission plugin can use to look up the service account missing from its cache
+ client := fake.NewSimpleClientset(objects...)
+
+ return &podPresetPlugin{
+ client: client,
+ Handler: kadmission.NewHandler(kadmission.Create),
+ lister: lister,
+ }
+}
+
+func TestAdmitConflictWithDifferentNamespaceShouldDoNothing(t *testing.T) {
+ containerName := "container"
+
+ pod := &api.Pod{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "mypod",
+ Namespace: "namespace",
+ Labels: map[string]string{
+ "security": "S2",
+ },
+ },
+ Spec: api.PodSpec{
+ Containers: []api.Container{
+ {
+ Name: containerName,
+ Env: []api.EnvVar{{Name: "abc", Value: "value2"}, {Name: "ABC", Value: "value3"}},
+ },
+ },
+ },
+ }
+
+ pip := &settings.PodPreset{
+ ObjectMeta: v1.ObjectMeta{
+ Name: "hello",
+ Namespace: "othernamespace",
+ },
+ Spec: settings.PodPresetSpec{
+ Selector: v1.LabelSelector{
+ MatchExpressions: []v1.LabelSelectorRequirement{
+ {
+ Key: "security",
+ Operator: v1.LabelSelectorOpIn,
+ Values: []string{"S2"},
+ },
+ },
+ },
+ Env: []api.EnvVar{{Name: "abc", Value: "value"}, {Name: "ABC", Value: "value"}},
+ },
+ }
+
+ err := admitPod(pod, pip)
+ if err != nil {
+ t.Fatal(err)
+ }
+}
+
+func TestAdmitConflictWithNonMatchingLabelsShouldNotError(t *testing.T) {
+ containerName := "container"
+
+ pod := &api.Pod{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "mypod",
+ Namespace: "namespace",
+ Labels: map[string]string{
+ "security": "S2",
+ },
+ },
+ Spec: api.PodSpec{
+ Containers: []api.Container{
+ {
+ Name: containerName,
+ Env: []api.EnvVar{{Name: "abc", Value: "value2"}, {Name: "ABC", Value: "value3"}},
+ },
+ },
+ },
+ }
+
+ pip := &settings.PodPreset{
+ ObjectMeta: v1.ObjectMeta{
+ Name: "hello",
+ Namespace: "namespace",
+ },
+ Spec: settings.PodPresetSpec{
+ Selector: v1.LabelSelector{
+ MatchExpressions: []v1.LabelSelectorRequirement{
+ {
+ Key: "security",
+ Operator: v1.LabelSelectorOpIn,
+ Values: []string{"S3"},
+ },
+ },
+ },
+ Env: []api.EnvVar{{Name: "abc", Value: "value"}, {Name: "ABC", Value: "value"}},
+ },
+ }
+
+ err := admitPod(pod, pip)
+ if err != nil {
+ t.Fatal(err)
+ }
+}
+
+func TestAdmit(t *testing.T) {
+ containerName := "container"
+
+ pod := &api.Pod{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "mypod",
+ Namespace: "namespace",
+ Labels: map[string]string{
+ "security": "S2",
+ },
+ },
+ Spec: api.PodSpec{
+ Containers: []api.Container{
+ {
+ Name: containerName,
+ Env: []api.EnvVar{{Name: "abc", Value: "value2"}, {Name: "ABCD", Value: "value3"}},
+ },
+ },
+ },
+ }
+
+ pip := &settings.PodPreset{
+ ObjectMeta: v1.ObjectMeta{
+ Name: "hello",
+ Namespace: "namespace",
+ },
+ Spec: settings.PodPresetSpec{
+ Selector: v1.LabelSelector{
+ MatchExpressions: []v1.LabelSelectorRequirement{
+ {
+ Key: "security",
+ Operator: v1.LabelSelectorOpIn,
+ Values: []string{"S2"},
+ },
+ },
+ },
+ Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}},
+ Env: []api.EnvVar{{Name: "abcd", Value: "value"}, {Name: "ABC", Value: "value"}},
+ EnvFrom: []api.EnvFromSource{
+ {
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ {
+ Prefix: "pre_",
+ ConfigMapRef: &api.ConfigMapEnvSource{
+ LocalObjectReference: api.LocalObjectReference{Name: "abc"},
+ },
+ },
+ },
+ },
+ }
+
+ err := admitPod(pod, pip)
+ if err != nil {
+ t.Fatal(err)
+ }
+}
+
+func admitPod(pod *api.Pod, pip *settings.PodPreset) error {
+ informerFactory := informers.NewSharedInformerFactory(nil, controller.NoResyncPeriodFunc())
+ store := informerFactory.Settings().InternalVersion().PodPresets().Informer().GetStore()
+ store.Add(pip)
+ plugin := NewTestAdmission(informerFactory.Settings().InternalVersion().PodPresets().Lister())
+ attrs := kadmission.NewAttributesRecord(
+ pod,
+ nil,
+ api.Kind("Pod").WithVersion("version"),
+ "namespace",
+ "",
+ api.Resource("pods").WithVersion("version"),
+ "",
+ kadmission.Create,
+ &user.DefaultInfo{},
+ )
+
+ err := plugin.Admit(attrs)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/staging/src/k8s.io/client-go/informers/factory.go b/staging/src/k8s.io/client-go/informers/factory.go
index 9db23775a9a..67e5f624b5e 100644
--- a/staging/src/k8s.io/client-go/informers/factory.go
+++ b/staging/src/k8s.io/client-go/informers/factory.go
@@ -30,6 +30,7 @@ import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
policy "k8s.io/client-go/informers/policy"
rbac "k8s.io/client-go/informers/rbac"
+ settings "k8s.io/client-go/informers/settings"
storage "k8s.io/client-go/informers/storage"
kubernetes "k8s.io/client-go/kubernetes"
cache "k8s.io/client-go/tools/cache"
@@ -103,6 +104,7 @@ type SharedInformerFactory interface {
Extensions() extensions.Interface
Policy() policy.Interface
Rbac() rbac.Interface
+ Settings() settings.Interface
Storage() storage.Interface
}
@@ -138,6 +140,10 @@ func (f *sharedInformerFactory) Rbac() rbac.Interface {
return rbac.New(f)
}
+func (f *sharedInformerFactory) Settings() settings.Interface {
+ return settings.New(f)
+}
+
func (f *sharedInformerFactory) Storage() storage.Interface {
return storage.New(f)
}
diff --git a/staging/src/k8s.io/client-go/informers/generic.go b/staging/src/k8s.io/client-go/informers/generic.go
index b3194464ce4..ce9cd65c090 100644
--- a/staging/src/k8s.io/client-go/informers/generic.go
+++ b/staging/src/k8s.io/client-go/informers/generic.go
@@ -32,6 +32,7 @@ import (
policy_v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
rbac_v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
+ settings_v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
storage_v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
cache "k8s.io/client-go/tools/cache"
)
@@ -162,6 +163,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case rbac_v1beta1.SchemeGroupVersion.WithResource("rolebindings"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
+ // Group=Settings, Version=V1alpha1
+ case settings_v1alpha1.SchemeGroupVersion.WithResource("podpresets"):
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Settings().V1alpha1().PodPresets().Informer()}, nil
+
// Group=Storage, Version=V1beta1
case storage_v1beta1.SchemeGroupVersion.WithResource("storageclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().StorageClasses().Informer()}, nil
diff --git a/staging/src/k8s.io/client-go/informers/settings/interface.go b/staging/src/k8s.io/client-go/informers/settings/interface.go
new file mode 100644
index 00000000000..00d051eac61
--- /dev/null
+++ b/staging/src/k8s.io/client-go/informers/settings/interface.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 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 file was automatically generated by informer-gen
+
+package settings
+
+import (
+ internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
+ v1alpha1 "k8s.io/client-go/informers/settings/v1alpha1"
+)
+
+// Interface provides access to each of this group's versions.
+type Interface interface {
+ // V1alpha1 provides access to shared informers for resources in V1alpha1.
+ V1alpha1() v1alpha1.Interface
+}
+
+type group struct {
+ internalinterfaces.SharedInformerFactory
+}
+
+// New returns a new Interface.
+func New(f internalinterfaces.SharedInformerFactory) Interface {
+ return &group{f}
+}
+
+// V1alpha1 returns a new v1alpha1.Interface.
+func (g *group) V1alpha1() v1alpha1.Interface {
+ return v1alpha1.New(g.SharedInformerFactory)
+}
diff --git a/staging/src/k8s.io/client-go/informers/settings/v1alpha1/interface.go b/staging/src/k8s.io/client-go/informers/settings/v1alpha1/interface.go
new file mode 100644
index 00000000000..58114f6e20c
--- /dev/null
+++ b/staging/src/k8s.io/client-go/informers/settings/v1alpha1/interface.go
@@ -0,0 +1,43 @@
+/*
+Copyright 2017 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 file was automatically generated by informer-gen
+
+package v1alpha1
+
+import (
+ internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
+)
+
+// Interface provides access to all the informers in this group version.
+type Interface interface {
+ // PodPresets returns a PodPresetInformer.
+ PodPresets() PodPresetInformer
+}
+
+type version struct {
+ internalinterfaces.SharedInformerFactory
+}
+
+// New returns a new Interface.
+func New(f internalinterfaces.SharedInformerFactory) Interface {
+ return &version{f}
+}
+
+// PodPresets returns a PodPresetInformer.
+func (v *version) PodPresets() PodPresetInformer {
+ return &podPresetInformer{factory: v.SharedInformerFactory}
+}
diff --git a/staging/src/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go b/staging/src/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go
new file mode 100644
index 00000000000..6f89088fffd
--- /dev/null
+++ b/staging/src/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go
@@ -0,0 +1,68 @@
+/*
+Copyright 2017 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 file was automatically generated by informer-gen
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ watch "k8s.io/apimachinery/pkg/watch"
+ internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
+ kubernetes "k8s.io/client-go/kubernetes"
+ v1alpha1 "k8s.io/client-go/listers/settings/v1alpha1"
+ settings_v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
+ cache "k8s.io/client-go/tools/cache"
+ time "time"
+)
+
+// PodPresetInformer provides access to a shared informer and lister for
+// PodPresets.
+type PodPresetInformer interface {
+ Informer() cache.SharedIndexInformer
+ Lister() v1alpha1.PodPresetLister
+}
+
+type podPresetInformer struct {
+ factory internalinterfaces.SharedInformerFactory
+}
+
+func newPodPresetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
+ sharedIndexInformer := cache.NewSharedIndexInformer(
+ &cache.ListWatch{
+ ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
+ return client.SettingsV1alpha1().PodPresets(v1.NamespaceAll).List(options)
+ },
+ WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
+ return client.SettingsV1alpha1().PodPresets(v1.NamespaceAll).Watch(options)
+ },
+ },
+ &settings_v1alpha1.PodPreset{},
+ resyncPeriod,
+ cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
+ )
+
+ return sharedIndexInformer
+}
+
+func (f *podPresetInformer) Informer() cache.SharedIndexInformer {
+ return f.factory.InformerFor(&settings_v1alpha1.PodPreset{}, newPodPresetInformer)
+}
+
+func (f *podPresetInformer) Lister() v1alpha1.PodPresetLister {
+ return v1alpha1.NewPodPresetLister(f.Informer().GetIndexer())
+}
diff --git a/staging/src/k8s.io/client-go/kubernetes/clientset.go b/staging/src/k8s.io/client-go/kubernetes/clientset.go
index ace8e437a91..1f413248c8f 100644
--- a/staging/src/k8s.io/client-go/kubernetes/clientset.go
+++ b/staging/src/k8s.io/client-go/kubernetes/clientset.go
@@ -34,6 +34,7 @@ import (
policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
+ settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1"
storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
rest "k8s.io/client-go/rest"
flowcontrol "k8s.io/client-go/util/flowcontrol"
@@ -76,6 +77,9 @@ type Interface interface {
// Deprecated: please explicitly pick a version if possible.
Rbac() rbacv1beta1.RbacV1beta1Interface
RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
+ SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Settings() settingsv1alpha1.SettingsV1alpha1Interface
StorageV1beta1() storagev1beta1.StorageV1beta1Interface
// Deprecated: please explicitly pick a version if possible.
Storage() storagev1beta1.StorageV1beta1Interface
@@ -100,6 +104,7 @@ type Clientset struct {
*policyv1beta1.PolicyV1beta1Client
*rbacv1beta1.RbacV1beta1Client
*rbacv1alpha1.RbacV1alpha1Client
+ *settingsv1alpha1.SettingsV1alpha1Client
*storagev1beta1.StorageV1beta1Client
}
@@ -313,6 +318,23 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return c.RbacV1alpha1Client
}
+// SettingsV1alpha1 retrieves the SettingsV1alpha1Client
+func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.SettingsV1alpha1Client
+}
+
+// Deprecated: Settings retrieves the default version of SettingsClient.
+// Please explicitly pick a version.
+func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.SettingsV1alpha1Client
+}
+
// StorageV1beta1 retrieves the StorageV1beta1Client
func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
if c == nil {
@@ -406,6 +428,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
+ cs.SettingsV1alpha1Client, err = settingsv1alpha1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
cs.StorageV1beta1Client, err = storagev1beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@@ -438,6 +464,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
cs.PolicyV1beta1Client = policyv1beta1.NewForConfigOrDie(c)
cs.RbacV1beta1Client = rbacv1beta1.NewForConfigOrDie(c)
cs.RbacV1alpha1Client = rbacv1alpha1.NewForConfigOrDie(c)
+ cs.SettingsV1alpha1Client = settingsv1alpha1.NewForConfigOrDie(c)
cs.StorageV1beta1Client = storagev1beta1.NewForConfigOrDie(c)
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
@@ -462,6 +489,7 @@ func New(c rest.Interface) *Clientset {
cs.PolicyV1beta1Client = policyv1beta1.New(c)
cs.RbacV1beta1Client = rbacv1beta1.New(c)
cs.RbacV1alpha1Client = rbacv1alpha1.New(c)
+ cs.SettingsV1alpha1Client = settingsv1alpha1.New(c)
cs.StorageV1beta1Client = storagev1beta1.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
diff --git a/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go b/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go
index 4647ade3c11..c99855cc443 100644
--- a/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go
+++ b/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go
@@ -52,6 +52,8 @@ import (
fakerbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake"
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
fakerbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake"
+ settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1"
+ fakesettingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake"
storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
fakestoragev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake"
"k8s.io/client-go/testing"
@@ -215,6 +217,16 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake}
}
+// SettingsV1alpha1 retrieves the SettingsV1alpha1Client
+func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
+ return &fakesettingsv1alpha1.FakeSettingsV1alpha1{Fake: &c.Fake}
+}
+
+// Settings retrieves the SettingsV1alpha1Client
+func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface {
+ return &fakesettingsv1alpha1.FakeSettingsV1alpha1{Fake: &c.Fake}
+}
+
// StorageV1beta1 retrieves the StorageV1beta1Client
func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
return &fakestoragev1beta1.FakeStorageV1beta1{Fake: &c.Fake}
diff --git a/staging/src/k8s.io/client-go/kubernetes/fake/register.go b/staging/src/k8s.io/client-go/kubernetes/fake/register.go
index 312867e659c..3ad666057cc 100644
--- a/staging/src/k8s.io/client-go/kubernetes/fake/register.go
+++ b/staging/src/k8s.io/client-go/kubernetes/fake/register.go
@@ -33,6 +33,7 @@ import (
extensions "k8s.io/client-go/pkg/apis/extensions/install"
policy "k8s.io/client-go/pkg/apis/policy/install"
rbac "k8s.io/client-go/pkg/apis/rbac/install"
+ settings "k8s.io/client-go/pkg/apis/settings/install"
storage "k8s.io/client-go/pkg/apis/storage/install"
os "os"
)
@@ -61,6 +62,7 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
extensions.Install(groupFactoryRegistry, registry, scheme)
policy.Install(groupFactoryRegistry, registry, scheme)
rbac.Install(groupFactoryRegistry, registry, scheme)
+ settings.Install(groupFactoryRegistry, registry, scheme)
storage.Install(groupFactoryRegistry, registry, scheme)
}
diff --git a/staging/src/k8s.io/client-go/kubernetes/import_known_versions.go b/staging/src/k8s.io/client-go/kubernetes/import_known_versions.go
index 08c24a32ccc..297466b01a9 100644
--- a/staging/src/k8s.io/client-go/kubernetes/import_known_versions.go
+++ b/staging/src/k8s.io/client-go/kubernetes/import_known_versions.go
@@ -31,6 +31,7 @@ import (
_ "k8s.io/client-go/pkg/apis/extensions/install"
_ "k8s.io/client-go/pkg/apis/policy/install"
_ "k8s.io/client-go/pkg/apis/rbac/install"
+ _ "k8s.io/client-go/pkg/apis/settings/install"
_ "k8s.io/client-go/pkg/apis/storage/install"
)
diff --git a/staging/src/k8s.io/client-go/kubernetes/scheme/register.go b/staging/src/k8s.io/client-go/kubernetes/scheme/register.go
index 42fc1f50699..eebfe67a743 100644
--- a/staging/src/k8s.io/client-go/kubernetes/scheme/register.go
+++ b/staging/src/k8s.io/client-go/kubernetes/scheme/register.go
@@ -36,6 +36,7 @@ import (
policyv1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
rbacv1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
rbacv1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
+ settingsv1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
storagev1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
)
@@ -78,6 +79,7 @@ func AddToScheme(scheme *runtime.Scheme) {
policyv1beta1.AddToScheme(scheme)
rbacv1beta1.AddToScheme(scheme)
rbacv1alpha1.AddToScheme(scheme)
+ settingsv1alpha1.AddToScheme(scheme)
storagev1beta1.AddToScheme(scheme)
}
diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go
new file mode 100644
index 00000000000..ba8d10d3b66
--- /dev/null
+++ b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 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 custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1alpha1
diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/doc.go b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/doc.go
new file mode 100644
index 00000000000..c6548330a0d
--- /dev/null
+++ b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 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 custom arguments.
+
+// Package fake has the automatically generated clients.
+package fake
diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go
new file mode 100644
index 00000000000..aa2fd101b45
--- /dev/null
+++ b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go
@@ -0,0 +1,118 @@
+/*
+Copyright 2017 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 (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ labels "k8s.io/apimachinery/pkg/labels"
+ schema "k8s.io/apimachinery/pkg/runtime/schema"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
+ testing "k8s.io/client-go/testing"
+)
+
+// FakePodPresets implements PodPresetInterface
+type FakePodPresets struct {
+ Fake *FakeSettingsV1alpha1
+ ns string
+}
+
+var podpresetsResource = schema.GroupVersionResource{Group: "settings.k8s.io", Version: "v1alpha1", Resource: "podpresets"}
+
+func (c *FakePodPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewCreateAction(podpresetsResource, c.ns, podPreset), &v1alpha1.PodPreset{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.PodPreset), err
+}
+
+func (c *FakePodPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewUpdateAction(podpresetsResource, c.ns, podPreset), &v1alpha1.PodPreset{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.PodPreset), err
+}
+
+func (c *FakePodPresets) Delete(name string, options *v1.DeleteOptions) error {
+ _, err := c.Fake.
+ Invokes(testing.NewDeleteAction(podpresetsResource, c.ns, name), &v1alpha1.PodPreset{})
+
+ return err
+}
+
+func (c *FakePodPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ action := testing.NewDeleteCollectionAction(podpresetsResource, c.ns, listOptions)
+
+ _, err := c.Fake.Invokes(action, &v1alpha1.PodPresetList{})
+ return err
+}
+
+func (c *FakePodPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewGetAction(podpresetsResource, c.ns, name), &v1alpha1.PodPreset{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.PodPreset), err
+}
+
+func (c *FakePodPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewListAction(podpresetsResource, c.ns, opts), &v1alpha1.PodPresetList{})
+
+ if obj == nil {
+ return nil, err
+ }
+
+ label, _, _ := testing.ExtractFromListOptions(opts)
+ if label == nil {
+ label = labels.Everything()
+ }
+ list := &v1alpha1.PodPresetList{}
+ for _, item := range obj.(*v1alpha1.PodPresetList).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 podPresets.
+func (c *FakePodPresets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ return c.Fake.
+ InvokesWatch(testing.NewWatchAction(podpresetsResource, c.ns, opts))
+
+}
+
+// Patch applies the patch and returns the patched podPreset.
+func (c *FakePodPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewPatchSubresourceAction(podpresetsResource, c.ns, name, data, subresources...), &v1alpha1.PodPreset{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.PodPreset), err
+}
diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_settings_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_settings_client.go
new file mode 100644
index 00000000000..6feb9b218f1
--- /dev/null
+++ b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_settings_client.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2017 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/kubernetes/typed/settings/v1alpha1"
+ rest "k8s.io/client-go/rest"
+ testing "k8s.io/client-go/testing"
+)
+
+type FakeSettingsV1alpha1 struct {
+ *testing.Fake
+}
+
+func (c *FakeSettingsV1alpha1) PodPresets(namespace string) v1alpha1.PodPresetInterface {
+ return &FakePodPresets{c, namespace}
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *FakeSettingsV1alpha1) RESTClient() rest.Interface {
+ var ret *rest.RESTClient
+ return ret
+}
diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go
new file mode 100644
index 00000000000..d599b2935c2
--- /dev/null
+++ b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 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 PodPresetExpansion interface{}
diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go
new file mode 100644
index 00000000000..b8fc0a022af
--- /dev/null
+++ b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 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 (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+// PodPresetsGetter has a method to return a PodPresetInterface.
+// A group's client should implement this interface.
+type PodPresetsGetter interface {
+ PodPresets(namespace string) PodPresetInterface
+}
+
+// PodPresetInterface has methods to work with PodPreset resources.
+type PodPresetInterface interface {
+ Create(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error)
+ Update(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.PodPreset, error)
+ List(opts v1.ListOptions) (*v1alpha1.PodPresetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error)
+ PodPresetExpansion
+}
+
+// podPresets implements PodPresetInterface
+type podPresets struct {
+ client rest.Interface
+ ns string
+}
+
+// newPodPresets returns a PodPresets
+func newPodPresets(c *SettingsV1alpha1Client, namespace string) *podPresets {
+ return &podPresets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any.
+func (c *podPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Body(podPreset).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any.
+func (c *podPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(podPreset.Name).
+ Body(podPreset).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the podPreset and deletes it. Returns an error if one occurs.
+func (c *podPresets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *podPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the podPreset, and returns the corresponding podPreset object, and an error if there is any.
+func (c *podPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PodPresets that match those selectors.
+func (c *podPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) {
+ result = &v1alpha1.PodPresetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested podPresets.
+func (c *podPresets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched podPreset.
+func (c *podPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("podpresets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go
new file mode 100644
index 00000000000..1a90034bcdd
--- /dev/null
+++ b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 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 (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+type SettingsV1alpha1Interface interface {
+ RESTClient() rest.Interface
+ PodPresetsGetter
+}
+
+// SettingsV1alpha1Client is used to interact with features provided by the settings.k8s.io group.
+type SettingsV1alpha1Client struct {
+ restClient rest.Interface
+}
+
+func (c *SettingsV1alpha1Client) PodPresets(namespace string) PodPresetInterface {
+ return newPodPresets(c, namespace)
+}
+
+// NewForConfig creates a new SettingsV1alpha1Client for the given config.
+func NewForConfig(c *rest.Config) (*SettingsV1alpha1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &SettingsV1alpha1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new SettingsV1alpha1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *SettingsV1alpha1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new SettingsV1alpha1Client for the given RESTClient.
+func New(c rest.Interface) *SettingsV1alpha1Client {
+ return &SettingsV1alpha1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1alpha1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *SettingsV1alpha1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/staging/src/k8s.io/client-go/listers/settings/v1alpha1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/settings/v1alpha1/expansion_generated.go
new file mode 100644
index 00000000000..5334612fff1
--- /dev/null
+++ b/staging/src/k8s.io/client-go/listers/settings/v1alpha1/expansion_generated.go
@@ -0,0 +1,27 @@
+/*
+Copyright 2017 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 file was automatically generated by lister-gen
+
+package v1alpha1
+
+// PodPresetListerExpansion allows custom methods to be added to
+// PodPresetLister.
+type PodPresetListerExpansion interface{}
+
+// PodPresetNamespaceListerExpansion allows custom methods to be added to
+// PodPresetNamespaeLister.
+type PodPresetNamespaceListerExpansion interface{}
diff --git a/staging/src/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go b/staging/src/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go
new file mode 100644
index 00000000000..77de0241f7f
--- /dev/null
+++ b/staging/src/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go
@@ -0,0 +1,95 @@
+/*
+Copyright 2017 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 file was automatically generated by lister-gen
+
+package v1alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/labels"
+ settings "k8s.io/client-go/pkg/apis/settings"
+ v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
+ "k8s.io/client-go/tools/cache"
+)
+
+// PodPresetLister helps list PodPresets.
+type PodPresetLister interface {
+ // List lists all PodPresets in the indexer.
+ List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error)
+ // PodPresets returns an object that can list and get PodPresets.
+ PodPresets(namespace string) PodPresetNamespaceLister
+ PodPresetListerExpansion
+}
+
+// podPresetLister implements the PodPresetLister interface.
+type podPresetLister struct {
+ indexer cache.Indexer
+}
+
+// NewPodPresetLister returns a new PodPresetLister.
+func NewPodPresetLister(indexer cache.Indexer) PodPresetLister {
+ return &podPresetLister{indexer: indexer}
+}
+
+// List lists all PodPresets in the indexer.
+func (s *podPresetLister) List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error) {
+ err = cache.ListAll(s.indexer, selector, func(m interface{}) {
+ ret = append(ret, m.(*v1alpha1.PodPreset))
+ })
+ return ret, err
+}
+
+// PodPresets returns an object that can list and get PodPresets.
+func (s *podPresetLister) PodPresets(namespace string) PodPresetNamespaceLister {
+ return podPresetNamespaceLister{indexer: s.indexer, namespace: namespace}
+}
+
+// PodPresetNamespaceLister helps list and get PodPresets.
+type PodPresetNamespaceLister interface {
+ // List lists all PodPresets in the indexer for a given namespace.
+ List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error)
+ // Get retrieves the PodPreset from the indexer for a given namespace and name.
+ Get(name string) (*v1alpha1.PodPreset, error)
+ PodPresetNamespaceListerExpansion
+}
+
+// podPresetNamespaceLister implements the PodPresetNamespaceLister
+// interface.
+type podPresetNamespaceLister struct {
+ indexer cache.Indexer
+ namespace string
+}
+
+// List lists all PodPresets in the indexer for a given namespace.
+func (s podPresetNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error) {
+ err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
+ ret = append(ret, m.(*v1alpha1.PodPreset))
+ })
+ return ret, err
+}
+
+// Get retrieves the PodPreset from the indexer for a given namespace and name.
+func (s podPresetNamespaceLister) Get(name string) (*v1alpha1.PodPreset, error) {
+ obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
+ if err != nil {
+ return nil, err
+ }
+ if !exists {
+ return nil, errors.NewNotFound(settings.Resource("podpreset"), name)
+ }
+ return obj.(*v1alpha1.PodPreset), nil
+}
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/doc.go b/staging/src/k8s.io/client-go/pkg/apis/settings/doc.go
new file mode 100644
index 00000000000..90ccf882a2e
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/doc.go
@@ -0,0 +1,18 @@
+/*
+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.
+*/
+
+// +groupName=settings.k8s.io
+package settings
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/install/install.go b/staging/src/k8s.io/client-go/pkg/apis/settings/install/install.go
new file mode 100644
index 00000000000..ccdc70400a2
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/install/install.go
@@ -0,0 +1,49 @@
+/*
+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 install installs the settings API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/client-go/pkg/api"
+ "k8s.io/client-go/pkg/apis/settings"
+ "k8s.io/client-go/pkg/apis/settings/v1alpha1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: settings.GroupName,
+ VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/client-go/pkg/apis/settings",
+ AddInternalObjectsToScheme: settings.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/register.go b/staging/src/k8s.io/client-go/pkg/apis/settings/register.go
new file mode 100644
index 00000000000..85847012793
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/register.go
@@ -0,0 +1,52 @@
+/*
+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 settings
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// GroupName is the group name use in this package
+const GroupName = "settings.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodPreset{},
+ &PodPresetList{},
+ )
+ return nil
+}
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/types.go b/staging/src/k8s.io/client-go/pkg/apis/settings/types.go
new file mode 100644
index 00000000000..f89a16d25c9
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/types.go
@@ -0,0 +1,63 @@
+/*
+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 settings
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/client-go/pkg/api"
+)
+
+// +genclient=true
+
+// PodPreset is a policy resource that defines additional runtime
+// requirements for a Pod.
+type PodPreset struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // +optional
+ Spec PodPresetSpec
+}
+
+// PodPresetSpec is a description of a pod injection policy.
+type PodPresetSpec struct {
+ // Selector is a label query over a set of resources, in this case pods.
+ // Required.
+ Selector metav1.LabelSelector
+ // Env defines the collection of EnvVar to inject into containers.
+ // +optional
+ Env []api.EnvVar
+ // EnvFrom defines the collection of EnvFromSource to inject into containers.
+ // +optional
+ EnvFrom []api.EnvFromSource
+ // Volumes defines the collection of Volume to inject into the pod.
+ // +optional
+ Volumes []api.Volume
+ // VolumeMounts defines the collection of VolumeMount to inject into containers.
+ // +optional
+ VolumeMounts []api.VolumeMount
+}
+
+// PodPresetList is a list of PodPreset objects.
+type PodPresetList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []PodPreset
+}
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/doc.go b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/doc.go
new file mode 100644
index 00000000000..86390b5237e
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2017 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.
+*/
+
+// +groupName=settings.k8s.io
+package v1alpha1
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.pb.go b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.pb.go
new file mode 100644
index 00000000000..88f85877a9b
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.pb.go
@@ -0,0 +1,924 @@
+/*
+Copyright 2017 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.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ PodPreset
+ PodPresetList
+ PodPresetSpec
+*/
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+const _ = proto.GoGoProtoPackageIsVersion1
+
+func (m *PodPreset) Reset() { *m = PodPreset{} }
+func (*PodPreset) ProtoMessage() {}
+func (*PodPreset) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *PodPresetList) Reset() { *m = PodPresetList{} }
+func (*PodPresetList) ProtoMessage() {}
+func (*PodPresetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *PodPresetSpec) Reset() { *m = PodPresetSpec{} }
+func (*PodPresetSpec) ProtoMessage() {}
+func (*PodPresetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func init() {
+ proto.RegisterType((*PodPreset)(nil), "k8s.io.client-go.pkg.apis.settings.v1alpha1.PodPreset")
+ proto.RegisterType((*PodPresetList)(nil), "k8s.io.client-go.pkg.apis.settings.v1alpha1.PodPresetList")
+ proto.RegisterType((*PodPresetSpec)(nil), "k8s.io.client-go.pkg.apis.settings.v1alpha1.PodPresetSpec")
+}
+func (m *PodPreset) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PodPreset) MarshalTo(data []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ data[i] = 0xa
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ return i, nil
+}
+
+func (m *PodPresetList) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PodPresetList) MarshalTo(data []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ data[i] = 0xa
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size()))
+ n3, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodPresetSpec) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PodPresetSpec) MarshalTo(data []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ data[i] = 0xa
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Selector.Size()))
+ n4, err := m.Selector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ if len(m.Env) > 0 {
+ for _, msg := range m.Env {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.EnvFrom) > 0 {
+ for _, msg := range m.EnvFrom {
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Volumes) > 0 {
+ for _, msg := range m.Volumes {
+ data[i] = 0x22
+ i++
+ i = encodeVarintGenerated(data, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.VolumeMounts) > 0 {
+ for _, msg := range m.VolumeMounts {
+ data[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(data []byte, offset int, v uint64) int {
+ data[offset] = uint8(v)
+ data[offset+1] = uint8(v >> 8)
+ data[offset+2] = uint8(v >> 16)
+ data[offset+3] = uint8(v >> 24)
+ data[offset+4] = uint8(v >> 32)
+ data[offset+5] = uint8(v >> 40)
+ data[offset+6] = uint8(v >> 48)
+ data[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(data []byte, offset int, v uint32) int {
+ data[offset] = uint8(v)
+ data[offset+1] = uint8(v >> 8)
+ data[offset+2] = uint8(v >> 16)
+ data[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(data []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ data[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ data[offset] = uint8(v)
+ return offset + 1
+}
+func (m *PodPreset) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodPresetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodPresetSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Env) > 0 {
+ for _, e := range m.Env {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.EnvFrom) > 0 {
+ for _, e := range m.EnvFrom {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Volumes) > 0 {
+ for _, e := range m.Volumes {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.VolumeMounts) > 0 {
+ for _, e := range m.VolumeMounts {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *PodPreset) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPreset{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodPresetSpec", "PodPresetSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodPresetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPresetList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodPreset", "PodPreset", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodPresetSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPresetSpec{`,
+ `Selector:` + strings.Replace(strings.Replace(this.Selector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
+ `Env:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Env), "EnvVar", "k8s_io_kubernetes_pkg_api_v1.EnvVar", 1), `&`, ``, 1) + `,`,
+ `EnvFrom:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EnvFrom), "EnvFromSource", "k8s_io_kubernetes_pkg_api_v1.EnvFromSource", 1), `&`, ``, 1) + `,`,
+ `Volumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Volumes), "Volume", "k8s_io_kubernetes_pkg_api_v1.Volume", 1), `&`, ``, 1) + `,`,
+ `VolumeMounts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeMounts), "VolumeMount", "k8s_io_kubernetes_pkg_api_v1.VolumeMount", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *PodPreset) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPreset: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPreset: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodPresetList) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPresetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPresetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PodPreset{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodPresetSpec) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPresetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPresetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Env = append(m.Env, k8s_io_kubernetes_pkg_api_v1.EnvVar{})
+ if err := m.Env[len(m.Env)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EnvFrom", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EnvFrom = append(m.EnvFrom, k8s_io_kubernetes_pkg_api_v1.EnvFromSource{})
+ if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Volumes = append(m.Volumes, k8s_io_kubernetes_pkg_api_v1.Volume{})
+ if err := m.Volumes[len(m.Volumes)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeMounts", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeMounts = append(m.VolumeMounts, k8s_io_kubernetes_pkg_api_v1.VolumeMount{})
+ if err := m.VolumeMounts[len(m.VolumeMounts)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(data []byte) (n int, err error) {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if data[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(data[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+var fileDescriptorGenerated = []byte{
+ // 550 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x8b, 0xd3, 0x40,
+ 0x14, 0xc7, 0x9b, 0x6d, 0x4b, 0xeb, 0xb4, 0x8b, 0x12, 0x3c, 0x84, 0x1e, 0xb2, 0x4b, 0xf1, 0xb0,
+ 0xea, 0x3a, 0xb1, 0xab, 0xa8, 0xa0, 0xa7, 0xc8, 0x0a, 0x82, 0xcb, 0x2e, 0x29, 0xf4, 0x20, 0x2b,
+ 0x38, 0x4d, 0x9f, 0x69, 0x6c, 0x93, 0x09, 0x33, 0x93, 0xa0, 0x37, 0x3f, 0x82, 0x5f, 0x4a, 0x28,
+ 0xe8, 0x61, 0x8f, 0x9e, 0x16, 0x5b, 0xbf, 0x88, 0xcc, 0x74, 0xd2, 0x44, 0xba, 0x65, 0xab, 0xb7,
+ 0x79, 0x8f, 0xf7, 0xff, 0xbd, 0xff, 0x3f, 0x2f, 0xe8, 0xc5, 0xe4, 0x19, 0xc7, 0x21, 0x75, 0x26,
+ 0xe9, 0x10, 0x58, 0x0c, 0x02, 0xb8, 0x93, 0x4c, 0x02, 0x87, 0x24, 0x21, 0x77, 0x38, 0x08, 0x11,
+ 0xc6, 0x01, 0x77, 0xb2, 0x1e, 0x99, 0x26, 0x63, 0xd2, 0x73, 0x02, 0x88, 0x81, 0x11, 0x01, 0x23,
+ 0x9c, 0x30, 0x2a, 0xa8, 0x79, 0xb8, 0x54, 0xe3, 0x42, 0x8d, 0x93, 0x49, 0x80, 0xa5, 0x1a, 0xe7,
+ 0x6a, 0x9c, 0xab, 0x3b, 0x0f, 0x82, 0x50, 0x8c, 0xd3, 0x21, 0xf6, 0x69, 0xe4, 0x04, 0x34, 0xa0,
+ 0x8e, 0x82, 0x0c, 0xd3, 0x0f, 0xaa, 0x52, 0x85, 0x7a, 0x2d, 0xe1, 0x9d, 0xc7, 0xda, 0x1a, 0x49,
+ 0xc2, 0x88, 0xf8, 0xe3, 0x30, 0x06, 0xf6, 0xb9, 0x30, 0x17, 0x81, 0x20, 0x4e, 0xb6, 0x66, 0xa9,
+ 0xe3, 0x6c, 0x52, 0xb1, 0x34, 0x16, 0x61, 0x04, 0x6b, 0x82, 0x27, 0xd7, 0x09, 0xb8, 0x3f, 0x86,
+ 0x88, 0xac, 0xe9, 0x4a, 0xf6, 0x38, 0xb0, 0x0c, 0x58, 0xe1, 0x0d, 0x3e, 0x91, 0x28, 0x99, 0xc2,
+ 0x55, 0xf6, 0x0e, 0x37, 0x7e, 0xef, 0x2b, 0xa6, 0xbb, 0x3f, 0x0c, 0x74, 0xe3, 0x8c, 0x8e, 0xce,
+ 0x18, 0x70, 0x10, 0xe6, 0x7b, 0xd4, 0x94, 0xa9, 0x47, 0x44, 0x10, 0xcb, 0xd8, 0x37, 0x0e, 0x5a,
+ 0x47, 0x0f, 0xb1, 0x3e, 0x40, 0xd9, 0x7c, 0x71, 0x02, 0x39, 0x8d, 0xb3, 0x1e, 0x3e, 0x1d, 0x7e,
+ 0x04, 0x5f, 0x9c, 0x80, 0x20, 0xae, 0x39, 0xbb, 0xdc, 0xab, 0x2c, 0x2e, 0xf7, 0x50, 0xd1, 0xf3,
+ 0x56, 0x54, 0xf3, 0x1d, 0xaa, 0xf1, 0x04, 0x7c, 0x6b, 0x47, 0xd1, 0x9f, 0xe3, 0x7f, 0x39, 0x2f,
+ 0x5e, 0x19, 0xed, 0x27, 0xe0, 0xbb, 0x6d, 0xbd, 0xa8, 0x26, 0x2b, 0x4f, 0x61, 0xbb, 0xdf, 0x0d,
+ 0xb4, 0xbb, 0x9a, 0x7a, 0x13, 0x72, 0x61, 0x9e, 0xaf, 0x45, 0xc2, 0xdb, 0x45, 0x92, 0x6a, 0x15,
+ 0xe8, 0x96, 0xde, 0xd3, 0xcc, 0x3b, 0xa5, 0x38, 0xe7, 0xa8, 0x1e, 0x0a, 0x88, 0xb8, 0xb5, 0xb3,
+ 0x5f, 0x3d, 0x68, 0x1d, 0x3d, 0xfd, 0xcf, 0x3c, 0xee, 0xae, 0xde, 0x51, 0x7f, 0x2d, 0x69, 0xde,
+ 0x12, 0xda, 0xfd, 0x56, 0x2d, 0xa5, 0x91, 0x29, 0x4d, 0x82, 0x9a, 0x1c, 0xa6, 0xe0, 0x0b, 0xca,
+ 0x74, 0x9a, 0x47, 0x5b, 0xa6, 0x21, 0x43, 0x98, 0xf6, 0xb5, 0xb4, 0x88, 0x94, 0x77, 0xbc, 0x15,
+ 0xd6, 0x7c, 0x89, 0xaa, 0x10, 0x67, 0x3a, 0xd0, 0x9d, 0xcd, 0x81, 0x24, 0xf5, 0x38, 0xce, 0x06,
+ 0x84, 0xb9, 0x2d, 0x8d, 0xab, 0x1e, 0xc7, 0x99, 0x27, 0xd5, 0xe6, 0x00, 0x35, 0x20, 0xce, 0x5e,
+ 0x31, 0x1a, 0x59, 0x55, 0x05, 0xba, 0x7f, 0x2d, 0x48, 0x0e, 0xf7, 0x69, 0xca, 0x7c, 0x70, 0x6f,
+ 0x6a, 0x5e, 0x43, 0xb7, 0xbd, 0x1c, 0x66, 0x9e, 0xa2, 0x46, 0x46, 0xa7, 0x69, 0x04, 0xdc, 0xaa,
+ 0x6d, 0x63, 0x70, 0xa0, 0x86, 0x0b, 0xe0, 0xb2, 0xe6, 0x5e, 0x4e, 0x31, 0x7d, 0xd4, 0x5e, 0x3e,
+ 0x4f, 0x68, 0x1a, 0x0b, 0x6e, 0xd5, 0x15, 0xf5, 0xee, 0x36, 0x54, 0xa5, 0x70, 0x6f, 0x6b, 0x74,
+ 0xbb, 0xd4, 0xe4, 0xde, 0x5f, 0x50, 0xf7, 0xde, 0x6c, 0x6e, 0x57, 0x2e, 0xe6, 0x76, 0xe5, 0xe7,
+ 0xdc, 0xae, 0x7c, 0x59, 0xd8, 0xc6, 0x6c, 0x61, 0x1b, 0x17, 0x0b, 0xdb, 0xf8, 0xb5, 0xb0, 0x8d,
+ 0xaf, 0xbf, 0xed, 0xca, 0xdb, 0x66, 0xfe, 0x4f, 0xfc, 0x09, 0x00, 0x00, 0xff, 0xff, 0x91, 0x84,
+ 0x03, 0x10, 0x2f, 0x05, 0x00, 0x00,
+}
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.proto b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.proto
new file mode 100644
index 00000000000..b5a80fa637f
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.proto
@@ -0,0 +1,76 @@
+/*
+Copyright 2017 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 file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.settings.v1alpha1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// PodPreset is a policy resource that defines additional runtime
+// requirements for a Pod.
+message PodPreset {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // +optional
+ optional PodPresetSpec spec = 2;
+}
+
+// PodPresetList is a list of PodPreset objects.
+message PodPresetList {
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of schema objects.
+ repeated PodPreset items = 2;
+}
+
+// PodPresetSpec is a description of a pod injection policy.
+message PodPresetSpec {
+ // Selector is a label query over a set of resources, in this case pods.
+ // Required.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
+
+ // Env defines the collection of EnvVar to inject into containers.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.EnvVar env = 2;
+
+ // EnvFrom defines the collection of EnvFromSource to inject into containers.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.EnvFromSource envFrom = 3;
+
+ // Volumes defines the collection of Volume to inject into the pod.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.Volume volumes = 4;
+
+ // VolumeMounts defines the collection of VolumeMount to inject into containers.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.VolumeMount volumeMounts = 5;
+}
+
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/register.go b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/register.go
new file mode 100644
index 00000000000..45afb50ca9a
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/register.go
@@ -0,0 +1,49 @@
+/*
+Copyright 2017 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 (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "settings.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodPreset{},
+ &PodPresetList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/types.go b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/types.go
new file mode 100644
index 00000000000..5b0c5d19f82
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/types.go
@@ -0,0 +1,67 @@
+/*
+Copyright 2017 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 (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+// +genclient=true
+
+// PodPreset is a policy resource that defines additional runtime
+// requirements for a Pod.
+type PodPreset struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // +optional
+ Spec PodPresetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// PodPresetSpec is a description of a pod injection policy.
+type PodPresetSpec struct {
+ // Selector is a label query over a set of resources, in this case pods.
+ // Required.
+ Selector metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
+
+ // Env defines the collection of EnvVar to inject into containers.
+ // +optional
+ Env []v1.EnvVar `json:"env,omitempty" protobuf:"bytes,2,rep,name=env"`
+ // EnvFrom defines the collection of EnvFromSource to inject into containers.
+ // +optional
+ EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,3,rep,name=envFrom"`
+ // Volumes defines the collection of Volume to inject into the pod.
+ // +optional
+ Volumes []v1.Volume `json:"volumes,omitempty" protobuf:"bytes,4,rep,name=volumes"`
+ // VolumeMounts defines the collection of VolumeMount to inject into containers.
+ // +optional
+ VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty" protobuf:"bytes,5,rep,name=volumeMounts"`
+}
+
+// PodPresetList is a list of PodPreset objects.
+type PodPresetList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of schema objects.
+ Items []PodPreset `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 00000000000..5b4dc665de8
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,61 @@
+/*
+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
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_PodPreset = map[string]string{
+ "": "PodPreset is a policy resource that defines additional runtime requirements for a Pod.",
+}
+
+func (PodPreset) SwaggerDoc() map[string]string {
+ return map_PodPreset
+}
+
+var map_PodPresetList = map[string]string{
+ "": "PodPresetList is a list of PodPreset objects.",
+ "metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
+ "items": "Items is a list of schema objects.",
+}
+
+func (PodPresetList) SwaggerDoc() map[string]string {
+ return map_PodPresetList
+}
+
+var map_PodPresetSpec = map[string]string{
+ "": "PodPresetSpec is a description of a pod injection policy.",
+ "selector": "Selector is a label query over a set of resources, in this case pods. Required.",
+ "env": "Env defines the collection of EnvVar to inject into containers.",
+ "envFrom": "EnvFrom defines the collection of EnvFromSource to inject into containers.",
+ "volumes": "Volumes defines the collection of Volume to inject into the pod.",
+ "volumeMounts": "VolumeMounts defines the collection of VolumeMount to inject into containers.",
+}
+
+func (PodPresetSpec) SwaggerDoc() map[string]string {
+ return map_PodPresetSpec
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.conversion.go b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.conversion.go
new file mode 100644
index 00000000000..c140797bad5
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.conversion.go
@@ -0,0 +1,159 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 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 file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/client-go/pkg/api"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ settings "k8s.io/client-go/pkg/apis/settings"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_PodPreset_To_settings_PodPreset,
+ Convert_settings_PodPreset_To_v1alpha1_PodPreset,
+ Convert_v1alpha1_PodPresetList_To_settings_PodPresetList,
+ Convert_settings_PodPresetList_To_v1alpha1_PodPresetList,
+ Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec,
+ Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec,
+ )
+}
+
+func autoConvert_v1alpha1_PodPreset_To_settings_PodPreset(in *PodPreset, out *settings.PodPreset, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1alpha1_PodPreset_To_settings_PodPreset(in *PodPreset, out *settings.PodPreset, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodPreset_To_settings_PodPreset(in, out, s)
+}
+
+func autoConvert_settings_PodPreset_To_v1alpha1_PodPreset(in *settings.PodPreset, out *PodPreset, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_settings_PodPreset_To_v1alpha1_PodPreset(in *settings.PodPreset, out *PodPreset, s conversion.Scope) error {
+ return autoConvert_settings_PodPreset_To_v1alpha1_PodPreset(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodPresetList_To_settings_PodPresetList(in *PodPresetList, out *settings.PodPresetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]settings.PodPreset, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_PodPreset_To_settings_PodPreset(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_v1alpha1_PodPresetList_To_settings_PodPresetList(in *PodPresetList, out *settings.PodPresetList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodPresetList_To_settings_PodPresetList(in, out, s)
+}
+
+func autoConvert_settings_PodPresetList_To_v1alpha1_PodPresetList(in *settings.PodPresetList, out *PodPresetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodPreset, len(*in))
+ for i := range *in {
+ if err := Convert_settings_PodPreset_To_v1alpha1_PodPreset(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_settings_PodPresetList_To_v1alpha1_PodPresetList(in *settings.PodPresetList, out *PodPresetList, s conversion.Scope) error {
+ return autoConvert_settings_PodPresetList_To_v1alpha1_PodPresetList(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in *PodPresetSpec, out *settings.PodPresetSpec, s conversion.Scope) error {
+ out.Selector = in.Selector
+ out.Env = *(*[]api.EnvVar)(unsafe.Pointer(&in.Env))
+ out.EnvFrom = *(*[]api.EnvFromSource)(unsafe.Pointer(&in.EnvFrom))
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api.Volume, len(*in))
+ for i := range *in {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.VolumeMounts = *(*[]api.VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
+ return nil
+}
+
+func Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in *PodPresetSpec, out *settings.PodPresetSpec, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in, out, s)
+}
+
+func autoConvert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in *settings.PodPresetSpec, out *PodPresetSpec, s conversion.Scope) error {
+ out.Selector = in.Selector
+ out.Env = *(*[]v1.EnvVar)(unsafe.Pointer(&in.Env))
+ out.EnvFrom = *(*[]v1.EnvFromSource)(unsafe.Pointer(&in.EnvFrom))
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]v1.Volume, len(*in))
+ for i := range *in {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.VolumeMounts = *(*[]v1.VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
+ return nil
+}
+
+func Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in *settings.PodPresetSpec, out *PodPresetSpec, s conversion.Scope) error {
+ return autoConvert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in, out, s)
+}
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 00000000000..017d8ccb06f
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,124 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 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 file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPreset, InType: reflect.TypeOf(&PodPreset{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPresetList, InType: reflect.TypeOf(&PodPresetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPresetSpec, InType: reflect.TypeOf(&PodPresetSpec{})},
+ )
+}
+
+func DeepCopy_v1alpha1_PodPreset(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPreset)
+ out := out.(*PodPreset)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1alpha1_PodPresetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+func DeepCopy_v1alpha1_PodPresetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetList)
+ out := out.(*PodPresetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodPreset, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_PodPreset(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+func DeepCopy_v1alpha1_PodPresetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetSpec)
+ out := out.(*PodPresetSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.Selector); err != nil {
+ return err
+ } else {
+ out.Selector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]api_v1.EnvVar, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]api_v1.EnvFromSource, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api_v1.Volume, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_Volume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]api_v1.VolumeMount, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.defaults.go b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.defaults.go
new file mode 100644
index 00000000000..15626f1aaca
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.defaults.go
@@ -0,0 +1,95 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 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 file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ v1 "k8s.io/client-go/pkg/api/v1"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&PodPreset{}, func(obj interface{}) { SetObjectDefaults_PodPreset(obj.(*PodPreset)) })
+ scheme.AddTypeDefaultingFunc(&PodPresetList{}, func(obj interface{}) { SetObjectDefaults_PodPresetList(obj.(*PodPresetList)) })
+ return nil
+}
+
+func SetObjectDefaults_PodPreset(in *PodPreset) {
+ for i := range in.Spec.Env {
+ a := &in.Spec.Env[i]
+ if a.ValueFrom != nil {
+ if a.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(a.ValueFrom.FieldRef)
+ }
+ }
+ }
+ for i := range in.Spec.Volumes {
+ a := &in.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_PodPresetList(in *PodPresetList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_PodPreset(a)
+ }
+}
diff --git a/staging/src/k8s.io/client-go/pkg/apis/settings/zz_generated.deepcopy.go b/staging/src/k8s.io/client-go/pkg/apis/settings/zz_generated.deepcopy.go
new file mode 100644
index 00000000000..eb109b553c0
--- /dev/null
+++ b/staging/src/k8s.io/client-go/pkg/apis/settings/zz_generated.deepcopy.go
@@ -0,0 +1,124 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 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 file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package settings
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/client-go/pkg/api"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPreset, InType: reflect.TypeOf(&PodPreset{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPresetList, InType: reflect.TypeOf(&PodPresetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPresetSpec, InType: reflect.TypeOf(&PodPresetSpec{})},
+ )
+}
+
+func DeepCopy_settings_PodPreset(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPreset)
+ out := out.(*PodPreset)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_settings_PodPresetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+func DeepCopy_settings_PodPresetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetList)
+ out := out.(*PodPresetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodPreset, len(*in))
+ for i := range *in {
+ if err := DeepCopy_settings_PodPreset(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+func DeepCopy_settings_PodPresetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetSpec)
+ out := out.(*PodPresetSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.Selector); err != nil {
+ return err
+ } else {
+ out.Selector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]api.EnvVar, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]api.EnvFromSource, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api.Volume, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_Volume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]api.VolumeMount, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/test/e2e/BUILD b/test/e2e/BUILD
index 731820f1d5b..fa5dae29480 100644
--- a/test/e2e/BUILD
+++ b/test/e2e/BUILD
@@ -72,6 +72,7 @@ go_library(
"persistent_volumes-disruptive.go",
"persistent_volumes-vsphere.go",
"pod_gc.go",
+ "podpreset.go",
"pods.go",
"portforward.go",
"pre_stop.go",
@@ -117,6 +118,7 @@ go_library(
"//pkg/apis/extensions:go_default_library",
"//pkg/apis/extensions/v1beta1:go_default_library",
"//pkg/apis/rbac/v1beta1:go_default_library",
+ "//pkg/apis/settings/v1alpha1:go_default_library",
"//pkg/apis/storage/util:go_default_library",
"//pkg/apis/storage/v1beta1:go_default_library",
"//pkg/apis/storage/v1beta1/util:go_default_library",
diff --git a/test/e2e/podpreset.go b/test/e2e/podpreset.go
new file mode 100644
index 00000000000..5cd75703460
--- /dev/null
+++ b/test/e2e/podpreset.go
@@ -0,0 +1,274 @@
+/*
+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 e2e
+
+import (
+ "reflect"
+ "strconv"
+ "time"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/watch"
+ "k8s.io/kubernetes/pkg/api/v1"
+ settings "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
+ "k8s.io/kubernetes/test/e2e/framework"
+
+ . "github.com/onsi/ginkgo"
+ . "github.com/onsi/gomega"
+)
+
+var _ = framework.KubeDescribe("PodPreset", func() {
+ f := framework.NewDefaultFramework("podpreset")
+
+ var podClient *framework.PodClient
+ BeforeEach(func() {
+ // only run on gce for the time being til we find an easier way to update
+ // the admission controllers used on the others
+ framework.SkipUnlessProviderIs("gce")
+ podClient = f.PodClient()
+ })
+
+ // Simplest case: all pods succeed promptly
+ It("should create a pod preset", func() {
+ By("Creating a pod preset")
+
+ pip := &settings.PodPreset{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "hello",
+ Namespace: f.Namespace.Name,
+ },
+ Spec: settings.PodPresetSpec{
+ Selector: metav1.LabelSelector{
+ MatchExpressions: []metav1.LabelSelectorRequirement{
+ {
+ Key: "security",
+ Operator: metav1.LabelSelectorOpIn,
+ Values: []string{"S2"},
+ },
+ },
+ },
+ Volumes: []v1.Volume{{Name: "vol", VolumeSource: v1.VolumeSource{EmptyDir: &v1.EmptyDirVolumeSource{}}}},
+ VolumeMounts: []v1.VolumeMount{
+ {Name: "vol", MountPath: "/foo"},
+ },
+ Env: []v1.EnvVar{{Name: "abc", Value: "value"}, {Name: "ABC", Value: "value"}},
+ },
+ }
+
+ _, err := createPodPreset(f.ClientSet, f.Namespace.Name, pip)
+ Expect(err).NotTo(HaveOccurred())
+
+ By("creating the pod")
+ name := "pod-preset-pod"
+ value := strconv.Itoa(time.Now().Nanosecond())
+ pod := &v1.Pod{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: name,
+ Namespace: f.Namespace.Name,
+ Labels: map[string]string{
+ "name": "foo",
+ "time": value,
+ "security": "S2",
+ },
+ },
+ Spec: v1.PodSpec{
+ Containers: []v1.Container{
+ {
+ Name: "nginx",
+ Image: "gcr.io/google_containers/nginx-slim:0.7",
+ },
+ },
+ },
+ }
+
+ By("setting up watch")
+ selector := labels.SelectorFromSet(labels.Set(map[string]string{"time": value}))
+ options := metav1.ListOptions{LabelSelector: selector.String()}
+ pods, err := podClient.List(options)
+ Expect(err).NotTo(HaveOccurred(), "failed to query for pod")
+ Expect(len(pods.Items)).To(Equal(0))
+ options = metav1.ListOptions{
+ LabelSelector: selector.String(),
+ ResourceVersion: pods.ListMeta.ResourceVersion,
+ }
+ w, err := podClient.Watch(options)
+ Expect(err).NotTo(HaveOccurred(), "failed to set up watch")
+
+ By("submitting the pod to kubernetes")
+ podClient.Create(pod)
+
+ By("verifying the pod is in kubernetes")
+ selector = labels.SelectorFromSet(labels.Set(map[string]string{"time": value}))
+ options = metav1.ListOptions{LabelSelector: selector.String()}
+ pods, err = podClient.List(options)
+ Expect(err).NotTo(HaveOccurred(), "failed to query for pod")
+ Expect(len(pods.Items)).To(Equal(1))
+
+ By("verifying pod creation was observed")
+ select {
+ case event, _ := <-w.ResultChan():
+ if event.Type != watch.Added {
+ framework.Failf("Failed to observe pod creation: %v", event)
+ }
+ case <-time.After(framework.PodStartTimeout):
+ Fail("Timeout while waiting for pod creation")
+ }
+
+ // We need to wait for the pod to be running, otherwise the deletion
+ // may be carried out immediately rather than gracefully.
+ framework.ExpectNoError(f.WaitForPodRunning(pod.Name))
+
+ By("ensuring pod is modified")
+ // save the running pod
+ pod, err = podClient.Get(pod.Name, metav1.GetOptions{})
+ Expect(err).NotTo(HaveOccurred(), "failed to GET scheduled pod")
+
+ // check the annotation is there
+ if _, ok := pod.Annotations["podpreset.admission.kubernetes.io/hello"]; !ok {
+ framework.Failf("Annotation not found in pod annotations: \n%v\n", pod.Annotations)
+ }
+
+ // verify the env is the same
+ if !reflect.DeepEqual(pip.Spec.Env, pod.Spec.Containers[0].Env) {
+ framework.Failf("env of pod container does not match the env of the pip: expected %#v, got: %#v", pip.Spec.Env, pod.Spec.Containers[0].Env)
+ }
+ })
+
+ It("should not modify the pod on conflict", func() {
+ By("Creating a pod preset")
+
+ pip := &settings.PodPreset{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "hello",
+ Namespace: f.Namespace.Name,
+ },
+ Spec: settings.PodPresetSpec{
+ Selector: metav1.LabelSelector{
+ MatchExpressions: []metav1.LabelSelectorRequirement{
+ {
+ Key: "security",
+ Operator: metav1.LabelSelectorOpIn,
+ Values: []string{"S2"},
+ },
+ },
+ },
+ Volumes: []v1.Volume{{Name: "vol", VolumeSource: v1.VolumeSource{EmptyDir: &v1.EmptyDirVolumeSource{}}}},
+ VolumeMounts: []v1.VolumeMount{
+ {Name: "vol", MountPath: "/foo"},
+ },
+ Env: []v1.EnvVar{{Name: "abc", Value: "value"}, {Name: "ABC", Value: "value"}},
+ },
+ }
+
+ _, err := createPodPreset(f.ClientSet, f.Namespace.Name, pip)
+ Expect(err).NotTo(HaveOccurred())
+
+ By("creating the pod")
+ name := "pod-preset-pod"
+ value := strconv.Itoa(time.Now().Nanosecond())
+ originalPod := &v1.Pod{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: name,
+ Namespace: f.Namespace.Name,
+ Labels: map[string]string{
+ "name": "foo",
+ "time": value,
+ "security": "S2",
+ },
+ },
+ Spec: v1.PodSpec{
+ Containers: []v1.Container{
+ {
+ Name: "nginx",
+ Image: "gcr.io/google_containers/nginx-slim:0.7",
+ Env: []v1.EnvVar{{Name: "abc", Value: "value2"}, {Name: "ABC", Value: "value"}},
+ },
+ },
+ },
+ }
+
+ By("setting up watch")
+ selector := labels.SelectorFromSet(labels.Set(map[string]string{"time": value}))
+ options := metav1.ListOptions{LabelSelector: selector.String()}
+ pods, err := podClient.List(options)
+ Expect(err).NotTo(HaveOccurred(), "failed to query for pod")
+ Expect(len(pods.Items)).To(Equal(0))
+ options = metav1.ListOptions{
+ LabelSelector: selector.String(),
+ ResourceVersion: pods.ListMeta.ResourceVersion,
+ }
+ w, err := podClient.Watch(options)
+ Expect(err).NotTo(HaveOccurred(), "failed to set up watch")
+
+ By("submitting the pod to kubernetes")
+ podClient.Create(originalPod)
+
+ By("verifying the pod is in kubernetes")
+ selector = labels.SelectorFromSet(labels.Set(map[string]string{"time": value}))
+ options = metav1.ListOptions{LabelSelector: selector.String()}
+ pods, err = podClient.List(options)
+ Expect(err).NotTo(HaveOccurred(), "failed to query for pod")
+ Expect(len(pods.Items)).To(Equal(1))
+
+ By("verifying pod creation was observed")
+ select {
+ case event, _ := <-w.ResultChan():
+ if event.Type != watch.Added {
+ framework.Failf("Failed to observe pod creation: %v", event)
+ }
+ case <-time.After(framework.PodStartTimeout):
+ Fail("Timeout while waiting for pod creation")
+ }
+
+ // We need to wait for the pod to be running, otherwise the deletion
+ // may be carried out immediately rather than gracefully.
+ framework.ExpectNoError(f.WaitForPodRunning(originalPod.Name))
+
+ By("ensuring pod is modified")
+ // save the running pod
+ pod, err := podClient.Get(originalPod.Name, metav1.GetOptions{})
+ Expect(err).NotTo(HaveOccurred(), "failed to GET scheduled pod")
+
+ // check the annotation is not there
+ if _, ok := pod.Annotations["podpreset.admission.kubernetes.io/hello"]; ok {
+ framework.Failf("Annotation found in pod annotations and should not be: \n%v\n", pod.Annotations)
+ }
+
+ // verify the env is the same
+ if !reflect.DeepEqual(originalPod.Spec.Containers[0].Env, pod.Spec.Containers[0].Env) {
+ framework.Failf("env of pod container does not match the env of the original pod: expected %#v, got: %#v", originalPod.Spec.Containers[0].Env, pod.Spec.Containers[0].Env)
+ }
+ })
+})
+
+func getPodPreset(c clientset.Interface, ns, name string) (*settings.PodPreset, error) {
+ return c.Settings().PodPresets(ns).Get(name, metav1.GetOptions{})
+}
+
+func createPodPreset(c clientset.Interface, ns string, job *settings.PodPreset) (*settings.PodPreset, error) {
+ return c.Settings().PodPresets(ns).Create(job)
+}
+
+func updatePodPreset(c clientset.Interface, ns string, job *settings.PodPreset) (*settings.PodPreset, error) {
+ return c.Settings().PodPresets(ns).Update(job)
+}
+
+func deletePodPreset(c clientset.Interface, ns, name string) error {
+ return c.Settings().PodPresets(ns).Delete(name, nil)
+}
diff --git a/vendor/BUILD b/vendor/BUILD
index 08c9c40d9b8..15e81bc32fc 100644
--- a/vendor/BUILD
+++ b/vendor/BUILD
@@ -4873,6 +4873,70 @@ go_library(
tags = ["automanaged"],
)
+go_library(
+ name = "github.com/libopenstorage/openstorage/api",
+ srcs = [
+ "github.com/libopenstorage/openstorage/api/api.go",
+ "github.com/libopenstorage/openstorage/api/api.pb.go",
+ "github.com/libopenstorage/openstorage/api/status.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:github.com/golang/protobuf/proto",
+ "//vendor:go.pedge.io/pb/go/google/protobuf",
+ ],
+)
+
+go_library(
+ name = "github.com/libopenstorage/openstorage/api/client",
+ srcs = [
+ "github.com/libopenstorage/openstorage/api/client/client.go",
+ "github.com/libopenstorage/openstorage/api/client/request.go",
+ ],
+ tags = ["automanaged"],
+)
+
+go_library(
+ name = "github.com/libopenstorage/openstorage/api/client/volume",
+ srcs = [
+ "github.com/libopenstorage/openstorage/api/client/volume/client.go",
+ "github.com/libopenstorage/openstorage/api/client/volume/volume.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:github.com/libopenstorage/openstorage/api",
+ "//vendor:github.com/libopenstorage/openstorage/api/client",
+ "//vendor:github.com/libopenstorage/openstorage/volume",
+ ],
+)
+
+go_library(
+ name = "github.com/libopenstorage/openstorage/api/spec",
+ srcs = ["github.com/libopenstorage/openstorage/api/spec/spec_handler.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:github.com/libopenstorage/openstorage/api",
+ "//vendor:github.com/libopenstorage/openstorage/pkg/units",
+ ],
+)
+
+go_library(
+ name = "github.com/libopenstorage/openstorage/pkg/units",
+ srcs = ["github.com/libopenstorage/openstorage/pkg/units/units.go"],
+ tags = ["automanaged"],
+)
+
+go_library(
+ name = "github.com/libopenstorage/openstorage/volume",
+ srcs = [
+ "github.com/libopenstorage/openstorage/volume/volume.go",
+ "github.com/libopenstorage/openstorage/volume/volume_driver_registry.go",
+ "github.com/libopenstorage/openstorage/volume/volume_not_supported.go",
+ ],
+ tags = ["automanaged"],
+ deps = ["//vendor:github.com/libopenstorage/openstorage/api"],
+)
+
go_library(
name = "github.com/lpabon/godbc",
srcs = ["github.com/lpabon/godbc/godbc.go"],
@@ -5398,6 +5462,24 @@ go_library(
],
)
+go_library(
+ name = "github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable",
+ srcs = [
+ "github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_others.go",
+ "github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/noncolorable.go",
+ ],
+ tags = ["automanaged"],
+)
+
+go_library(
+ name = "github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty",
+ srcs = [
+ "github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/doc.go",
+ "github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_linux.go",
+ ],
+ tags = ["automanaged"],
+)
+
go_library(
name = "github.com/onsi/ginkgo/types",
srcs = [
@@ -7141,6 +7223,25 @@ go_library(
deps = ["//vendor:github.com/garyburd/redigo/redis"],
)
+go_library(
+ name = "go.pedge.io/pb/go/google/protobuf",
+ srcs = [
+ "go.pedge.io/pb/go/google/protobuf/any.pb.go",
+ "go.pedge.io/pb/go/google/protobuf/api.pb.go",
+ "go.pedge.io/pb/go/google/protobuf/duration.pb.go",
+ "go.pedge.io/pb/go/google/protobuf/empty.pb.go",
+ "go.pedge.io/pb/go/google/protobuf/field_mask.pb.go",
+ "go.pedge.io/pb/go/google/protobuf/protobuf.gen.go",
+ "go.pedge.io/pb/go/google/protobuf/source_context.pb.go",
+ "go.pedge.io/pb/go/google/protobuf/struct.pb.go",
+ "go.pedge.io/pb/go/google/protobuf/timestamp.pb.go",
+ "go.pedge.io/pb/go/google/protobuf/type.pb.go",
+ "go.pedge.io/pb/go/google/protobuf/wrappers.pb.go",
+ ],
+ tags = ["automanaged"],
+ deps = ["//vendor:github.com/golang/protobuf/proto"],
+)
+
go_library(
name = "go4.org/errorutil",
srcs = ["go4.org/errorutil/highlight.go"],
@@ -8438,6 +8539,13 @@ go_library(
],
)
+go_test(
+ name = "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured_test",
+ srcs = ["k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go"],
+ library = ":k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
+ tags = ["automanaged"],
+)
+
go_library(
name = "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
srcs = ["k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go"],
@@ -12534,6 +12642,17 @@ go_binary(
tags = ["automanaged"],
)
+go_test(
+ name = "k8s.io/client-go/examples/third-party-resources_test",
+ srcs = ["k8s.io/client-go/examples/third-party-resources/types_test.go"],
+ library = ":k8s.io/client-go/examples/third-party-resources",
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ ],
+)
+
go_library(
name = "k8s.io/client-go/examples/third-party-resources",
srcs = [
@@ -12575,6 +12694,7 @@ go_library(
"//vendor:k8s.io/client-go/informers/internalinterfaces",
"//vendor:k8s.io/client-go/informers/policy",
"//vendor:k8s.io/client-go/informers/rbac",
+ "//vendor:k8s.io/client-go/informers/settings",
"//vendor:k8s.io/client-go/informers/storage",
"//vendor:k8s.io/client-go/kubernetes",
"//vendor:k8s.io/client-go/pkg/api/v1",
@@ -12588,6 +12708,7 @@ go_library(
"//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1",
"//vendor:k8s.io/client-go/pkg/apis/rbac/v1alpha1",
"//vendor:k8s.io/client-go/pkg/apis/rbac/v1beta1",
+ "//vendor:k8s.io/client-go/pkg/apis/settings/v1alpha1",
"//vendor:k8s.io/client-go/pkg/apis/storage/v1beta1",
"//vendor:k8s.io/client-go/tools/cache",
],
@@ -12924,6 +13045,35 @@ go_library(
],
)
+go_library(
+ name = "k8s.io/client-go/informers/settings",
+ srcs = ["k8s.io/client-go/informers/settings/interface.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/client-go/informers/internalinterfaces",
+ "//vendor:k8s.io/client-go/informers/settings/v1alpha1",
+ ],
+)
+
+go_library(
+ name = "k8s.io/client-go/informers/settings/v1alpha1",
+ srcs = [
+ "k8s.io/client-go/informers/settings/v1alpha1/interface.go",
+ "k8s.io/client-go/informers/settings/v1alpha1/podpreset.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/watch",
+ "//vendor:k8s.io/client-go/informers/internalinterfaces",
+ "//vendor:k8s.io/client-go/kubernetes",
+ "//vendor:k8s.io/client-go/listers/settings/v1alpha1",
+ "//vendor:k8s.io/client-go/pkg/apis/settings/v1alpha1",
+ "//vendor:k8s.io/client-go/tools/cache",
+ ],
+)
+
go_library(
name = "k8s.io/client-go/informers/storage",
srcs = ["k8s.io/client-go/informers/storage/interface.go"],
@@ -12979,6 +13129,7 @@ go_library(
"//vendor:k8s.io/client-go/kubernetes/typed/policy/v1beta1",
"//vendor:k8s.io/client-go/kubernetes/typed/rbac/v1alpha1",
"//vendor:k8s.io/client-go/kubernetes/typed/rbac/v1beta1",
+ "//vendor:k8s.io/client-go/kubernetes/typed/settings/v1alpha1",
"//vendor:k8s.io/client-go/kubernetes/typed/storage/v1beta1",
"//vendor:k8s.io/client-go/pkg/api",
"//vendor:k8s.io/client-go/pkg/api/install",
@@ -12991,6 +13142,7 @@ go_library(
"//vendor:k8s.io/client-go/pkg/apis/extensions/install",
"//vendor:k8s.io/client-go/pkg/apis/policy/install",
"//vendor:k8s.io/client-go/pkg/apis/rbac/install",
+ "//vendor:k8s.io/client-go/pkg/apis/settings/install",
"//vendor:k8s.io/client-go/pkg/apis/storage/install",
"//vendor:k8s.io/client-go/rest",
"//vendor:k8s.io/client-go/util/flowcontrol",
@@ -13046,6 +13198,8 @@ go_library(
"//vendor:k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake",
"//vendor:k8s.io/client-go/kubernetes/typed/rbac/v1beta1",
"//vendor:k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake",
+ "//vendor:k8s.io/client-go/kubernetes/typed/settings/v1alpha1",
+ "//vendor:k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake",
"//vendor:k8s.io/client-go/kubernetes/typed/storage/v1beta1",
"//vendor:k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake",
"//vendor:k8s.io/client-go/pkg/api/install",
@@ -13058,11 +13212,44 @@ go_library(
"//vendor:k8s.io/client-go/pkg/apis/extensions/install",
"//vendor:k8s.io/client-go/pkg/apis/policy/install",
"//vendor:k8s.io/client-go/pkg/apis/rbac/install",
+ "//vendor:k8s.io/client-go/pkg/apis/settings/install",
"//vendor:k8s.io/client-go/pkg/apis/storage/install",
"//vendor:k8s.io/client-go/testing",
],
)
+go_library(
+ name = "k8s.io/client-go/kubernetes/scheme",
+ srcs = [
+ "k8s.io/client-go/kubernetes/scheme/doc.go",
+ "k8s.io/client-go/kubernetes/scheme/register.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
+ "//vendor:k8s.io/client-go/pkg/api/v1",
+ "//vendor:k8s.io/client-go/pkg/apis/apps/v1beta1",
+ "//vendor:k8s.io/client-go/pkg/apis/authentication/v1",
+ "//vendor:k8s.io/client-go/pkg/apis/authentication/v1beta1",
+ "//vendor:k8s.io/client-go/pkg/apis/authorization/v1",
+ "//vendor:k8s.io/client-go/pkg/apis/authorization/v1beta1",
+ "//vendor:k8s.io/client-go/pkg/apis/autoscaling/v1",
+ "//vendor:k8s.io/client-go/pkg/apis/autoscaling/v2alpha1",
+ "//vendor:k8s.io/client-go/pkg/apis/batch/v1",
+ "//vendor:k8s.io/client-go/pkg/apis/batch/v2alpha1",
+ "//vendor:k8s.io/client-go/pkg/apis/certificates/v1beta1",
+ "//vendor:k8s.io/client-go/pkg/apis/extensions/v1beta1",
+ "//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1",
+ "//vendor:k8s.io/client-go/pkg/apis/rbac/v1alpha1",
+ "//vendor:k8s.io/client-go/pkg/apis/rbac/v1beta1",
+ "//vendor:k8s.io/client-go/pkg/apis/settings/v1alpha1",
+ "//vendor:k8s.io/client-go/pkg/apis/storage/v1beta1",
+ ],
+)
+
go_library(
name = "k8s.io/client-go/kubernetes/typed/apps/v1beta1",
srcs = [
@@ -13762,6 +13949,47 @@ go_library(
],
)
+go_library(
+ name = "k8s.io/client-go/kubernetes/typed/settings/v1alpha1",
+ srcs = [
+ "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go",
+ "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go",
+ "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go",
+ "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
+ "//vendor:k8s.io/apimachinery/pkg/types",
+ "//vendor:k8s.io/apimachinery/pkg/watch",
+ "//vendor:k8s.io/client-go/kubernetes/scheme",
+ "//vendor:k8s.io/client-go/pkg/apis/settings/v1alpha1",
+ "//vendor:k8s.io/client-go/rest",
+ ],
+)
+
+go_library(
+ name = "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake",
+ srcs = [
+ "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/doc.go",
+ "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go",
+ "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_settings_client.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/labels",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ "//vendor:k8s.io/apimachinery/pkg/types",
+ "//vendor:k8s.io/apimachinery/pkg/watch",
+ "//vendor:k8s.io/client-go/kubernetes/typed/settings/v1alpha1",
+ "//vendor:k8s.io/client-go/pkg/apis/settings/v1alpha1",
+ "//vendor:k8s.io/client-go/rest",
+ "//vendor:k8s.io/client-go/testing",
+ ],
+)
+
go_library(
name = "k8s.io/client-go/kubernetes/typed/storage/v1beta1",
srcs = [
@@ -14032,6 +14260,22 @@ go_library(
],
)
+go_library(
+ name = "k8s.io/client-go/listers/settings/v1alpha1",
+ srcs = [
+ "k8s.io/client-go/listers/settings/v1alpha1/expansion_generated.go",
+ "k8s.io/client-go/listers/settings/v1alpha1/podpreset.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/api/errors",
+ "//vendor:k8s.io/apimachinery/pkg/labels",
+ "//vendor:k8s.io/client-go/pkg/apis/settings",
+ "//vendor:k8s.io/client-go/pkg/apis/settings/v1alpha1",
+ "//vendor:k8s.io/client-go/tools/cache",
+ ],
+)
+
go_library(
name = "k8s.io/client-go/listers/storage/v1beta1",
srcs = [
@@ -14864,6 +15108,63 @@ go_library(
],
)
+go_library(
+ name = "k8s.io/client-go/pkg/apis/settings",
+ srcs = [
+ "k8s.io/client-go/pkg/apis/settings/doc.go",
+ "k8s.io/client-go/pkg/apis/settings/register.go",
+ "k8s.io/client-go/pkg/apis/settings/types.go",
+ "k8s.io/client-go/pkg/apis/settings/zz_generated.deepcopy.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/conversion",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ "//vendor:k8s.io/client-go/pkg/api",
+ ],
+)
+
+go_library(
+ name = "k8s.io/client-go/pkg/apis/settings/install",
+ srcs = ["k8s.io/client-go/pkg/apis/settings/install/install.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced",
+ "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/client-go/pkg/api",
+ "//vendor:k8s.io/client-go/pkg/apis/settings",
+ "//vendor:k8s.io/client-go/pkg/apis/settings/v1alpha1",
+ ],
+)
+
+go_library(
+ name = "k8s.io/client-go/pkg/apis/settings/v1alpha1",
+ srcs = [
+ "k8s.io/client-go/pkg/apis/settings/v1alpha1/doc.go",
+ "k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.pb.go",
+ "k8s.io/client-go/pkg/apis/settings/v1alpha1/register.go",
+ "k8s.io/client-go/pkg/apis/settings/v1alpha1/types.go",
+ "k8s.io/client-go/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go",
+ "k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.conversion.go",
+ "k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go",
+ "k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.defaults.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:github.com/gogo/protobuf/proto",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/conversion",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ "//vendor:k8s.io/client-go/pkg/api",
+ "//vendor:k8s.io/client-go/pkg/api/v1",
+ "//vendor:k8s.io/client-go/pkg/apis/settings",
+ ],
+)
+
go_library(
name = "k8s.io/client-go/pkg/apis/storage",
srcs = [
@@ -16031,6 +16332,22 @@ go_library(
],
)
+go_library(
+ name = "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme",
+ srcs = [
+ "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/doc.go",
+ "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/register.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
+ "//vendor:k8s.io/kube-aggregator/pkg/apis/apiregistration/v1alpha1",
+ ],
+)
+
go_library(
name = "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1",
srcs = [
@@ -16114,6 +16431,24 @@ go_library(
],
)
+go_library(
+ name = "k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/scheme",
+ srcs = [
+ "k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/scheme/doc.go",
+ "k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/scheme/register.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced",
+ "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
+ "//vendor:k8s.io/kube-aggregator/pkg/apis/apiregistration/install",
+ ],
+)
+
go_library(
name = "k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion",
srcs = [
@@ -16356,350 +16691,6 @@ go_library(
],
)
-go_binary(
- name = "k8s.io/sample-apiserver_bin",
- library = ":k8s.io/sample-apiserver",
- tags = ["automanaged"],
-)
-
-go_library(
- name = "k8s.io/sample-apiserver",
- srcs = ["k8s.io/sample-apiserver/main.go"],
- tags = ["automanaged"],
- deps = [
- "//vendor:k8s.io/apimachinery/pkg/util/wait",
- "//vendor:k8s.io/apiserver/pkg/util/logs",
- "//vendor:k8s.io/sample-apiserver/pkg/cmd/server",
- ],
-)
-
-go_library(
- name = "k8s.io/sample-apiserver/pkg/apis/wardle",
- srcs = [
- "k8s.io/sample-apiserver/pkg/apis/wardle/doc.go",
- "k8s.io/sample-apiserver/pkg/apis/wardle/register.go",
- "k8s.io/sample-apiserver/pkg/apis/wardle/types.go",
- "k8s.io/sample-apiserver/pkg/apis/wardle/zz_generated.deepcopy.go",
- ],
- tags = ["automanaged"],
- deps = [
- "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
- "//vendor:k8s.io/apimachinery/pkg/conversion",
- "//vendor:k8s.io/apimachinery/pkg/runtime",
- "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
- ],
-)
-
-go_test(
- name = "k8s.io/sample-apiserver/pkg/apis/wardle/install_test",
- srcs = ["k8s.io/sample-apiserver/pkg/apis/wardle/install/install_test.go"],
- library = ":k8s.io/sample-apiserver/pkg/apis/wardle/install",
- tags = ["automanaged"],
- deps = ["//vendor:k8s.io/apimachinery/pkg/api/testing"],
-)
-
-go_library(
- name = "k8s.io/sample-apiserver/pkg/apis/wardle/install",
- srcs = ["k8s.io/sample-apiserver/pkg/apis/wardle/install/install.go"],
- tags = ["automanaged"],
- deps = [
- "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced",
- "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered",
- "//vendor:k8s.io/apimachinery/pkg/runtime",
- "//vendor:k8s.io/apimachinery/pkg/util/sets",
- "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle",
- "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1",
- ],
-)
-
-go_library(
- name = "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1",
- srcs = [
- "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/doc.go",
- "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/register.go",
- "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/types.go",
- "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/zz_generated.conversion.go",
- "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/zz_generated.deepcopy.go",
- ],
- tags = ["automanaged"],
- deps = [
- "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
- "//vendor:k8s.io/apimachinery/pkg/conversion",
- "//vendor:k8s.io/apimachinery/pkg/runtime",
- "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
- "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle",
- ],
-)
-
-go_test(
- name = "k8s.io/sample-apiserver/pkg/apiserver_test",
- srcs = ["k8s.io/sample-apiserver/pkg/apiserver/scheme_test.go"],
- library = ":k8s.io/sample-apiserver/pkg/apiserver",
- tags = ["automanaged"],
- deps = ["//vendor:k8s.io/apimachinery/pkg/api/testing"],
-)
-
-go_library(
- name = "k8s.io/sample-apiserver/pkg/apiserver",
- srcs = ["k8s.io/sample-apiserver/pkg/apiserver/apiserver.go"],
- tags = ["automanaged"],
- deps = [
- "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced",
- "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered",
- "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
- "//vendor:k8s.io/apimachinery/pkg/runtime",
- "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
- "//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
- "//vendor:k8s.io/apimachinery/pkg/version",
- "//vendor:k8s.io/apiserver/pkg/registry/rest",
- "//vendor:k8s.io/apiserver/pkg/server",
- "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle",
- "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle/install",
- "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1",
- "//vendor:k8s.io/sample-apiserver/pkg/registry/wardle",
- ],
-)
-
-go_library(
- name = "k8s.io/sample-apiserver/pkg/cmd/server",
- srcs = ["k8s.io/sample-apiserver/pkg/cmd/server/start.go"],
- tags = ["automanaged"],
- deps = [
- "//vendor:github.com/spf13/cobra",
- "//vendor:k8s.io/apiserver/pkg/server",
- "//vendor:k8s.io/apiserver/pkg/server/options",
- "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1",
- "//vendor:k8s.io/sample-apiserver/pkg/apiserver",
- ],
-)
-
-go_library(
- name = "k8s.io/sample-apiserver/pkg/registry/wardle",
- srcs = [
- "k8s.io/sample-apiserver/pkg/registry/wardle/etcd.go",
- "k8s.io/sample-apiserver/pkg/registry/wardle/strategy.go",
- ],
- tags = ["automanaged"],
- deps = [
- "//vendor:k8s.io/apimachinery/pkg/fields",
- "//vendor:k8s.io/apimachinery/pkg/labels",
- "//vendor:k8s.io/apimachinery/pkg/runtime",
- "//vendor:k8s.io/apimachinery/pkg/util/validation/field",
- "//vendor:k8s.io/apiserver/pkg/endpoints/request",
- "//vendor:k8s.io/apiserver/pkg/registry/generic",
- "//vendor:k8s.io/apiserver/pkg/registry/generic/registry",
- "//vendor:k8s.io/apiserver/pkg/storage",
- "//vendor:k8s.io/apiserver/pkg/storage/names",
- "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle",
- ],
-)
-
-filegroup(
- name = "package-srcs",
- srcs = glob(["**"]),
- tags = ["automanaged"],
- visibility = ["//visibility:private"],
-)
-
-filegroup(
- name = "all-srcs",
- srcs = [":package-srcs"],
- tags = ["automanaged"],
-)
-
-go_test(
- name = "k8s.io/client-go/examples/third-party-resources_test",
- srcs = ["k8s.io/client-go/examples/third-party-resources/types_test.go"],
- library = ":k8s.io/client-go/examples/third-party-resources",
- tags = ["automanaged"],
- deps = [
- "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
- "//vendor:k8s.io/apimachinery/pkg/runtime",
- ],
-)
-
-go_library(
- name = "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme",
- srcs = [
- "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/doc.go",
- "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/register.go",
- ],
- tags = ["automanaged"],
- deps = [
- "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
- "//vendor:k8s.io/apimachinery/pkg/runtime",
- "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
- "//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
- "//vendor:k8s.io/kube-aggregator/pkg/apis/apiregistration/v1alpha1",
- ],
-)
-
-go_library(
- name = "k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/scheme",
- srcs = [
- "k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/scheme/doc.go",
- "k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/scheme/register.go",
- ],
- tags = ["automanaged"],
- deps = [
- "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced",
- "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered",
- "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
- "//vendor:k8s.io/apimachinery/pkg/runtime",
- "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
- "//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
- "//vendor:k8s.io/kube-aggregator/pkg/apis/apiregistration/install",
- ],
-)
-
-go_test(
- name = "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured_test",
- srcs = ["k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go"],
- library = ":k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
- tags = ["automanaged"],
-)
-
-go_library(
- name = "github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable",
- srcs = [
- "github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_others.go",
- "github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/noncolorable.go",
- ],
- tags = ["automanaged"],
-)
-
-go_library(
- name = "github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty",
- srcs = [
- "github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/doc.go",
- "github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_linux.go",
- ],
- tags = ["automanaged"],
-)
-
-go_library(
- name = "k8s.io/client-go/kubernetes/scheme",
- srcs = [
- "k8s.io/client-go/kubernetes/scheme/doc.go",
- "k8s.io/client-go/kubernetes/scheme/register.go",
- ],
- tags = ["automanaged"],
- deps = [
- "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
- "//vendor:k8s.io/apimachinery/pkg/runtime",
- "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
- "//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
- "//vendor:k8s.io/client-go/pkg/api/v1",
- "//vendor:k8s.io/client-go/pkg/apis/apps/v1beta1",
- "//vendor:k8s.io/client-go/pkg/apis/authentication/v1",
- "//vendor:k8s.io/client-go/pkg/apis/authentication/v1beta1",
- "//vendor:k8s.io/client-go/pkg/apis/authorization/v1",
- "//vendor:k8s.io/client-go/pkg/apis/authorization/v1beta1",
- "//vendor:k8s.io/client-go/pkg/apis/autoscaling/v1",
- "//vendor:k8s.io/client-go/pkg/apis/autoscaling/v2alpha1",
- "//vendor:k8s.io/client-go/pkg/apis/batch/v1",
- "//vendor:k8s.io/client-go/pkg/apis/batch/v2alpha1",
- "//vendor:k8s.io/client-go/pkg/apis/certificates/v1beta1",
- "//vendor:k8s.io/client-go/pkg/apis/extensions/v1beta1",
- "//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1",
- "//vendor:k8s.io/client-go/pkg/apis/rbac/v1alpha1",
- "//vendor:k8s.io/client-go/pkg/apis/rbac/v1beta1",
- "//vendor:k8s.io/client-go/pkg/apis/storage/v1beta1",
- ],
-)
-
-go_library(
- name = "vbom.ml/util/sortorder",
- srcs = [
- "vbom.ml/util/sortorder/doc.go",
- "vbom.ml/util/sortorder/natsort.go",
- ],
- tags = ["automanaged"],
-)
-
-go_library(
- name = "github.com/libopenstorage/openstorage/api",
- srcs = [
- "github.com/libopenstorage/openstorage/api/api.go",
- "github.com/libopenstorage/openstorage/api/api.pb.go",
- "github.com/libopenstorage/openstorage/api/status.go",
- ],
- tags = ["automanaged"],
- deps = [
- "//vendor:github.com/golang/protobuf/proto",
- "//vendor:go.pedge.io/pb/go/google/protobuf",
- ],
-)
-
-go_library(
- name = "github.com/libopenstorage/openstorage/api/client",
- srcs = [
- "github.com/libopenstorage/openstorage/api/client/client.go",
- "github.com/libopenstorage/openstorage/api/client/request.go",
- ],
- tags = ["automanaged"],
-)
-
-go_library(
- name = "github.com/libopenstorage/openstorage/api/client/volume",
- srcs = [
- "github.com/libopenstorage/openstorage/api/client/volume/client.go",
- "github.com/libopenstorage/openstorage/api/client/volume/volume.go",
- ],
- tags = ["automanaged"],
- deps = [
- "//vendor:github.com/libopenstorage/openstorage/api",
- "//vendor:github.com/libopenstorage/openstorage/api/client",
- "//vendor:github.com/libopenstorage/openstorage/volume",
- ],
-)
-
-go_library(
- name = "github.com/libopenstorage/openstorage/api/spec",
- srcs = ["github.com/libopenstorage/openstorage/api/spec/spec_handler.go"],
- tags = ["automanaged"],
- deps = [
- "//vendor:github.com/libopenstorage/openstorage/api",
- "//vendor:github.com/libopenstorage/openstorage/pkg/units",
- ],
-)
-
-go_library(
- name = "github.com/libopenstorage/openstorage/pkg/units",
- srcs = ["github.com/libopenstorage/openstorage/pkg/units/units.go"],
- tags = ["automanaged"],
-)
-
-go_library(
- name = "github.com/libopenstorage/openstorage/volume",
- srcs = [
- "github.com/libopenstorage/openstorage/volume/volume.go",
- "github.com/libopenstorage/openstorage/volume/volume_driver_registry.go",
- "github.com/libopenstorage/openstorage/volume/volume_not_supported.go",
- ],
- tags = ["automanaged"],
- deps = ["//vendor:github.com/libopenstorage/openstorage/api"],
-)
-
-go_library(
- name = "go.pedge.io/pb/go/google/protobuf",
- srcs = [
- "go.pedge.io/pb/go/google/protobuf/any.pb.go",
- "go.pedge.io/pb/go/google/protobuf/api.pb.go",
- "go.pedge.io/pb/go/google/protobuf/duration.pb.go",
- "go.pedge.io/pb/go/google/protobuf/empty.pb.go",
- "go.pedge.io/pb/go/google/protobuf/field_mask.pb.go",
- "go.pedge.io/pb/go/google/protobuf/protobuf.gen.go",
- "go.pedge.io/pb/go/google/protobuf/source_context.pb.go",
- "go.pedge.io/pb/go/google/protobuf/struct.pb.go",
- "go.pedge.io/pb/go/google/protobuf/timestamp.pb.go",
- "go.pedge.io/pb/go/google/protobuf/type.pb.go",
- "go.pedge.io/pb/go/google/protobuf/wrappers.pb.go",
- ],
- tags = ["automanaged"],
- deps = ["//vendor:github.com/golang/protobuf/proto"],
-)
-
go_library(
name = "k8s.io/metrics/pkg/apis/custom_metrics",
srcs = [
@@ -16946,3 +16937,163 @@ go_library(
"//vendor:k8s.io/metrics/pkg/client/custom_metrics",
],
)
+
+go_binary(
+ name = "k8s.io/sample-apiserver_bin",
+ library = ":k8s.io/sample-apiserver",
+ tags = ["automanaged"],
+)
+
+go_library(
+ name = "k8s.io/sample-apiserver",
+ srcs = ["k8s.io/sample-apiserver/main.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/util/wait",
+ "//vendor:k8s.io/apiserver/pkg/util/logs",
+ "//vendor:k8s.io/sample-apiserver/pkg/cmd/server",
+ ],
+)
+
+go_library(
+ name = "k8s.io/sample-apiserver/pkg/apis/wardle",
+ srcs = [
+ "k8s.io/sample-apiserver/pkg/apis/wardle/doc.go",
+ "k8s.io/sample-apiserver/pkg/apis/wardle/register.go",
+ "k8s.io/sample-apiserver/pkg/apis/wardle/types.go",
+ "k8s.io/sample-apiserver/pkg/apis/wardle/zz_generated.deepcopy.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/conversion",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ ],
+)
+
+go_test(
+ name = "k8s.io/sample-apiserver/pkg/apis/wardle/install_test",
+ srcs = ["k8s.io/sample-apiserver/pkg/apis/wardle/install/install_test.go"],
+ library = ":k8s.io/sample-apiserver/pkg/apis/wardle/install",
+ tags = ["automanaged"],
+ deps = ["//vendor:k8s.io/apimachinery/pkg/api/testing"],
+)
+
+go_library(
+ name = "k8s.io/sample-apiserver/pkg/apis/wardle/install",
+ srcs = ["k8s.io/sample-apiserver/pkg/apis/wardle/install/install.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced",
+ "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/util/sets",
+ "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle",
+ "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1",
+ ],
+)
+
+go_library(
+ name = "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1",
+ srcs = [
+ "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/doc.go",
+ "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/register.go",
+ "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/types.go",
+ "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/zz_generated.conversion.go",
+ "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1/zz_generated.deepcopy.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/conversion",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle",
+ ],
+)
+
+go_test(
+ name = "k8s.io/sample-apiserver/pkg/apiserver_test",
+ srcs = ["k8s.io/sample-apiserver/pkg/apiserver/scheme_test.go"],
+ library = ":k8s.io/sample-apiserver/pkg/apiserver",
+ tags = ["automanaged"],
+ deps = ["//vendor:k8s.io/apimachinery/pkg/api/testing"],
+)
+
+go_library(
+ name = "k8s.io/sample-apiserver/pkg/apiserver",
+ srcs = ["k8s.io/sample-apiserver/pkg/apiserver/apiserver.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced",
+ "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered",
+ "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
+ "//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
+ "//vendor:k8s.io/apimachinery/pkg/version",
+ "//vendor:k8s.io/apiserver/pkg/registry/rest",
+ "//vendor:k8s.io/apiserver/pkg/server",
+ "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle",
+ "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle/install",
+ "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1",
+ "//vendor:k8s.io/sample-apiserver/pkg/registry/wardle",
+ ],
+)
+
+go_library(
+ name = "k8s.io/sample-apiserver/pkg/cmd/server",
+ srcs = ["k8s.io/sample-apiserver/pkg/cmd/server/start.go"],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:github.com/spf13/cobra",
+ "//vendor:k8s.io/apiserver/pkg/server",
+ "//vendor:k8s.io/apiserver/pkg/server/options",
+ "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1",
+ "//vendor:k8s.io/sample-apiserver/pkg/apiserver",
+ ],
+)
+
+go_library(
+ name = "k8s.io/sample-apiserver/pkg/registry/wardle",
+ srcs = [
+ "k8s.io/sample-apiserver/pkg/registry/wardle/etcd.go",
+ "k8s.io/sample-apiserver/pkg/registry/wardle/strategy.go",
+ ],
+ tags = ["automanaged"],
+ deps = [
+ "//vendor:k8s.io/apimachinery/pkg/fields",
+ "//vendor:k8s.io/apimachinery/pkg/labels",
+ "//vendor:k8s.io/apimachinery/pkg/runtime",
+ "//vendor:k8s.io/apimachinery/pkg/util/validation/field",
+ "//vendor:k8s.io/apiserver/pkg/endpoints/request",
+ "//vendor:k8s.io/apiserver/pkg/registry/generic",
+ "//vendor:k8s.io/apiserver/pkg/registry/generic/registry",
+ "//vendor:k8s.io/apiserver/pkg/storage",
+ "//vendor:k8s.io/apiserver/pkg/storage/names",
+ "//vendor:k8s.io/sample-apiserver/pkg/apis/wardle",
+ ],
+)
+
+go_library(
+ name = "vbom.ml/util/sortorder",
+ srcs = [
+ "vbom.ml/util/sortorder/doc.go",
+ "vbom.ml/util/sortorder/natsort.go",
+ ],
+ tags = ["automanaged"],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+)