From 03261146b0f883f3f2d36c3560f7d5438f6dc56a Mon Sep 17 00:00:00 2001 From: Paul Weil Date: Mon, 14 Dec 2015 08:31:23 -0500 Subject: [PATCH] api --- api/swagger-spec/v1beta1.json | 724 +++ contrib/completions/bash/kubectl | 3 + .../extensions/v1beta1/definitions.html | 370 +- .../extensions/v1beta1/operations.html | 1234 ++++- .../proposals/security-context-constraints.md | 4 - pkg/api/testing/fuzzer.go | 7 + pkg/apis/extensions/install/install.go | 4 +- pkg/apis/extensions/register.go | 4 + pkg/apis/extensions/types.generated.go | 4774 ++++++++++++---- pkg/apis/extensions/types.go | 120 + .../v1beta1/conversion_generated.go | 340 ++ .../extensions/v1beta1/deep_copy_generated.go | 120 + pkg/apis/extensions/v1beta1/register.go | 4 + .../extensions/v1beta1/types.generated.go | 4902 +++++++++++++---- pkg/apis/extensions/v1beta1/types.go | 125 + .../v1beta1/types_swagger_doc_generated.go | 77 + pkg/apis/extensions/validation/validation.go | 113 + .../extensions/validation/validation_test.go | 123 + pkg/client/unversioned/extensions.go | 5 + pkg/client/unversioned/podsecuritypolicy.go | 111 + .../unversioned/podsecuritypolicy_test.go | 138 + .../testclient/fake_podsecuritypolicy.go | 73 + .../unversioned/testclient/testclient.go | 4 + pkg/kubectl/kubectl.go | 1 + pkg/kubectl/resource_printer.go | 20 + pkg/master/master.go | 7 +- pkg/registry/podsecuritypolicy/doc.go | 19 + pkg/registry/podsecuritypolicy/etcd/etcd.go | 67 + .../podsecuritypolicy/etcd/etcd_test.go | 130 + pkg/registry/podsecuritypolicy/strategy.go | 93 + 30 files changed, 11554 insertions(+), 2162 deletions(-) create mode 100644 pkg/client/unversioned/podsecuritypolicy.go create mode 100644 pkg/client/unversioned/podsecuritypolicy_test.go create mode 100644 pkg/client/unversioned/testclient/fake_podsecuritypolicy.go create mode 100644 pkg/registry/podsecuritypolicy/doc.go create mode 100644 pkg/registry/podsecuritypolicy/etcd/etcd.go create mode 100644 pkg/registry/podsecuritypolicy/etcd/etcd_test.go create mode 100644 pkg/registry/podsecuritypolicy/strategy.go diff --git a/api/swagger-spec/v1beta1.json b/api/swagger-spec/v1beta1.json index 9c9f4774ab7..be2ddfa57c7 100644 --- a/api/swagger-spec/v1beta1.json +++ b/api/swagger-spec/v1beta1.json @@ -2479,6 +2479,548 @@ } ] }, + { + "path": "/apis/extensions/v1beta1/podsecuritypolicies", + "description": "API at /apis/extensions/v1beta1", + "operations": [ + { + "type": "v1beta1.PodSecurityPolicyList", + "method": "GET", + "summary": "list or watch objects of kind PodSecurityPolicy", + "nickname": "listNamespacedPodSecurityPolicy", + "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.", + "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": "v1beta1.PodSecurityPolicyList" + } + ], + "produces": [ + "application/json", + "application/yaml" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.PodSecurityPolicy", + "method": "POST", + "summary": "create a PodSecurityPolicy", + "nickname": "createNamespacedPodSecurityPolicy", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.PodSecurityPolicy", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.PodSecurityPolicy" + } + ], + "produces": [ + "application/json", + "application/yaml" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "unversioned.Status", + "method": "DELETE", + "summary": "delete collection of PodSecurityPolicy", + "nickname": "deletecollectionNamespacedPodSecurityPolicy", + "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.", + "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": "unversioned.Status" + } + ], + "produces": [ + "application/json", + "application/yaml" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/extensions/v1beta1/watch/podsecuritypolicies", + "description": "API at /apis/extensions/v1beta1", + "operations": [ + { + "type": "json.WatchEvent", + "method": "GET", + "summary": "watch individual changes to a list of PodSecurityPolicy", + "nickname": "watchNamespacedPodSecurityPolicyList", + "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.", + "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": "json.WatchEvent" + } + ], + "produces": [ + "application/json" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/extensions/v1beta1/podsecuritypolicies/{name}", + "description": "API at /apis/extensions/v1beta1", + "operations": [ + { + "type": "v1beta1.PodSecurityPolicy", + "method": "GET", + "summary": "read the specified PodSecurityPolicy", + "nickname": "readNamespacedPodSecurityPolicy", + "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": "name", + "description": "name of the PodSecurityPolicy", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.PodSecurityPolicy" + } + ], + "produces": [ + "application/json", + "application/yaml" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.PodSecurityPolicy", + "method": "PUT", + "summary": "replace the specified PodSecurityPolicy", + "nickname": "replaceNamespacedPodSecurityPolicy", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.PodSecurityPolicy", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the PodSecurityPolicy", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.PodSecurityPolicy" + } + ], + "produces": [ + "application/json", + "application/yaml" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.PodSecurityPolicy", + "method": "PATCH", + "summary": "partially update the specified PodSecurityPolicy", + "nickname": "patchNamespacedPodSecurityPolicy", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "unversioned.Patch", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the PodSecurityPolicy", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.PodSecurityPolicy" + } + ], + "produces": [ + "application/json", + "application/yaml" + ], + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ] + }, + { + "type": "unversioned.Status", + "method": "DELETE", + "summary": "delete a PodSecurityPolicy", + "nickname": "deleteNamespacedPodSecurityPolicy", + "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": "string", + "paramType": "path", + "name": "name", + "description": "name of the PodSecurityPolicy", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "unversioned.Status" + } + ], + "produces": [ + "application/json", + "application/yaml" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/extensions/v1beta1/watch/podsecuritypolicies/{name}", + "description": "API at /apis/extensions/v1beta1", + "operations": [ + { + "type": "json.WatchEvent", + "method": "GET", + "summary": "watch changes to an object of kind PodSecurityPolicy", + "nickname": "watchNamespacedPodSecurityPolicy", + "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.", + "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": "name", + "description": "name of the PodSecurityPolicy", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "json.WatchEvent" + } + ], + "produces": [ + "application/json" + ], + "consumes": [ + "*/*" + ] + } + ] + }, { "path": "/apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale", "description": "API at /apis/extensions/v1beta1", @@ -4470,6 +5012,188 @@ } } }, + "v1beta1.PodSecurityPolicyList": { + "id": "v1beta1.PodSecurityPolicyList", + "description": "Pod Security Policy List is a list of PodSecurityPolicy 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": "unversioned.ListMeta", + "description": "Standard list metadata. More info: http://docs.k8s.io/api-conventions.md#metadata" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1beta1.PodSecurityPolicy" + }, + "description": "Items is a list of schema objects." + } + } + }, + "v1beta1.PodSecurityPolicy": { + "id": "v1beta1.PodSecurityPolicy", + "description": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", + "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", + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" + }, + "spec": { + "$ref": "v1beta1.PodSecurityPolicySpec", + "description": "Spec defines the policy enforced." + } + } + }, + "v1beta1.PodSecurityPolicySpec": { + "id": "v1beta1.PodSecurityPolicySpec", + "description": "Pod Security Policy Spec defines the policy enforced.", + "properties": { + "privileged": { + "type": "boolean", + "description": "privileged determines if a pod can request to be run as privileged." + }, + "capabilities": { + "type": "array", + "items": { + "$ref": "v1.Capability" + }, + "description": "capabilities is a list of capabilities that can be added." + }, + "volumes": { + "type": "array", + "items": { + "$ref": "v1beta1.FSType" + }, + "description": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used." + }, + "hostNetwork": { + "type": "boolean", + "description": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec." + }, + "hostPorts": { + "type": "array", + "items": { + "$ref": "v1beta1.HostPortRange" + }, + "description": "hostPorts determines which host port ranges are allowed to be exposed." + }, + "hostPID": { + "type": "boolean", + "description": "hostPID determines if the policy allows the use of HostPID in the pod spec." + }, + "hostIPC": { + "type": "boolean", + "description": "hostIPC determines if the policy allows the use of HostIPC in the pod spec." + }, + "seLinuxContext": { + "$ref": "v1beta1.SELinuxContextStrategyOptions", + "description": "seLinuxContext is the strategy that will dictate the allowable labels that may be set." + }, + "runAsUser": { + "$ref": "v1beta1.RunAsUserStrategyOptions", + "description": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set." + } + } + }, + "v1beta1.FSType": { + "id": "v1beta1.FSType", + "properties": {} + }, + "v1beta1.HostPortRange": { + "id": "v1beta1.HostPortRange", + "description": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + "required": [ + "min", + "max" + ], + "properties": { + "min": { + "type": "integer", + "format": "int32", + "description": "min is the start of the range, inclusive." + }, + "max": { + "type": "integer", + "format": "int32", + "description": "max is the end of the range, inclusive." + } + } + }, + "v1beta1.SELinuxContextStrategyOptions": { + "id": "v1beta1.SELinuxContextStrategyOptions", + "description": "SELinux Context Strategy Options defines the strategy type and any options used to create the strategy.", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "type is the strategy that will dictate the allowable labels that may be set." + }, + "seLinuxOptions": { + "$ref": "v1.SELinuxOptions", + "description": "seLinuxOptions required to run as; required for MustRunAs More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context" + } + } + }, + "v1beta1.RunAsUserStrategyOptions": { + "id": "v1beta1.RunAsUserStrategyOptions", + "description": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "type is the strategy that will dictate the allowable RunAsUser values that may be set." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of uids that may be used." + } + } + }, + "v1beta1.IDRange": { + "id": "v1beta1.IDRange", + "description": "ID Range provides a min/max of an allowed range of IDs.", + "required": [ + "min", + "max" + ], + "properties": { + "min": { + "type": "integer", + "format": "int64", + "description": "Min is the start of the range, inclusive." + }, + "max": { + "type": "integer", + "format": "int64", + "description": "Max is the end of the range, inclusive." + } + } + }, "v1beta1.Scale": { "id": "v1beta1.Scale", "description": "represents a scaling request for a resource.", diff --git a/contrib/completions/bash/kubectl b/contrib/completions/bash/kubectl index 69a4e98ca16..7a6b0c810e0 100644 --- a/contrib/completions/bash/kubectl +++ b/contrib/completions/bash/kubectl @@ -330,6 +330,7 @@ _kubectl_get() must_have_one_noun+=("persistentvolume") must_have_one_noun+=("persistentvolumeclaim") must_have_one_noun+=("pod") + must_have_one_noun+=("podsecuritypolicy") must_have_one_noun+=("podtemplate") must_have_one_noun+=("replicationcontroller") must_have_one_noun+=("resourcequota") @@ -827,6 +828,7 @@ _kubectl_delete() must_have_one_noun+=("persistentvolume") must_have_one_noun+=("persistentvolumeclaim") must_have_one_noun+=("pod") + must_have_one_noun+=("podsecuritypolicy") must_have_one_noun+=("podtemplate") must_have_one_noun+=("replicationcontroller") must_have_one_noun+=("resourcequota") @@ -1964,6 +1966,7 @@ _kubectl_label() must_have_one_noun+=("persistentvolume") must_have_one_noun+=("persistentvolumeclaim") must_have_one_noun+=("pod") + must_have_one_noun+=("podsecuritypolicy") must_have_one_noun+=("podtemplate") must_have_one_noun+=("replicationcontroller") must_have_one_noun+=("resourcequota") diff --git a/docs/api-reference/extensions/v1beta1/definitions.html b/docs/api-reference/extensions/v1beta1/definitions.html index 4ac994c8d15..ec432190ec8 100755 --- a/docs/api-reference/extensions/v1beta1/definitions.html +++ b/docs/api-reference/extensions/v1beta1/definitions.html @@ -458,6 +458,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } + +
+

v1beta1.FSType

+

v1.SELinuxOptions

@@ -595,6 +599,47 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } +
+
+

v1beta1.SELinuxContextStrategyOptions

+
+

SELinux Context Strategy Options defines the strategy type and any options used to create the strategy.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

type

type is the strategy that will dictate the allowable labels that may be set.

true

string

seLinuxOptions

seLinuxOptions required to run as; required for MustRunAs More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context

false

v1.SELinuxOptions

+

v1.VolumeMount

@@ -1137,6 +1182,61 @@ Examples:
+
+
+

v1beta1.PodSecurityPolicyList

+
+

Pod Security Policy List is a list of PodSecurityPolicy objects.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

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://docs.k8s.io/api-conventions.md#metadata

false

unversioned.ListMeta

items

Items is a list of schema objects.

true

v1beta1.PodSecurityPolicy array

+

v1.TCPSocketAction

@@ -2706,6 +2806,47 @@ Populated by the system when a graceful deletion is requested. Read-only. More i +
+
+

v1beta1.HostPortRange

+
+

Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

min

min is the start of the range, inclusive.

true

integer (int32)

max

max is the end of the range, inclusive.

true

integer (int32)

+

v1beta1.LabelSelectorRequirement

@@ -2816,6 +2957,47 @@ Populated by the system when a graceful deletion is requested. Read-only. More i +
+
+

v1beta1.RunAsUserStrategyOptions

+
+

Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

type

type is the strategy that will dictate the allowable RunAsUser values that may be set.

true

string

ranges

Ranges are the allowed ranges of uids that may be used.

false

v1beta1.IDRange array

+

v1.EnvVar

@@ -3251,6 +3433,96 @@ Populated by the system when a graceful deletion is requested. Read-only. More i +
+
+

v1beta1.PodSecurityPolicySpec

+
+

Pod Security Policy Spec defines the policy enforced.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

privileged

privileged determines if a pod can request to be run as privileged.

false

boolean

false

capabilities

capabilities is a list of capabilities that can be added.

false

v1.Capability array

volumes

volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used.

false

v1beta1.FSType array

hostNetwork

hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.

false

boolean

false

hostPorts

hostPorts determines which host port ranges are allowed to be exposed.

false

v1beta1.HostPortRange array

hostPID

hostPID determines if the policy allows the use of HostPID in the pod spec.

false

boolean

false

hostIPC

hostIPC determines if the policy allows the use of HostIPC in the pod spec.

false

boolean

false

seLinuxContext

seLinuxContext is the strategy that will dictate the allowable labels that may be set.

false

v1beta1.SELinuxContextStrategyOptions

runAsUser

runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.

false

v1beta1.RunAsUserStrategyOptions

+

v1.Volume

@@ -3594,6 +3866,61 @@ Populated by the system when a graceful deletion is requested. Read-only. More i +
+
+

v1beta1.PodSecurityPolicy

+
+

Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

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 object’s metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata

false

v1.ObjectMeta

spec

Spec defines the policy enforced.

false

v1beta1.PodSecurityPolicySpec

+

v1.Capability

@@ -3916,6 +4243,47 @@ Populated by the system when a graceful deletion is requested. Read-only. More i +
+
+

v1beta1.IDRange

+
+

ID Range provides a min/max of an allowed range of IDs.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

min

Min is the start of the range, inclusive.

true

integer (int64)

max

Max is the end of the range, inclusive.

true

integer (int64)

+

v1beta1.HorizontalPodAutoscalerList

@@ -4464,7 +4832,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
diff --git a/docs/api-reference/extensions/v1beta1/operations.html b/docs/api-reference/extensions/v1beta1/operations.html index bdd29bf8894..86d4bfb74cc 100755 --- a/docs/api-reference/extensions/v1beta1/operations.html +++ b/docs/api-reference/extensions/v1beta1/operations.html @@ -4365,10 +4365,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

watch individual changes to a list of HorizontalPodAutoscaler

+

list or watch objects of kind PodSecurityPolicy

-
GET /apis/extensions/v1beta1/watch/horizontalpodautoscalers
+
GET /apis/extensions/v1beta1/podsecuritypolicies
@@ -4464,7 +4464,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

200

success

-

json.WatchEvent

+

v1beta1.PodSecurityPolicyList

@@ -4487,6 +4487,9 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • application/json

  • +
  • +

    application/yaml

    +
  • @@ -4502,10 +4505,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    watch individual changes to a list of Ingress

    +

    delete collection of PodSecurityPolicy

    -
    GET /apis/extensions/v1beta1/watch/ingresses
    +
    DELETE /apis/extensions/v1beta1/podsecuritypolicies
    @@ -4601,7 +4604,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    200

    success

    -

    json.WatchEvent

    +

    unversioned.Status

    @@ -4624,6 +4627,9 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • application/json

  • +
  • +

    application/yaml

    +
  • @@ -4639,10 +4645,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    watch individual changes to a list of Job

    +

    create a PodSecurityPolicy

    -
    GET /apis/extensions/v1beta1/watch/jobs
    +
    POST /apis/extensions/v1beta1/podsecuritypolicies
    @@ -4676,6 +4682,592 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } +

    BodyParameter

    +

    body

    + +

    true

    +

    v1beta1.PodSecurityPolicy

    + + + + + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1beta1.PodSecurityPolicy

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisextensionsv1beta1

      +
    • +
    +
    +
    +
    +
    +

    read the specified PodSecurityPolicy

    +
    +
    +
    GET /apis/extensions/v1beta1/podsecuritypolicies/{name}
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    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

    name

    name of the PodSecurityPolicy

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1beta1.PodSecurityPolicy

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisextensionsv1beta1

      +
    • +
    +
    +
    +
    +
    +

    replace the specified PodSecurityPolicy

    +
    +
    +
    PUT /apis/extensions/v1beta1/podsecuritypolicies/{name}
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1beta1.PodSecurityPolicy

    PathParameter

    name

    name of the PodSecurityPolicy

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1beta1.PodSecurityPolicy

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisextensionsv1beta1

      +
    • +
    +
    +
    +
    +
    +

    delete a PodSecurityPolicy

    +
    +
    +
    DELETE /apis/extensions/v1beta1/podsecuritypolicies/{name}
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.DeleteOptions

    PathParameter

    name

    name of the PodSecurityPolicy

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    unversioned.Status

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisextensionsv1beta1

      +
    • +
    +
    +
    +
    +
    +

    partially update the specified PodSecurityPolicy

    +
    +
    +
    PATCH /apis/extensions/v1beta1/podsecuritypolicies/{name}
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    unversioned.Patch

    PathParameter

    name

    name of the PodSecurityPolicy

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1beta1.PodSecurityPolicy

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      application/json-patch+json

      +
    • +
    • +

      application/merge-patch+json

      +
    • +
    • +

      application/strategic-merge-patch+json

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisextensionsv1beta1

      +
    • +
    +
    +
    +
    +
    +

    watch individual changes to a list of HorizontalPodAutoscaler

    +
    +
    +
    GET /apis/extensions/v1beta1/watch/horizontalpodautoscalers
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + @@ -4720,7 +5312,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    TypeNameDescriptionRequiredSchemaDefault

    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.

    @@ -4745,7 +5337,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -4755,7 +5347,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -4765,7 +5357,281 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    +
    +
      +
    • +

      apisextensionsv1beta1

      +
    • +
    +
    +
    + +
    +

    watch individual changes to a list of Ingress

    +
    +
    +
    GET /apis/extensions/v1beta1/watch/ingresses
    +
    +
    +
    +

    Parameters

    +
    ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    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.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call.

    false

    integer (int32)

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    json.WatchEvent

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisextensionsv1beta1

      +
    • +
    +
    +
    +
    +
    +

    watch individual changes to a list of Job

    +
    +
    +
    GET /apis/extensions/v1beta1/watch/jobs
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    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.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call.

    false

    integer (int32)

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    json.WatchEvent

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    +
    +
    +
    +

    Tags

    • @@ -4783,7 +5649,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -4865,7 +5731,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -4890,7 +5756,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -4900,7 +5766,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -4910,7 +5776,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -4928,7 +5794,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -5018,7 +5884,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -5043,7 +5909,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -5053,7 +5919,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -5063,7 +5929,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -5081,7 +5947,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -5163,7 +6029,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -5188,7 +6054,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -5198,7 +6064,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -5208,7 +6074,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -5226,7 +6092,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -5316,7 +6182,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -5341,7 +6207,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -5351,7 +6217,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -5361,7 +6227,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -5379,7 +6245,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -5461,7 +6327,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -5486,7 +6352,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -5496,7 +6362,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -5506,7 +6372,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -5524,7 +6390,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -5614,7 +6480,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -5639,7 +6505,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -5649,7 +6515,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -5659,7 +6525,289 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    +
    +
      +
    • +

      apisextensionsv1beta1

      +
    • +
    +
    +
    + +
    +

    watch individual changes to a list of PodSecurityPolicy

    +
    +
    +
    GET /apis/extensions/v1beta1/watch/podsecuritypolicies
    +
    +
    +
    +

    Parameters

    +
    ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    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.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call.

    false

    integer (int32)

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    json.WatchEvent

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisextensionsv1beta1

      +
    • +
    +
    +
    +
    +
    +

    watch changes to an object of kind PodSecurityPolicy

    +
    +
    +
    GET /apis/extensions/v1beta1/watch/podsecuritypolicies/{name}
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    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.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call.

    false

    integer (int32)

    PathParameter

    name

    name of the PodSecurityPolicy

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    json.WatchEvent

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    +
    +
    +
    +

    Tags

    • @@ -5674,7 +6822,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    diff --git a/docs/proposals/security-context-constraints.md b/docs/proposals/security-context-constraints.md index 3eb4aeef814..e4050b20d15 100644 --- a/docs/proposals/security-context-constraints.md +++ b/docs/proposals/security-context-constraints.md @@ -18,10 +18,6 @@ If you are using a released version of Kubernetes, you should refer to the docs that go with that version. - -The latest 1.0.x release of this document can be found -[here](http://releases.k8s.io/release-1.0/docs/proposals/security-context-constraints.md). - Documentation for other releases can be found at [releases.k8s.io](http://releases.k8s.io). diff --git a/pkg/api/testing/fuzzer.go b/pkg/api/testing/fuzzer.go index 5d240c2384a..4d9e18f24a1 100644 --- a/pkg/api/testing/fuzzer.go +++ b/pkg/api/testing/fuzzer.go @@ -404,6 +404,13 @@ func FuzzerFor(t *testing.T, version unversioned.GroupVersion, src rand.Source) MaxUnavailable: intstr.FromInt(10), } }, + func(psp *extensions.PodSecurityPolicySpec, c fuzz.Continue) { + c.FuzzNoCustom(psp) // fuzz self without calling this function again + userTypes := []extensions.RunAsUserStrategy{extensions.RunAsUserStrategyMustRunAsNonRoot, extensions.RunAsUserStrategyMustRunAs, extensions.RunAsUserStrategyRunAsAny} + psp.RunAsUser.Type = userTypes[c.Rand.Intn(len(userTypes))] + seLinuxTypes := []extensions.SELinuxContextStrategy{extensions.SELinuxStrategyRunAsAny, extensions.SELinuxStrategyMustRunAs} + psp.SELinuxContext.Type = seLinuxTypes[c.Rand.Intn(len(seLinuxTypes))] + }, ) return f } diff --git a/pkg/apis/extensions/install/install.go b/pkg/apis/extensions/install/install.go index 4e1477d2d0a..90d5c507335 100644 --- a/pkg/apis/extensions/install/install.go +++ b/pkg/apis/extensions/install/install.go @@ -90,7 +90,9 @@ func enableVersions(externalVersions []unversioned.GroupVersion) error { func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper { // the list of kinds that are scoped at the root of the api hierarchy // if a kind is not enumerated here, it is assumed to have a namespace scope - rootScoped := sets.NewString() + rootScoped := sets.NewString( + "PodSecurityPolicy", + ) ignoredKinds := sets.NewString() diff --git a/pkg/apis/extensions/register.go b/pkg/apis/extensions/register.go index a35ceb9eb58..db7b937706e 100644 --- a/pkg/apis/extensions/register.go +++ b/pkg/apis/extensions/register.go @@ -70,6 +70,8 @@ func addKnownTypes(scheme *runtime.Scheme) { &ReplicaSet{}, &ReplicaSetList{}, &api.ExportOptions{}, + &PodSecurityPolicy{}, + &PodSecurityPolicyList{}, ) } @@ -94,3 +96,5 @@ func (obj *Ingress) GetObjectKind() unversioned.ObjectKind { func (obj *IngressList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ReplicaSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ReplicaSetList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *PodSecurityPolicy) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *PodSecurityPolicyList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/apis/extensions/types.generated.go b/pkg/apis/extensions/types.generated.go index 106b10f4ee2..746d694dba8 100644 --- a/pkg/apis/extensions/types.generated.go +++ b/pkg/apis/extensions/types.generated.go @@ -16404,15 +16404,2173 @@ func (x *ReplicaSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } +func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1378 := z.EncBinary() + _ = yym1378 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1379 := !z.EncBinary() + yy2arr1379 := z.EncBasicHandle().StructToArray + var yyq1379 [4]bool + _, _, _ = yysep1379, yyq1379, yy2arr1379 + const yyr1379 bool = false + yyq1379[0] = x.Kind != "" + yyq1379[1] = x.APIVersion != "" + yyq1379[2] = true + yyq1379[3] = true + var yynn1379 int + if yyr1379 || yy2arr1379 { + r.EncodeArrayStart(4) + } else { + yynn1379 = 0 + for _, b := range yyq1379 { + if b { + yynn1379++ + } + } + r.EncodeMapStart(yynn1379) + yynn1379 = 0 + } + if yyr1379 || yy2arr1379 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1379[0] { + yym1381 := z.EncBinary() + _ = yym1381 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1379[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1382 := z.EncBinary() + _ = yym1382 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr1379 || yy2arr1379 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1379[1] { + yym1384 := z.EncBinary() + _ = yym1384 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1379[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1385 := z.EncBinary() + _ = yym1385 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr1379 || yy2arr1379 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1379[2] { + yy1387 := &x.ObjectMeta + yy1387.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1379[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1388 := &x.ObjectMeta + yy1388.CodecEncodeSelf(e) + } + } + if yyr1379 || yy2arr1379 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1379[3] { + yy1390 := &x.Spec + yy1390.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1379[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1391 := &x.Spec + yy1391.CodecEncodeSelf(e) + } + } + if yyr1379 || yy2arr1379 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodSecurityPolicy) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1392 := z.DecBinary() + _ = yym1392 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1393 := r.ContainerType() + if yyct1393 == codecSelferValueTypeMap1234 { + yyl1393 := r.ReadMapStart() + if yyl1393 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1393, d) + } + } else if yyct1393 == codecSelferValueTypeArray1234 { + yyl1393 := r.ReadArrayStart() + if yyl1393 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1393, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodSecurityPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1394Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1394Slc + var yyhl1394 bool = l >= 0 + for yyj1394 := 0; ; yyj1394++ { + if yyhl1394 { + if yyj1394 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1394Slc = r.DecodeBytes(yys1394Slc, true, true) + yys1394 := string(yys1394Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1394 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_api.ObjectMeta{} + } else { + yyv1397 := &x.ObjectMeta + yyv1397.CodecDecodeSelf(d) + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = PodSecurityPolicySpec{} + } else { + yyv1398 := &x.Spec + yyv1398.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1394) + } // end switch yys1394 + } // end for yyj1394 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1399 int + var yyb1399 bool + var yyhl1399 bool = l >= 0 + yyj1399++ + if yyhl1399 { + yyb1399 = yyj1399 > l + } else { + yyb1399 = r.CheckBreak() + } + if yyb1399 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj1399++ + if yyhl1399 { + yyb1399 = yyj1399 > l + } else { + yyb1399 = r.CheckBreak() + } + if yyb1399 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj1399++ + if yyhl1399 { + yyb1399 = yyj1399 > l + } else { + yyb1399 = r.CheckBreak() + } + if yyb1399 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_api.ObjectMeta{} + } else { + yyv1402 := &x.ObjectMeta + yyv1402.CodecDecodeSelf(d) + } + yyj1399++ + if yyhl1399 { + yyb1399 = yyj1399 > l + } else { + yyb1399 = r.CheckBreak() + } + if yyb1399 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = PodSecurityPolicySpec{} + } else { + yyv1403 := &x.Spec + yyv1403.CodecDecodeSelf(d) + } + for { + yyj1399++ + if yyhl1399 { + yyb1399 = yyj1399 > l + } else { + yyb1399 = r.CheckBreak() + } + if yyb1399 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1399-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1404 := z.EncBinary() + _ = yym1404 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1405 := !z.EncBinary() + yy2arr1405 := z.EncBasicHandle().StructToArray + var yyq1405 [9]bool + _, _, _ = yysep1405, yyq1405, yy2arr1405 + const yyr1405 bool = false + yyq1405[0] = x.Privileged != false + yyq1405[1] = len(x.Capabilities) != 0 + yyq1405[2] = len(x.Volumes) != 0 + yyq1405[3] = x.HostNetwork != false + yyq1405[4] = len(x.HostPorts) != 0 + yyq1405[5] = x.HostPID != false + yyq1405[6] = x.HostIPC != false + yyq1405[7] = true + yyq1405[8] = true + var yynn1405 int + if yyr1405 || yy2arr1405 { + r.EncodeArrayStart(9) + } else { + yynn1405 = 0 + for _, b := range yyq1405 { + if b { + yynn1405++ + } + } + r.EncodeMapStart(yynn1405) + yynn1405 = 0 + } + if yyr1405 || yy2arr1405 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1405[0] { + yym1407 := z.EncBinary() + _ = yym1407 + if false { + } else { + r.EncodeBool(bool(x.Privileged)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq1405[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("privileged")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1408 := z.EncBinary() + _ = yym1408 + if false { + } else { + r.EncodeBool(bool(x.Privileged)) + } + } + } + if yyr1405 || yy2arr1405 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1405[1] { + if x.Capabilities == nil { + r.EncodeNil() + } else { + yym1410 := z.EncBinary() + _ = yym1410 + if false { + } else { + h.encSliceapi_Capability(([]pkg2_api.Capability)(x.Capabilities), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1405[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("capabilities")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Capabilities == nil { + r.EncodeNil() + } else { + yym1411 := z.EncBinary() + _ = yym1411 + if false { + } else { + h.encSliceapi_Capability(([]pkg2_api.Capability)(x.Capabilities), e) + } + } + } + } + if yyr1405 || yy2arr1405 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1405[2] { + if x.Volumes == nil { + r.EncodeNil() + } else { + yym1413 := z.EncBinary() + _ = yym1413 + if false { + } else { + h.encSliceFSType(([]FSType)(x.Volumes), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1405[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("volumes")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Volumes == nil { + r.EncodeNil() + } else { + yym1414 := z.EncBinary() + _ = yym1414 + if false { + } else { + h.encSliceFSType(([]FSType)(x.Volumes), e) + } + } + } + } + if yyr1405 || yy2arr1405 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1405[3] { + yym1416 := z.EncBinary() + _ = yym1416 + if false { + } else { + r.EncodeBool(bool(x.HostNetwork)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq1405[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostNetwork")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1417 := z.EncBinary() + _ = yym1417 + if false { + } else { + r.EncodeBool(bool(x.HostNetwork)) + } + } + } + if yyr1405 || yy2arr1405 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1405[4] { + if x.HostPorts == nil { + r.EncodeNil() + } else { + yym1419 := z.EncBinary() + _ = yym1419 + if false { + } else { + h.encSliceHostPortRange(([]HostPortRange)(x.HostPorts), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1405[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostPorts")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.HostPorts == nil { + r.EncodeNil() + } else { + yym1420 := z.EncBinary() + _ = yym1420 + if false { + } else { + h.encSliceHostPortRange(([]HostPortRange)(x.HostPorts), e) + } + } + } + } + if yyr1405 || yy2arr1405 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1405[5] { + yym1422 := z.EncBinary() + _ = yym1422 + if false { + } else { + r.EncodeBool(bool(x.HostPID)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq1405[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostPID")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1423 := z.EncBinary() + _ = yym1423 + if false { + } else { + r.EncodeBool(bool(x.HostPID)) + } + } + } + if yyr1405 || yy2arr1405 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1405[6] { + yym1425 := z.EncBinary() + _ = yym1425 + if false { + } else { + r.EncodeBool(bool(x.HostIPC)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq1405[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostIPC")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1426 := z.EncBinary() + _ = yym1426 + if false { + } else { + r.EncodeBool(bool(x.HostIPC)) + } + } + } + if yyr1405 || yy2arr1405 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1405[7] { + yy1428 := &x.SELinuxContext + yy1428.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1405[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("seLinuxContext")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1429 := &x.SELinuxContext + yy1429.CodecEncodeSelf(e) + } + } + if yyr1405 || yy2arr1405 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1405[8] { + yy1431 := &x.RunAsUser + yy1431.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1405[8] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("runAsUser")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1432 := &x.RunAsUser + yy1432.CodecEncodeSelf(e) + } + } + if yyr1405 || yy2arr1405 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodSecurityPolicySpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1433 := z.DecBinary() + _ = yym1433 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1434 := r.ContainerType() + if yyct1434 == codecSelferValueTypeMap1234 { + yyl1434 := r.ReadMapStart() + if yyl1434 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1434, d) + } + } else if yyct1434 == codecSelferValueTypeArray1234 { + yyl1434 := r.ReadArrayStart() + if yyl1434 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1434, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1435Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1435Slc + var yyhl1435 bool = l >= 0 + for yyj1435 := 0; ; yyj1435++ { + if yyhl1435 { + if yyj1435 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1435Slc = r.DecodeBytes(yys1435Slc, true, true) + yys1435 := string(yys1435Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1435 { + case "privileged": + if r.TryDecodeAsNil() { + x.Privileged = false + } else { + x.Privileged = bool(r.DecodeBool()) + } + case "capabilities": + if r.TryDecodeAsNil() { + x.Capabilities = nil + } else { + yyv1437 := &x.Capabilities + yym1438 := z.DecBinary() + _ = yym1438 + if false { + } else { + h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv1437), d) + } + } + case "volumes": + if r.TryDecodeAsNil() { + x.Volumes = nil + } else { + yyv1439 := &x.Volumes + yym1440 := z.DecBinary() + _ = yym1440 + if false { + } else { + h.decSliceFSType((*[]FSType)(yyv1439), d) + } + } + case "hostNetwork": + if r.TryDecodeAsNil() { + x.HostNetwork = false + } else { + x.HostNetwork = bool(r.DecodeBool()) + } + case "hostPorts": + if r.TryDecodeAsNil() { + x.HostPorts = nil + } else { + yyv1442 := &x.HostPorts + yym1443 := z.DecBinary() + _ = yym1443 + if false { + } else { + h.decSliceHostPortRange((*[]HostPortRange)(yyv1442), d) + } + } + case "hostPID": + if r.TryDecodeAsNil() { + x.HostPID = false + } else { + x.HostPID = bool(r.DecodeBool()) + } + case "hostIPC": + if r.TryDecodeAsNil() { + x.HostIPC = false + } else { + x.HostIPC = bool(r.DecodeBool()) + } + case "seLinuxContext": + if r.TryDecodeAsNil() { + x.SELinuxContext = SELinuxContextStrategyOptions{} + } else { + yyv1446 := &x.SELinuxContext + yyv1446.CodecDecodeSelf(d) + } + case "runAsUser": + if r.TryDecodeAsNil() { + x.RunAsUser = RunAsUserStrategyOptions{} + } else { + yyv1447 := &x.RunAsUser + yyv1447.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1435) + } // end switch yys1435 + } // end for yyj1435 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1448 int + var yyb1448 bool + var yyhl1448 bool = l >= 0 + yyj1448++ + if yyhl1448 { + yyb1448 = yyj1448 > l + } else { + yyb1448 = r.CheckBreak() + } + if yyb1448 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Privileged = false + } else { + x.Privileged = bool(r.DecodeBool()) + } + yyj1448++ + if yyhl1448 { + yyb1448 = yyj1448 > l + } else { + yyb1448 = r.CheckBreak() + } + if yyb1448 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Capabilities = nil + } else { + yyv1450 := &x.Capabilities + yym1451 := z.DecBinary() + _ = yym1451 + if false { + } else { + h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv1450), d) + } + } + yyj1448++ + if yyhl1448 { + yyb1448 = yyj1448 > l + } else { + yyb1448 = r.CheckBreak() + } + if yyb1448 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Volumes = nil + } else { + yyv1452 := &x.Volumes + yym1453 := z.DecBinary() + _ = yym1453 + if false { + } else { + h.decSliceFSType((*[]FSType)(yyv1452), d) + } + } + yyj1448++ + if yyhl1448 { + yyb1448 = yyj1448 > l + } else { + yyb1448 = r.CheckBreak() + } + if yyb1448 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostNetwork = false + } else { + x.HostNetwork = bool(r.DecodeBool()) + } + yyj1448++ + if yyhl1448 { + yyb1448 = yyj1448 > l + } else { + yyb1448 = r.CheckBreak() + } + if yyb1448 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostPorts = nil + } else { + yyv1455 := &x.HostPorts + yym1456 := z.DecBinary() + _ = yym1456 + if false { + } else { + h.decSliceHostPortRange((*[]HostPortRange)(yyv1455), d) + } + } + yyj1448++ + if yyhl1448 { + yyb1448 = yyj1448 > l + } else { + yyb1448 = r.CheckBreak() + } + if yyb1448 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostPID = false + } else { + x.HostPID = bool(r.DecodeBool()) + } + yyj1448++ + if yyhl1448 { + yyb1448 = yyj1448 > l + } else { + yyb1448 = r.CheckBreak() + } + if yyb1448 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostIPC = false + } else { + x.HostIPC = bool(r.DecodeBool()) + } + yyj1448++ + if yyhl1448 { + yyb1448 = yyj1448 > l + } else { + yyb1448 = r.CheckBreak() + } + if yyb1448 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SELinuxContext = SELinuxContextStrategyOptions{} + } else { + yyv1459 := &x.SELinuxContext + yyv1459.CodecDecodeSelf(d) + } + yyj1448++ + if yyhl1448 { + yyb1448 = yyj1448 > l + } else { + yyb1448 = r.CheckBreak() + } + if yyb1448 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RunAsUser = RunAsUserStrategyOptions{} + } else { + yyv1460 := &x.RunAsUser + yyv1460.CodecDecodeSelf(d) + } + for { + yyj1448++ + if yyhl1448 { + yyb1448 = yyj1448 > l + } else { + yyb1448 = r.CheckBreak() + } + if yyb1448 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1448-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *HostPortRange) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1461 := z.EncBinary() + _ = yym1461 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1462 := !z.EncBinary() + yy2arr1462 := z.EncBasicHandle().StructToArray + var yyq1462 [2]bool + _, _, _ = yysep1462, yyq1462, yy2arr1462 + const yyr1462 bool = false + var yynn1462 int + if yyr1462 || yy2arr1462 { + r.EncodeArrayStart(2) + } else { + yynn1462 = 2 + for _, b := range yyq1462 { + if b { + yynn1462++ + } + } + r.EncodeMapStart(yynn1462) + yynn1462 = 0 + } + if yyr1462 || yy2arr1462 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1464 := z.EncBinary() + _ = yym1464 + if false { + } else { + r.EncodeInt(int64(x.Min)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("min")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1465 := z.EncBinary() + _ = yym1465 + if false { + } else { + r.EncodeInt(int64(x.Min)) + } + } + if yyr1462 || yy2arr1462 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1467 := z.EncBinary() + _ = yym1467 + if false { + } else { + r.EncodeInt(int64(x.Max)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("max")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1468 := z.EncBinary() + _ = yym1468 + if false { + } else { + r.EncodeInt(int64(x.Max)) + } + } + if yyr1462 || yy2arr1462 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *HostPortRange) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1469 := z.DecBinary() + _ = yym1469 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1470 := r.ContainerType() + if yyct1470 == codecSelferValueTypeMap1234 { + yyl1470 := r.ReadMapStart() + if yyl1470 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1470, d) + } + } else if yyct1470 == codecSelferValueTypeArray1234 { + yyl1470 := r.ReadArrayStart() + if yyl1470 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1470, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *HostPortRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1471Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1471Slc + var yyhl1471 bool = l >= 0 + for yyj1471 := 0; ; yyj1471++ { + if yyhl1471 { + if yyj1471 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1471Slc = r.DecodeBytes(yys1471Slc, true, true) + yys1471 := string(yys1471Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1471 { + case "min": + if r.TryDecodeAsNil() { + x.Min = 0 + } else { + x.Min = int(r.DecodeInt(codecSelferBitsize1234)) + } + case "max": + if r.TryDecodeAsNil() { + x.Max = 0 + } else { + x.Max = int(r.DecodeInt(codecSelferBitsize1234)) + } + default: + z.DecStructFieldNotFound(-1, yys1471) + } // end switch yys1471 + } // end for yyj1471 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *HostPortRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1474 int + var yyb1474 bool + var yyhl1474 bool = l >= 0 + yyj1474++ + if yyhl1474 { + yyb1474 = yyj1474 > l + } else { + yyb1474 = r.CheckBreak() + } + if yyb1474 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Min = 0 + } else { + x.Min = int(r.DecodeInt(codecSelferBitsize1234)) + } + yyj1474++ + if yyhl1474 { + yyb1474 = yyj1474 > l + } else { + yyb1474 = r.CheckBreak() + } + if yyb1474 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Max = 0 + } else { + x.Max = int(r.DecodeInt(codecSelferBitsize1234)) + } + for { + yyj1474++ + if yyhl1474 { + yyb1474 = yyj1474 > l + } else { + yyb1474 = r.CheckBreak() + } + if yyb1474 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1474-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x FSType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1477 := z.EncBinary() + _ = yym1477 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *FSType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1478 := z.DecBinary() + _ = yym1478 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *SELinuxContextStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1479 := z.EncBinary() + _ = yym1479 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1480 := !z.EncBinary() + yy2arr1480 := z.EncBasicHandle().StructToArray + var yyq1480 [2]bool + _, _, _ = yysep1480, yyq1480, yy2arr1480 + const yyr1480 bool = false + yyq1480[1] = x.SELinuxOptions != nil + var yynn1480 int + if yyr1480 || yy2arr1480 { + r.EncodeArrayStart(2) + } else { + yynn1480 = 1 + for _, b := range yyq1480 { + if b { + yynn1480++ + } + } + r.EncodeMapStart(yynn1480) + yynn1480 = 0 + } + if yyr1480 || yy2arr1480 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr1480 || yy2arr1480 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1480[1] { + if x.SELinuxOptions == nil { + r.EncodeNil() + } else { + x.SELinuxOptions.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1480[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SELinuxOptions == nil { + r.EncodeNil() + } else { + x.SELinuxOptions.CodecEncodeSelf(e) + } + } + } + if yyr1480 || yy2arr1480 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *SELinuxContextStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1483 := z.DecBinary() + _ = yym1483 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1484 := r.ContainerType() + if yyct1484 == codecSelferValueTypeMap1234 { + yyl1484 := r.ReadMapStart() + if yyl1484 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1484, d) + } + } else if yyct1484 == codecSelferValueTypeArray1234 { + yyl1484 := r.ReadArrayStart() + if yyl1484 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1484, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *SELinuxContextStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1485Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1485Slc + var yyhl1485 bool = l >= 0 + for yyj1485 := 0; ; yyj1485++ { + if yyhl1485 { + if yyj1485 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1485Slc = r.DecodeBytes(yys1485Slc, true, true) + yys1485 := string(yys1485Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1485 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = SELinuxContextStrategy(r.DecodeString()) + } + case "seLinuxOptions": + if r.TryDecodeAsNil() { + if x.SELinuxOptions != nil { + x.SELinuxOptions = nil + } + } else { + if x.SELinuxOptions == nil { + x.SELinuxOptions = new(pkg2_api.SELinuxOptions) + } + x.SELinuxOptions.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1485) + } // end switch yys1485 + } // end for yyj1485 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *SELinuxContextStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1488 int + var yyb1488 bool + var yyhl1488 bool = l >= 0 + yyj1488++ + if yyhl1488 { + yyb1488 = yyj1488 > l + } else { + yyb1488 = r.CheckBreak() + } + if yyb1488 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = SELinuxContextStrategy(r.DecodeString()) + } + yyj1488++ + if yyhl1488 { + yyb1488 = yyj1488 > l + } else { + yyb1488 = r.CheckBreak() + } + if yyb1488 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.SELinuxOptions != nil { + x.SELinuxOptions = nil + } + } else { + if x.SELinuxOptions == nil { + x.SELinuxOptions = new(pkg2_api.SELinuxOptions) + } + x.SELinuxOptions.CodecDecodeSelf(d) + } + for { + yyj1488++ + if yyhl1488 { + yyb1488 = yyj1488 > l + } else { + yyb1488 = r.CheckBreak() + } + if yyb1488 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1488-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x SELinuxContextStrategy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1491 := z.EncBinary() + _ = yym1491 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *SELinuxContextStrategy) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1492 := z.DecBinary() + _ = yym1492 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *RunAsUserStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1493 := z.EncBinary() + _ = yym1493 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1494 := !z.EncBinary() + yy2arr1494 := z.EncBasicHandle().StructToArray + var yyq1494 [2]bool + _, _, _ = yysep1494, yyq1494, yy2arr1494 + const yyr1494 bool = false + yyq1494[1] = len(x.Ranges) != 0 + var yynn1494 int + if yyr1494 || yy2arr1494 { + r.EncodeArrayStart(2) + } else { + yynn1494 = 1 + for _, b := range yyq1494 { + if b { + yynn1494++ + } + } + r.EncodeMapStart(yynn1494) + yynn1494 = 0 + } + if yyr1494 || yy2arr1494 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr1494 || yy2arr1494 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1494[1] { + if x.Ranges == nil { + r.EncodeNil() + } else { + yym1497 := z.EncBinary() + _ = yym1497 + if false { + } else { + h.encSliceIDRange(([]IDRange)(x.Ranges), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1494[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("ranges")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Ranges == nil { + r.EncodeNil() + } else { + yym1498 := z.EncBinary() + _ = yym1498 + if false { + } else { + h.encSliceIDRange(([]IDRange)(x.Ranges), e) + } + } + } + } + if yyr1494 || yy2arr1494 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RunAsUserStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1499 := z.DecBinary() + _ = yym1499 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1500 := r.ContainerType() + if yyct1500 == codecSelferValueTypeMap1234 { + yyl1500 := r.ReadMapStart() + if yyl1500 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1500, d) + } + } else if yyct1500 == codecSelferValueTypeArray1234 { + yyl1500 := r.ReadArrayStart() + if yyl1500 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1500, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RunAsUserStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1501Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1501Slc + var yyhl1501 bool = l >= 0 + for yyj1501 := 0; ; yyj1501++ { + if yyhl1501 { + if yyj1501 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1501Slc = r.DecodeBytes(yys1501Slc, true, true) + yys1501 := string(yys1501Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1501 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = RunAsUserStrategy(r.DecodeString()) + } + case "ranges": + if r.TryDecodeAsNil() { + x.Ranges = nil + } else { + yyv1503 := &x.Ranges + yym1504 := z.DecBinary() + _ = yym1504 + if false { + } else { + h.decSliceIDRange((*[]IDRange)(yyv1503), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1501) + } // end switch yys1501 + } // end for yyj1501 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RunAsUserStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1505 int + var yyb1505 bool + var yyhl1505 bool = l >= 0 + yyj1505++ + if yyhl1505 { + yyb1505 = yyj1505 > l + } else { + yyb1505 = r.CheckBreak() + } + if yyb1505 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = RunAsUserStrategy(r.DecodeString()) + } + yyj1505++ + if yyhl1505 { + yyb1505 = yyj1505 > l + } else { + yyb1505 = r.CheckBreak() + } + if yyb1505 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Ranges = nil + } else { + yyv1507 := &x.Ranges + yym1508 := z.DecBinary() + _ = yym1508 + if false { + } else { + h.decSliceIDRange((*[]IDRange)(yyv1507), d) + } + } + for { + yyj1505++ + if yyhl1505 { + yyb1505 = yyj1505 > l + } else { + yyb1505 = r.CheckBreak() + } + if yyb1505 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1505-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *IDRange) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1509 := z.EncBinary() + _ = yym1509 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1510 := !z.EncBinary() + yy2arr1510 := z.EncBasicHandle().StructToArray + var yyq1510 [2]bool + _, _, _ = yysep1510, yyq1510, yy2arr1510 + const yyr1510 bool = false + var yynn1510 int + if yyr1510 || yy2arr1510 { + r.EncodeArrayStart(2) + } else { + yynn1510 = 2 + for _, b := range yyq1510 { + if b { + yynn1510++ + } + } + r.EncodeMapStart(yynn1510) + yynn1510 = 0 + } + if yyr1510 || yy2arr1510 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1512 := z.EncBinary() + _ = yym1512 + if false { + } else { + r.EncodeInt(int64(x.Min)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("min")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1513 := z.EncBinary() + _ = yym1513 + if false { + } else { + r.EncodeInt(int64(x.Min)) + } + } + if yyr1510 || yy2arr1510 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1515 := z.EncBinary() + _ = yym1515 + if false { + } else { + r.EncodeInt(int64(x.Max)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("max")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1516 := z.EncBinary() + _ = yym1516 + if false { + } else { + r.EncodeInt(int64(x.Max)) + } + } + if yyr1510 || yy2arr1510 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *IDRange) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1517 := z.DecBinary() + _ = yym1517 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1518 := r.ContainerType() + if yyct1518 == codecSelferValueTypeMap1234 { + yyl1518 := r.ReadMapStart() + if yyl1518 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1518, d) + } + } else if yyct1518 == codecSelferValueTypeArray1234 { + yyl1518 := r.ReadArrayStart() + if yyl1518 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1518, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *IDRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1519Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1519Slc + var yyhl1519 bool = l >= 0 + for yyj1519 := 0; ; yyj1519++ { + if yyhl1519 { + if yyj1519 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1519Slc = r.DecodeBytes(yys1519Slc, true, true) + yys1519 := string(yys1519Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1519 { + case "min": + if r.TryDecodeAsNil() { + x.Min = 0 + } else { + x.Min = int64(r.DecodeInt(64)) + } + case "max": + if r.TryDecodeAsNil() { + x.Max = 0 + } else { + x.Max = int64(r.DecodeInt(64)) + } + default: + z.DecStructFieldNotFound(-1, yys1519) + } // end switch yys1519 + } // end for yyj1519 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *IDRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1522 int + var yyb1522 bool + var yyhl1522 bool = l >= 0 + yyj1522++ + if yyhl1522 { + yyb1522 = yyj1522 > l + } else { + yyb1522 = r.CheckBreak() + } + if yyb1522 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Min = 0 + } else { + x.Min = int64(r.DecodeInt(64)) + } + yyj1522++ + if yyhl1522 { + yyb1522 = yyj1522 > l + } else { + yyb1522 = r.CheckBreak() + } + if yyb1522 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Max = 0 + } else { + x.Max = int64(r.DecodeInt(64)) + } + for { + yyj1522++ + if yyhl1522 { + yyb1522 = yyj1522 > l + } else { + yyb1522 = r.CheckBreak() + } + if yyb1522 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1522-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x RunAsUserStrategy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1525 := z.EncBinary() + _ = yym1525 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *RunAsUserStrategy) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1526 := z.DecBinary() + _ = yym1526 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *PodSecurityPolicyList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1527 := z.EncBinary() + _ = yym1527 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1528 := !z.EncBinary() + yy2arr1528 := z.EncBasicHandle().StructToArray + var yyq1528 [4]bool + _, _, _ = yysep1528, yyq1528, yy2arr1528 + const yyr1528 bool = false + yyq1528[0] = x.Kind != "" + yyq1528[1] = x.APIVersion != "" + yyq1528[2] = true + var yynn1528 int + if yyr1528 || yy2arr1528 { + r.EncodeArrayStart(4) + } else { + yynn1528 = 1 + for _, b := range yyq1528 { + if b { + yynn1528++ + } + } + r.EncodeMapStart(yynn1528) + yynn1528 = 0 + } + if yyr1528 || yy2arr1528 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1528[0] { + yym1530 := z.EncBinary() + _ = yym1530 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1528[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1531 := z.EncBinary() + _ = yym1531 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr1528 || yy2arr1528 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1528[1] { + yym1533 := z.EncBinary() + _ = yym1533 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1528[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1534 := z.EncBinary() + _ = yym1534 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr1528 || yy2arr1528 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1528[2] { + yy1536 := &x.ListMeta + yym1537 := z.EncBinary() + _ = yym1537 + if false { + } else if z.HasExtensions() && z.EncExt(yy1536) { + } else { + z.EncFallback(yy1536) + } + } else { + r.EncodeNil() + } + } else { + if yyq1528[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1538 := &x.ListMeta + yym1539 := z.EncBinary() + _ = yym1539 + if false { + } else if z.HasExtensions() && z.EncExt(yy1538) { + } else { + z.EncFallback(yy1538) + } + } + } + if yyr1528 || yy2arr1528 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym1541 := z.EncBinary() + _ = yym1541 + if false { + } else { + h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym1542 := z.EncBinary() + _ = yym1542 + if false { + } else { + h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e) + } + } + } + if yyr1528 || yy2arr1528 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodSecurityPolicyList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1543 := z.DecBinary() + _ = yym1543 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1544 := r.ContainerType() + if yyct1544 == codecSelferValueTypeMap1234 { + yyl1544 := r.ReadMapStart() + if yyl1544 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1544, d) + } + } else if yyct1544 == codecSelferValueTypeArray1234 { + yyl1544 := r.ReadArrayStart() + if yyl1544 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1544, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodSecurityPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1545Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1545Slc + var yyhl1545 bool = l >= 0 + for yyj1545 := 0; ; yyj1545++ { + if yyhl1545 { + if yyj1545 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1545Slc = r.DecodeBytes(yys1545Slc, true, true) + yys1545 := string(yys1545Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1545 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv1548 := &x.ListMeta + yym1549 := z.DecBinary() + _ = yym1549 + if false { + } else if z.HasExtensions() && z.DecExt(yyv1548) { + } else { + z.DecFallback(yyv1548, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv1550 := &x.Items + yym1551 := z.DecBinary() + _ = yym1551 + if false { + } else { + h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv1550), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1545) + } // end switch yys1545 + } // end for yyj1545 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodSecurityPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1552 int + var yyb1552 bool + var yyhl1552 bool = l >= 0 + yyj1552++ + if yyhl1552 { + yyb1552 = yyj1552 > l + } else { + yyb1552 = r.CheckBreak() + } + if yyb1552 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj1552++ + if yyhl1552 { + yyb1552 = yyj1552 > l + } else { + yyb1552 = r.CheckBreak() + } + if yyb1552 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj1552++ + if yyhl1552 { + yyb1552 = yyj1552 > l + } else { + yyb1552 = r.CheckBreak() + } + if yyb1552 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv1555 := &x.ListMeta + yym1556 := z.DecBinary() + _ = yym1556 + if false { + } else if z.HasExtensions() && z.DecExt(yyv1555) { + } else { + z.DecFallback(yyv1555, false) + } + } + yyj1552++ + if yyhl1552 { + yyb1552 = yyj1552 > l + } else { + yyb1552 = r.CheckBreak() + } + if yyb1552 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv1557 := &x.Items + yym1558 := z.DecBinary() + _ = yym1558 + if false { + } else { + h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv1557), d) + } + } + for { + yyj1552++ + if yyhl1552 { + yyb1552 = yyj1552 > l + } else { + yyb1552 = r.CheckBreak() + } + if yyb1552 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1552-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + func (x codecSelfer1234) encSliceCustomMetricTarget(v []CustomMetricTarget, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1378 := range v { + for _, yyv1559 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1379 := &yyv1378 - yy1379.CodecEncodeSelf(e) + yy1560 := &yyv1559 + yy1560.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16422,83 +18580,83 @@ func (x codecSelfer1234) decSliceCustomMetricTarget(v *[]CustomMetricTarget, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1380 := *v - yyh1380, yyl1380 := z.DecSliceHelperStart() - var yyc1380 bool - if yyl1380 == 0 { - if yyv1380 == nil { - yyv1380 = []CustomMetricTarget{} - yyc1380 = true - } else if len(yyv1380) != 0 { - yyv1380 = yyv1380[:0] - yyc1380 = true + yyv1561 := *v + yyh1561, yyl1561 := z.DecSliceHelperStart() + var yyc1561 bool + if yyl1561 == 0 { + if yyv1561 == nil { + yyv1561 = []CustomMetricTarget{} + yyc1561 = true + } else if len(yyv1561) != 0 { + yyv1561 = yyv1561[:0] + yyc1561 = true } - } else if yyl1380 > 0 { - var yyrr1380, yyrl1380 int - var yyrt1380 bool - if yyl1380 > cap(yyv1380) { + } else if yyl1561 > 0 { + var yyrr1561, yyrl1561 int + var yyrt1561 bool + if yyl1561 > cap(yyv1561) { - yyrg1380 := len(yyv1380) > 0 - yyv21380 := yyv1380 - yyrl1380, yyrt1380 = z.DecInferLen(yyl1380, z.DecBasicHandle().MaxInitLen, 40) - if yyrt1380 { - if yyrl1380 <= cap(yyv1380) { - yyv1380 = yyv1380[:yyrl1380] + yyrg1561 := len(yyv1561) > 0 + yyv21561 := yyv1561 + yyrl1561, yyrt1561 = z.DecInferLen(yyl1561, z.DecBasicHandle().MaxInitLen, 40) + if yyrt1561 { + if yyrl1561 <= cap(yyv1561) { + yyv1561 = yyv1561[:yyrl1561] } else { - yyv1380 = make([]CustomMetricTarget, yyrl1380) + yyv1561 = make([]CustomMetricTarget, yyrl1561) } } else { - yyv1380 = make([]CustomMetricTarget, yyrl1380) + yyv1561 = make([]CustomMetricTarget, yyrl1561) } - yyc1380 = true - yyrr1380 = len(yyv1380) - if yyrg1380 { - copy(yyv1380, yyv21380) + yyc1561 = true + yyrr1561 = len(yyv1561) + if yyrg1561 { + copy(yyv1561, yyv21561) } - } else if yyl1380 != len(yyv1380) { - yyv1380 = yyv1380[:yyl1380] - yyc1380 = true + } else if yyl1561 != len(yyv1561) { + yyv1561 = yyv1561[:yyl1561] + yyc1561 = true } - yyj1380 := 0 - for ; yyj1380 < yyrr1380; yyj1380++ { - yyh1380.ElemContainerState(yyj1380) + yyj1561 := 0 + for ; yyj1561 < yyrr1561; yyj1561++ { + yyh1561.ElemContainerState(yyj1561) if r.TryDecodeAsNil() { - yyv1380[yyj1380] = CustomMetricTarget{} + yyv1561[yyj1561] = CustomMetricTarget{} } else { - yyv1381 := &yyv1380[yyj1380] - yyv1381.CodecDecodeSelf(d) + yyv1562 := &yyv1561[yyj1561] + yyv1562.CodecDecodeSelf(d) } } - if yyrt1380 { - for ; yyj1380 < yyl1380; yyj1380++ { - yyv1380 = append(yyv1380, CustomMetricTarget{}) - yyh1380.ElemContainerState(yyj1380) + if yyrt1561 { + for ; yyj1561 < yyl1561; yyj1561++ { + yyv1561 = append(yyv1561, CustomMetricTarget{}) + yyh1561.ElemContainerState(yyj1561) if r.TryDecodeAsNil() { - yyv1380[yyj1380] = CustomMetricTarget{} + yyv1561[yyj1561] = CustomMetricTarget{} } else { - yyv1382 := &yyv1380[yyj1380] - yyv1382.CodecDecodeSelf(d) + yyv1563 := &yyv1561[yyj1561] + yyv1563.CodecDecodeSelf(d) } } } } else { - yyj1380 := 0 - for ; !r.CheckBreak(); yyj1380++ { + yyj1561 := 0 + for ; !r.CheckBreak(); yyj1561++ { - if yyj1380 >= len(yyv1380) { - yyv1380 = append(yyv1380, CustomMetricTarget{}) // var yyz1380 CustomMetricTarget - yyc1380 = true + if yyj1561 >= len(yyv1561) { + yyv1561 = append(yyv1561, CustomMetricTarget{}) // var yyz1561 CustomMetricTarget + yyc1561 = true } - yyh1380.ElemContainerState(yyj1380) - if yyj1380 < len(yyv1380) { + yyh1561.ElemContainerState(yyj1561) + if yyj1561 < len(yyv1561) { if r.TryDecodeAsNil() { - yyv1380[yyj1380] = CustomMetricTarget{} + yyv1561[yyj1561] = CustomMetricTarget{} } else { - yyv1383 := &yyv1380[yyj1380] - yyv1383.CodecDecodeSelf(d) + yyv1564 := &yyv1561[yyj1561] + yyv1564.CodecDecodeSelf(d) } } else { @@ -16506,17 +18664,17 @@ func (x codecSelfer1234) decSliceCustomMetricTarget(v *[]CustomMetricTarget, d * } } - if yyj1380 < len(yyv1380) { - yyv1380 = yyv1380[:yyj1380] - yyc1380 = true - } else if yyj1380 == 0 && yyv1380 == nil { - yyv1380 = []CustomMetricTarget{} - yyc1380 = true + if yyj1561 < len(yyv1561) { + yyv1561 = yyv1561[:yyj1561] + yyc1561 = true + } else if yyj1561 == 0 && yyv1561 == nil { + yyv1561 = []CustomMetricTarget{} + yyc1561 = true } } - yyh1380.End() - if yyc1380 { - *v = yyv1380 + yyh1561.End() + if yyc1561 { + *v = yyv1561 } } @@ -16525,10 +18683,10 @@ func (x codecSelfer1234) encSliceCustomMetricCurrentStatus(v []CustomMetricCurre z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1384 := range v { + for _, yyv1565 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1385 := &yyv1384 - yy1385.CodecEncodeSelf(e) + yy1566 := &yyv1565 + yy1566.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16538,83 +18696,83 @@ func (x codecSelfer1234) decSliceCustomMetricCurrentStatus(v *[]CustomMetricCurr z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1386 := *v - yyh1386, yyl1386 := z.DecSliceHelperStart() - var yyc1386 bool - if yyl1386 == 0 { - if yyv1386 == nil { - yyv1386 = []CustomMetricCurrentStatus{} - yyc1386 = true - } else if len(yyv1386) != 0 { - yyv1386 = yyv1386[:0] - yyc1386 = true + yyv1567 := *v + yyh1567, yyl1567 := z.DecSliceHelperStart() + var yyc1567 bool + if yyl1567 == 0 { + if yyv1567 == nil { + yyv1567 = []CustomMetricCurrentStatus{} + yyc1567 = true + } else if len(yyv1567) != 0 { + yyv1567 = yyv1567[:0] + yyc1567 = true } - } else if yyl1386 > 0 { - var yyrr1386, yyrl1386 int - var yyrt1386 bool - if yyl1386 > cap(yyv1386) { + } else if yyl1567 > 0 { + var yyrr1567, yyrl1567 int + var yyrt1567 bool + if yyl1567 > cap(yyv1567) { - yyrg1386 := len(yyv1386) > 0 - yyv21386 := yyv1386 - yyrl1386, yyrt1386 = z.DecInferLen(yyl1386, z.DecBasicHandle().MaxInitLen, 40) - if yyrt1386 { - if yyrl1386 <= cap(yyv1386) { - yyv1386 = yyv1386[:yyrl1386] + yyrg1567 := len(yyv1567) > 0 + yyv21567 := yyv1567 + yyrl1567, yyrt1567 = z.DecInferLen(yyl1567, z.DecBasicHandle().MaxInitLen, 40) + if yyrt1567 { + if yyrl1567 <= cap(yyv1567) { + yyv1567 = yyv1567[:yyrl1567] } else { - yyv1386 = make([]CustomMetricCurrentStatus, yyrl1386) + yyv1567 = make([]CustomMetricCurrentStatus, yyrl1567) } } else { - yyv1386 = make([]CustomMetricCurrentStatus, yyrl1386) + yyv1567 = make([]CustomMetricCurrentStatus, yyrl1567) } - yyc1386 = true - yyrr1386 = len(yyv1386) - if yyrg1386 { - copy(yyv1386, yyv21386) + yyc1567 = true + yyrr1567 = len(yyv1567) + if yyrg1567 { + copy(yyv1567, yyv21567) } - } else if yyl1386 != len(yyv1386) { - yyv1386 = yyv1386[:yyl1386] - yyc1386 = true + } else if yyl1567 != len(yyv1567) { + yyv1567 = yyv1567[:yyl1567] + yyc1567 = true } - yyj1386 := 0 - for ; yyj1386 < yyrr1386; yyj1386++ { - yyh1386.ElemContainerState(yyj1386) + yyj1567 := 0 + for ; yyj1567 < yyrr1567; yyj1567++ { + yyh1567.ElemContainerState(yyj1567) if r.TryDecodeAsNil() { - yyv1386[yyj1386] = CustomMetricCurrentStatus{} + yyv1567[yyj1567] = CustomMetricCurrentStatus{} } else { - yyv1387 := &yyv1386[yyj1386] - yyv1387.CodecDecodeSelf(d) + yyv1568 := &yyv1567[yyj1567] + yyv1568.CodecDecodeSelf(d) } } - if yyrt1386 { - for ; yyj1386 < yyl1386; yyj1386++ { - yyv1386 = append(yyv1386, CustomMetricCurrentStatus{}) - yyh1386.ElemContainerState(yyj1386) + if yyrt1567 { + for ; yyj1567 < yyl1567; yyj1567++ { + yyv1567 = append(yyv1567, CustomMetricCurrentStatus{}) + yyh1567.ElemContainerState(yyj1567) if r.TryDecodeAsNil() { - yyv1386[yyj1386] = CustomMetricCurrentStatus{} + yyv1567[yyj1567] = CustomMetricCurrentStatus{} } else { - yyv1388 := &yyv1386[yyj1386] - yyv1388.CodecDecodeSelf(d) + yyv1569 := &yyv1567[yyj1567] + yyv1569.CodecDecodeSelf(d) } } } } else { - yyj1386 := 0 - for ; !r.CheckBreak(); yyj1386++ { + yyj1567 := 0 + for ; !r.CheckBreak(); yyj1567++ { - if yyj1386 >= len(yyv1386) { - yyv1386 = append(yyv1386, CustomMetricCurrentStatus{}) // var yyz1386 CustomMetricCurrentStatus - yyc1386 = true + if yyj1567 >= len(yyv1567) { + yyv1567 = append(yyv1567, CustomMetricCurrentStatus{}) // var yyz1567 CustomMetricCurrentStatus + yyc1567 = true } - yyh1386.ElemContainerState(yyj1386) - if yyj1386 < len(yyv1386) { + yyh1567.ElemContainerState(yyj1567) + if yyj1567 < len(yyv1567) { if r.TryDecodeAsNil() { - yyv1386[yyj1386] = CustomMetricCurrentStatus{} + yyv1567[yyj1567] = CustomMetricCurrentStatus{} } else { - yyv1389 := &yyv1386[yyj1386] - yyv1389.CodecDecodeSelf(d) + yyv1570 := &yyv1567[yyj1567] + yyv1570.CodecDecodeSelf(d) } } else { @@ -16622,17 +18780,17 @@ func (x codecSelfer1234) decSliceCustomMetricCurrentStatus(v *[]CustomMetricCurr } } - if yyj1386 < len(yyv1386) { - yyv1386 = yyv1386[:yyj1386] - yyc1386 = true - } else if yyj1386 == 0 && yyv1386 == nil { - yyv1386 = []CustomMetricCurrentStatus{} - yyc1386 = true + if yyj1567 < len(yyv1567) { + yyv1567 = yyv1567[:yyj1567] + yyc1567 = true + } else if yyj1567 == 0 && yyv1567 == nil { + yyv1567 = []CustomMetricCurrentStatus{} + yyc1567 = true } } - yyh1386.End() - if yyc1386 { - *v = yyv1386 + yyh1567.End() + if yyc1567 { + *v = yyv1567 } } @@ -16641,10 +18799,10 @@ func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutosc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1390 := range v { + for _, yyv1571 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1391 := &yyv1390 - yy1391.CodecEncodeSelf(e) + yy1572 := &yyv1571 + yy1572.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16654,83 +18812,83 @@ func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutos z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1392 := *v - yyh1392, yyl1392 := z.DecSliceHelperStart() - var yyc1392 bool - if yyl1392 == 0 { - if yyv1392 == nil { - yyv1392 = []HorizontalPodAutoscaler{} - yyc1392 = true - } else if len(yyv1392) != 0 { - yyv1392 = yyv1392[:0] - yyc1392 = true + yyv1573 := *v + yyh1573, yyl1573 := z.DecSliceHelperStart() + var yyc1573 bool + if yyl1573 == 0 { + if yyv1573 == nil { + yyv1573 = []HorizontalPodAutoscaler{} + yyc1573 = true + } else if len(yyv1573) != 0 { + yyv1573 = yyv1573[:0] + yyc1573 = true } - } else if yyl1392 > 0 { - var yyrr1392, yyrl1392 int - var yyrt1392 bool - if yyl1392 > cap(yyv1392) { + } else if yyl1573 > 0 { + var yyrr1573, yyrl1573 int + var yyrt1573 bool + if yyl1573 > cap(yyv1573) { - yyrg1392 := len(yyv1392) > 0 - yyv21392 := yyv1392 - yyrl1392, yyrt1392 = z.DecInferLen(yyl1392, z.DecBasicHandle().MaxInitLen, 320) - if yyrt1392 { - if yyrl1392 <= cap(yyv1392) { - yyv1392 = yyv1392[:yyrl1392] + yyrg1573 := len(yyv1573) > 0 + yyv21573 := yyv1573 + yyrl1573, yyrt1573 = z.DecInferLen(yyl1573, z.DecBasicHandle().MaxInitLen, 320) + if yyrt1573 { + if yyrl1573 <= cap(yyv1573) { + yyv1573 = yyv1573[:yyrl1573] } else { - yyv1392 = make([]HorizontalPodAutoscaler, yyrl1392) + yyv1573 = make([]HorizontalPodAutoscaler, yyrl1573) } } else { - yyv1392 = make([]HorizontalPodAutoscaler, yyrl1392) + yyv1573 = make([]HorizontalPodAutoscaler, yyrl1573) } - yyc1392 = true - yyrr1392 = len(yyv1392) - if yyrg1392 { - copy(yyv1392, yyv21392) + yyc1573 = true + yyrr1573 = len(yyv1573) + if yyrg1573 { + copy(yyv1573, yyv21573) } - } else if yyl1392 != len(yyv1392) { - yyv1392 = yyv1392[:yyl1392] - yyc1392 = true + } else if yyl1573 != len(yyv1573) { + yyv1573 = yyv1573[:yyl1573] + yyc1573 = true } - yyj1392 := 0 - for ; yyj1392 < yyrr1392; yyj1392++ { - yyh1392.ElemContainerState(yyj1392) + yyj1573 := 0 + for ; yyj1573 < yyrr1573; yyj1573++ { + yyh1573.ElemContainerState(yyj1573) if r.TryDecodeAsNil() { - yyv1392[yyj1392] = HorizontalPodAutoscaler{} + yyv1573[yyj1573] = HorizontalPodAutoscaler{} } else { - yyv1393 := &yyv1392[yyj1392] - yyv1393.CodecDecodeSelf(d) + yyv1574 := &yyv1573[yyj1573] + yyv1574.CodecDecodeSelf(d) } } - if yyrt1392 { - for ; yyj1392 < yyl1392; yyj1392++ { - yyv1392 = append(yyv1392, HorizontalPodAutoscaler{}) - yyh1392.ElemContainerState(yyj1392) + if yyrt1573 { + for ; yyj1573 < yyl1573; yyj1573++ { + yyv1573 = append(yyv1573, HorizontalPodAutoscaler{}) + yyh1573.ElemContainerState(yyj1573) if r.TryDecodeAsNil() { - yyv1392[yyj1392] = HorizontalPodAutoscaler{} + yyv1573[yyj1573] = HorizontalPodAutoscaler{} } else { - yyv1394 := &yyv1392[yyj1392] - yyv1394.CodecDecodeSelf(d) + yyv1575 := &yyv1573[yyj1573] + yyv1575.CodecDecodeSelf(d) } } } } else { - yyj1392 := 0 - for ; !r.CheckBreak(); yyj1392++ { + yyj1573 := 0 + for ; !r.CheckBreak(); yyj1573++ { - if yyj1392 >= len(yyv1392) { - yyv1392 = append(yyv1392, HorizontalPodAutoscaler{}) // var yyz1392 HorizontalPodAutoscaler - yyc1392 = true + if yyj1573 >= len(yyv1573) { + yyv1573 = append(yyv1573, HorizontalPodAutoscaler{}) // var yyz1573 HorizontalPodAutoscaler + yyc1573 = true } - yyh1392.ElemContainerState(yyj1392) - if yyj1392 < len(yyv1392) { + yyh1573.ElemContainerState(yyj1573) + if yyj1573 < len(yyv1573) { if r.TryDecodeAsNil() { - yyv1392[yyj1392] = HorizontalPodAutoscaler{} + yyv1573[yyj1573] = HorizontalPodAutoscaler{} } else { - yyv1395 := &yyv1392[yyj1392] - yyv1395.CodecDecodeSelf(d) + yyv1576 := &yyv1573[yyj1573] + yyv1576.CodecDecodeSelf(d) } } else { @@ -16738,17 +18896,17 @@ func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutos } } - if yyj1392 < len(yyv1392) { - yyv1392 = yyv1392[:yyj1392] - yyc1392 = true - } else if yyj1392 == 0 && yyv1392 == nil { - yyv1392 = []HorizontalPodAutoscaler{} - yyc1392 = true + if yyj1573 < len(yyv1573) { + yyv1573 = yyv1573[:yyj1573] + yyc1573 = true + } else if yyj1573 == 0 && yyv1573 == nil { + yyv1573 = []HorizontalPodAutoscaler{} + yyc1573 = true } } - yyh1392.End() - if yyc1392 { - *v = yyv1392 + yyh1573.End() + if yyc1573 { + *v = yyv1573 } } @@ -16757,10 +18915,10 @@ func (x codecSelfer1234) encSliceAPIVersion(v []APIVersion, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1396 := range v { + for _, yyv1577 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1397 := &yyv1396 - yy1397.CodecEncodeSelf(e) + yy1578 := &yyv1577 + yy1578.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16770,83 +18928,83 @@ func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1398 := *v - yyh1398, yyl1398 := z.DecSliceHelperStart() - var yyc1398 bool - if yyl1398 == 0 { - if yyv1398 == nil { - yyv1398 = []APIVersion{} - yyc1398 = true - } else if len(yyv1398) != 0 { - yyv1398 = yyv1398[:0] - yyc1398 = true + yyv1579 := *v + yyh1579, yyl1579 := z.DecSliceHelperStart() + var yyc1579 bool + if yyl1579 == 0 { + if yyv1579 == nil { + yyv1579 = []APIVersion{} + yyc1579 = true + } else if len(yyv1579) != 0 { + yyv1579 = yyv1579[:0] + yyc1579 = true } - } else if yyl1398 > 0 { - var yyrr1398, yyrl1398 int - var yyrt1398 bool - if yyl1398 > cap(yyv1398) { + } else if yyl1579 > 0 { + var yyrr1579, yyrl1579 int + var yyrt1579 bool + if yyl1579 > cap(yyv1579) { - yyrg1398 := len(yyv1398) > 0 - yyv21398 := yyv1398 - yyrl1398, yyrt1398 = z.DecInferLen(yyl1398, z.DecBasicHandle().MaxInitLen, 32) - if yyrt1398 { - if yyrl1398 <= cap(yyv1398) { - yyv1398 = yyv1398[:yyrl1398] + yyrg1579 := len(yyv1579) > 0 + yyv21579 := yyv1579 + yyrl1579, yyrt1579 = z.DecInferLen(yyl1579, z.DecBasicHandle().MaxInitLen, 32) + if yyrt1579 { + if yyrl1579 <= cap(yyv1579) { + yyv1579 = yyv1579[:yyrl1579] } else { - yyv1398 = make([]APIVersion, yyrl1398) + yyv1579 = make([]APIVersion, yyrl1579) } } else { - yyv1398 = make([]APIVersion, yyrl1398) + yyv1579 = make([]APIVersion, yyrl1579) } - yyc1398 = true - yyrr1398 = len(yyv1398) - if yyrg1398 { - copy(yyv1398, yyv21398) + yyc1579 = true + yyrr1579 = len(yyv1579) + if yyrg1579 { + copy(yyv1579, yyv21579) } - } else if yyl1398 != len(yyv1398) { - yyv1398 = yyv1398[:yyl1398] - yyc1398 = true + } else if yyl1579 != len(yyv1579) { + yyv1579 = yyv1579[:yyl1579] + yyc1579 = true } - yyj1398 := 0 - for ; yyj1398 < yyrr1398; yyj1398++ { - yyh1398.ElemContainerState(yyj1398) + yyj1579 := 0 + for ; yyj1579 < yyrr1579; yyj1579++ { + yyh1579.ElemContainerState(yyj1579) if r.TryDecodeAsNil() { - yyv1398[yyj1398] = APIVersion{} + yyv1579[yyj1579] = APIVersion{} } else { - yyv1399 := &yyv1398[yyj1398] - yyv1399.CodecDecodeSelf(d) + yyv1580 := &yyv1579[yyj1579] + yyv1580.CodecDecodeSelf(d) } } - if yyrt1398 { - for ; yyj1398 < yyl1398; yyj1398++ { - yyv1398 = append(yyv1398, APIVersion{}) - yyh1398.ElemContainerState(yyj1398) + if yyrt1579 { + for ; yyj1579 < yyl1579; yyj1579++ { + yyv1579 = append(yyv1579, APIVersion{}) + yyh1579.ElemContainerState(yyj1579) if r.TryDecodeAsNil() { - yyv1398[yyj1398] = APIVersion{} + yyv1579[yyj1579] = APIVersion{} } else { - yyv1400 := &yyv1398[yyj1398] - yyv1400.CodecDecodeSelf(d) + yyv1581 := &yyv1579[yyj1579] + yyv1581.CodecDecodeSelf(d) } } } } else { - yyj1398 := 0 - for ; !r.CheckBreak(); yyj1398++ { + yyj1579 := 0 + for ; !r.CheckBreak(); yyj1579++ { - if yyj1398 >= len(yyv1398) { - yyv1398 = append(yyv1398, APIVersion{}) // var yyz1398 APIVersion - yyc1398 = true + if yyj1579 >= len(yyv1579) { + yyv1579 = append(yyv1579, APIVersion{}) // var yyz1579 APIVersion + yyc1579 = true } - yyh1398.ElemContainerState(yyj1398) - if yyj1398 < len(yyv1398) { + yyh1579.ElemContainerState(yyj1579) + if yyj1579 < len(yyv1579) { if r.TryDecodeAsNil() { - yyv1398[yyj1398] = APIVersion{} + yyv1579[yyj1579] = APIVersion{} } else { - yyv1401 := &yyv1398[yyj1398] - yyv1401.CodecDecodeSelf(d) + yyv1582 := &yyv1579[yyj1579] + yyv1582.CodecDecodeSelf(d) } } else { @@ -16854,17 +19012,17 @@ func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decode } } - if yyj1398 < len(yyv1398) { - yyv1398 = yyv1398[:yyj1398] - yyc1398 = true - } else if yyj1398 == 0 && yyv1398 == nil { - yyv1398 = []APIVersion{} - yyc1398 = true + if yyj1579 < len(yyv1579) { + yyv1579 = yyv1579[:yyj1579] + yyc1579 = true + } else if yyj1579 == 0 && yyv1579 == nil { + yyv1579 = []APIVersion{} + yyc1579 = true } } - yyh1398.End() - if yyc1398 { - *v = yyv1398 + yyh1579.End() + if yyc1579 { + *v = yyv1579 } } @@ -16873,10 +19031,10 @@ func (x codecSelfer1234) encSliceThirdPartyResource(v []ThirdPartyResource, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1402 := range v { + for _, yyv1583 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1403 := &yyv1402 - yy1403.CodecEncodeSelf(e) + yy1584 := &yyv1583 + yy1584.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16886,83 +19044,83 @@ func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1404 := *v - yyh1404, yyl1404 := z.DecSliceHelperStart() - var yyc1404 bool - if yyl1404 == 0 { - if yyv1404 == nil { - yyv1404 = []ThirdPartyResource{} - yyc1404 = true - } else if len(yyv1404) != 0 { - yyv1404 = yyv1404[:0] - yyc1404 = true + yyv1585 := *v + yyh1585, yyl1585 := z.DecSliceHelperStart() + var yyc1585 bool + if yyl1585 == 0 { + if yyv1585 == nil { + yyv1585 = []ThirdPartyResource{} + yyc1585 = true + } else if len(yyv1585) != 0 { + yyv1585 = yyv1585[:0] + yyc1585 = true } - } else if yyl1404 > 0 { - var yyrr1404, yyrl1404 int - var yyrt1404 bool - if yyl1404 > cap(yyv1404) { + } else if yyl1585 > 0 { + var yyrr1585, yyrl1585 int + var yyrt1585 bool + if yyl1585 > cap(yyv1585) { - yyrg1404 := len(yyv1404) > 0 - yyv21404 := yyv1404 - yyrl1404, yyrt1404 = z.DecInferLen(yyl1404, z.DecBasicHandle().MaxInitLen, 232) - if yyrt1404 { - if yyrl1404 <= cap(yyv1404) { - yyv1404 = yyv1404[:yyrl1404] + yyrg1585 := len(yyv1585) > 0 + yyv21585 := yyv1585 + yyrl1585, yyrt1585 = z.DecInferLen(yyl1585, z.DecBasicHandle().MaxInitLen, 232) + if yyrt1585 { + if yyrl1585 <= cap(yyv1585) { + yyv1585 = yyv1585[:yyrl1585] } else { - yyv1404 = make([]ThirdPartyResource, yyrl1404) + yyv1585 = make([]ThirdPartyResource, yyrl1585) } } else { - yyv1404 = make([]ThirdPartyResource, yyrl1404) + yyv1585 = make([]ThirdPartyResource, yyrl1585) } - yyc1404 = true - yyrr1404 = len(yyv1404) - if yyrg1404 { - copy(yyv1404, yyv21404) + yyc1585 = true + yyrr1585 = len(yyv1585) + if yyrg1585 { + copy(yyv1585, yyv21585) } - } else if yyl1404 != len(yyv1404) { - yyv1404 = yyv1404[:yyl1404] - yyc1404 = true + } else if yyl1585 != len(yyv1585) { + yyv1585 = yyv1585[:yyl1585] + yyc1585 = true } - yyj1404 := 0 - for ; yyj1404 < yyrr1404; yyj1404++ { - yyh1404.ElemContainerState(yyj1404) + yyj1585 := 0 + for ; yyj1585 < yyrr1585; yyj1585++ { + yyh1585.ElemContainerState(yyj1585) if r.TryDecodeAsNil() { - yyv1404[yyj1404] = ThirdPartyResource{} + yyv1585[yyj1585] = ThirdPartyResource{} } else { - yyv1405 := &yyv1404[yyj1404] - yyv1405.CodecDecodeSelf(d) + yyv1586 := &yyv1585[yyj1585] + yyv1586.CodecDecodeSelf(d) } } - if yyrt1404 { - for ; yyj1404 < yyl1404; yyj1404++ { - yyv1404 = append(yyv1404, ThirdPartyResource{}) - yyh1404.ElemContainerState(yyj1404) + if yyrt1585 { + for ; yyj1585 < yyl1585; yyj1585++ { + yyv1585 = append(yyv1585, ThirdPartyResource{}) + yyh1585.ElemContainerState(yyj1585) if r.TryDecodeAsNil() { - yyv1404[yyj1404] = ThirdPartyResource{} + yyv1585[yyj1585] = ThirdPartyResource{} } else { - yyv1406 := &yyv1404[yyj1404] - yyv1406.CodecDecodeSelf(d) + yyv1587 := &yyv1585[yyj1585] + yyv1587.CodecDecodeSelf(d) } } } } else { - yyj1404 := 0 - for ; !r.CheckBreak(); yyj1404++ { + yyj1585 := 0 + for ; !r.CheckBreak(); yyj1585++ { - if yyj1404 >= len(yyv1404) { - yyv1404 = append(yyv1404, ThirdPartyResource{}) // var yyz1404 ThirdPartyResource - yyc1404 = true + if yyj1585 >= len(yyv1585) { + yyv1585 = append(yyv1585, ThirdPartyResource{}) // var yyz1585 ThirdPartyResource + yyc1585 = true } - yyh1404.ElemContainerState(yyj1404) - if yyj1404 < len(yyv1404) { + yyh1585.ElemContainerState(yyj1585) + if yyj1585 < len(yyv1585) { if r.TryDecodeAsNil() { - yyv1404[yyj1404] = ThirdPartyResource{} + yyv1585[yyj1585] = ThirdPartyResource{} } else { - yyv1407 := &yyv1404[yyj1404] - yyv1407.CodecDecodeSelf(d) + yyv1588 := &yyv1585[yyj1585] + yyv1588.CodecDecodeSelf(d) } } else { @@ -16970,17 +19128,17 @@ func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d * } } - if yyj1404 < len(yyv1404) { - yyv1404 = yyv1404[:yyj1404] - yyc1404 = true - } else if yyj1404 == 0 && yyv1404 == nil { - yyv1404 = []ThirdPartyResource{} - yyc1404 = true + if yyj1585 < len(yyv1585) { + yyv1585 = yyv1585[:yyj1585] + yyc1585 = true + } else if yyj1585 == 0 && yyv1585 == nil { + yyv1585 = []ThirdPartyResource{} + yyc1585 = true } } - yyh1404.End() - if yyc1404 { - *v = yyv1404 + yyh1585.End() + if yyc1585 { + *v = yyv1585 } } @@ -16989,10 +19147,10 @@ func (x codecSelfer1234) encSliceDeployment(v []Deployment, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1408 := range v { + for _, yyv1589 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1409 := &yyv1408 - yy1409.CodecEncodeSelf(e) + yy1590 := &yyv1589 + yy1590.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17002,83 +19160,83 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1410 := *v - yyh1410, yyl1410 := z.DecSliceHelperStart() - var yyc1410 bool - if yyl1410 == 0 { - if yyv1410 == nil { - yyv1410 = []Deployment{} - yyc1410 = true - } else if len(yyv1410) != 0 { - yyv1410 = yyv1410[:0] - yyc1410 = true + yyv1591 := *v + yyh1591, yyl1591 := z.DecSliceHelperStart() + var yyc1591 bool + if yyl1591 == 0 { + if yyv1591 == nil { + yyv1591 = []Deployment{} + yyc1591 = true + } else if len(yyv1591) != 0 { + yyv1591 = yyv1591[:0] + yyc1591 = true } - } else if yyl1410 > 0 { - var yyrr1410, yyrl1410 int - var yyrt1410 bool - if yyl1410 > cap(yyv1410) { + } else if yyl1591 > 0 { + var yyrr1591, yyrl1591 int + var yyrt1591 bool + if yyl1591 > cap(yyv1591) { - yyrg1410 := len(yyv1410) > 0 - yyv21410 := yyv1410 - yyrl1410, yyrt1410 = z.DecInferLen(yyl1410, z.DecBasicHandle().MaxInitLen, 640) - if yyrt1410 { - if yyrl1410 <= cap(yyv1410) { - yyv1410 = yyv1410[:yyrl1410] + yyrg1591 := len(yyv1591) > 0 + yyv21591 := yyv1591 + yyrl1591, yyrt1591 = z.DecInferLen(yyl1591, z.DecBasicHandle().MaxInitLen, 640) + if yyrt1591 { + if yyrl1591 <= cap(yyv1591) { + yyv1591 = yyv1591[:yyrl1591] } else { - yyv1410 = make([]Deployment, yyrl1410) + yyv1591 = make([]Deployment, yyrl1591) } } else { - yyv1410 = make([]Deployment, yyrl1410) + yyv1591 = make([]Deployment, yyrl1591) } - yyc1410 = true - yyrr1410 = len(yyv1410) - if yyrg1410 { - copy(yyv1410, yyv21410) + yyc1591 = true + yyrr1591 = len(yyv1591) + if yyrg1591 { + copy(yyv1591, yyv21591) } - } else if yyl1410 != len(yyv1410) { - yyv1410 = yyv1410[:yyl1410] - yyc1410 = true + } else if yyl1591 != len(yyv1591) { + yyv1591 = yyv1591[:yyl1591] + yyc1591 = true } - yyj1410 := 0 - for ; yyj1410 < yyrr1410; yyj1410++ { - yyh1410.ElemContainerState(yyj1410) + yyj1591 := 0 + for ; yyj1591 < yyrr1591; yyj1591++ { + yyh1591.ElemContainerState(yyj1591) if r.TryDecodeAsNil() { - yyv1410[yyj1410] = Deployment{} + yyv1591[yyj1591] = Deployment{} } else { - yyv1411 := &yyv1410[yyj1410] - yyv1411.CodecDecodeSelf(d) + yyv1592 := &yyv1591[yyj1591] + yyv1592.CodecDecodeSelf(d) } } - if yyrt1410 { - for ; yyj1410 < yyl1410; yyj1410++ { - yyv1410 = append(yyv1410, Deployment{}) - yyh1410.ElemContainerState(yyj1410) + if yyrt1591 { + for ; yyj1591 < yyl1591; yyj1591++ { + yyv1591 = append(yyv1591, Deployment{}) + yyh1591.ElemContainerState(yyj1591) if r.TryDecodeAsNil() { - yyv1410[yyj1410] = Deployment{} + yyv1591[yyj1591] = Deployment{} } else { - yyv1412 := &yyv1410[yyj1410] - yyv1412.CodecDecodeSelf(d) + yyv1593 := &yyv1591[yyj1591] + yyv1593.CodecDecodeSelf(d) } } } } else { - yyj1410 := 0 - for ; !r.CheckBreak(); yyj1410++ { + yyj1591 := 0 + for ; !r.CheckBreak(); yyj1591++ { - if yyj1410 >= len(yyv1410) { - yyv1410 = append(yyv1410, Deployment{}) // var yyz1410 Deployment - yyc1410 = true + if yyj1591 >= len(yyv1591) { + yyv1591 = append(yyv1591, Deployment{}) // var yyz1591 Deployment + yyc1591 = true } - yyh1410.ElemContainerState(yyj1410) - if yyj1410 < len(yyv1410) { + yyh1591.ElemContainerState(yyj1591) + if yyj1591 < len(yyv1591) { if r.TryDecodeAsNil() { - yyv1410[yyj1410] = Deployment{} + yyv1591[yyj1591] = Deployment{} } else { - yyv1413 := &yyv1410[yyj1410] - yyv1413.CodecDecodeSelf(d) + yyv1594 := &yyv1591[yyj1591] + yyv1594.CodecDecodeSelf(d) } } else { @@ -17086,17 +19244,17 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode } } - if yyj1410 < len(yyv1410) { - yyv1410 = yyv1410[:yyj1410] - yyc1410 = true - } else if yyj1410 == 0 && yyv1410 == nil { - yyv1410 = []Deployment{} - yyc1410 = true + if yyj1591 < len(yyv1591) { + yyv1591 = yyv1591[:yyj1591] + yyc1591 = true + } else if yyj1591 == 0 && yyv1591 == nil { + yyv1591 = []Deployment{} + yyc1591 = true } } - yyh1410.End() - if yyc1410 { - *v = yyv1410 + yyh1591.End() + if yyc1591 { + *v = yyv1591 } } @@ -17105,10 +19263,10 @@ func (x codecSelfer1234) encSliceDaemonSet(v []DaemonSet, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1414 := range v { + for _, yyv1595 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1415 := &yyv1414 - yy1415.CodecEncodeSelf(e) + yy1596 := &yyv1595 + yy1596.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17118,83 +19276,83 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1416 := *v - yyh1416, yyl1416 := z.DecSliceHelperStart() - var yyc1416 bool - if yyl1416 == 0 { - if yyv1416 == nil { - yyv1416 = []DaemonSet{} - yyc1416 = true - } else if len(yyv1416) != 0 { - yyv1416 = yyv1416[:0] - yyc1416 = true + yyv1597 := *v + yyh1597, yyl1597 := z.DecSliceHelperStart() + var yyc1597 bool + if yyl1597 == 0 { + if yyv1597 == nil { + yyv1597 = []DaemonSet{} + yyc1597 = true + } else if len(yyv1597) != 0 { + yyv1597 = yyv1597[:0] + yyc1597 = true } - } else if yyl1416 > 0 { - var yyrr1416, yyrl1416 int - var yyrt1416 bool - if yyl1416 > cap(yyv1416) { + } else if yyl1597 > 0 { + var yyrr1597, yyrl1597 int + var yyrt1597 bool + if yyl1597 > cap(yyv1597) { - yyrg1416 := len(yyv1416) > 0 - yyv21416 := yyv1416 - yyrl1416, yyrt1416 = z.DecInferLen(yyl1416, z.DecBasicHandle().MaxInitLen, 592) - if yyrt1416 { - if yyrl1416 <= cap(yyv1416) { - yyv1416 = yyv1416[:yyrl1416] + yyrg1597 := len(yyv1597) > 0 + yyv21597 := yyv1597 + yyrl1597, yyrt1597 = z.DecInferLen(yyl1597, z.DecBasicHandle().MaxInitLen, 592) + if yyrt1597 { + if yyrl1597 <= cap(yyv1597) { + yyv1597 = yyv1597[:yyrl1597] } else { - yyv1416 = make([]DaemonSet, yyrl1416) + yyv1597 = make([]DaemonSet, yyrl1597) } } else { - yyv1416 = make([]DaemonSet, yyrl1416) + yyv1597 = make([]DaemonSet, yyrl1597) } - yyc1416 = true - yyrr1416 = len(yyv1416) - if yyrg1416 { - copy(yyv1416, yyv21416) + yyc1597 = true + yyrr1597 = len(yyv1597) + if yyrg1597 { + copy(yyv1597, yyv21597) } - } else if yyl1416 != len(yyv1416) { - yyv1416 = yyv1416[:yyl1416] - yyc1416 = true + } else if yyl1597 != len(yyv1597) { + yyv1597 = yyv1597[:yyl1597] + yyc1597 = true } - yyj1416 := 0 - for ; yyj1416 < yyrr1416; yyj1416++ { - yyh1416.ElemContainerState(yyj1416) + yyj1597 := 0 + for ; yyj1597 < yyrr1597; yyj1597++ { + yyh1597.ElemContainerState(yyj1597) if r.TryDecodeAsNil() { - yyv1416[yyj1416] = DaemonSet{} + yyv1597[yyj1597] = DaemonSet{} } else { - yyv1417 := &yyv1416[yyj1416] - yyv1417.CodecDecodeSelf(d) + yyv1598 := &yyv1597[yyj1597] + yyv1598.CodecDecodeSelf(d) } } - if yyrt1416 { - for ; yyj1416 < yyl1416; yyj1416++ { - yyv1416 = append(yyv1416, DaemonSet{}) - yyh1416.ElemContainerState(yyj1416) + if yyrt1597 { + for ; yyj1597 < yyl1597; yyj1597++ { + yyv1597 = append(yyv1597, DaemonSet{}) + yyh1597.ElemContainerState(yyj1597) if r.TryDecodeAsNil() { - yyv1416[yyj1416] = DaemonSet{} + yyv1597[yyj1597] = DaemonSet{} } else { - yyv1418 := &yyv1416[yyj1416] - yyv1418.CodecDecodeSelf(d) + yyv1599 := &yyv1597[yyj1597] + yyv1599.CodecDecodeSelf(d) } } } } else { - yyj1416 := 0 - for ; !r.CheckBreak(); yyj1416++ { + yyj1597 := 0 + for ; !r.CheckBreak(); yyj1597++ { - if yyj1416 >= len(yyv1416) { - yyv1416 = append(yyv1416, DaemonSet{}) // var yyz1416 DaemonSet - yyc1416 = true + if yyj1597 >= len(yyv1597) { + yyv1597 = append(yyv1597, DaemonSet{}) // var yyz1597 DaemonSet + yyc1597 = true } - yyh1416.ElemContainerState(yyj1416) - if yyj1416 < len(yyv1416) { + yyh1597.ElemContainerState(yyj1597) + if yyj1597 < len(yyv1597) { if r.TryDecodeAsNil() { - yyv1416[yyj1416] = DaemonSet{} + yyv1597[yyj1597] = DaemonSet{} } else { - yyv1419 := &yyv1416[yyj1416] - yyv1419.CodecDecodeSelf(d) + yyv1600 := &yyv1597[yyj1597] + yyv1600.CodecDecodeSelf(d) } } else { @@ -17202,17 +19360,17 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) } } - if yyj1416 < len(yyv1416) { - yyv1416 = yyv1416[:yyj1416] - yyc1416 = true - } else if yyj1416 == 0 && yyv1416 == nil { - yyv1416 = []DaemonSet{} - yyc1416 = true + if yyj1597 < len(yyv1597) { + yyv1597 = yyv1597[:yyj1597] + yyc1597 = true + } else if yyj1597 == 0 && yyv1597 == nil { + yyv1597 = []DaemonSet{} + yyc1597 = true } } - yyh1416.End() - if yyc1416 { - *v = yyv1416 + yyh1597.End() + if yyc1597 { + *v = yyv1597 } } @@ -17221,10 +19379,10 @@ func (x codecSelfer1234) encSliceThirdPartyResourceData(v []ThirdPartyResourceDa z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1420 := range v { + for _, yyv1601 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1421 := &yyv1420 - yy1421.CodecEncodeSelf(e) + yy1602 := &yyv1601 + yy1602.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17234,83 +19392,83 @@ func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceD z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1422 := *v - yyh1422, yyl1422 := z.DecSliceHelperStart() - var yyc1422 bool - if yyl1422 == 0 { - if yyv1422 == nil { - yyv1422 = []ThirdPartyResourceData{} - yyc1422 = true - } else if len(yyv1422) != 0 { - yyv1422 = yyv1422[:0] - yyc1422 = true + yyv1603 := *v + yyh1603, yyl1603 := z.DecSliceHelperStart() + var yyc1603 bool + if yyl1603 == 0 { + if yyv1603 == nil { + yyv1603 = []ThirdPartyResourceData{} + yyc1603 = true + } else if len(yyv1603) != 0 { + yyv1603 = yyv1603[:0] + yyc1603 = true } - } else if yyl1422 > 0 { - var yyrr1422, yyrl1422 int - var yyrt1422 bool - if yyl1422 > cap(yyv1422) { + } else if yyl1603 > 0 { + var yyrr1603, yyrl1603 int + var yyrt1603 bool + if yyl1603 > cap(yyv1603) { - yyrg1422 := len(yyv1422) > 0 - yyv21422 := yyv1422 - yyrl1422, yyrt1422 = z.DecInferLen(yyl1422, z.DecBasicHandle().MaxInitLen, 216) - if yyrt1422 { - if yyrl1422 <= cap(yyv1422) { - yyv1422 = yyv1422[:yyrl1422] + yyrg1603 := len(yyv1603) > 0 + yyv21603 := yyv1603 + yyrl1603, yyrt1603 = z.DecInferLen(yyl1603, z.DecBasicHandle().MaxInitLen, 216) + if yyrt1603 { + if yyrl1603 <= cap(yyv1603) { + yyv1603 = yyv1603[:yyrl1603] } else { - yyv1422 = make([]ThirdPartyResourceData, yyrl1422) + yyv1603 = make([]ThirdPartyResourceData, yyrl1603) } } else { - yyv1422 = make([]ThirdPartyResourceData, yyrl1422) + yyv1603 = make([]ThirdPartyResourceData, yyrl1603) } - yyc1422 = true - yyrr1422 = len(yyv1422) - if yyrg1422 { - copy(yyv1422, yyv21422) + yyc1603 = true + yyrr1603 = len(yyv1603) + if yyrg1603 { + copy(yyv1603, yyv21603) } - } else if yyl1422 != len(yyv1422) { - yyv1422 = yyv1422[:yyl1422] - yyc1422 = true + } else if yyl1603 != len(yyv1603) { + yyv1603 = yyv1603[:yyl1603] + yyc1603 = true } - yyj1422 := 0 - for ; yyj1422 < yyrr1422; yyj1422++ { - yyh1422.ElemContainerState(yyj1422) + yyj1603 := 0 + for ; yyj1603 < yyrr1603; yyj1603++ { + yyh1603.ElemContainerState(yyj1603) if r.TryDecodeAsNil() { - yyv1422[yyj1422] = ThirdPartyResourceData{} + yyv1603[yyj1603] = ThirdPartyResourceData{} } else { - yyv1423 := &yyv1422[yyj1422] - yyv1423.CodecDecodeSelf(d) + yyv1604 := &yyv1603[yyj1603] + yyv1604.CodecDecodeSelf(d) } } - if yyrt1422 { - for ; yyj1422 < yyl1422; yyj1422++ { - yyv1422 = append(yyv1422, ThirdPartyResourceData{}) - yyh1422.ElemContainerState(yyj1422) + if yyrt1603 { + for ; yyj1603 < yyl1603; yyj1603++ { + yyv1603 = append(yyv1603, ThirdPartyResourceData{}) + yyh1603.ElemContainerState(yyj1603) if r.TryDecodeAsNil() { - yyv1422[yyj1422] = ThirdPartyResourceData{} + yyv1603[yyj1603] = ThirdPartyResourceData{} } else { - yyv1424 := &yyv1422[yyj1422] - yyv1424.CodecDecodeSelf(d) + yyv1605 := &yyv1603[yyj1603] + yyv1605.CodecDecodeSelf(d) } } } } else { - yyj1422 := 0 - for ; !r.CheckBreak(); yyj1422++ { + yyj1603 := 0 + for ; !r.CheckBreak(); yyj1603++ { - if yyj1422 >= len(yyv1422) { - yyv1422 = append(yyv1422, ThirdPartyResourceData{}) // var yyz1422 ThirdPartyResourceData - yyc1422 = true + if yyj1603 >= len(yyv1603) { + yyv1603 = append(yyv1603, ThirdPartyResourceData{}) // var yyz1603 ThirdPartyResourceData + yyc1603 = true } - yyh1422.ElemContainerState(yyj1422) - if yyj1422 < len(yyv1422) { + yyh1603.ElemContainerState(yyj1603) + if yyj1603 < len(yyv1603) { if r.TryDecodeAsNil() { - yyv1422[yyj1422] = ThirdPartyResourceData{} + yyv1603[yyj1603] = ThirdPartyResourceData{} } else { - yyv1425 := &yyv1422[yyj1422] - yyv1425.CodecDecodeSelf(d) + yyv1606 := &yyv1603[yyj1603] + yyv1606.CodecDecodeSelf(d) } } else { @@ -17318,17 +19476,17 @@ func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceD } } - if yyj1422 < len(yyv1422) { - yyv1422 = yyv1422[:yyj1422] - yyc1422 = true - } else if yyj1422 == 0 && yyv1422 == nil { - yyv1422 = []ThirdPartyResourceData{} - yyc1422 = true + if yyj1603 < len(yyv1603) { + yyv1603 = yyv1603[:yyj1603] + yyc1603 = true + } else if yyj1603 == 0 && yyv1603 == nil { + yyv1603 = []ThirdPartyResourceData{} + yyc1603 = true } } - yyh1422.End() - if yyc1422 { - *v = yyv1422 + yyh1603.End() + if yyc1603 { + *v = yyv1603 } } @@ -17337,10 +19495,10 @@ func (x codecSelfer1234) encSliceJob(v []Job, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1426 := range v { + for _, yyv1607 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1427 := &yyv1426 - yy1427.CodecEncodeSelf(e) + yy1608 := &yyv1607 + yy1608.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17350,83 +19508,83 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1428 := *v - yyh1428, yyl1428 := z.DecSliceHelperStart() - var yyc1428 bool - if yyl1428 == 0 { - if yyv1428 == nil { - yyv1428 = []Job{} - yyc1428 = true - } else if len(yyv1428) != 0 { - yyv1428 = yyv1428[:0] - yyc1428 = true + yyv1609 := *v + yyh1609, yyl1609 := z.DecSliceHelperStart() + var yyc1609 bool + if yyl1609 == 0 { + if yyv1609 == nil { + yyv1609 = []Job{} + yyc1609 = true + } else if len(yyv1609) != 0 { + yyv1609 = yyv1609[:0] + yyc1609 = true } - } else if yyl1428 > 0 { - var yyrr1428, yyrl1428 int - var yyrt1428 bool - if yyl1428 > cap(yyv1428) { + } else if yyl1609 > 0 { + var yyrr1609, yyrl1609 int + var yyrt1609 bool + if yyl1609 > cap(yyv1609) { - yyrg1428 := len(yyv1428) > 0 - yyv21428 := yyv1428 - yyrl1428, yyrt1428 = z.DecInferLen(yyl1428, z.DecBasicHandle().MaxInitLen, 616) - if yyrt1428 { - if yyrl1428 <= cap(yyv1428) { - yyv1428 = yyv1428[:yyrl1428] + yyrg1609 := len(yyv1609) > 0 + yyv21609 := yyv1609 + yyrl1609, yyrt1609 = z.DecInferLen(yyl1609, z.DecBasicHandle().MaxInitLen, 616) + if yyrt1609 { + if yyrl1609 <= cap(yyv1609) { + yyv1609 = yyv1609[:yyrl1609] } else { - yyv1428 = make([]Job, yyrl1428) + yyv1609 = make([]Job, yyrl1609) } } else { - yyv1428 = make([]Job, yyrl1428) + yyv1609 = make([]Job, yyrl1609) } - yyc1428 = true - yyrr1428 = len(yyv1428) - if yyrg1428 { - copy(yyv1428, yyv21428) + yyc1609 = true + yyrr1609 = len(yyv1609) + if yyrg1609 { + copy(yyv1609, yyv21609) } - } else if yyl1428 != len(yyv1428) { - yyv1428 = yyv1428[:yyl1428] - yyc1428 = true + } else if yyl1609 != len(yyv1609) { + yyv1609 = yyv1609[:yyl1609] + yyc1609 = true } - yyj1428 := 0 - for ; yyj1428 < yyrr1428; yyj1428++ { - yyh1428.ElemContainerState(yyj1428) + yyj1609 := 0 + for ; yyj1609 < yyrr1609; yyj1609++ { + yyh1609.ElemContainerState(yyj1609) if r.TryDecodeAsNil() { - yyv1428[yyj1428] = Job{} + yyv1609[yyj1609] = Job{} } else { - yyv1429 := &yyv1428[yyj1428] - yyv1429.CodecDecodeSelf(d) + yyv1610 := &yyv1609[yyj1609] + yyv1610.CodecDecodeSelf(d) } } - if yyrt1428 { - for ; yyj1428 < yyl1428; yyj1428++ { - yyv1428 = append(yyv1428, Job{}) - yyh1428.ElemContainerState(yyj1428) + if yyrt1609 { + for ; yyj1609 < yyl1609; yyj1609++ { + yyv1609 = append(yyv1609, Job{}) + yyh1609.ElemContainerState(yyj1609) if r.TryDecodeAsNil() { - yyv1428[yyj1428] = Job{} + yyv1609[yyj1609] = Job{} } else { - yyv1430 := &yyv1428[yyj1428] - yyv1430.CodecDecodeSelf(d) + yyv1611 := &yyv1609[yyj1609] + yyv1611.CodecDecodeSelf(d) } } } } else { - yyj1428 := 0 - for ; !r.CheckBreak(); yyj1428++ { + yyj1609 := 0 + for ; !r.CheckBreak(); yyj1609++ { - if yyj1428 >= len(yyv1428) { - yyv1428 = append(yyv1428, Job{}) // var yyz1428 Job - yyc1428 = true + if yyj1609 >= len(yyv1609) { + yyv1609 = append(yyv1609, Job{}) // var yyz1609 Job + yyc1609 = true } - yyh1428.ElemContainerState(yyj1428) - if yyj1428 < len(yyv1428) { + yyh1609.ElemContainerState(yyj1609) + if yyj1609 < len(yyv1609) { if r.TryDecodeAsNil() { - yyv1428[yyj1428] = Job{} + yyv1609[yyj1609] = Job{} } else { - yyv1431 := &yyv1428[yyj1428] - yyv1431.CodecDecodeSelf(d) + yyv1612 := &yyv1609[yyj1609] + yyv1612.CodecDecodeSelf(d) } } else { @@ -17434,17 +19592,17 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { } } - if yyj1428 < len(yyv1428) { - yyv1428 = yyv1428[:yyj1428] - yyc1428 = true - } else if yyj1428 == 0 && yyv1428 == nil { - yyv1428 = []Job{} - yyc1428 = true + if yyj1609 < len(yyv1609) { + yyv1609 = yyv1609[:yyj1609] + yyc1609 = true + } else if yyj1609 == 0 && yyv1609 == nil { + yyv1609 = []Job{} + yyc1609 = true } } - yyh1428.End() - if yyc1428 { - *v = yyv1428 + yyh1609.End() + if yyc1609 { + *v = yyv1609 } } @@ -17453,10 +19611,10 @@ func (x codecSelfer1234) encSliceJobCondition(v []JobCondition, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1432 := range v { + for _, yyv1613 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1433 := &yyv1432 - yy1433.CodecEncodeSelf(e) + yy1614 := &yyv1613 + yy1614.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17466,83 +19624,83 @@ func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1434 := *v - yyh1434, yyl1434 := z.DecSliceHelperStart() - var yyc1434 bool - if yyl1434 == 0 { - if yyv1434 == nil { - yyv1434 = []JobCondition{} - yyc1434 = true - } else if len(yyv1434) != 0 { - yyv1434 = yyv1434[:0] - yyc1434 = true + yyv1615 := *v + yyh1615, yyl1615 := z.DecSliceHelperStart() + var yyc1615 bool + if yyl1615 == 0 { + if yyv1615 == nil { + yyv1615 = []JobCondition{} + yyc1615 = true + } else if len(yyv1615) != 0 { + yyv1615 = yyv1615[:0] + yyc1615 = true } - } else if yyl1434 > 0 { - var yyrr1434, yyrl1434 int - var yyrt1434 bool - if yyl1434 > cap(yyv1434) { + } else if yyl1615 > 0 { + var yyrr1615, yyrl1615 int + var yyrt1615 bool + if yyl1615 > cap(yyv1615) { - yyrg1434 := len(yyv1434) > 0 - yyv21434 := yyv1434 - yyrl1434, yyrt1434 = z.DecInferLen(yyl1434, z.DecBasicHandle().MaxInitLen, 112) - if yyrt1434 { - if yyrl1434 <= cap(yyv1434) { - yyv1434 = yyv1434[:yyrl1434] + yyrg1615 := len(yyv1615) > 0 + yyv21615 := yyv1615 + yyrl1615, yyrt1615 = z.DecInferLen(yyl1615, z.DecBasicHandle().MaxInitLen, 112) + if yyrt1615 { + if yyrl1615 <= cap(yyv1615) { + yyv1615 = yyv1615[:yyrl1615] } else { - yyv1434 = make([]JobCondition, yyrl1434) + yyv1615 = make([]JobCondition, yyrl1615) } } else { - yyv1434 = make([]JobCondition, yyrl1434) + yyv1615 = make([]JobCondition, yyrl1615) } - yyc1434 = true - yyrr1434 = len(yyv1434) - if yyrg1434 { - copy(yyv1434, yyv21434) + yyc1615 = true + yyrr1615 = len(yyv1615) + if yyrg1615 { + copy(yyv1615, yyv21615) } - } else if yyl1434 != len(yyv1434) { - yyv1434 = yyv1434[:yyl1434] - yyc1434 = true + } else if yyl1615 != len(yyv1615) { + yyv1615 = yyv1615[:yyl1615] + yyc1615 = true } - yyj1434 := 0 - for ; yyj1434 < yyrr1434; yyj1434++ { - yyh1434.ElemContainerState(yyj1434) + yyj1615 := 0 + for ; yyj1615 < yyrr1615; yyj1615++ { + yyh1615.ElemContainerState(yyj1615) if r.TryDecodeAsNil() { - yyv1434[yyj1434] = JobCondition{} + yyv1615[yyj1615] = JobCondition{} } else { - yyv1435 := &yyv1434[yyj1434] - yyv1435.CodecDecodeSelf(d) + yyv1616 := &yyv1615[yyj1615] + yyv1616.CodecDecodeSelf(d) } } - if yyrt1434 { - for ; yyj1434 < yyl1434; yyj1434++ { - yyv1434 = append(yyv1434, JobCondition{}) - yyh1434.ElemContainerState(yyj1434) + if yyrt1615 { + for ; yyj1615 < yyl1615; yyj1615++ { + yyv1615 = append(yyv1615, JobCondition{}) + yyh1615.ElemContainerState(yyj1615) if r.TryDecodeAsNil() { - yyv1434[yyj1434] = JobCondition{} + yyv1615[yyj1615] = JobCondition{} } else { - yyv1436 := &yyv1434[yyj1434] - yyv1436.CodecDecodeSelf(d) + yyv1617 := &yyv1615[yyj1615] + yyv1617.CodecDecodeSelf(d) } } } } else { - yyj1434 := 0 - for ; !r.CheckBreak(); yyj1434++ { + yyj1615 := 0 + for ; !r.CheckBreak(); yyj1615++ { - if yyj1434 >= len(yyv1434) { - yyv1434 = append(yyv1434, JobCondition{}) // var yyz1434 JobCondition - yyc1434 = true + if yyj1615 >= len(yyv1615) { + yyv1615 = append(yyv1615, JobCondition{}) // var yyz1615 JobCondition + yyc1615 = true } - yyh1434.ElemContainerState(yyj1434) - if yyj1434 < len(yyv1434) { + yyh1615.ElemContainerState(yyj1615) + if yyj1615 < len(yyv1615) { if r.TryDecodeAsNil() { - yyv1434[yyj1434] = JobCondition{} + yyv1615[yyj1615] = JobCondition{} } else { - yyv1437 := &yyv1434[yyj1434] - yyv1437.CodecDecodeSelf(d) + yyv1618 := &yyv1615[yyj1615] + yyv1618.CodecDecodeSelf(d) } } else { @@ -17550,17 +19708,17 @@ func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.De } } - if yyj1434 < len(yyv1434) { - yyv1434 = yyv1434[:yyj1434] - yyc1434 = true - } else if yyj1434 == 0 && yyv1434 == nil { - yyv1434 = []JobCondition{} - yyc1434 = true + if yyj1615 < len(yyv1615) { + yyv1615 = yyv1615[:yyj1615] + yyc1615 = true + } else if yyj1615 == 0 && yyv1615 == nil { + yyv1615 = []JobCondition{} + yyc1615 = true } } - yyh1434.End() - if yyc1434 { - *v = yyv1434 + yyh1615.End() + if yyc1615 { + *v = yyv1615 } } @@ -17569,10 +19727,10 @@ func (x codecSelfer1234) encSliceIngress(v []Ingress, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1438 := range v { + for _, yyv1619 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1439 := &yyv1438 - yy1439.CodecEncodeSelf(e) + yy1620 := &yyv1619 + yy1620.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17582,83 +19740,83 @@ func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1440 := *v - yyh1440, yyl1440 := z.DecSliceHelperStart() - var yyc1440 bool - if yyl1440 == 0 { - if yyv1440 == nil { - yyv1440 = []Ingress{} - yyc1440 = true - } else if len(yyv1440) != 0 { - yyv1440 = yyv1440[:0] - yyc1440 = true + yyv1621 := *v + yyh1621, yyl1621 := z.DecSliceHelperStart() + var yyc1621 bool + if yyl1621 == 0 { + if yyv1621 == nil { + yyv1621 = []Ingress{} + yyc1621 = true + } else if len(yyv1621) != 0 { + yyv1621 = yyv1621[:0] + yyc1621 = true } - } else if yyl1440 > 0 { - var yyrr1440, yyrl1440 int - var yyrt1440 bool - if yyl1440 > cap(yyv1440) { + } else if yyl1621 > 0 { + var yyrr1621, yyrl1621 int + var yyrt1621 bool + if yyl1621 > cap(yyv1621) { - yyrg1440 := len(yyv1440) > 0 - yyv21440 := yyv1440 - yyrl1440, yyrt1440 = z.DecInferLen(yyl1440, z.DecBasicHandle().MaxInitLen, 248) - if yyrt1440 { - if yyrl1440 <= cap(yyv1440) { - yyv1440 = yyv1440[:yyrl1440] + yyrg1621 := len(yyv1621) > 0 + yyv21621 := yyv1621 + yyrl1621, yyrt1621 = z.DecInferLen(yyl1621, z.DecBasicHandle().MaxInitLen, 248) + if yyrt1621 { + if yyrl1621 <= cap(yyv1621) { + yyv1621 = yyv1621[:yyrl1621] } else { - yyv1440 = make([]Ingress, yyrl1440) + yyv1621 = make([]Ingress, yyrl1621) } } else { - yyv1440 = make([]Ingress, yyrl1440) + yyv1621 = make([]Ingress, yyrl1621) } - yyc1440 = true - yyrr1440 = len(yyv1440) - if yyrg1440 { - copy(yyv1440, yyv21440) + yyc1621 = true + yyrr1621 = len(yyv1621) + if yyrg1621 { + copy(yyv1621, yyv21621) } - } else if yyl1440 != len(yyv1440) { - yyv1440 = yyv1440[:yyl1440] - yyc1440 = true + } else if yyl1621 != len(yyv1621) { + yyv1621 = yyv1621[:yyl1621] + yyc1621 = true } - yyj1440 := 0 - for ; yyj1440 < yyrr1440; yyj1440++ { - yyh1440.ElemContainerState(yyj1440) + yyj1621 := 0 + for ; yyj1621 < yyrr1621; yyj1621++ { + yyh1621.ElemContainerState(yyj1621) if r.TryDecodeAsNil() { - yyv1440[yyj1440] = Ingress{} + yyv1621[yyj1621] = Ingress{} } else { - yyv1441 := &yyv1440[yyj1440] - yyv1441.CodecDecodeSelf(d) + yyv1622 := &yyv1621[yyj1621] + yyv1622.CodecDecodeSelf(d) } } - if yyrt1440 { - for ; yyj1440 < yyl1440; yyj1440++ { - yyv1440 = append(yyv1440, Ingress{}) - yyh1440.ElemContainerState(yyj1440) + if yyrt1621 { + for ; yyj1621 < yyl1621; yyj1621++ { + yyv1621 = append(yyv1621, Ingress{}) + yyh1621.ElemContainerState(yyj1621) if r.TryDecodeAsNil() { - yyv1440[yyj1440] = Ingress{} + yyv1621[yyj1621] = Ingress{} } else { - yyv1442 := &yyv1440[yyj1440] - yyv1442.CodecDecodeSelf(d) + yyv1623 := &yyv1621[yyj1621] + yyv1623.CodecDecodeSelf(d) } } } } else { - yyj1440 := 0 - for ; !r.CheckBreak(); yyj1440++ { + yyj1621 := 0 + for ; !r.CheckBreak(); yyj1621++ { - if yyj1440 >= len(yyv1440) { - yyv1440 = append(yyv1440, Ingress{}) // var yyz1440 Ingress - yyc1440 = true + if yyj1621 >= len(yyv1621) { + yyv1621 = append(yyv1621, Ingress{}) // var yyz1621 Ingress + yyc1621 = true } - yyh1440.ElemContainerState(yyj1440) - if yyj1440 < len(yyv1440) { + yyh1621.ElemContainerState(yyj1621) + if yyj1621 < len(yyv1621) { if r.TryDecodeAsNil() { - yyv1440[yyj1440] = Ingress{} + yyv1621[yyj1621] = Ingress{} } else { - yyv1443 := &yyv1440[yyj1440] - yyv1443.CodecDecodeSelf(d) + yyv1624 := &yyv1621[yyj1621] + yyv1624.CodecDecodeSelf(d) } } else { @@ -17666,17 +19824,17 @@ func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) { } } - if yyj1440 < len(yyv1440) { - yyv1440 = yyv1440[:yyj1440] - yyc1440 = true - } else if yyj1440 == 0 && yyv1440 == nil { - yyv1440 = []Ingress{} - yyc1440 = true + if yyj1621 < len(yyv1621) { + yyv1621 = yyv1621[:yyj1621] + yyc1621 = true + } else if yyj1621 == 0 && yyv1621 == nil { + yyv1621 = []Ingress{} + yyc1621 = true } } - yyh1440.End() - if yyc1440 { - *v = yyv1440 + yyh1621.End() + if yyc1621 { + *v = yyv1621 } } @@ -17685,10 +19843,10 @@ func (x codecSelfer1234) encSliceIngressRule(v []IngressRule, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1444 := range v { + for _, yyv1625 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1445 := &yyv1444 - yy1445.CodecEncodeSelf(e) + yy1626 := &yyv1625 + yy1626.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17698,83 +19856,83 @@ func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1446 := *v - yyh1446, yyl1446 := z.DecSliceHelperStart() - var yyc1446 bool - if yyl1446 == 0 { - if yyv1446 == nil { - yyv1446 = []IngressRule{} - yyc1446 = true - } else if len(yyv1446) != 0 { - yyv1446 = yyv1446[:0] - yyc1446 = true + yyv1627 := *v + yyh1627, yyl1627 := z.DecSliceHelperStart() + var yyc1627 bool + if yyl1627 == 0 { + if yyv1627 == nil { + yyv1627 = []IngressRule{} + yyc1627 = true + } else if len(yyv1627) != 0 { + yyv1627 = yyv1627[:0] + yyc1627 = true } - } else if yyl1446 > 0 { - var yyrr1446, yyrl1446 int - var yyrt1446 bool - if yyl1446 > cap(yyv1446) { + } else if yyl1627 > 0 { + var yyrr1627, yyrl1627 int + var yyrt1627 bool + if yyl1627 > cap(yyv1627) { - yyrg1446 := len(yyv1446) > 0 - yyv21446 := yyv1446 - yyrl1446, yyrt1446 = z.DecInferLen(yyl1446, z.DecBasicHandle().MaxInitLen, 24) - if yyrt1446 { - if yyrl1446 <= cap(yyv1446) { - yyv1446 = yyv1446[:yyrl1446] + yyrg1627 := len(yyv1627) > 0 + yyv21627 := yyv1627 + yyrl1627, yyrt1627 = z.DecInferLen(yyl1627, z.DecBasicHandle().MaxInitLen, 24) + if yyrt1627 { + if yyrl1627 <= cap(yyv1627) { + yyv1627 = yyv1627[:yyrl1627] } else { - yyv1446 = make([]IngressRule, yyrl1446) + yyv1627 = make([]IngressRule, yyrl1627) } } else { - yyv1446 = make([]IngressRule, yyrl1446) + yyv1627 = make([]IngressRule, yyrl1627) } - yyc1446 = true - yyrr1446 = len(yyv1446) - if yyrg1446 { - copy(yyv1446, yyv21446) + yyc1627 = true + yyrr1627 = len(yyv1627) + if yyrg1627 { + copy(yyv1627, yyv21627) } - } else if yyl1446 != len(yyv1446) { - yyv1446 = yyv1446[:yyl1446] - yyc1446 = true + } else if yyl1627 != len(yyv1627) { + yyv1627 = yyv1627[:yyl1627] + yyc1627 = true } - yyj1446 := 0 - for ; yyj1446 < yyrr1446; yyj1446++ { - yyh1446.ElemContainerState(yyj1446) + yyj1627 := 0 + for ; yyj1627 < yyrr1627; yyj1627++ { + yyh1627.ElemContainerState(yyj1627) if r.TryDecodeAsNil() { - yyv1446[yyj1446] = IngressRule{} + yyv1627[yyj1627] = IngressRule{} } else { - yyv1447 := &yyv1446[yyj1446] - yyv1447.CodecDecodeSelf(d) + yyv1628 := &yyv1627[yyj1627] + yyv1628.CodecDecodeSelf(d) } } - if yyrt1446 { - for ; yyj1446 < yyl1446; yyj1446++ { - yyv1446 = append(yyv1446, IngressRule{}) - yyh1446.ElemContainerState(yyj1446) + if yyrt1627 { + for ; yyj1627 < yyl1627; yyj1627++ { + yyv1627 = append(yyv1627, IngressRule{}) + yyh1627.ElemContainerState(yyj1627) if r.TryDecodeAsNil() { - yyv1446[yyj1446] = IngressRule{} + yyv1627[yyj1627] = IngressRule{} } else { - yyv1448 := &yyv1446[yyj1446] - yyv1448.CodecDecodeSelf(d) + yyv1629 := &yyv1627[yyj1627] + yyv1629.CodecDecodeSelf(d) } } } } else { - yyj1446 := 0 - for ; !r.CheckBreak(); yyj1446++ { + yyj1627 := 0 + for ; !r.CheckBreak(); yyj1627++ { - if yyj1446 >= len(yyv1446) { - yyv1446 = append(yyv1446, IngressRule{}) // var yyz1446 IngressRule - yyc1446 = true + if yyj1627 >= len(yyv1627) { + yyv1627 = append(yyv1627, IngressRule{}) // var yyz1627 IngressRule + yyc1627 = true } - yyh1446.ElemContainerState(yyj1446) - if yyj1446 < len(yyv1446) { + yyh1627.ElemContainerState(yyj1627) + if yyj1627 < len(yyv1627) { if r.TryDecodeAsNil() { - yyv1446[yyj1446] = IngressRule{} + yyv1627[yyj1627] = IngressRule{} } else { - yyv1449 := &yyv1446[yyj1446] - yyv1449.CodecDecodeSelf(d) + yyv1630 := &yyv1627[yyj1627] + yyv1630.CodecDecodeSelf(d) } } else { @@ -17782,17 +19940,17 @@ func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Deco } } - if yyj1446 < len(yyv1446) { - yyv1446 = yyv1446[:yyj1446] - yyc1446 = true - } else if yyj1446 == 0 && yyv1446 == nil { - yyv1446 = []IngressRule{} - yyc1446 = true + if yyj1627 < len(yyv1627) { + yyv1627 = yyv1627[:yyj1627] + yyc1627 = true + } else if yyj1627 == 0 && yyv1627 == nil { + yyv1627 = []IngressRule{} + yyc1627 = true } } - yyh1446.End() - if yyc1446 { - *v = yyv1446 + yyh1627.End() + if yyc1627 { + *v = yyv1627 } } @@ -17801,10 +19959,10 @@ func (x codecSelfer1234) encSliceHTTPIngressPath(v []HTTPIngressPath, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1450 := range v { + for _, yyv1631 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1451 := &yyv1450 - yy1451.CodecEncodeSelf(e) + yy1632 := &yyv1631 + yy1632.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17814,83 +19972,83 @@ func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1452 := *v - yyh1452, yyl1452 := z.DecSliceHelperStart() - var yyc1452 bool - if yyl1452 == 0 { - if yyv1452 == nil { - yyv1452 = []HTTPIngressPath{} - yyc1452 = true - } else if len(yyv1452) != 0 { - yyv1452 = yyv1452[:0] - yyc1452 = true + yyv1633 := *v + yyh1633, yyl1633 := z.DecSliceHelperStart() + var yyc1633 bool + if yyl1633 == 0 { + if yyv1633 == nil { + yyv1633 = []HTTPIngressPath{} + yyc1633 = true + } else if len(yyv1633) != 0 { + yyv1633 = yyv1633[:0] + yyc1633 = true } - } else if yyl1452 > 0 { - var yyrr1452, yyrl1452 int - var yyrt1452 bool - if yyl1452 > cap(yyv1452) { + } else if yyl1633 > 0 { + var yyrr1633, yyrl1633 int + var yyrt1633 bool + if yyl1633 > cap(yyv1633) { - yyrg1452 := len(yyv1452) > 0 - yyv21452 := yyv1452 - yyrl1452, yyrt1452 = z.DecInferLen(yyl1452, z.DecBasicHandle().MaxInitLen, 64) - if yyrt1452 { - if yyrl1452 <= cap(yyv1452) { - yyv1452 = yyv1452[:yyrl1452] + yyrg1633 := len(yyv1633) > 0 + yyv21633 := yyv1633 + yyrl1633, yyrt1633 = z.DecInferLen(yyl1633, z.DecBasicHandle().MaxInitLen, 64) + if yyrt1633 { + if yyrl1633 <= cap(yyv1633) { + yyv1633 = yyv1633[:yyrl1633] } else { - yyv1452 = make([]HTTPIngressPath, yyrl1452) + yyv1633 = make([]HTTPIngressPath, yyrl1633) } } else { - yyv1452 = make([]HTTPIngressPath, yyrl1452) + yyv1633 = make([]HTTPIngressPath, yyrl1633) } - yyc1452 = true - yyrr1452 = len(yyv1452) - if yyrg1452 { - copy(yyv1452, yyv21452) + yyc1633 = true + yyrr1633 = len(yyv1633) + if yyrg1633 { + copy(yyv1633, yyv21633) } - } else if yyl1452 != len(yyv1452) { - yyv1452 = yyv1452[:yyl1452] - yyc1452 = true + } else if yyl1633 != len(yyv1633) { + yyv1633 = yyv1633[:yyl1633] + yyc1633 = true } - yyj1452 := 0 - for ; yyj1452 < yyrr1452; yyj1452++ { - yyh1452.ElemContainerState(yyj1452) + yyj1633 := 0 + for ; yyj1633 < yyrr1633; yyj1633++ { + yyh1633.ElemContainerState(yyj1633) if r.TryDecodeAsNil() { - yyv1452[yyj1452] = HTTPIngressPath{} + yyv1633[yyj1633] = HTTPIngressPath{} } else { - yyv1453 := &yyv1452[yyj1452] - yyv1453.CodecDecodeSelf(d) + yyv1634 := &yyv1633[yyj1633] + yyv1634.CodecDecodeSelf(d) } } - if yyrt1452 { - for ; yyj1452 < yyl1452; yyj1452++ { - yyv1452 = append(yyv1452, HTTPIngressPath{}) - yyh1452.ElemContainerState(yyj1452) + if yyrt1633 { + for ; yyj1633 < yyl1633; yyj1633++ { + yyv1633 = append(yyv1633, HTTPIngressPath{}) + yyh1633.ElemContainerState(yyj1633) if r.TryDecodeAsNil() { - yyv1452[yyj1452] = HTTPIngressPath{} + yyv1633[yyj1633] = HTTPIngressPath{} } else { - yyv1454 := &yyv1452[yyj1452] - yyv1454.CodecDecodeSelf(d) + yyv1635 := &yyv1633[yyj1633] + yyv1635.CodecDecodeSelf(d) } } } } else { - yyj1452 := 0 - for ; !r.CheckBreak(); yyj1452++ { + yyj1633 := 0 + for ; !r.CheckBreak(); yyj1633++ { - if yyj1452 >= len(yyv1452) { - yyv1452 = append(yyv1452, HTTPIngressPath{}) // var yyz1452 HTTPIngressPath - yyc1452 = true + if yyj1633 >= len(yyv1633) { + yyv1633 = append(yyv1633, HTTPIngressPath{}) // var yyz1633 HTTPIngressPath + yyc1633 = true } - yyh1452.ElemContainerState(yyj1452) - if yyj1452 < len(yyv1452) { + yyh1633.ElemContainerState(yyj1633) + if yyj1633 < len(yyv1633) { if r.TryDecodeAsNil() { - yyv1452[yyj1452] = HTTPIngressPath{} + yyv1633[yyj1633] = HTTPIngressPath{} } else { - yyv1455 := &yyv1452[yyj1452] - yyv1455.CodecDecodeSelf(d) + yyv1636 := &yyv1633[yyj1633] + yyv1636.CodecDecodeSelf(d) } } else { @@ -17898,17 +20056,17 @@ func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1 } } - if yyj1452 < len(yyv1452) { - yyv1452 = yyv1452[:yyj1452] - yyc1452 = true - } else if yyj1452 == 0 && yyv1452 == nil { - yyv1452 = []HTTPIngressPath{} - yyc1452 = true + if yyj1633 < len(yyv1633) { + yyv1633 = yyv1633[:yyj1633] + yyc1633 = true + } else if yyj1633 == 0 && yyv1633 == nil { + yyv1633 = []HTTPIngressPath{} + yyc1633 = true } } - yyh1452.End() - if yyc1452 { - *v = yyv1452 + yyh1633.End() + if yyc1633 { + *v = yyv1633 } } @@ -17917,10 +20075,10 @@ func (x codecSelfer1234) encSliceNodeUtilization(v []NodeUtilization, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1456 := range v { + for _, yyv1637 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1457 := &yyv1456 - yy1457.CodecEncodeSelf(e) + yy1638 := &yyv1637 + yy1638.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17930,83 +20088,83 @@ func (x codecSelfer1234) decSliceNodeUtilization(v *[]NodeUtilization, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1458 := *v - yyh1458, yyl1458 := z.DecSliceHelperStart() - var yyc1458 bool - if yyl1458 == 0 { - if yyv1458 == nil { - yyv1458 = []NodeUtilization{} - yyc1458 = true - } else if len(yyv1458) != 0 { - yyv1458 = yyv1458[:0] - yyc1458 = true + yyv1639 := *v + yyh1639, yyl1639 := z.DecSliceHelperStart() + var yyc1639 bool + if yyl1639 == 0 { + if yyv1639 == nil { + yyv1639 = []NodeUtilization{} + yyc1639 = true + } else if len(yyv1639) != 0 { + yyv1639 = yyv1639[:0] + yyc1639 = true } - } else if yyl1458 > 0 { - var yyrr1458, yyrl1458 int - var yyrt1458 bool - if yyl1458 > cap(yyv1458) { + } else if yyl1639 > 0 { + var yyrr1639, yyrl1639 int + var yyrt1639 bool + if yyl1639 > cap(yyv1639) { - yyrg1458 := len(yyv1458) > 0 - yyv21458 := yyv1458 - yyrl1458, yyrt1458 = z.DecInferLen(yyl1458, z.DecBasicHandle().MaxInitLen, 24) - if yyrt1458 { - if yyrl1458 <= cap(yyv1458) { - yyv1458 = yyv1458[:yyrl1458] + yyrg1639 := len(yyv1639) > 0 + yyv21639 := yyv1639 + yyrl1639, yyrt1639 = z.DecInferLen(yyl1639, z.DecBasicHandle().MaxInitLen, 24) + if yyrt1639 { + if yyrl1639 <= cap(yyv1639) { + yyv1639 = yyv1639[:yyrl1639] } else { - yyv1458 = make([]NodeUtilization, yyrl1458) + yyv1639 = make([]NodeUtilization, yyrl1639) } } else { - yyv1458 = make([]NodeUtilization, yyrl1458) + yyv1639 = make([]NodeUtilization, yyrl1639) } - yyc1458 = true - yyrr1458 = len(yyv1458) - if yyrg1458 { - copy(yyv1458, yyv21458) + yyc1639 = true + yyrr1639 = len(yyv1639) + if yyrg1639 { + copy(yyv1639, yyv21639) } - } else if yyl1458 != len(yyv1458) { - yyv1458 = yyv1458[:yyl1458] - yyc1458 = true + } else if yyl1639 != len(yyv1639) { + yyv1639 = yyv1639[:yyl1639] + yyc1639 = true } - yyj1458 := 0 - for ; yyj1458 < yyrr1458; yyj1458++ { - yyh1458.ElemContainerState(yyj1458) + yyj1639 := 0 + for ; yyj1639 < yyrr1639; yyj1639++ { + yyh1639.ElemContainerState(yyj1639) if r.TryDecodeAsNil() { - yyv1458[yyj1458] = NodeUtilization{} + yyv1639[yyj1639] = NodeUtilization{} } else { - yyv1459 := &yyv1458[yyj1458] - yyv1459.CodecDecodeSelf(d) + yyv1640 := &yyv1639[yyj1639] + yyv1640.CodecDecodeSelf(d) } } - if yyrt1458 { - for ; yyj1458 < yyl1458; yyj1458++ { - yyv1458 = append(yyv1458, NodeUtilization{}) - yyh1458.ElemContainerState(yyj1458) + if yyrt1639 { + for ; yyj1639 < yyl1639; yyj1639++ { + yyv1639 = append(yyv1639, NodeUtilization{}) + yyh1639.ElemContainerState(yyj1639) if r.TryDecodeAsNil() { - yyv1458[yyj1458] = NodeUtilization{} + yyv1639[yyj1639] = NodeUtilization{} } else { - yyv1460 := &yyv1458[yyj1458] - yyv1460.CodecDecodeSelf(d) + yyv1641 := &yyv1639[yyj1639] + yyv1641.CodecDecodeSelf(d) } } } } else { - yyj1458 := 0 - for ; !r.CheckBreak(); yyj1458++ { + yyj1639 := 0 + for ; !r.CheckBreak(); yyj1639++ { - if yyj1458 >= len(yyv1458) { - yyv1458 = append(yyv1458, NodeUtilization{}) // var yyz1458 NodeUtilization - yyc1458 = true + if yyj1639 >= len(yyv1639) { + yyv1639 = append(yyv1639, NodeUtilization{}) // var yyz1639 NodeUtilization + yyc1639 = true } - yyh1458.ElemContainerState(yyj1458) - if yyj1458 < len(yyv1458) { + yyh1639.ElemContainerState(yyj1639) + if yyj1639 < len(yyv1639) { if r.TryDecodeAsNil() { - yyv1458[yyj1458] = NodeUtilization{} + yyv1639[yyj1639] = NodeUtilization{} } else { - yyv1461 := &yyv1458[yyj1458] - yyv1461.CodecDecodeSelf(d) + yyv1642 := &yyv1639[yyj1639] + yyv1642.CodecDecodeSelf(d) } } else { @@ -18014,17 +20172,17 @@ func (x codecSelfer1234) decSliceNodeUtilization(v *[]NodeUtilization, d *codec1 } } - if yyj1458 < len(yyv1458) { - yyv1458 = yyv1458[:yyj1458] - yyc1458 = true - } else if yyj1458 == 0 && yyv1458 == nil { - yyv1458 = []NodeUtilization{} - yyc1458 = true + if yyj1639 < len(yyv1639) { + yyv1639 = yyv1639[:yyj1639] + yyc1639 = true + } else if yyj1639 == 0 && yyv1639 == nil { + yyv1639 = []NodeUtilization{} + yyc1639 = true } } - yyh1458.End() - if yyc1458 { - *v = yyv1458 + yyh1639.End() + if yyc1639 { + *v = yyv1639 } } @@ -18033,10 +20191,10 @@ func (x codecSelfer1234) encSliceClusterAutoscaler(v []ClusterAutoscaler, e *cod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1462 := range v { + for _, yyv1643 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1463 := &yyv1462 - yy1463.CodecEncodeSelf(e) + yy1644 := &yyv1643 + yy1644.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18046,83 +20204,83 @@ func (x codecSelfer1234) decSliceClusterAutoscaler(v *[]ClusterAutoscaler, d *co z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1464 := *v - yyh1464, yyl1464 := z.DecSliceHelperStart() - var yyc1464 bool - if yyl1464 == 0 { - if yyv1464 == nil { - yyv1464 = []ClusterAutoscaler{} - yyc1464 = true - } else if len(yyv1464) != 0 { - yyv1464 = yyv1464[:0] - yyc1464 = true + yyv1645 := *v + yyh1645, yyl1645 := z.DecSliceHelperStart() + var yyc1645 bool + if yyl1645 == 0 { + if yyv1645 == nil { + yyv1645 = []ClusterAutoscaler{} + yyc1645 = true + } else if len(yyv1645) != 0 { + yyv1645 = yyv1645[:0] + yyc1645 = true } - } else if yyl1464 > 0 { - var yyrr1464, yyrl1464 int - var yyrt1464 bool - if yyl1464 > cap(yyv1464) { + } else if yyl1645 > 0 { + var yyrr1645, yyrl1645 int + var yyrt1645 bool + if yyl1645 > cap(yyv1645) { - yyrg1464 := len(yyv1464) > 0 - yyv21464 := yyv1464 - yyrl1464, yyrt1464 = z.DecInferLen(yyl1464, z.DecBasicHandle().MaxInitLen, 232) - if yyrt1464 { - if yyrl1464 <= cap(yyv1464) { - yyv1464 = yyv1464[:yyrl1464] + yyrg1645 := len(yyv1645) > 0 + yyv21645 := yyv1645 + yyrl1645, yyrt1645 = z.DecInferLen(yyl1645, z.DecBasicHandle().MaxInitLen, 232) + if yyrt1645 { + if yyrl1645 <= cap(yyv1645) { + yyv1645 = yyv1645[:yyrl1645] } else { - yyv1464 = make([]ClusterAutoscaler, yyrl1464) + yyv1645 = make([]ClusterAutoscaler, yyrl1645) } } else { - yyv1464 = make([]ClusterAutoscaler, yyrl1464) + yyv1645 = make([]ClusterAutoscaler, yyrl1645) } - yyc1464 = true - yyrr1464 = len(yyv1464) - if yyrg1464 { - copy(yyv1464, yyv21464) + yyc1645 = true + yyrr1645 = len(yyv1645) + if yyrg1645 { + copy(yyv1645, yyv21645) } - } else if yyl1464 != len(yyv1464) { - yyv1464 = yyv1464[:yyl1464] - yyc1464 = true + } else if yyl1645 != len(yyv1645) { + yyv1645 = yyv1645[:yyl1645] + yyc1645 = true } - yyj1464 := 0 - for ; yyj1464 < yyrr1464; yyj1464++ { - yyh1464.ElemContainerState(yyj1464) + yyj1645 := 0 + for ; yyj1645 < yyrr1645; yyj1645++ { + yyh1645.ElemContainerState(yyj1645) if r.TryDecodeAsNil() { - yyv1464[yyj1464] = ClusterAutoscaler{} + yyv1645[yyj1645] = ClusterAutoscaler{} } else { - yyv1465 := &yyv1464[yyj1464] - yyv1465.CodecDecodeSelf(d) + yyv1646 := &yyv1645[yyj1645] + yyv1646.CodecDecodeSelf(d) } } - if yyrt1464 { - for ; yyj1464 < yyl1464; yyj1464++ { - yyv1464 = append(yyv1464, ClusterAutoscaler{}) - yyh1464.ElemContainerState(yyj1464) + if yyrt1645 { + for ; yyj1645 < yyl1645; yyj1645++ { + yyv1645 = append(yyv1645, ClusterAutoscaler{}) + yyh1645.ElemContainerState(yyj1645) if r.TryDecodeAsNil() { - yyv1464[yyj1464] = ClusterAutoscaler{} + yyv1645[yyj1645] = ClusterAutoscaler{} } else { - yyv1466 := &yyv1464[yyj1464] - yyv1466.CodecDecodeSelf(d) + yyv1647 := &yyv1645[yyj1645] + yyv1647.CodecDecodeSelf(d) } } } } else { - yyj1464 := 0 - for ; !r.CheckBreak(); yyj1464++ { + yyj1645 := 0 + for ; !r.CheckBreak(); yyj1645++ { - if yyj1464 >= len(yyv1464) { - yyv1464 = append(yyv1464, ClusterAutoscaler{}) // var yyz1464 ClusterAutoscaler - yyc1464 = true + if yyj1645 >= len(yyv1645) { + yyv1645 = append(yyv1645, ClusterAutoscaler{}) // var yyz1645 ClusterAutoscaler + yyc1645 = true } - yyh1464.ElemContainerState(yyj1464) - if yyj1464 < len(yyv1464) { + yyh1645.ElemContainerState(yyj1645) + if yyj1645 < len(yyv1645) { if r.TryDecodeAsNil() { - yyv1464[yyj1464] = ClusterAutoscaler{} + yyv1645[yyj1645] = ClusterAutoscaler{} } else { - yyv1467 := &yyv1464[yyj1464] - yyv1467.CodecDecodeSelf(d) + yyv1648 := &yyv1645[yyj1645] + yyv1648.CodecDecodeSelf(d) } } else { @@ -18130,17 +20288,17 @@ func (x codecSelfer1234) decSliceClusterAutoscaler(v *[]ClusterAutoscaler, d *co } } - if yyj1464 < len(yyv1464) { - yyv1464 = yyv1464[:yyj1464] - yyc1464 = true - } else if yyj1464 == 0 && yyv1464 == nil { - yyv1464 = []ClusterAutoscaler{} - yyc1464 = true + if yyj1645 < len(yyv1645) { + yyv1645 = yyv1645[:yyj1645] + yyc1645 = true + } else if yyj1645 == 0 && yyv1645 == nil { + yyv1645 = []ClusterAutoscaler{} + yyc1645 = true } } - yyh1464.End() - if yyc1464 { - *v = yyv1464 + yyh1645.End() + if yyc1645 { + *v = yyv1645 } } @@ -18149,10 +20307,10 @@ func (x codecSelfer1234) encSliceReplicaSet(v []ReplicaSet, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1468 := range v { + for _, yyv1649 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1469 := &yyv1468 - yy1469.CodecEncodeSelf(e) + yy1650 := &yyv1649 + yy1650.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18162,83 +20320,83 @@ func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1470 := *v - yyh1470, yyl1470 := z.DecSliceHelperStart() - var yyc1470 bool - if yyl1470 == 0 { - if yyv1470 == nil { - yyv1470 = []ReplicaSet{} - yyc1470 = true - } else if len(yyv1470) != 0 { - yyv1470 = yyv1470[:0] - yyc1470 = true + yyv1651 := *v + yyh1651, yyl1651 := z.DecSliceHelperStart() + var yyc1651 bool + if yyl1651 == 0 { + if yyv1651 == nil { + yyv1651 = []ReplicaSet{} + yyc1651 = true + } else if len(yyv1651) != 0 { + yyv1651 = yyv1651[:0] + yyc1651 = true } - } else if yyl1470 > 0 { - var yyrr1470, yyrl1470 int - var yyrt1470 bool - if yyl1470 > cap(yyv1470) { + } else if yyl1651 > 0 { + var yyrr1651, yyrl1651 int + var yyrt1651 bool + if yyl1651 > cap(yyv1651) { - yyrg1470 := len(yyv1470) > 0 - yyv21470 := yyv1470 - yyrl1470, yyrt1470 = z.DecInferLen(yyl1470, z.DecBasicHandle().MaxInitLen, 232) - if yyrt1470 { - if yyrl1470 <= cap(yyv1470) { - yyv1470 = yyv1470[:yyrl1470] + yyrg1651 := len(yyv1651) > 0 + yyv21651 := yyv1651 + yyrl1651, yyrt1651 = z.DecInferLen(yyl1651, z.DecBasicHandle().MaxInitLen, 232) + if yyrt1651 { + if yyrl1651 <= cap(yyv1651) { + yyv1651 = yyv1651[:yyrl1651] } else { - yyv1470 = make([]ReplicaSet, yyrl1470) + yyv1651 = make([]ReplicaSet, yyrl1651) } } else { - yyv1470 = make([]ReplicaSet, yyrl1470) + yyv1651 = make([]ReplicaSet, yyrl1651) } - yyc1470 = true - yyrr1470 = len(yyv1470) - if yyrg1470 { - copy(yyv1470, yyv21470) + yyc1651 = true + yyrr1651 = len(yyv1651) + if yyrg1651 { + copy(yyv1651, yyv21651) } - } else if yyl1470 != len(yyv1470) { - yyv1470 = yyv1470[:yyl1470] - yyc1470 = true + } else if yyl1651 != len(yyv1651) { + yyv1651 = yyv1651[:yyl1651] + yyc1651 = true } - yyj1470 := 0 - for ; yyj1470 < yyrr1470; yyj1470++ { - yyh1470.ElemContainerState(yyj1470) + yyj1651 := 0 + for ; yyj1651 < yyrr1651; yyj1651++ { + yyh1651.ElemContainerState(yyj1651) if r.TryDecodeAsNil() { - yyv1470[yyj1470] = ReplicaSet{} + yyv1651[yyj1651] = ReplicaSet{} } else { - yyv1471 := &yyv1470[yyj1470] - yyv1471.CodecDecodeSelf(d) + yyv1652 := &yyv1651[yyj1651] + yyv1652.CodecDecodeSelf(d) } } - if yyrt1470 { - for ; yyj1470 < yyl1470; yyj1470++ { - yyv1470 = append(yyv1470, ReplicaSet{}) - yyh1470.ElemContainerState(yyj1470) + if yyrt1651 { + for ; yyj1651 < yyl1651; yyj1651++ { + yyv1651 = append(yyv1651, ReplicaSet{}) + yyh1651.ElemContainerState(yyj1651) if r.TryDecodeAsNil() { - yyv1470[yyj1470] = ReplicaSet{} + yyv1651[yyj1651] = ReplicaSet{} } else { - yyv1472 := &yyv1470[yyj1470] - yyv1472.CodecDecodeSelf(d) + yyv1653 := &yyv1651[yyj1651] + yyv1653.CodecDecodeSelf(d) } } } } else { - yyj1470 := 0 - for ; !r.CheckBreak(); yyj1470++ { + yyj1651 := 0 + for ; !r.CheckBreak(); yyj1651++ { - if yyj1470 >= len(yyv1470) { - yyv1470 = append(yyv1470, ReplicaSet{}) // var yyz1470 ReplicaSet - yyc1470 = true + if yyj1651 >= len(yyv1651) { + yyv1651 = append(yyv1651, ReplicaSet{}) // var yyz1651 ReplicaSet + yyc1651 = true } - yyh1470.ElemContainerState(yyj1470) - if yyj1470 < len(yyv1470) { + yyh1651.ElemContainerState(yyj1651) + if yyj1651 < len(yyv1651) { if r.TryDecodeAsNil() { - yyv1470[yyj1470] = ReplicaSet{} + yyv1651[yyj1651] = ReplicaSet{} } else { - yyv1473 := &yyv1470[yyj1470] - yyv1473.CodecDecodeSelf(d) + yyv1654 := &yyv1651[yyj1651] + yyv1654.CodecDecodeSelf(d) } } else { @@ -18246,16 +20404,584 @@ func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decode } } - if yyj1470 < len(yyv1470) { - yyv1470 = yyv1470[:yyj1470] - yyc1470 = true - } else if yyj1470 == 0 && yyv1470 == nil { - yyv1470 = []ReplicaSet{} - yyc1470 = true + if yyj1651 < len(yyv1651) { + yyv1651 = yyv1651[:yyj1651] + yyc1651 = true + } else if yyj1651 == 0 && yyv1651 == nil { + yyv1651 = []ReplicaSet{} + yyc1651 = true } } - yyh1470.End() - if yyc1470 { - *v = yyv1470 + yyh1651.End() + if yyc1651 { + *v = yyv1651 + } +} + +func (x codecSelfer1234) encSliceapi_Capability(v []pkg2_api.Capability, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1655 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1656 := z.EncBinary() + _ = yym1656 + if false { + } else if z.HasExtensions() && z.EncExt(yyv1655) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yyv1655)) + } + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceapi_Capability(v *[]pkg2_api.Capability, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1657 := *v + yyh1657, yyl1657 := z.DecSliceHelperStart() + var yyc1657 bool + if yyl1657 == 0 { + if yyv1657 == nil { + yyv1657 = []pkg2_api.Capability{} + yyc1657 = true + } else if len(yyv1657) != 0 { + yyv1657 = yyv1657[:0] + yyc1657 = true + } + } else if yyl1657 > 0 { + var yyrr1657, yyrl1657 int + var yyrt1657 bool + if yyl1657 > cap(yyv1657) { + + yyrl1657, yyrt1657 = z.DecInferLen(yyl1657, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1657 { + if yyrl1657 <= cap(yyv1657) { + yyv1657 = yyv1657[:yyrl1657] + } else { + yyv1657 = make([]pkg2_api.Capability, yyrl1657) + } + } else { + yyv1657 = make([]pkg2_api.Capability, yyrl1657) + } + yyc1657 = true + yyrr1657 = len(yyv1657) + } else if yyl1657 != len(yyv1657) { + yyv1657 = yyv1657[:yyl1657] + yyc1657 = true + } + yyj1657 := 0 + for ; yyj1657 < yyrr1657; yyj1657++ { + yyh1657.ElemContainerState(yyj1657) + if r.TryDecodeAsNil() { + yyv1657[yyj1657] = "" + } else { + yyv1657[yyj1657] = pkg2_api.Capability(r.DecodeString()) + } + + } + if yyrt1657 { + for ; yyj1657 < yyl1657; yyj1657++ { + yyv1657 = append(yyv1657, "") + yyh1657.ElemContainerState(yyj1657) + if r.TryDecodeAsNil() { + yyv1657[yyj1657] = "" + } else { + yyv1657[yyj1657] = pkg2_api.Capability(r.DecodeString()) + } + + } + } + + } else { + yyj1657 := 0 + for ; !r.CheckBreak(); yyj1657++ { + + if yyj1657 >= len(yyv1657) { + yyv1657 = append(yyv1657, "") // var yyz1657 pkg2_api.Capability + yyc1657 = true + } + yyh1657.ElemContainerState(yyj1657) + if yyj1657 < len(yyv1657) { + if r.TryDecodeAsNil() { + yyv1657[yyj1657] = "" + } else { + yyv1657[yyj1657] = pkg2_api.Capability(r.DecodeString()) + } + + } else { + z.DecSwallow() + } + + } + if yyj1657 < len(yyv1657) { + yyv1657 = yyv1657[:yyj1657] + yyc1657 = true + } else if yyj1657 == 0 && yyv1657 == nil { + yyv1657 = []pkg2_api.Capability{} + yyc1657 = true + } + } + yyh1657.End() + if yyc1657 { + *v = yyv1657 + } +} + +func (x codecSelfer1234) encSliceFSType(v []FSType, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1661 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yyv1661.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceFSType(v *[]FSType, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1662 := *v + yyh1662, yyl1662 := z.DecSliceHelperStart() + var yyc1662 bool + if yyl1662 == 0 { + if yyv1662 == nil { + yyv1662 = []FSType{} + yyc1662 = true + } else if len(yyv1662) != 0 { + yyv1662 = yyv1662[:0] + yyc1662 = true + } + } else if yyl1662 > 0 { + var yyrr1662, yyrl1662 int + var yyrt1662 bool + if yyl1662 > cap(yyv1662) { + + yyrl1662, yyrt1662 = z.DecInferLen(yyl1662, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1662 { + if yyrl1662 <= cap(yyv1662) { + yyv1662 = yyv1662[:yyrl1662] + } else { + yyv1662 = make([]FSType, yyrl1662) + } + } else { + yyv1662 = make([]FSType, yyrl1662) + } + yyc1662 = true + yyrr1662 = len(yyv1662) + } else if yyl1662 != len(yyv1662) { + yyv1662 = yyv1662[:yyl1662] + yyc1662 = true + } + yyj1662 := 0 + for ; yyj1662 < yyrr1662; yyj1662++ { + yyh1662.ElemContainerState(yyj1662) + if r.TryDecodeAsNil() { + yyv1662[yyj1662] = "" + } else { + yyv1662[yyj1662] = FSType(r.DecodeString()) + } + + } + if yyrt1662 { + for ; yyj1662 < yyl1662; yyj1662++ { + yyv1662 = append(yyv1662, "") + yyh1662.ElemContainerState(yyj1662) + if r.TryDecodeAsNil() { + yyv1662[yyj1662] = "" + } else { + yyv1662[yyj1662] = FSType(r.DecodeString()) + } + + } + } + + } else { + yyj1662 := 0 + for ; !r.CheckBreak(); yyj1662++ { + + if yyj1662 >= len(yyv1662) { + yyv1662 = append(yyv1662, "") // var yyz1662 FSType + yyc1662 = true + } + yyh1662.ElemContainerState(yyj1662) + if yyj1662 < len(yyv1662) { + if r.TryDecodeAsNil() { + yyv1662[yyj1662] = "" + } else { + yyv1662[yyj1662] = FSType(r.DecodeString()) + } + + } else { + z.DecSwallow() + } + + } + if yyj1662 < len(yyv1662) { + yyv1662 = yyv1662[:yyj1662] + yyc1662 = true + } else if yyj1662 == 0 && yyv1662 == nil { + yyv1662 = []FSType{} + yyc1662 = true + } + } + yyh1662.End() + if yyc1662 { + *v = yyv1662 + } +} + +func (x codecSelfer1234) encSliceHostPortRange(v []HostPortRange, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1666 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy1667 := &yyv1666 + yy1667.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceHostPortRange(v *[]HostPortRange, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1668 := *v + yyh1668, yyl1668 := z.DecSliceHelperStart() + var yyc1668 bool + if yyl1668 == 0 { + if yyv1668 == nil { + yyv1668 = []HostPortRange{} + yyc1668 = true + } else if len(yyv1668) != 0 { + yyv1668 = yyv1668[:0] + yyc1668 = true + } + } else if yyl1668 > 0 { + var yyrr1668, yyrl1668 int + var yyrt1668 bool + if yyl1668 > cap(yyv1668) { + + yyrg1668 := len(yyv1668) > 0 + yyv21668 := yyv1668 + yyrl1668, yyrt1668 = z.DecInferLen(yyl1668, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1668 { + if yyrl1668 <= cap(yyv1668) { + yyv1668 = yyv1668[:yyrl1668] + } else { + yyv1668 = make([]HostPortRange, yyrl1668) + } + } else { + yyv1668 = make([]HostPortRange, yyrl1668) + } + yyc1668 = true + yyrr1668 = len(yyv1668) + if yyrg1668 { + copy(yyv1668, yyv21668) + } + } else if yyl1668 != len(yyv1668) { + yyv1668 = yyv1668[:yyl1668] + yyc1668 = true + } + yyj1668 := 0 + for ; yyj1668 < yyrr1668; yyj1668++ { + yyh1668.ElemContainerState(yyj1668) + if r.TryDecodeAsNil() { + yyv1668[yyj1668] = HostPortRange{} + } else { + yyv1669 := &yyv1668[yyj1668] + yyv1669.CodecDecodeSelf(d) + } + + } + if yyrt1668 { + for ; yyj1668 < yyl1668; yyj1668++ { + yyv1668 = append(yyv1668, HostPortRange{}) + yyh1668.ElemContainerState(yyj1668) + if r.TryDecodeAsNil() { + yyv1668[yyj1668] = HostPortRange{} + } else { + yyv1670 := &yyv1668[yyj1668] + yyv1670.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1668 := 0 + for ; !r.CheckBreak(); yyj1668++ { + + if yyj1668 >= len(yyv1668) { + yyv1668 = append(yyv1668, HostPortRange{}) // var yyz1668 HostPortRange + yyc1668 = true + } + yyh1668.ElemContainerState(yyj1668) + if yyj1668 < len(yyv1668) { + if r.TryDecodeAsNil() { + yyv1668[yyj1668] = HostPortRange{} + } else { + yyv1671 := &yyv1668[yyj1668] + yyv1671.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1668 < len(yyv1668) { + yyv1668 = yyv1668[:yyj1668] + yyc1668 = true + } else if yyj1668 == 0 && yyv1668 == nil { + yyv1668 = []HostPortRange{} + yyc1668 = true + } + } + yyh1668.End() + if yyc1668 { + *v = yyv1668 + } +} + +func (x codecSelfer1234) encSliceIDRange(v []IDRange, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1672 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy1673 := &yyv1672 + yy1673.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceIDRange(v *[]IDRange, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1674 := *v + yyh1674, yyl1674 := z.DecSliceHelperStart() + var yyc1674 bool + if yyl1674 == 0 { + if yyv1674 == nil { + yyv1674 = []IDRange{} + yyc1674 = true + } else if len(yyv1674) != 0 { + yyv1674 = yyv1674[:0] + yyc1674 = true + } + } else if yyl1674 > 0 { + var yyrr1674, yyrl1674 int + var yyrt1674 bool + if yyl1674 > cap(yyv1674) { + + yyrg1674 := len(yyv1674) > 0 + yyv21674 := yyv1674 + yyrl1674, yyrt1674 = z.DecInferLen(yyl1674, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1674 { + if yyrl1674 <= cap(yyv1674) { + yyv1674 = yyv1674[:yyrl1674] + } else { + yyv1674 = make([]IDRange, yyrl1674) + } + } else { + yyv1674 = make([]IDRange, yyrl1674) + } + yyc1674 = true + yyrr1674 = len(yyv1674) + if yyrg1674 { + copy(yyv1674, yyv21674) + } + } else if yyl1674 != len(yyv1674) { + yyv1674 = yyv1674[:yyl1674] + yyc1674 = true + } + yyj1674 := 0 + for ; yyj1674 < yyrr1674; yyj1674++ { + yyh1674.ElemContainerState(yyj1674) + if r.TryDecodeAsNil() { + yyv1674[yyj1674] = IDRange{} + } else { + yyv1675 := &yyv1674[yyj1674] + yyv1675.CodecDecodeSelf(d) + } + + } + if yyrt1674 { + for ; yyj1674 < yyl1674; yyj1674++ { + yyv1674 = append(yyv1674, IDRange{}) + yyh1674.ElemContainerState(yyj1674) + if r.TryDecodeAsNil() { + yyv1674[yyj1674] = IDRange{} + } else { + yyv1676 := &yyv1674[yyj1674] + yyv1676.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1674 := 0 + for ; !r.CheckBreak(); yyj1674++ { + + if yyj1674 >= len(yyv1674) { + yyv1674 = append(yyv1674, IDRange{}) // var yyz1674 IDRange + yyc1674 = true + } + yyh1674.ElemContainerState(yyj1674) + if yyj1674 < len(yyv1674) { + if r.TryDecodeAsNil() { + yyv1674[yyj1674] = IDRange{} + } else { + yyv1677 := &yyv1674[yyj1674] + yyv1677.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1674 < len(yyv1674) { + yyv1674 = yyv1674[:yyj1674] + yyc1674 = true + } else if yyj1674 == 0 && yyv1674 == nil { + yyv1674 = []IDRange{} + yyc1674 = true + } + } + yyh1674.End() + if yyc1674 { + *v = yyv1674 + } +} + +func (x codecSelfer1234) encSlicePodSecurityPolicy(v []PodSecurityPolicy, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1678 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy1679 := &yyv1678 + yy1679.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSlicePodSecurityPolicy(v *[]PodSecurityPolicy, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1680 := *v + yyh1680, yyl1680 := z.DecSliceHelperStart() + var yyc1680 bool + if yyl1680 == 0 { + if yyv1680 == nil { + yyv1680 = []PodSecurityPolicy{} + yyc1680 = true + } else if len(yyv1680) != 0 { + yyv1680 = yyv1680[:0] + yyc1680 = true + } + } else if yyl1680 > 0 { + var yyrr1680, yyrl1680 int + var yyrt1680 bool + if yyl1680 > cap(yyv1680) { + + yyrg1680 := len(yyv1680) > 0 + yyv21680 := yyv1680 + yyrl1680, yyrt1680 = z.DecInferLen(yyl1680, z.DecBasicHandle().MaxInitLen, 352) + if yyrt1680 { + if yyrl1680 <= cap(yyv1680) { + yyv1680 = yyv1680[:yyrl1680] + } else { + yyv1680 = make([]PodSecurityPolicy, yyrl1680) + } + } else { + yyv1680 = make([]PodSecurityPolicy, yyrl1680) + } + yyc1680 = true + yyrr1680 = len(yyv1680) + if yyrg1680 { + copy(yyv1680, yyv21680) + } + } else if yyl1680 != len(yyv1680) { + yyv1680 = yyv1680[:yyl1680] + yyc1680 = true + } + yyj1680 := 0 + for ; yyj1680 < yyrr1680; yyj1680++ { + yyh1680.ElemContainerState(yyj1680) + if r.TryDecodeAsNil() { + yyv1680[yyj1680] = PodSecurityPolicy{} + } else { + yyv1681 := &yyv1680[yyj1680] + yyv1681.CodecDecodeSelf(d) + } + + } + if yyrt1680 { + for ; yyj1680 < yyl1680; yyj1680++ { + yyv1680 = append(yyv1680, PodSecurityPolicy{}) + yyh1680.ElemContainerState(yyj1680) + if r.TryDecodeAsNil() { + yyv1680[yyj1680] = PodSecurityPolicy{} + } else { + yyv1682 := &yyv1680[yyj1680] + yyv1682.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1680 := 0 + for ; !r.CheckBreak(); yyj1680++ { + + if yyj1680 >= len(yyv1680) { + yyv1680 = append(yyv1680, PodSecurityPolicy{}) // var yyz1680 PodSecurityPolicy + yyc1680 = true + } + yyh1680.ElemContainerState(yyj1680) + if yyj1680 < len(yyv1680) { + if r.TryDecodeAsNil() { + yyv1680[yyj1680] = PodSecurityPolicy{} + } else { + yyv1683 := &yyv1680[yyj1680] + yyv1683.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1680 < len(yyv1680) { + yyv1680 = yyv1680[:yyj1680] + yyc1680 = true + } else if yyj1680 == 0 && yyv1680 == nil { + yyv1680 = []PodSecurityPolicy{} + yyc1680 = true + } + } + yyh1680.End() + if yyc1680 { + *v = yyv1680 } } diff --git a/pkg/apis/extensions/types.go b/pkg/apis/extensions/types.go index 59c3485a0ab..50a166f9a62 100644 --- a/pkg/apis/extensions/types.go +++ b/pkg/apis/extensions/types.go @@ -842,3 +842,123 @@ type ReplicaSetStatus struct { // ObservedGeneration is the most recent generation observed by the controller. ObservedGeneration int64 `json:"observedGeneration,omitempty"` } + +// PodSecurityPolicy governs the ability to make requests that affect the SecurityContext +// that will be applied to a pod and container. +type PodSecurityPolicy struct { + unversioned.TypeMeta `json:",inline"` + api.ObjectMeta `json:"metadata,omitempty"` + + // Spec defines the policy enforced. + Spec PodSecurityPolicySpec `json:"spec,omitempty"` +} + +// PodSecurityPolicySpec defines the policy enforced. +type PodSecurityPolicySpec struct { + // Privileged determines if a pod can request to be run as privileged. + Privileged bool `json:"privileged,omitempty"` + // Capabilities is a list of capabilities that can be added. + Capabilities []api.Capability `json:"capabilities,omitempty"` + // Volumes is a white list of allowed volume plugins. Empty indicates that all plugins + // may be used. + Volumes []FSType `json:"volumes,omitempty"` + // HostNetwork determines if the policy allows the use of HostNetwork in the pod spec. + HostNetwork bool `json:"hostNetwork,omitempty"` + // HostPorts determines which host port ranges are allowed to be exposed. + HostPorts []HostPortRange `json:"hostPorts,omitempty"` + // HostPID determines if the policy allows the use of HostPID in the pod spec. + HostPID bool `json:"hostPID,omitempty"` + // HostIPC determines if the policy allows the use of HostIPC in the pod spec. + HostIPC bool `json:"hostIPC,omitempty"` + // SELinuxContext is the strategy that will dictate the allowable labels that may be set. + SELinuxContext SELinuxContextStrategyOptions `json:"seLinuxContext,omitempty"` + // RunAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. + RunAsUser RunAsUserStrategyOptions `json:"runAsUser,omitempty"` +} + +// HostPortRange defines a range of host ports that will be enabled by a policy +// for pods to use. It requires both the start and end to be defined. +type HostPortRange struct { + // Min is the start of the range, inclusive. + Min int `json:"min"` + // Max is the end of the range, inclusive. + Max int `json:"max"` +} + +// FSType gives strong typing to different file systems that are used by volumes. +type FSType string + +var ( + HostPath FSType = "hostPath" + EmptyDir FSType = "emptyDir" + GCEPersistentDisk FSType = "gcePersistentDisk" + AWSElasticBlockStore FSType = "awsElasticBlockStore" + GitRepo FSType = "gitRepo" + Secret FSType = "secret" + NFS FSType = "nfs" + ISCSI FSType = "iscsi" + Glusterfs FSType = "glusterfs" + PersistentVolumeClaim FSType = "persistentVolumeClaim" + RBD FSType = "rbd" + Cinder FSType = "cinder" + CephFS FSType = "cephFS" + DownwardAPI FSType = "downwardAPI" + FC FSType = "fc" +) + +// SELinuxContextStrategyOptions defines the strategy type and any options used to create the strategy. +type SELinuxContextStrategyOptions struct { + // Type is the strategy that will dictate the allowable labels that may be set. + Type SELinuxContextStrategy `json:"type"` + // seLinuxOptions required to run as; required for MustRunAs + // More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context + SELinuxOptions *api.SELinuxOptions `json:"seLinuxOptions,omitempty"` +} + +// SELinuxContextStrategyType denotes strategy types for generating SELinux options for a +// SecurityContext. +type SELinuxContextStrategy string + +const ( + // container must have SELinux labels of X applied. + SELinuxStrategyMustRunAs SELinuxContextStrategy = "MustRunAs" + // container may make requests for any SELinux context labels. + SELinuxStrategyRunAsAny SELinuxContextStrategy = "RunAsAny" +) + +// RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. +type RunAsUserStrategyOptions struct { + // Type is the strategy that will dictate the allowable RunAsUser values that may be set. + Type RunAsUserStrategy `json:"type"` + // Ranges are the allowed ranges of uids that may be used. + Ranges []IDRange `json:"ranges,omitempty"` +} + +// IDRange provides a min/max of an allowed range of IDs. +type IDRange struct { + // Min is the start of the range, inclusive. + Min int64 `json:"min"` + // Max is the end of the range, inclusive. + Max int64 `json:"max"` +} + +// RunAsUserStrategyType denotes strategy types for generating RunAsUser values for a +// SecurityContext. +type RunAsUserStrategy string + +const ( + // container must run as a particular uid. + RunAsUserStrategyMustRunAs RunAsUserStrategy = "MustRunAs" + // container must run as a non-root uid + RunAsUserStrategyMustRunAsNonRoot RunAsUserStrategy = "MustRunAsNonRoot" + // container may make requests for any uid. + RunAsUserStrategyRunAsAny RunAsUserStrategy = "RunAsAny" +) + +// PodSecurityPolicyList is a list of PodSecurityPolicy objects. +type PodSecurityPolicyList struct { + unversioned.TypeMeta `json:",inline"` + unversioned.ListMeta `json:"metadata,omitempty"` + + Items []PodSecurityPolicy `json:"items"` +} diff --git a/pkg/apis/extensions/v1beta1/conversion_generated.go b/pkg/apis/extensions/v1beta1/conversion_generated.go index b6ba0a90d19..0f52858e0fc 100644 --- a/pkg/apis/extensions/v1beta1/conversion_generated.go +++ b/pkg/apis/extensions/v1beta1/conversion_generated.go @@ -2982,6 +2982,32 @@ func Convert_extensions_HorizontalPodAutoscalerStatus_To_v1beta1_HorizontalPodAu return autoConvert_extensions_HorizontalPodAutoscalerStatus_To_v1beta1_HorizontalPodAutoscalerStatus(in, out, s) } +func autoConvert_extensions_HostPortRange_To_v1beta1_HostPortRange(in *extensions.HostPortRange, out *HostPortRange, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*extensions.HostPortRange))(in) + } + out.Min = int32(in.Min) + out.Max = int32(in.Max) + return nil +} + +func Convert_extensions_HostPortRange_To_v1beta1_HostPortRange(in *extensions.HostPortRange, out *HostPortRange, s conversion.Scope) error { + return autoConvert_extensions_HostPortRange_To_v1beta1_HostPortRange(in, out, s) +} + +func autoConvert_extensions_IDRange_To_v1beta1_IDRange(in *extensions.IDRange, out *IDRange, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*extensions.IDRange))(in) + } + out.Min = in.Min + out.Max = in.Max + return nil +} + +func Convert_extensions_IDRange_To_v1beta1_IDRange(in *extensions.IDRange, out *IDRange, s conversion.Scope) error { + return autoConvert_extensions_IDRange_To_v1beta1_IDRange(in, out, s) +} + func autoConvert_extensions_Ingress_To_v1beta1_Ingress(in *extensions.Ingress, out *Ingress, s conversion.Scope) error { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { defaulting.(func(*extensions.Ingress))(in) @@ -3293,6 +3319,100 @@ func Convert_extensions_NodeUtilization_To_v1beta1_NodeUtilization(in *extension return autoConvert_extensions_NodeUtilization_To_v1beta1_NodeUtilization(in, out, s) } +func autoConvert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *extensions.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*extensions.PodSecurityPolicy))(in) + } + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +func Convert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *extensions.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error { + return autoConvert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in, out, s) +} + +func autoConvert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(in *extensions.PodSecurityPolicyList, out *PodSecurityPolicyList, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*extensions.PodSecurityPolicyList))(in) + } + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + out.Items = make([]PodSecurityPolicy, len(in.Items)) + for i := range in.Items { + if err := Convert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(&in.Items[i], &out.Items[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(in *extensions.PodSecurityPolicyList, out *PodSecurityPolicyList, s conversion.Scope) error { + return autoConvert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(in, out, s) +} + +func autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(in *extensions.PodSecurityPolicySpec, out *PodSecurityPolicySpec, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*extensions.PodSecurityPolicySpec))(in) + } + out.Privileged = in.Privileged + if in.Capabilities != nil { + out.Capabilities = make([]v1.Capability, len(in.Capabilities)) + for i := range in.Capabilities { + out.Capabilities[i] = v1.Capability(in.Capabilities[i]) + } + } else { + out.Capabilities = nil + } + if in.Volumes != nil { + out.Volumes = make([]FSType, len(in.Volumes)) + for i := range in.Volumes { + out.Volumes[i] = FSType(in.Volumes[i]) + } + } else { + out.Volumes = nil + } + out.HostNetwork = in.HostNetwork + if in.HostPorts != nil { + out.HostPorts = make([]HostPortRange, len(in.HostPorts)) + for i := range in.HostPorts { + if err := Convert_extensions_HostPortRange_To_v1beta1_HostPortRange(&in.HostPorts[i], &out.HostPorts[i], s); err != nil { + return err + } + } + } else { + out.HostPorts = nil + } + out.HostPID = in.HostPID + out.HostIPC = in.HostIPC + if err := Convert_extensions_SELinuxContextStrategyOptions_To_v1beta1_SELinuxContextStrategyOptions(&in.SELinuxContext, &out.SELinuxContext, s); err != nil { + return err + } + if err := Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, s); err != nil { + return err + } + return nil +} + +func Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(in *extensions.PodSecurityPolicySpec, out *PodSecurityPolicySpec, s conversion.Scope) error { + return autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(in, out, s) +} + func autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in *extensions.ReplicaSet, out *ReplicaSet, s conversion.Scope) error { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { defaulting.(func(*extensions.ReplicaSet))(in) @@ -3434,6 +3554,49 @@ func autoConvert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDepl return nil } +func autoConvert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(in *extensions.RunAsUserStrategyOptions, out *RunAsUserStrategyOptions, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*extensions.RunAsUserStrategyOptions))(in) + } + out.Type = RunAsUserStrategy(in.Type) + if in.Ranges != nil { + out.Ranges = make([]IDRange, len(in.Ranges)) + for i := range in.Ranges { + if err := Convert_extensions_IDRange_To_v1beta1_IDRange(&in.Ranges[i], &out.Ranges[i], s); err != nil { + return err + } + } + } else { + out.Ranges = nil + } + return nil +} + +func Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(in *extensions.RunAsUserStrategyOptions, out *RunAsUserStrategyOptions, s conversion.Scope) error { + return autoConvert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(in, out, s) +} + +func autoConvert_extensions_SELinuxContextStrategyOptions_To_v1beta1_SELinuxContextStrategyOptions(in *extensions.SELinuxContextStrategyOptions, out *SELinuxContextStrategyOptions, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*extensions.SELinuxContextStrategyOptions))(in) + } + out.Type = SELinuxContextStrategy(in.Type) + // unable to generate simple pointer conversion for api.SELinuxOptions -> v1.SELinuxOptions + if in.SELinuxOptions != nil { + out.SELinuxOptions = new(v1.SELinuxOptions) + if err := Convert_api_SELinuxOptions_To_v1_SELinuxOptions(in.SELinuxOptions, out.SELinuxOptions, s); err != nil { + return err + } + } else { + out.SELinuxOptions = nil + } + return nil +} + +func Convert_extensions_SELinuxContextStrategyOptions_To_v1beta1_SELinuxContextStrategyOptions(in *extensions.SELinuxContextStrategyOptions, out *SELinuxContextStrategyOptions, s conversion.Scope) error { + return autoConvert_extensions_SELinuxContextStrategyOptions_To_v1beta1_SELinuxContextStrategyOptions(in, out, s) +} + func autoConvert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *Scale, s conversion.Scope) error { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { defaulting.(func(*extensions.Scale))(in) @@ -4090,6 +4253,32 @@ func Convert_v1beta1_HorizontalPodAutoscalerStatus_To_extensions_HorizontalPodAu return autoConvert_v1beta1_HorizontalPodAutoscalerStatus_To_extensions_HorizontalPodAutoscalerStatus(in, out, s) } +func autoConvert_v1beta1_HostPortRange_To_extensions_HostPortRange(in *HostPortRange, out *extensions.HostPortRange, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*HostPortRange))(in) + } + out.Min = int(in.Min) + out.Max = int(in.Max) + return nil +} + +func Convert_v1beta1_HostPortRange_To_extensions_HostPortRange(in *HostPortRange, out *extensions.HostPortRange, s conversion.Scope) error { + return autoConvert_v1beta1_HostPortRange_To_extensions_HostPortRange(in, out, s) +} + +func autoConvert_v1beta1_IDRange_To_extensions_IDRange(in *IDRange, out *extensions.IDRange, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*IDRange))(in) + } + out.Min = in.Min + out.Max = in.Max + return nil +} + +func Convert_v1beta1_IDRange_To_extensions_IDRange(in *IDRange, out *extensions.IDRange, s conversion.Scope) error { + return autoConvert_v1beta1_IDRange_To_extensions_IDRange(in, out, s) +} + func autoConvert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions.Ingress, s conversion.Scope) error { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { defaulting.(func(*Ingress))(in) @@ -4479,6 +4668,100 @@ func Convert_v1beta1_NodeUtilization_To_extensions_NodeUtilization(in *NodeUtili return autoConvert_v1beta1_NodeUtilization_To_extensions_NodeUtilization(in, out, s) } +func autoConvert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSecurityPolicy, out *extensions.PodSecurityPolicy, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*PodSecurityPolicy))(in) + } + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSecurityPolicy, out *extensions.PodSecurityPolicy, s conversion.Scope) error { + return autoConvert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in, out, s) +} + +func autoConvert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList(in *PodSecurityPolicyList, out *extensions.PodSecurityPolicyList, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*PodSecurityPolicyList))(in) + } + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + out.Items = make([]extensions.PodSecurityPolicy, len(in.Items)) + for i := range in.Items { + if err := Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(&in.Items[i], &out.Items[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList(in *PodSecurityPolicyList, out *extensions.PodSecurityPolicyList, s conversion.Scope) error { + return autoConvert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList(in, out, s) +} + +func autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(in *PodSecurityPolicySpec, out *extensions.PodSecurityPolicySpec, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*PodSecurityPolicySpec))(in) + } + out.Privileged = in.Privileged + if in.Capabilities != nil { + out.Capabilities = make([]api.Capability, len(in.Capabilities)) + for i := range in.Capabilities { + out.Capabilities[i] = api.Capability(in.Capabilities[i]) + } + } else { + out.Capabilities = nil + } + if in.Volumes != nil { + out.Volumes = make([]extensions.FSType, len(in.Volumes)) + for i := range in.Volumes { + out.Volumes[i] = extensions.FSType(in.Volumes[i]) + } + } else { + out.Volumes = nil + } + out.HostNetwork = in.HostNetwork + if in.HostPorts != nil { + out.HostPorts = make([]extensions.HostPortRange, len(in.HostPorts)) + for i := range in.HostPorts { + if err := Convert_v1beta1_HostPortRange_To_extensions_HostPortRange(&in.HostPorts[i], &out.HostPorts[i], s); err != nil { + return err + } + } + } else { + out.HostPorts = nil + } + out.HostPID = in.HostPID + out.HostIPC = in.HostIPC + if err := Convert_v1beta1_SELinuxContextStrategyOptions_To_extensions_SELinuxContextStrategyOptions(&in.SELinuxContext, &out.SELinuxContext, s); err != nil { + return err + } + if err := Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(in *PodSecurityPolicySpec, out *extensions.PodSecurityPolicySpec, s conversion.Scope) error { + return autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(in, out, s) +} + func autoConvert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *extensions.ReplicaSet, s conversion.Scope) error { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { defaulting.(func(*ReplicaSet))(in) @@ -4612,6 +4895,49 @@ func autoConvert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDepl return nil } +func autoConvert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(in *RunAsUserStrategyOptions, out *extensions.RunAsUserStrategyOptions, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*RunAsUserStrategyOptions))(in) + } + out.Type = extensions.RunAsUserStrategy(in.Type) + if in.Ranges != nil { + out.Ranges = make([]extensions.IDRange, len(in.Ranges)) + for i := range in.Ranges { + if err := Convert_v1beta1_IDRange_To_extensions_IDRange(&in.Ranges[i], &out.Ranges[i], s); err != nil { + return err + } + } + } else { + out.Ranges = nil + } + return nil +} + +func Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(in *RunAsUserStrategyOptions, out *extensions.RunAsUserStrategyOptions, s conversion.Scope) error { + return autoConvert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(in, out, s) +} + +func autoConvert_v1beta1_SELinuxContextStrategyOptions_To_extensions_SELinuxContextStrategyOptions(in *SELinuxContextStrategyOptions, out *extensions.SELinuxContextStrategyOptions, s conversion.Scope) error { + if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { + defaulting.(func(*SELinuxContextStrategyOptions))(in) + } + out.Type = extensions.SELinuxContextStrategy(in.Type) + // unable to generate simple pointer conversion for v1.SELinuxOptions -> api.SELinuxOptions + if in.SELinuxOptions != nil { + out.SELinuxOptions = new(api.SELinuxOptions) + if err := Convert_v1_SELinuxOptions_To_api_SELinuxOptions(in.SELinuxOptions, out.SELinuxOptions, s); err != nil { + return err + } + } else { + out.SELinuxOptions = nil + } + return nil +} + +func Convert_v1beta1_SELinuxContextStrategyOptions_To_extensions_SELinuxContextStrategyOptions(in *SELinuxContextStrategyOptions, out *extensions.SELinuxContextStrategyOptions, s conversion.Scope) error { + return autoConvert_v1beta1_SELinuxContextStrategyOptions_To_extensions_SELinuxContextStrategyOptions(in, out, s) +} + func autoConvert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, s conversion.Scope) error { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { defaulting.(func(*Scale))(in) @@ -4853,6 +5179,8 @@ func init() { autoConvert_extensions_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec, autoConvert_extensions_HorizontalPodAutoscalerStatus_To_v1beta1_HorizontalPodAutoscalerStatus, autoConvert_extensions_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler, + autoConvert_extensions_HostPortRange_To_v1beta1_HostPortRange, + autoConvert_extensions_IDRange_To_v1beta1_IDRange, autoConvert_extensions_IngressBackend_To_v1beta1_IngressBackend, autoConvert_extensions_IngressList_To_v1beta1_IngressList, autoConvert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue, @@ -4866,6 +5194,9 @@ func init() { autoConvert_extensions_JobStatus_To_v1beta1_JobStatus, autoConvert_extensions_Job_To_v1beta1_Job, autoConvert_extensions_NodeUtilization_To_v1beta1_NodeUtilization, + autoConvert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList, + autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec, + autoConvert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy, autoConvert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList, autoConvert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec, autoConvert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus, @@ -4874,6 +5205,8 @@ func init() { autoConvert_extensions_RollbackConfig_To_v1beta1_RollbackConfig, autoConvert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet, autoConvert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment, + autoConvert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions, + autoConvert_extensions_SELinuxContextStrategyOptions_To_v1beta1_SELinuxContextStrategyOptions, autoConvert_extensions_ScaleSpec_To_v1beta1_ScaleSpec, autoConvert_extensions_ScaleStatus_To_v1beta1_ScaleStatus, autoConvert_extensions_Scale_To_v1beta1_Scale, @@ -4949,6 +5282,8 @@ func init() { autoConvert_v1beta1_HorizontalPodAutoscalerSpec_To_extensions_HorizontalPodAutoscalerSpec, autoConvert_v1beta1_HorizontalPodAutoscalerStatus_To_extensions_HorizontalPodAutoscalerStatus, autoConvert_v1beta1_HorizontalPodAutoscaler_To_extensions_HorizontalPodAutoscaler, + autoConvert_v1beta1_HostPortRange_To_extensions_HostPortRange, + autoConvert_v1beta1_IDRange_To_extensions_IDRange, autoConvert_v1beta1_IngressBackend_To_extensions_IngressBackend, autoConvert_v1beta1_IngressList_To_extensions_IngressList, autoConvert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue, @@ -4965,6 +5300,9 @@ func init() { autoConvert_v1beta1_LabelSelector_To_unversioned_LabelSelector, autoConvert_v1beta1_ListOptions_To_api_ListOptions, autoConvert_v1beta1_NodeUtilization_To_extensions_NodeUtilization, + autoConvert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList, + autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec, + autoConvert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy, autoConvert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList, autoConvert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec, autoConvert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus, @@ -4973,6 +5311,8 @@ func init() { autoConvert_v1beta1_RollbackConfig_To_extensions_RollbackConfig, autoConvert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet, autoConvert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment, + autoConvert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions, + autoConvert_v1beta1_SELinuxContextStrategyOptions_To_extensions_SELinuxContextStrategyOptions, autoConvert_v1beta1_ScaleSpec_To_extensions_ScaleSpec, autoConvert_v1beta1_ScaleStatus_To_extensions_ScaleStatus, autoConvert_v1beta1_Scale_To_extensions_Scale, diff --git a/pkg/apis/extensions/v1beta1/deep_copy_generated.go b/pkg/apis/extensions/v1beta1/deep_copy_generated.go index 78e5b68a5f9..dec44be59e9 100644 --- a/pkg/apis/extensions/v1beta1/deep_copy_generated.go +++ b/pkg/apis/extensions/v1beta1/deep_copy_generated.go @@ -1319,6 +1319,18 @@ func deepCopy_v1beta1_HorizontalPodAutoscalerStatus(in HorizontalPodAutoscalerSt return nil } +func deepCopy_v1beta1_HostPortRange(in HostPortRange, out *HostPortRange, c *conversion.Cloner) error { + out.Min = in.Min + out.Max = in.Max + return nil +} + +func deepCopy_v1beta1_IDRange(in IDRange, out *IDRange, c *conversion.Cloner) error { + out.Min = in.Min + out.Max = in.Max + return nil +} + func deepCopy_v1beta1_Ingress(in Ingress, out *Ingress, c *conversion.Cloner) error { if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err @@ -1587,6 +1599,79 @@ func deepCopy_v1beta1_NodeUtilization(in NodeUtilization, out *NodeUtilization, return nil } +func deepCopy_v1beta1_PodSecurityPolicy(in PodSecurityPolicy, out *PodSecurityPolicy, c *conversion.Cloner) error { + if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := deepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + return err + } + if err := deepCopy_v1beta1_PodSecurityPolicySpec(in.Spec, &out.Spec, c); err != nil { + return err + } + return nil +} + +func deepCopy_v1beta1_PodSecurityPolicyList(in PodSecurityPolicyList, out *PodSecurityPolicyList, c *conversion.Cloner) error { + if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + return err + } + if in.Items != nil { + out.Items = make([]PodSecurityPolicy, len(in.Items)) + for i := range in.Items { + if err := deepCopy_v1beta1_PodSecurityPolicy(in.Items[i], &out.Items[i], c); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func deepCopy_v1beta1_PodSecurityPolicySpec(in PodSecurityPolicySpec, out *PodSecurityPolicySpec, c *conversion.Cloner) error { + out.Privileged = in.Privileged + if in.Capabilities != nil { + out.Capabilities = make([]v1.Capability, len(in.Capabilities)) + for i := range in.Capabilities { + out.Capabilities[i] = in.Capabilities[i] + } + } else { + out.Capabilities = nil + } + if in.Volumes != nil { + out.Volumes = make([]FSType, len(in.Volumes)) + for i := range in.Volumes { + out.Volumes[i] = in.Volumes[i] + } + } else { + out.Volumes = nil + } + out.HostNetwork = in.HostNetwork + if in.HostPorts != nil { + out.HostPorts = make([]HostPortRange, len(in.HostPorts)) + for i := range in.HostPorts { + if err := deepCopy_v1beta1_HostPortRange(in.HostPorts[i], &out.HostPorts[i], c); err != nil { + return err + } + } + } else { + out.HostPorts = nil + } + out.HostPID = in.HostPID + out.HostIPC = in.HostIPC + if err := deepCopy_v1beta1_SELinuxContextStrategyOptions(in.SELinuxContext, &out.SELinuxContext, c); err != nil { + return err + } + if err := deepCopy_v1beta1_RunAsUserStrategyOptions(in.RunAsUser, &out.RunAsUser, c); err != nil { + return err + } + return nil +} + func deepCopy_v1beta1_ReplicaSet(in ReplicaSet, out *ReplicaSet, c *conversion.Cloner) error { if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err @@ -1700,6 +1785,34 @@ func deepCopy_v1beta1_RollingUpdateDeployment(in RollingUpdateDeployment, out *R return nil } +func deepCopy_v1beta1_RunAsUserStrategyOptions(in RunAsUserStrategyOptions, out *RunAsUserStrategyOptions, c *conversion.Cloner) error { + out.Type = in.Type + if in.Ranges != nil { + out.Ranges = make([]IDRange, len(in.Ranges)) + for i := range in.Ranges { + if err := deepCopy_v1beta1_IDRange(in.Ranges[i], &out.Ranges[i], c); err != nil { + return err + } + } + } else { + out.Ranges = nil + } + return nil +} + +func deepCopy_v1beta1_SELinuxContextStrategyOptions(in SELinuxContextStrategyOptions, out *SELinuxContextStrategyOptions, c *conversion.Cloner) error { + out.Type = in.Type + if in.SELinuxOptions != nil { + out.SELinuxOptions = new(v1.SELinuxOptions) + if err := deepCopy_v1_SELinuxOptions(*in.SELinuxOptions, out.SELinuxOptions, c); err != nil { + return err + } + } else { + out.SELinuxOptions = nil + } + return nil +} + func deepCopy_v1beta1_Scale(in Scale, out *Scale, c *conversion.Cloner) error { if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err @@ -1901,6 +2014,8 @@ func init() { deepCopy_v1beta1_HorizontalPodAutoscalerList, deepCopy_v1beta1_HorizontalPodAutoscalerSpec, deepCopy_v1beta1_HorizontalPodAutoscalerStatus, + deepCopy_v1beta1_HostPortRange, + deepCopy_v1beta1_IDRange, deepCopy_v1beta1_Ingress, deepCopy_v1beta1_IngressBackend, deepCopy_v1beta1_IngressList, @@ -1917,6 +2032,9 @@ func init() { deepCopy_v1beta1_LabelSelectorRequirement, deepCopy_v1beta1_ListOptions, deepCopy_v1beta1_NodeUtilization, + deepCopy_v1beta1_PodSecurityPolicy, + deepCopy_v1beta1_PodSecurityPolicyList, + deepCopy_v1beta1_PodSecurityPolicySpec, deepCopy_v1beta1_ReplicaSet, deepCopy_v1beta1_ReplicaSetList, deepCopy_v1beta1_ReplicaSetSpec, @@ -1925,6 +2043,8 @@ func init() { deepCopy_v1beta1_RollbackConfig, deepCopy_v1beta1_RollingUpdateDaemonSet, deepCopy_v1beta1_RollingUpdateDeployment, + deepCopy_v1beta1_RunAsUserStrategyOptions, + deepCopy_v1beta1_SELinuxContextStrategyOptions, deepCopy_v1beta1_Scale, deepCopy_v1beta1_ScaleSpec, deepCopy_v1beta1_ScaleStatus, diff --git a/pkg/apis/extensions/v1beta1/register.go b/pkg/apis/extensions/v1beta1/register.go index f40c83c003e..d2750a63943 100644 --- a/pkg/apis/extensions/v1beta1/register.go +++ b/pkg/apis/extensions/v1beta1/register.go @@ -60,6 +60,8 @@ func addKnownTypes(scheme *runtime.Scheme) { &v1.DeleteOptions{}, &ReplicaSet{}, &ReplicaSetList{}, + &PodSecurityPolicy{}, + &PodSecurityPolicyList{}, ) } @@ -85,3 +87,5 @@ func (obj *IngressList) GetObjectKind() unversioned.ObjectKind { func (obj *ListOptions) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ReplicaSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *ReplicaSetList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *PodSecurityPolicy) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *PodSecurityPolicyList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/apis/extensions/v1beta1/types.generated.go b/pkg/apis/extensions/v1beta1/types.generated.go index 6c3a0f6765b..530c08729c3 100644 --- a/pkg/apis/extensions/v1beta1/types.generated.go +++ b/pkg/apis/extensions/v1beta1/types.generated.go @@ -17831,15 +17831,2173 @@ func (x *ReplicaSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } +func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1490 := z.EncBinary() + _ = yym1490 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1491 := !z.EncBinary() + yy2arr1491 := z.EncBasicHandle().StructToArray + var yyq1491 [4]bool + _, _, _ = yysep1491, yyq1491, yy2arr1491 + const yyr1491 bool = false + yyq1491[0] = x.Kind != "" + yyq1491[1] = x.APIVersion != "" + yyq1491[2] = true + yyq1491[3] = true + var yynn1491 int + if yyr1491 || yy2arr1491 { + r.EncodeArrayStart(4) + } else { + yynn1491 = 0 + for _, b := range yyq1491 { + if b { + yynn1491++ + } + } + r.EncodeMapStart(yynn1491) + yynn1491 = 0 + } + if yyr1491 || yy2arr1491 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1491[0] { + yym1493 := z.EncBinary() + _ = yym1493 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1491[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1494 := z.EncBinary() + _ = yym1494 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr1491 || yy2arr1491 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1491[1] { + yym1496 := z.EncBinary() + _ = yym1496 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1491[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1497 := z.EncBinary() + _ = yym1497 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr1491 || yy2arr1491 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1491[2] { + yy1499 := &x.ObjectMeta + yy1499.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1491[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1500 := &x.ObjectMeta + yy1500.CodecEncodeSelf(e) + } + } + if yyr1491 || yy2arr1491 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1491[3] { + yy1502 := &x.Spec + yy1502.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1491[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1503 := &x.Spec + yy1503.CodecEncodeSelf(e) + } + } + if yyr1491 || yy2arr1491 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodSecurityPolicy) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1504 := z.DecBinary() + _ = yym1504 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1505 := r.ContainerType() + if yyct1505 == codecSelferValueTypeMap1234 { + yyl1505 := r.ReadMapStart() + if yyl1505 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1505, d) + } + } else if yyct1505 == codecSelferValueTypeArray1234 { + yyl1505 := r.ReadArrayStart() + if yyl1505 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1505, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodSecurityPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1506Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1506Slc + var yyhl1506 bool = l >= 0 + for yyj1506 := 0; ; yyj1506++ { + if yyhl1506 { + if yyj1506 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1506Slc = r.DecodeBytes(yys1506Slc, true, true) + yys1506 := string(yys1506Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1506 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_v1.ObjectMeta{} + } else { + yyv1509 := &x.ObjectMeta + yyv1509.CodecDecodeSelf(d) + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = PodSecurityPolicySpec{} + } else { + yyv1510 := &x.Spec + yyv1510.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1506) + } // end switch yys1506 + } // end for yyj1506 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1511 int + var yyb1511 bool + var yyhl1511 bool = l >= 0 + yyj1511++ + if yyhl1511 { + yyb1511 = yyj1511 > l + } else { + yyb1511 = r.CheckBreak() + } + if yyb1511 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj1511++ + if yyhl1511 { + yyb1511 = yyj1511 > l + } else { + yyb1511 = r.CheckBreak() + } + if yyb1511 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj1511++ + if yyhl1511 { + yyb1511 = yyj1511 > l + } else { + yyb1511 = r.CheckBreak() + } + if yyb1511 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_v1.ObjectMeta{} + } else { + yyv1514 := &x.ObjectMeta + yyv1514.CodecDecodeSelf(d) + } + yyj1511++ + if yyhl1511 { + yyb1511 = yyj1511 > l + } else { + yyb1511 = r.CheckBreak() + } + if yyb1511 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = PodSecurityPolicySpec{} + } else { + yyv1515 := &x.Spec + yyv1515.CodecDecodeSelf(d) + } + for { + yyj1511++ + if yyhl1511 { + yyb1511 = yyj1511 > l + } else { + yyb1511 = r.CheckBreak() + } + if yyb1511 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1511-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1516 := z.EncBinary() + _ = yym1516 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1517 := !z.EncBinary() + yy2arr1517 := z.EncBasicHandle().StructToArray + var yyq1517 [9]bool + _, _, _ = yysep1517, yyq1517, yy2arr1517 + const yyr1517 bool = false + yyq1517[0] = x.Privileged != false + yyq1517[1] = len(x.Capabilities) != 0 + yyq1517[2] = len(x.Volumes) != 0 + yyq1517[3] = x.HostNetwork != false + yyq1517[4] = len(x.HostPorts) != 0 + yyq1517[5] = x.HostPID != false + yyq1517[6] = x.HostIPC != false + yyq1517[7] = true + yyq1517[8] = true + var yynn1517 int + if yyr1517 || yy2arr1517 { + r.EncodeArrayStart(9) + } else { + yynn1517 = 0 + for _, b := range yyq1517 { + if b { + yynn1517++ + } + } + r.EncodeMapStart(yynn1517) + yynn1517 = 0 + } + if yyr1517 || yy2arr1517 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1517[0] { + yym1519 := z.EncBinary() + _ = yym1519 + if false { + } else { + r.EncodeBool(bool(x.Privileged)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq1517[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("privileged")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1520 := z.EncBinary() + _ = yym1520 + if false { + } else { + r.EncodeBool(bool(x.Privileged)) + } + } + } + if yyr1517 || yy2arr1517 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1517[1] { + if x.Capabilities == nil { + r.EncodeNil() + } else { + yym1522 := z.EncBinary() + _ = yym1522 + if false { + } else { + h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.Capabilities), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1517[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("capabilities")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Capabilities == nil { + r.EncodeNil() + } else { + yym1523 := z.EncBinary() + _ = yym1523 + if false { + } else { + h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.Capabilities), e) + } + } + } + } + if yyr1517 || yy2arr1517 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1517[2] { + if x.Volumes == nil { + r.EncodeNil() + } else { + yym1525 := z.EncBinary() + _ = yym1525 + if false { + } else { + h.encSliceFSType(([]FSType)(x.Volumes), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1517[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("volumes")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Volumes == nil { + r.EncodeNil() + } else { + yym1526 := z.EncBinary() + _ = yym1526 + if false { + } else { + h.encSliceFSType(([]FSType)(x.Volumes), e) + } + } + } + } + if yyr1517 || yy2arr1517 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1517[3] { + yym1528 := z.EncBinary() + _ = yym1528 + if false { + } else { + r.EncodeBool(bool(x.HostNetwork)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq1517[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostNetwork")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1529 := z.EncBinary() + _ = yym1529 + if false { + } else { + r.EncodeBool(bool(x.HostNetwork)) + } + } + } + if yyr1517 || yy2arr1517 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1517[4] { + if x.HostPorts == nil { + r.EncodeNil() + } else { + yym1531 := z.EncBinary() + _ = yym1531 + if false { + } else { + h.encSliceHostPortRange(([]HostPortRange)(x.HostPorts), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1517[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostPorts")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.HostPorts == nil { + r.EncodeNil() + } else { + yym1532 := z.EncBinary() + _ = yym1532 + if false { + } else { + h.encSliceHostPortRange(([]HostPortRange)(x.HostPorts), e) + } + } + } + } + if yyr1517 || yy2arr1517 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1517[5] { + yym1534 := z.EncBinary() + _ = yym1534 + if false { + } else { + r.EncodeBool(bool(x.HostPID)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq1517[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostPID")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1535 := z.EncBinary() + _ = yym1535 + if false { + } else { + r.EncodeBool(bool(x.HostPID)) + } + } + } + if yyr1517 || yy2arr1517 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1517[6] { + yym1537 := z.EncBinary() + _ = yym1537 + if false { + } else { + r.EncodeBool(bool(x.HostIPC)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq1517[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostIPC")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1538 := z.EncBinary() + _ = yym1538 + if false { + } else { + r.EncodeBool(bool(x.HostIPC)) + } + } + } + if yyr1517 || yy2arr1517 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1517[7] { + yy1540 := &x.SELinuxContext + yy1540.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1517[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("seLinuxContext")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1541 := &x.SELinuxContext + yy1541.CodecEncodeSelf(e) + } + } + if yyr1517 || yy2arr1517 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1517[8] { + yy1543 := &x.RunAsUser + yy1543.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq1517[8] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("runAsUser")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1544 := &x.RunAsUser + yy1544.CodecEncodeSelf(e) + } + } + if yyr1517 || yy2arr1517 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodSecurityPolicySpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1545 := z.DecBinary() + _ = yym1545 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1546 := r.ContainerType() + if yyct1546 == codecSelferValueTypeMap1234 { + yyl1546 := r.ReadMapStart() + if yyl1546 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1546, d) + } + } else if yyct1546 == codecSelferValueTypeArray1234 { + yyl1546 := r.ReadArrayStart() + if yyl1546 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1546, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1547Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1547Slc + var yyhl1547 bool = l >= 0 + for yyj1547 := 0; ; yyj1547++ { + if yyhl1547 { + if yyj1547 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1547Slc = r.DecodeBytes(yys1547Slc, true, true) + yys1547 := string(yys1547Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1547 { + case "privileged": + if r.TryDecodeAsNil() { + x.Privileged = false + } else { + x.Privileged = bool(r.DecodeBool()) + } + case "capabilities": + if r.TryDecodeAsNil() { + x.Capabilities = nil + } else { + yyv1549 := &x.Capabilities + yym1550 := z.DecBinary() + _ = yym1550 + if false { + } else { + h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv1549), d) + } + } + case "volumes": + if r.TryDecodeAsNil() { + x.Volumes = nil + } else { + yyv1551 := &x.Volumes + yym1552 := z.DecBinary() + _ = yym1552 + if false { + } else { + h.decSliceFSType((*[]FSType)(yyv1551), d) + } + } + case "hostNetwork": + if r.TryDecodeAsNil() { + x.HostNetwork = false + } else { + x.HostNetwork = bool(r.DecodeBool()) + } + case "hostPorts": + if r.TryDecodeAsNil() { + x.HostPorts = nil + } else { + yyv1554 := &x.HostPorts + yym1555 := z.DecBinary() + _ = yym1555 + if false { + } else { + h.decSliceHostPortRange((*[]HostPortRange)(yyv1554), d) + } + } + case "hostPID": + if r.TryDecodeAsNil() { + x.HostPID = false + } else { + x.HostPID = bool(r.DecodeBool()) + } + case "hostIPC": + if r.TryDecodeAsNil() { + x.HostIPC = false + } else { + x.HostIPC = bool(r.DecodeBool()) + } + case "seLinuxContext": + if r.TryDecodeAsNil() { + x.SELinuxContext = SELinuxContextStrategyOptions{} + } else { + yyv1558 := &x.SELinuxContext + yyv1558.CodecDecodeSelf(d) + } + case "runAsUser": + if r.TryDecodeAsNil() { + x.RunAsUser = RunAsUserStrategyOptions{} + } else { + yyv1559 := &x.RunAsUser + yyv1559.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1547) + } // end switch yys1547 + } // end for yyj1547 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1560 int + var yyb1560 bool + var yyhl1560 bool = l >= 0 + yyj1560++ + if yyhl1560 { + yyb1560 = yyj1560 > l + } else { + yyb1560 = r.CheckBreak() + } + if yyb1560 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Privileged = false + } else { + x.Privileged = bool(r.DecodeBool()) + } + yyj1560++ + if yyhl1560 { + yyb1560 = yyj1560 > l + } else { + yyb1560 = r.CheckBreak() + } + if yyb1560 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Capabilities = nil + } else { + yyv1562 := &x.Capabilities + yym1563 := z.DecBinary() + _ = yym1563 + if false { + } else { + h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv1562), d) + } + } + yyj1560++ + if yyhl1560 { + yyb1560 = yyj1560 > l + } else { + yyb1560 = r.CheckBreak() + } + if yyb1560 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Volumes = nil + } else { + yyv1564 := &x.Volumes + yym1565 := z.DecBinary() + _ = yym1565 + if false { + } else { + h.decSliceFSType((*[]FSType)(yyv1564), d) + } + } + yyj1560++ + if yyhl1560 { + yyb1560 = yyj1560 > l + } else { + yyb1560 = r.CheckBreak() + } + if yyb1560 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostNetwork = false + } else { + x.HostNetwork = bool(r.DecodeBool()) + } + yyj1560++ + if yyhl1560 { + yyb1560 = yyj1560 > l + } else { + yyb1560 = r.CheckBreak() + } + if yyb1560 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostPorts = nil + } else { + yyv1567 := &x.HostPorts + yym1568 := z.DecBinary() + _ = yym1568 + if false { + } else { + h.decSliceHostPortRange((*[]HostPortRange)(yyv1567), d) + } + } + yyj1560++ + if yyhl1560 { + yyb1560 = yyj1560 > l + } else { + yyb1560 = r.CheckBreak() + } + if yyb1560 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostPID = false + } else { + x.HostPID = bool(r.DecodeBool()) + } + yyj1560++ + if yyhl1560 { + yyb1560 = yyj1560 > l + } else { + yyb1560 = r.CheckBreak() + } + if yyb1560 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostIPC = false + } else { + x.HostIPC = bool(r.DecodeBool()) + } + yyj1560++ + if yyhl1560 { + yyb1560 = yyj1560 > l + } else { + yyb1560 = r.CheckBreak() + } + if yyb1560 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SELinuxContext = SELinuxContextStrategyOptions{} + } else { + yyv1571 := &x.SELinuxContext + yyv1571.CodecDecodeSelf(d) + } + yyj1560++ + if yyhl1560 { + yyb1560 = yyj1560 > l + } else { + yyb1560 = r.CheckBreak() + } + if yyb1560 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RunAsUser = RunAsUserStrategyOptions{} + } else { + yyv1572 := &x.RunAsUser + yyv1572.CodecDecodeSelf(d) + } + for { + yyj1560++ + if yyhl1560 { + yyb1560 = yyj1560 > l + } else { + yyb1560 = r.CheckBreak() + } + if yyb1560 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1560-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x FSType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1573 := z.EncBinary() + _ = yym1573 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *FSType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1574 := z.DecBinary() + _ = yym1574 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *HostPortRange) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1575 := z.EncBinary() + _ = yym1575 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1576 := !z.EncBinary() + yy2arr1576 := z.EncBasicHandle().StructToArray + var yyq1576 [2]bool + _, _, _ = yysep1576, yyq1576, yy2arr1576 + const yyr1576 bool = false + var yynn1576 int + if yyr1576 || yy2arr1576 { + r.EncodeArrayStart(2) + } else { + yynn1576 = 2 + for _, b := range yyq1576 { + if b { + yynn1576++ + } + } + r.EncodeMapStart(yynn1576) + yynn1576 = 0 + } + if yyr1576 || yy2arr1576 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1578 := z.EncBinary() + _ = yym1578 + if false { + } else { + r.EncodeInt(int64(x.Min)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("min")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1579 := z.EncBinary() + _ = yym1579 + if false { + } else { + r.EncodeInt(int64(x.Min)) + } + } + if yyr1576 || yy2arr1576 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1581 := z.EncBinary() + _ = yym1581 + if false { + } else { + r.EncodeInt(int64(x.Max)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("max")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1582 := z.EncBinary() + _ = yym1582 + if false { + } else { + r.EncodeInt(int64(x.Max)) + } + } + if yyr1576 || yy2arr1576 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *HostPortRange) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1583 := z.DecBinary() + _ = yym1583 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1584 := r.ContainerType() + if yyct1584 == codecSelferValueTypeMap1234 { + yyl1584 := r.ReadMapStart() + if yyl1584 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1584, d) + } + } else if yyct1584 == codecSelferValueTypeArray1234 { + yyl1584 := r.ReadArrayStart() + if yyl1584 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1584, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *HostPortRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1585Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1585Slc + var yyhl1585 bool = l >= 0 + for yyj1585 := 0; ; yyj1585++ { + if yyhl1585 { + if yyj1585 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1585Slc = r.DecodeBytes(yys1585Slc, true, true) + yys1585 := string(yys1585Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1585 { + case "min": + if r.TryDecodeAsNil() { + x.Min = 0 + } else { + x.Min = int32(r.DecodeInt(32)) + } + case "max": + if r.TryDecodeAsNil() { + x.Max = 0 + } else { + x.Max = int32(r.DecodeInt(32)) + } + default: + z.DecStructFieldNotFound(-1, yys1585) + } // end switch yys1585 + } // end for yyj1585 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *HostPortRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1588 int + var yyb1588 bool + var yyhl1588 bool = l >= 0 + yyj1588++ + if yyhl1588 { + yyb1588 = yyj1588 > l + } else { + yyb1588 = r.CheckBreak() + } + if yyb1588 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Min = 0 + } else { + x.Min = int32(r.DecodeInt(32)) + } + yyj1588++ + if yyhl1588 { + yyb1588 = yyj1588 > l + } else { + yyb1588 = r.CheckBreak() + } + if yyb1588 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Max = 0 + } else { + x.Max = int32(r.DecodeInt(32)) + } + for { + yyj1588++ + if yyhl1588 { + yyb1588 = yyj1588 > l + } else { + yyb1588 = r.CheckBreak() + } + if yyb1588 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1588-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *SELinuxContextStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1591 := z.EncBinary() + _ = yym1591 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1592 := !z.EncBinary() + yy2arr1592 := z.EncBasicHandle().StructToArray + var yyq1592 [2]bool + _, _, _ = yysep1592, yyq1592, yy2arr1592 + const yyr1592 bool = false + yyq1592[1] = x.SELinuxOptions != nil + var yynn1592 int + if yyr1592 || yy2arr1592 { + r.EncodeArrayStart(2) + } else { + yynn1592 = 1 + for _, b := range yyq1592 { + if b { + yynn1592++ + } + } + r.EncodeMapStart(yynn1592) + yynn1592 = 0 + } + if yyr1592 || yy2arr1592 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr1592 || yy2arr1592 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1592[1] { + if x.SELinuxOptions == nil { + r.EncodeNil() + } else { + x.SELinuxOptions.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq1592[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SELinuxOptions == nil { + r.EncodeNil() + } else { + x.SELinuxOptions.CodecEncodeSelf(e) + } + } + } + if yyr1592 || yy2arr1592 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *SELinuxContextStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1595 := z.DecBinary() + _ = yym1595 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1596 := r.ContainerType() + if yyct1596 == codecSelferValueTypeMap1234 { + yyl1596 := r.ReadMapStart() + if yyl1596 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1596, d) + } + } else if yyct1596 == codecSelferValueTypeArray1234 { + yyl1596 := r.ReadArrayStart() + if yyl1596 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1596, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *SELinuxContextStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1597Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1597Slc + var yyhl1597 bool = l >= 0 + for yyj1597 := 0; ; yyj1597++ { + if yyhl1597 { + if yyj1597 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1597Slc = r.DecodeBytes(yys1597Slc, true, true) + yys1597 := string(yys1597Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1597 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = SELinuxContextStrategy(r.DecodeString()) + } + case "seLinuxOptions": + if r.TryDecodeAsNil() { + if x.SELinuxOptions != nil { + x.SELinuxOptions = nil + } + } else { + if x.SELinuxOptions == nil { + x.SELinuxOptions = new(pkg2_v1.SELinuxOptions) + } + x.SELinuxOptions.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys1597) + } // end switch yys1597 + } // end for yyj1597 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *SELinuxContextStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1600 int + var yyb1600 bool + var yyhl1600 bool = l >= 0 + yyj1600++ + if yyhl1600 { + yyb1600 = yyj1600 > l + } else { + yyb1600 = r.CheckBreak() + } + if yyb1600 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = SELinuxContextStrategy(r.DecodeString()) + } + yyj1600++ + if yyhl1600 { + yyb1600 = yyj1600 > l + } else { + yyb1600 = r.CheckBreak() + } + if yyb1600 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.SELinuxOptions != nil { + x.SELinuxOptions = nil + } + } else { + if x.SELinuxOptions == nil { + x.SELinuxOptions = new(pkg2_v1.SELinuxOptions) + } + x.SELinuxOptions.CodecDecodeSelf(d) + } + for { + yyj1600++ + if yyhl1600 { + yyb1600 = yyj1600 > l + } else { + yyb1600 = r.CheckBreak() + } + if yyb1600 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1600-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x SELinuxContextStrategy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1603 := z.EncBinary() + _ = yym1603 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *SELinuxContextStrategy) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1604 := z.DecBinary() + _ = yym1604 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *RunAsUserStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1605 := z.EncBinary() + _ = yym1605 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1606 := !z.EncBinary() + yy2arr1606 := z.EncBasicHandle().StructToArray + var yyq1606 [2]bool + _, _, _ = yysep1606, yyq1606, yy2arr1606 + const yyr1606 bool = false + yyq1606[1] = len(x.Ranges) != 0 + var yynn1606 int + if yyr1606 || yy2arr1606 { + r.EncodeArrayStart(2) + } else { + yynn1606 = 1 + for _, b := range yyq1606 { + if b { + yynn1606++ + } + } + r.EncodeMapStart(yynn1606) + yynn1606 = 0 + } + if yyr1606 || yy2arr1606 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr1606 || yy2arr1606 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1606[1] { + if x.Ranges == nil { + r.EncodeNil() + } else { + yym1609 := z.EncBinary() + _ = yym1609 + if false { + } else { + h.encSliceIDRange(([]IDRange)(x.Ranges), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq1606[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("ranges")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Ranges == nil { + r.EncodeNil() + } else { + yym1610 := z.EncBinary() + _ = yym1610 + if false { + } else { + h.encSliceIDRange(([]IDRange)(x.Ranges), e) + } + } + } + } + if yyr1606 || yy2arr1606 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RunAsUserStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1611 := z.DecBinary() + _ = yym1611 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1612 := r.ContainerType() + if yyct1612 == codecSelferValueTypeMap1234 { + yyl1612 := r.ReadMapStart() + if yyl1612 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1612, d) + } + } else if yyct1612 == codecSelferValueTypeArray1234 { + yyl1612 := r.ReadArrayStart() + if yyl1612 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1612, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RunAsUserStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1613Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1613Slc + var yyhl1613 bool = l >= 0 + for yyj1613 := 0; ; yyj1613++ { + if yyhl1613 { + if yyj1613 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1613Slc = r.DecodeBytes(yys1613Slc, true, true) + yys1613 := string(yys1613Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1613 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = RunAsUserStrategy(r.DecodeString()) + } + case "ranges": + if r.TryDecodeAsNil() { + x.Ranges = nil + } else { + yyv1615 := &x.Ranges + yym1616 := z.DecBinary() + _ = yym1616 + if false { + } else { + h.decSliceIDRange((*[]IDRange)(yyv1615), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1613) + } // end switch yys1613 + } // end for yyj1613 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RunAsUserStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1617 int + var yyb1617 bool + var yyhl1617 bool = l >= 0 + yyj1617++ + if yyhl1617 { + yyb1617 = yyj1617 > l + } else { + yyb1617 = r.CheckBreak() + } + if yyb1617 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = RunAsUserStrategy(r.DecodeString()) + } + yyj1617++ + if yyhl1617 { + yyb1617 = yyj1617 > l + } else { + yyb1617 = r.CheckBreak() + } + if yyb1617 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Ranges = nil + } else { + yyv1619 := &x.Ranges + yym1620 := z.DecBinary() + _ = yym1620 + if false { + } else { + h.decSliceIDRange((*[]IDRange)(yyv1619), d) + } + } + for { + yyj1617++ + if yyhl1617 { + yyb1617 = yyj1617 > l + } else { + yyb1617 = r.CheckBreak() + } + if yyb1617 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1617-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *IDRange) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1621 := z.EncBinary() + _ = yym1621 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1622 := !z.EncBinary() + yy2arr1622 := z.EncBasicHandle().StructToArray + var yyq1622 [2]bool + _, _, _ = yysep1622, yyq1622, yy2arr1622 + const yyr1622 bool = false + var yynn1622 int + if yyr1622 || yy2arr1622 { + r.EncodeArrayStart(2) + } else { + yynn1622 = 2 + for _, b := range yyq1622 { + if b { + yynn1622++ + } + } + r.EncodeMapStart(yynn1622) + yynn1622 = 0 + } + if yyr1622 || yy2arr1622 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1624 := z.EncBinary() + _ = yym1624 + if false { + } else { + r.EncodeInt(int64(x.Min)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("min")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1625 := z.EncBinary() + _ = yym1625 + if false { + } else { + r.EncodeInt(int64(x.Min)) + } + } + if yyr1622 || yy2arr1622 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1627 := z.EncBinary() + _ = yym1627 + if false { + } else { + r.EncodeInt(int64(x.Max)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("max")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1628 := z.EncBinary() + _ = yym1628 + if false { + } else { + r.EncodeInt(int64(x.Max)) + } + } + if yyr1622 || yy2arr1622 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *IDRange) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1629 := z.DecBinary() + _ = yym1629 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1630 := r.ContainerType() + if yyct1630 == codecSelferValueTypeMap1234 { + yyl1630 := r.ReadMapStart() + if yyl1630 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1630, d) + } + } else if yyct1630 == codecSelferValueTypeArray1234 { + yyl1630 := r.ReadArrayStart() + if yyl1630 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1630, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *IDRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1631Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1631Slc + var yyhl1631 bool = l >= 0 + for yyj1631 := 0; ; yyj1631++ { + if yyhl1631 { + if yyj1631 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1631Slc = r.DecodeBytes(yys1631Slc, true, true) + yys1631 := string(yys1631Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1631 { + case "min": + if r.TryDecodeAsNil() { + x.Min = 0 + } else { + x.Min = int64(r.DecodeInt(64)) + } + case "max": + if r.TryDecodeAsNil() { + x.Max = 0 + } else { + x.Max = int64(r.DecodeInt(64)) + } + default: + z.DecStructFieldNotFound(-1, yys1631) + } // end switch yys1631 + } // end for yyj1631 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *IDRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1634 int + var yyb1634 bool + var yyhl1634 bool = l >= 0 + yyj1634++ + if yyhl1634 { + yyb1634 = yyj1634 > l + } else { + yyb1634 = r.CheckBreak() + } + if yyb1634 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Min = 0 + } else { + x.Min = int64(r.DecodeInt(64)) + } + yyj1634++ + if yyhl1634 { + yyb1634 = yyj1634 > l + } else { + yyb1634 = r.CheckBreak() + } + if yyb1634 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Max = 0 + } else { + x.Max = int64(r.DecodeInt(64)) + } + for { + yyj1634++ + if yyhl1634 { + yyb1634 = yyj1634 > l + } else { + yyb1634 = r.CheckBreak() + } + if yyb1634 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1634-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x RunAsUserStrategy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1637 := z.EncBinary() + _ = yym1637 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *RunAsUserStrategy) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1638 := z.DecBinary() + _ = yym1638 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *PodSecurityPolicyList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1639 := z.EncBinary() + _ = yym1639 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep1640 := !z.EncBinary() + yy2arr1640 := z.EncBasicHandle().StructToArray + var yyq1640 [4]bool + _, _, _ = yysep1640, yyq1640, yy2arr1640 + const yyr1640 bool = false + yyq1640[0] = x.Kind != "" + yyq1640[1] = x.APIVersion != "" + yyq1640[2] = true + var yynn1640 int + if yyr1640 || yy2arr1640 { + r.EncodeArrayStart(4) + } else { + yynn1640 = 1 + for _, b := range yyq1640 { + if b { + yynn1640++ + } + } + r.EncodeMapStart(yynn1640) + yynn1640 = 0 + } + if yyr1640 || yy2arr1640 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1640[0] { + yym1642 := z.EncBinary() + _ = yym1642 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1640[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1643 := z.EncBinary() + _ = yym1643 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr1640 || yy2arr1640 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1640[1] { + yym1645 := z.EncBinary() + _ = yym1645 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq1640[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym1646 := z.EncBinary() + _ = yym1646 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr1640 || yy2arr1640 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq1640[2] { + yy1648 := &x.ListMeta + yym1649 := z.EncBinary() + _ = yym1649 + if false { + } else if z.HasExtensions() && z.EncExt(yy1648) { + } else { + z.EncFallback(yy1648) + } + } else { + r.EncodeNil() + } + } else { + if yyq1640[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy1650 := &x.ListMeta + yym1651 := z.EncBinary() + _ = yym1651 + if false { + } else if z.HasExtensions() && z.EncExt(yy1650) { + } else { + z.EncFallback(yy1650) + } + } + } + if yyr1640 || yy2arr1640 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym1653 := z.EncBinary() + _ = yym1653 + if false { + } else { + h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym1654 := z.EncBinary() + _ = yym1654 + if false { + } else { + h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e) + } + } + } + if yyr1640 || yy2arr1640 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodSecurityPolicyList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1655 := z.DecBinary() + _ = yym1655 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct1656 := r.ContainerType() + if yyct1656 == codecSelferValueTypeMap1234 { + yyl1656 := r.ReadMapStart() + if yyl1656 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl1656, d) + } + } else if yyct1656 == codecSelferValueTypeArray1234 { + yyl1656 := r.ReadArrayStart() + if yyl1656 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl1656, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodSecurityPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys1657Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1657Slc + var yyhl1657 bool = l >= 0 + for yyj1657 := 0; ; yyj1657++ { + if yyhl1657 { + if yyj1657 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys1657Slc = r.DecodeBytes(yys1657Slc, true, true) + yys1657 := string(yys1657Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys1657 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv1660 := &x.ListMeta + yym1661 := z.DecBinary() + _ = yym1661 + if false { + } else if z.HasExtensions() && z.DecExt(yyv1660) { + } else { + z.DecFallback(yyv1660, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv1662 := &x.Items + yym1663 := z.DecBinary() + _ = yym1663 + if false { + } else { + h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv1662), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys1657) + } // end switch yys1657 + } // end for yyj1657 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodSecurityPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj1664 int + var yyb1664 bool + var yyhl1664 bool = l >= 0 + yyj1664++ + if yyhl1664 { + yyb1664 = yyj1664 > l + } else { + yyb1664 = r.CheckBreak() + } + if yyb1664 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj1664++ + if yyhl1664 { + yyb1664 = yyj1664 > l + } else { + yyb1664 = r.CheckBreak() + } + if yyb1664 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj1664++ + if yyhl1664 { + yyb1664 = yyj1664 > l + } else { + yyb1664 = r.CheckBreak() + } + if yyb1664 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv1667 := &x.ListMeta + yym1668 := z.DecBinary() + _ = yym1668 + if false { + } else if z.HasExtensions() && z.DecExt(yyv1667) { + } else { + z.DecFallback(yyv1667, false) + } + } + yyj1664++ + if yyhl1664 { + yyb1664 = yyj1664 > l + } else { + yyb1664 = r.CheckBreak() + } + if yyb1664 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv1669 := &x.Items + yym1670 := z.DecBinary() + _ = yym1670 + if false { + } else { + h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv1669), d) + } + } + for { + yyj1664++ + if yyhl1664 { + yyb1664 = yyj1664 > l + } else { + yyb1664 = r.CheckBreak() + } + if yyb1664 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj1664-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + func (x codecSelfer1234) encSliceCustomMetricTarget(v []CustomMetricTarget, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1490 := range v { + for _, yyv1671 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1491 := &yyv1490 - yy1491.CodecEncodeSelf(e) + yy1672 := &yyv1671 + yy1672.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17849,83 +20007,83 @@ func (x codecSelfer1234) decSliceCustomMetricTarget(v *[]CustomMetricTarget, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1492 := *v - yyh1492, yyl1492 := z.DecSliceHelperStart() - var yyc1492 bool - if yyl1492 == 0 { - if yyv1492 == nil { - yyv1492 = []CustomMetricTarget{} - yyc1492 = true - } else if len(yyv1492) != 0 { - yyv1492 = yyv1492[:0] - yyc1492 = true + yyv1673 := *v + yyh1673, yyl1673 := z.DecSliceHelperStart() + var yyc1673 bool + if yyl1673 == 0 { + if yyv1673 == nil { + yyv1673 = []CustomMetricTarget{} + yyc1673 = true + } else if len(yyv1673) != 0 { + yyv1673 = yyv1673[:0] + yyc1673 = true } - } else if yyl1492 > 0 { - var yyrr1492, yyrl1492 int - var yyrt1492 bool - if yyl1492 > cap(yyv1492) { + } else if yyl1673 > 0 { + var yyrr1673, yyrl1673 int + var yyrt1673 bool + if yyl1673 > cap(yyv1673) { - yyrg1492 := len(yyv1492) > 0 - yyv21492 := yyv1492 - yyrl1492, yyrt1492 = z.DecInferLen(yyl1492, z.DecBasicHandle().MaxInitLen, 40) - if yyrt1492 { - if yyrl1492 <= cap(yyv1492) { - yyv1492 = yyv1492[:yyrl1492] + yyrg1673 := len(yyv1673) > 0 + yyv21673 := yyv1673 + yyrl1673, yyrt1673 = z.DecInferLen(yyl1673, z.DecBasicHandle().MaxInitLen, 40) + if yyrt1673 { + if yyrl1673 <= cap(yyv1673) { + yyv1673 = yyv1673[:yyrl1673] } else { - yyv1492 = make([]CustomMetricTarget, yyrl1492) + yyv1673 = make([]CustomMetricTarget, yyrl1673) } } else { - yyv1492 = make([]CustomMetricTarget, yyrl1492) + yyv1673 = make([]CustomMetricTarget, yyrl1673) } - yyc1492 = true - yyrr1492 = len(yyv1492) - if yyrg1492 { - copy(yyv1492, yyv21492) + yyc1673 = true + yyrr1673 = len(yyv1673) + if yyrg1673 { + copy(yyv1673, yyv21673) } - } else if yyl1492 != len(yyv1492) { - yyv1492 = yyv1492[:yyl1492] - yyc1492 = true + } else if yyl1673 != len(yyv1673) { + yyv1673 = yyv1673[:yyl1673] + yyc1673 = true } - yyj1492 := 0 - for ; yyj1492 < yyrr1492; yyj1492++ { - yyh1492.ElemContainerState(yyj1492) + yyj1673 := 0 + for ; yyj1673 < yyrr1673; yyj1673++ { + yyh1673.ElemContainerState(yyj1673) if r.TryDecodeAsNil() { - yyv1492[yyj1492] = CustomMetricTarget{} + yyv1673[yyj1673] = CustomMetricTarget{} } else { - yyv1493 := &yyv1492[yyj1492] - yyv1493.CodecDecodeSelf(d) + yyv1674 := &yyv1673[yyj1673] + yyv1674.CodecDecodeSelf(d) } } - if yyrt1492 { - for ; yyj1492 < yyl1492; yyj1492++ { - yyv1492 = append(yyv1492, CustomMetricTarget{}) - yyh1492.ElemContainerState(yyj1492) + if yyrt1673 { + for ; yyj1673 < yyl1673; yyj1673++ { + yyv1673 = append(yyv1673, CustomMetricTarget{}) + yyh1673.ElemContainerState(yyj1673) if r.TryDecodeAsNil() { - yyv1492[yyj1492] = CustomMetricTarget{} + yyv1673[yyj1673] = CustomMetricTarget{} } else { - yyv1494 := &yyv1492[yyj1492] - yyv1494.CodecDecodeSelf(d) + yyv1675 := &yyv1673[yyj1673] + yyv1675.CodecDecodeSelf(d) } } } } else { - yyj1492 := 0 - for ; !r.CheckBreak(); yyj1492++ { + yyj1673 := 0 + for ; !r.CheckBreak(); yyj1673++ { - if yyj1492 >= len(yyv1492) { - yyv1492 = append(yyv1492, CustomMetricTarget{}) // var yyz1492 CustomMetricTarget - yyc1492 = true + if yyj1673 >= len(yyv1673) { + yyv1673 = append(yyv1673, CustomMetricTarget{}) // var yyz1673 CustomMetricTarget + yyc1673 = true } - yyh1492.ElemContainerState(yyj1492) - if yyj1492 < len(yyv1492) { + yyh1673.ElemContainerState(yyj1673) + if yyj1673 < len(yyv1673) { if r.TryDecodeAsNil() { - yyv1492[yyj1492] = CustomMetricTarget{} + yyv1673[yyj1673] = CustomMetricTarget{} } else { - yyv1495 := &yyv1492[yyj1492] - yyv1495.CodecDecodeSelf(d) + yyv1676 := &yyv1673[yyj1673] + yyv1676.CodecDecodeSelf(d) } } else { @@ -17933,17 +20091,17 @@ func (x codecSelfer1234) decSliceCustomMetricTarget(v *[]CustomMetricTarget, d * } } - if yyj1492 < len(yyv1492) { - yyv1492 = yyv1492[:yyj1492] - yyc1492 = true - } else if yyj1492 == 0 && yyv1492 == nil { - yyv1492 = []CustomMetricTarget{} - yyc1492 = true + if yyj1673 < len(yyv1673) { + yyv1673 = yyv1673[:yyj1673] + yyc1673 = true + } else if yyj1673 == 0 && yyv1673 == nil { + yyv1673 = []CustomMetricTarget{} + yyc1673 = true } } - yyh1492.End() - if yyc1492 { - *v = yyv1492 + yyh1673.End() + if yyc1673 { + *v = yyv1673 } } @@ -17952,10 +20110,10 @@ func (x codecSelfer1234) encSliceCustomMetricCurrentStatus(v []CustomMetricCurre z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1496 := range v { + for _, yyv1677 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1497 := &yyv1496 - yy1497.CodecEncodeSelf(e) + yy1678 := &yyv1677 + yy1678.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17965,83 +20123,83 @@ func (x codecSelfer1234) decSliceCustomMetricCurrentStatus(v *[]CustomMetricCurr z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1498 := *v - yyh1498, yyl1498 := z.DecSliceHelperStart() - var yyc1498 bool - if yyl1498 == 0 { - if yyv1498 == nil { - yyv1498 = []CustomMetricCurrentStatus{} - yyc1498 = true - } else if len(yyv1498) != 0 { - yyv1498 = yyv1498[:0] - yyc1498 = true + yyv1679 := *v + yyh1679, yyl1679 := z.DecSliceHelperStart() + var yyc1679 bool + if yyl1679 == 0 { + if yyv1679 == nil { + yyv1679 = []CustomMetricCurrentStatus{} + yyc1679 = true + } else if len(yyv1679) != 0 { + yyv1679 = yyv1679[:0] + yyc1679 = true } - } else if yyl1498 > 0 { - var yyrr1498, yyrl1498 int - var yyrt1498 bool - if yyl1498 > cap(yyv1498) { + } else if yyl1679 > 0 { + var yyrr1679, yyrl1679 int + var yyrt1679 bool + if yyl1679 > cap(yyv1679) { - yyrg1498 := len(yyv1498) > 0 - yyv21498 := yyv1498 - yyrl1498, yyrt1498 = z.DecInferLen(yyl1498, z.DecBasicHandle().MaxInitLen, 40) - if yyrt1498 { - if yyrl1498 <= cap(yyv1498) { - yyv1498 = yyv1498[:yyrl1498] + yyrg1679 := len(yyv1679) > 0 + yyv21679 := yyv1679 + yyrl1679, yyrt1679 = z.DecInferLen(yyl1679, z.DecBasicHandle().MaxInitLen, 40) + if yyrt1679 { + if yyrl1679 <= cap(yyv1679) { + yyv1679 = yyv1679[:yyrl1679] } else { - yyv1498 = make([]CustomMetricCurrentStatus, yyrl1498) + yyv1679 = make([]CustomMetricCurrentStatus, yyrl1679) } } else { - yyv1498 = make([]CustomMetricCurrentStatus, yyrl1498) + yyv1679 = make([]CustomMetricCurrentStatus, yyrl1679) } - yyc1498 = true - yyrr1498 = len(yyv1498) - if yyrg1498 { - copy(yyv1498, yyv21498) + yyc1679 = true + yyrr1679 = len(yyv1679) + if yyrg1679 { + copy(yyv1679, yyv21679) } - } else if yyl1498 != len(yyv1498) { - yyv1498 = yyv1498[:yyl1498] - yyc1498 = true + } else if yyl1679 != len(yyv1679) { + yyv1679 = yyv1679[:yyl1679] + yyc1679 = true } - yyj1498 := 0 - for ; yyj1498 < yyrr1498; yyj1498++ { - yyh1498.ElemContainerState(yyj1498) + yyj1679 := 0 + for ; yyj1679 < yyrr1679; yyj1679++ { + yyh1679.ElemContainerState(yyj1679) if r.TryDecodeAsNil() { - yyv1498[yyj1498] = CustomMetricCurrentStatus{} + yyv1679[yyj1679] = CustomMetricCurrentStatus{} } else { - yyv1499 := &yyv1498[yyj1498] - yyv1499.CodecDecodeSelf(d) + yyv1680 := &yyv1679[yyj1679] + yyv1680.CodecDecodeSelf(d) } } - if yyrt1498 { - for ; yyj1498 < yyl1498; yyj1498++ { - yyv1498 = append(yyv1498, CustomMetricCurrentStatus{}) - yyh1498.ElemContainerState(yyj1498) + if yyrt1679 { + for ; yyj1679 < yyl1679; yyj1679++ { + yyv1679 = append(yyv1679, CustomMetricCurrentStatus{}) + yyh1679.ElemContainerState(yyj1679) if r.TryDecodeAsNil() { - yyv1498[yyj1498] = CustomMetricCurrentStatus{} + yyv1679[yyj1679] = CustomMetricCurrentStatus{} } else { - yyv1500 := &yyv1498[yyj1498] - yyv1500.CodecDecodeSelf(d) + yyv1681 := &yyv1679[yyj1679] + yyv1681.CodecDecodeSelf(d) } } } } else { - yyj1498 := 0 - for ; !r.CheckBreak(); yyj1498++ { + yyj1679 := 0 + for ; !r.CheckBreak(); yyj1679++ { - if yyj1498 >= len(yyv1498) { - yyv1498 = append(yyv1498, CustomMetricCurrentStatus{}) // var yyz1498 CustomMetricCurrentStatus - yyc1498 = true + if yyj1679 >= len(yyv1679) { + yyv1679 = append(yyv1679, CustomMetricCurrentStatus{}) // var yyz1679 CustomMetricCurrentStatus + yyc1679 = true } - yyh1498.ElemContainerState(yyj1498) - if yyj1498 < len(yyv1498) { + yyh1679.ElemContainerState(yyj1679) + if yyj1679 < len(yyv1679) { if r.TryDecodeAsNil() { - yyv1498[yyj1498] = CustomMetricCurrentStatus{} + yyv1679[yyj1679] = CustomMetricCurrentStatus{} } else { - yyv1501 := &yyv1498[yyj1498] - yyv1501.CodecDecodeSelf(d) + yyv1682 := &yyv1679[yyj1679] + yyv1682.CodecDecodeSelf(d) } } else { @@ -18049,17 +20207,17 @@ func (x codecSelfer1234) decSliceCustomMetricCurrentStatus(v *[]CustomMetricCurr } } - if yyj1498 < len(yyv1498) { - yyv1498 = yyv1498[:yyj1498] - yyc1498 = true - } else if yyj1498 == 0 && yyv1498 == nil { - yyv1498 = []CustomMetricCurrentStatus{} - yyc1498 = true + if yyj1679 < len(yyv1679) { + yyv1679 = yyv1679[:yyj1679] + yyc1679 = true + } else if yyj1679 == 0 && yyv1679 == nil { + yyv1679 = []CustomMetricCurrentStatus{} + yyc1679 = true } } - yyh1498.End() - if yyc1498 { - *v = yyv1498 + yyh1679.End() + if yyc1679 { + *v = yyv1679 } } @@ -18068,10 +20226,10 @@ func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutosc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1502 := range v { + for _, yyv1683 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1503 := &yyv1502 - yy1503.CodecEncodeSelf(e) + yy1684 := &yyv1683 + yy1684.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18081,83 +20239,83 @@ func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutos z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1504 := *v - yyh1504, yyl1504 := z.DecSliceHelperStart() - var yyc1504 bool - if yyl1504 == 0 { - if yyv1504 == nil { - yyv1504 = []HorizontalPodAutoscaler{} - yyc1504 = true - } else if len(yyv1504) != 0 { - yyv1504 = yyv1504[:0] - yyc1504 = true + yyv1685 := *v + yyh1685, yyl1685 := z.DecSliceHelperStart() + var yyc1685 bool + if yyl1685 == 0 { + if yyv1685 == nil { + yyv1685 = []HorizontalPodAutoscaler{} + yyc1685 = true + } else if len(yyv1685) != 0 { + yyv1685 = yyv1685[:0] + yyc1685 = true } - } else if yyl1504 > 0 { - var yyrr1504, yyrl1504 int - var yyrt1504 bool - if yyl1504 > cap(yyv1504) { + } else if yyl1685 > 0 { + var yyrr1685, yyrl1685 int + var yyrt1685 bool + if yyl1685 > cap(yyv1685) { - yyrg1504 := len(yyv1504) > 0 - yyv21504 := yyv1504 - yyrl1504, yyrt1504 = z.DecInferLen(yyl1504, z.DecBasicHandle().MaxInitLen, 312) - if yyrt1504 { - if yyrl1504 <= cap(yyv1504) { - yyv1504 = yyv1504[:yyrl1504] + yyrg1685 := len(yyv1685) > 0 + yyv21685 := yyv1685 + yyrl1685, yyrt1685 = z.DecInferLen(yyl1685, z.DecBasicHandle().MaxInitLen, 312) + if yyrt1685 { + if yyrl1685 <= cap(yyv1685) { + yyv1685 = yyv1685[:yyrl1685] } else { - yyv1504 = make([]HorizontalPodAutoscaler, yyrl1504) + yyv1685 = make([]HorizontalPodAutoscaler, yyrl1685) } } else { - yyv1504 = make([]HorizontalPodAutoscaler, yyrl1504) + yyv1685 = make([]HorizontalPodAutoscaler, yyrl1685) } - yyc1504 = true - yyrr1504 = len(yyv1504) - if yyrg1504 { - copy(yyv1504, yyv21504) + yyc1685 = true + yyrr1685 = len(yyv1685) + if yyrg1685 { + copy(yyv1685, yyv21685) } - } else if yyl1504 != len(yyv1504) { - yyv1504 = yyv1504[:yyl1504] - yyc1504 = true + } else if yyl1685 != len(yyv1685) { + yyv1685 = yyv1685[:yyl1685] + yyc1685 = true } - yyj1504 := 0 - for ; yyj1504 < yyrr1504; yyj1504++ { - yyh1504.ElemContainerState(yyj1504) + yyj1685 := 0 + for ; yyj1685 < yyrr1685; yyj1685++ { + yyh1685.ElemContainerState(yyj1685) if r.TryDecodeAsNil() { - yyv1504[yyj1504] = HorizontalPodAutoscaler{} + yyv1685[yyj1685] = HorizontalPodAutoscaler{} } else { - yyv1505 := &yyv1504[yyj1504] - yyv1505.CodecDecodeSelf(d) + yyv1686 := &yyv1685[yyj1685] + yyv1686.CodecDecodeSelf(d) } } - if yyrt1504 { - for ; yyj1504 < yyl1504; yyj1504++ { - yyv1504 = append(yyv1504, HorizontalPodAutoscaler{}) - yyh1504.ElemContainerState(yyj1504) + if yyrt1685 { + for ; yyj1685 < yyl1685; yyj1685++ { + yyv1685 = append(yyv1685, HorizontalPodAutoscaler{}) + yyh1685.ElemContainerState(yyj1685) if r.TryDecodeAsNil() { - yyv1504[yyj1504] = HorizontalPodAutoscaler{} + yyv1685[yyj1685] = HorizontalPodAutoscaler{} } else { - yyv1506 := &yyv1504[yyj1504] - yyv1506.CodecDecodeSelf(d) + yyv1687 := &yyv1685[yyj1685] + yyv1687.CodecDecodeSelf(d) } } } } else { - yyj1504 := 0 - for ; !r.CheckBreak(); yyj1504++ { + yyj1685 := 0 + for ; !r.CheckBreak(); yyj1685++ { - if yyj1504 >= len(yyv1504) { - yyv1504 = append(yyv1504, HorizontalPodAutoscaler{}) // var yyz1504 HorizontalPodAutoscaler - yyc1504 = true + if yyj1685 >= len(yyv1685) { + yyv1685 = append(yyv1685, HorizontalPodAutoscaler{}) // var yyz1685 HorizontalPodAutoscaler + yyc1685 = true } - yyh1504.ElemContainerState(yyj1504) - if yyj1504 < len(yyv1504) { + yyh1685.ElemContainerState(yyj1685) + if yyj1685 < len(yyv1685) { if r.TryDecodeAsNil() { - yyv1504[yyj1504] = HorizontalPodAutoscaler{} + yyv1685[yyj1685] = HorizontalPodAutoscaler{} } else { - yyv1507 := &yyv1504[yyj1504] - yyv1507.CodecDecodeSelf(d) + yyv1688 := &yyv1685[yyj1685] + yyv1688.CodecDecodeSelf(d) } } else { @@ -18165,17 +20323,17 @@ func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutos } } - if yyj1504 < len(yyv1504) { - yyv1504 = yyv1504[:yyj1504] - yyc1504 = true - } else if yyj1504 == 0 && yyv1504 == nil { - yyv1504 = []HorizontalPodAutoscaler{} - yyc1504 = true + if yyj1685 < len(yyv1685) { + yyv1685 = yyv1685[:yyj1685] + yyc1685 = true + } else if yyj1685 == 0 && yyv1685 == nil { + yyv1685 = []HorizontalPodAutoscaler{} + yyc1685 = true } } - yyh1504.End() - if yyc1504 { - *v = yyv1504 + yyh1685.End() + if yyc1685 { + *v = yyv1685 } } @@ -18184,10 +20342,10 @@ func (x codecSelfer1234) encSliceAPIVersion(v []APIVersion, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1508 := range v { + for _, yyv1689 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1509 := &yyv1508 - yy1509.CodecEncodeSelf(e) + yy1690 := &yyv1689 + yy1690.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18197,83 +20355,83 @@ func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1510 := *v - yyh1510, yyl1510 := z.DecSliceHelperStart() - var yyc1510 bool - if yyl1510 == 0 { - if yyv1510 == nil { - yyv1510 = []APIVersion{} - yyc1510 = true - } else if len(yyv1510) != 0 { - yyv1510 = yyv1510[:0] - yyc1510 = true + yyv1691 := *v + yyh1691, yyl1691 := z.DecSliceHelperStart() + var yyc1691 bool + if yyl1691 == 0 { + if yyv1691 == nil { + yyv1691 = []APIVersion{} + yyc1691 = true + } else if len(yyv1691) != 0 { + yyv1691 = yyv1691[:0] + yyc1691 = true } - } else if yyl1510 > 0 { - var yyrr1510, yyrl1510 int - var yyrt1510 bool - if yyl1510 > cap(yyv1510) { + } else if yyl1691 > 0 { + var yyrr1691, yyrl1691 int + var yyrt1691 bool + if yyl1691 > cap(yyv1691) { - yyrg1510 := len(yyv1510) > 0 - yyv21510 := yyv1510 - yyrl1510, yyrt1510 = z.DecInferLen(yyl1510, z.DecBasicHandle().MaxInitLen, 32) - if yyrt1510 { - if yyrl1510 <= cap(yyv1510) { - yyv1510 = yyv1510[:yyrl1510] + yyrg1691 := len(yyv1691) > 0 + yyv21691 := yyv1691 + yyrl1691, yyrt1691 = z.DecInferLen(yyl1691, z.DecBasicHandle().MaxInitLen, 32) + if yyrt1691 { + if yyrl1691 <= cap(yyv1691) { + yyv1691 = yyv1691[:yyrl1691] } else { - yyv1510 = make([]APIVersion, yyrl1510) + yyv1691 = make([]APIVersion, yyrl1691) } } else { - yyv1510 = make([]APIVersion, yyrl1510) + yyv1691 = make([]APIVersion, yyrl1691) } - yyc1510 = true - yyrr1510 = len(yyv1510) - if yyrg1510 { - copy(yyv1510, yyv21510) + yyc1691 = true + yyrr1691 = len(yyv1691) + if yyrg1691 { + copy(yyv1691, yyv21691) } - } else if yyl1510 != len(yyv1510) { - yyv1510 = yyv1510[:yyl1510] - yyc1510 = true + } else if yyl1691 != len(yyv1691) { + yyv1691 = yyv1691[:yyl1691] + yyc1691 = true } - yyj1510 := 0 - for ; yyj1510 < yyrr1510; yyj1510++ { - yyh1510.ElemContainerState(yyj1510) + yyj1691 := 0 + for ; yyj1691 < yyrr1691; yyj1691++ { + yyh1691.ElemContainerState(yyj1691) if r.TryDecodeAsNil() { - yyv1510[yyj1510] = APIVersion{} + yyv1691[yyj1691] = APIVersion{} } else { - yyv1511 := &yyv1510[yyj1510] - yyv1511.CodecDecodeSelf(d) + yyv1692 := &yyv1691[yyj1691] + yyv1692.CodecDecodeSelf(d) } } - if yyrt1510 { - for ; yyj1510 < yyl1510; yyj1510++ { - yyv1510 = append(yyv1510, APIVersion{}) - yyh1510.ElemContainerState(yyj1510) + if yyrt1691 { + for ; yyj1691 < yyl1691; yyj1691++ { + yyv1691 = append(yyv1691, APIVersion{}) + yyh1691.ElemContainerState(yyj1691) if r.TryDecodeAsNil() { - yyv1510[yyj1510] = APIVersion{} + yyv1691[yyj1691] = APIVersion{} } else { - yyv1512 := &yyv1510[yyj1510] - yyv1512.CodecDecodeSelf(d) + yyv1693 := &yyv1691[yyj1691] + yyv1693.CodecDecodeSelf(d) } } } } else { - yyj1510 := 0 - for ; !r.CheckBreak(); yyj1510++ { + yyj1691 := 0 + for ; !r.CheckBreak(); yyj1691++ { - if yyj1510 >= len(yyv1510) { - yyv1510 = append(yyv1510, APIVersion{}) // var yyz1510 APIVersion - yyc1510 = true + if yyj1691 >= len(yyv1691) { + yyv1691 = append(yyv1691, APIVersion{}) // var yyz1691 APIVersion + yyc1691 = true } - yyh1510.ElemContainerState(yyj1510) - if yyj1510 < len(yyv1510) { + yyh1691.ElemContainerState(yyj1691) + if yyj1691 < len(yyv1691) { if r.TryDecodeAsNil() { - yyv1510[yyj1510] = APIVersion{} + yyv1691[yyj1691] = APIVersion{} } else { - yyv1513 := &yyv1510[yyj1510] - yyv1513.CodecDecodeSelf(d) + yyv1694 := &yyv1691[yyj1691] + yyv1694.CodecDecodeSelf(d) } } else { @@ -18281,17 +20439,17 @@ func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decode } } - if yyj1510 < len(yyv1510) { - yyv1510 = yyv1510[:yyj1510] - yyc1510 = true - } else if yyj1510 == 0 && yyv1510 == nil { - yyv1510 = []APIVersion{} - yyc1510 = true + if yyj1691 < len(yyv1691) { + yyv1691 = yyv1691[:yyj1691] + yyc1691 = true + } else if yyj1691 == 0 && yyv1691 == nil { + yyv1691 = []APIVersion{} + yyc1691 = true } } - yyh1510.End() - if yyc1510 { - *v = yyv1510 + yyh1691.End() + if yyc1691 { + *v = yyv1691 } } @@ -18300,10 +20458,10 @@ func (x codecSelfer1234) encSliceThirdPartyResource(v []ThirdPartyResource, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1514 := range v { + for _, yyv1695 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1515 := &yyv1514 - yy1515.CodecEncodeSelf(e) + yy1696 := &yyv1695 + yy1696.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18313,83 +20471,83 @@ func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1516 := *v - yyh1516, yyl1516 := z.DecSliceHelperStart() - var yyc1516 bool - if yyl1516 == 0 { - if yyv1516 == nil { - yyv1516 = []ThirdPartyResource{} - yyc1516 = true - } else if len(yyv1516) != 0 { - yyv1516 = yyv1516[:0] - yyc1516 = true + yyv1697 := *v + yyh1697, yyl1697 := z.DecSliceHelperStart() + var yyc1697 bool + if yyl1697 == 0 { + if yyv1697 == nil { + yyv1697 = []ThirdPartyResource{} + yyc1697 = true + } else if len(yyv1697) != 0 { + yyv1697 = yyv1697[:0] + yyc1697 = true } - } else if yyl1516 > 0 { - var yyrr1516, yyrl1516 int - var yyrt1516 bool - if yyl1516 > cap(yyv1516) { + } else if yyl1697 > 0 { + var yyrr1697, yyrl1697 int + var yyrt1697 bool + if yyl1697 > cap(yyv1697) { - yyrg1516 := len(yyv1516) > 0 - yyv21516 := yyv1516 - yyrl1516, yyrt1516 = z.DecInferLen(yyl1516, z.DecBasicHandle().MaxInitLen, 232) - if yyrt1516 { - if yyrl1516 <= cap(yyv1516) { - yyv1516 = yyv1516[:yyrl1516] + yyrg1697 := len(yyv1697) > 0 + yyv21697 := yyv1697 + yyrl1697, yyrt1697 = z.DecInferLen(yyl1697, z.DecBasicHandle().MaxInitLen, 232) + if yyrt1697 { + if yyrl1697 <= cap(yyv1697) { + yyv1697 = yyv1697[:yyrl1697] } else { - yyv1516 = make([]ThirdPartyResource, yyrl1516) + yyv1697 = make([]ThirdPartyResource, yyrl1697) } } else { - yyv1516 = make([]ThirdPartyResource, yyrl1516) + yyv1697 = make([]ThirdPartyResource, yyrl1697) } - yyc1516 = true - yyrr1516 = len(yyv1516) - if yyrg1516 { - copy(yyv1516, yyv21516) + yyc1697 = true + yyrr1697 = len(yyv1697) + if yyrg1697 { + copy(yyv1697, yyv21697) } - } else if yyl1516 != len(yyv1516) { - yyv1516 = yyv1516[:yyl1516] - yyc1516 = true + } else if yyl1697 != len(yyv1697) { + yyv1697 = yyv1697[:yyl1697] + yyc1697 = true } - yyj1516 := 0 - for ; yyj1516 < yyrr1516; yyj1516++ { - yyh1516.ElemContainerState(yyj1516) + yyj1697 := 0 + for ; yyj1697 < yyrr1697; yyj1697++ { + yyh1697.ElemContainerState(yyj1697) if r.TryDecodeAsNil() { - yyv1516[yyj1516] = ThirdPartyResource{} + yyv1697[yyj1697] = ThirdPartyResource{} } else { - yyv1517 := &yyv1516[yyj1516] - yyv1517.CodecDecodeSelf(d) + yyv1698 := &yyv1697[yyj1697] + yyv1698.CodecDecodeSelf(d) } } - if yyrt1516 { - for ; yyj1516 < yyl1516; yyj1516++ { - yyv1516 = append(yyv1516, ThirdPartyResource{}) - yyh1516.ElemContainerState(yyj1516) + if yyrt1697 { + for ; yyj1697 < yyl1697; yyj1697++ { + yyv1697 = append(yyv1697, ThirdPartyResource{}) + yyh1697.ElemContainerState(yyj1697) if r.TryDecodeAsNil() { - yyv1516[yyj1516] = ThirdPartyResource{} + yyv1697[yyj1697] = ThirdPartyResource{} } else { - yyv1518 := &yyv1516[yyj1516] - yyv1518.CodecDecodeSelf(d) + yyv1699 := &yyv1697[yyj1697] + yyv1699.CodecDecodeSelf(d) } } } } else { - yyj1516 := 0 - for ; !r.CheckBreak(); yyj1516++ { + yyj1697 := 0 + for ; !r.CheckBreak(); yyj1697++ { - if yyj1516 >= len(yyv1516) { - yyv1516 = append(yyv1516, ThirdPartyResource{}) // var yyz1516 ThirdPartyResource - yyc1516 = true + if yyj1697 >= len(yyv1697) { + yyv1697 = append(yyv1697, ThirdPartyResource{}) // var yyz1697 ThirdPartyResource + yyc1697 = true } - yyh1516.ElemContainerState(yyj1516) - if yyj1516 < len(yyv1516) { + yyh1697.ElemContainerState(yyj1697) + if yyj1697 < len(yyv1697) { if r.TryDecodeAsNil() { - yyv1516[yyj1516] = ThirdPartyResource{} + yyv1697[yyj1697] = ThirdPartyResource{} } else { - yyv1519 := &yyv1516[yyj1516] - yyv1519.CodecDecodeSelf(d) + yyv1700 := &yyv1697[yyj1697] + yyv1700.CodecDecodeSelf(d) } } else { @@ -18397,17 +20555,17 @@ func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d * } } - if yyj1516 < len(yyv1516) { - yyv1516 = yyv1516[:yyj1516] - yyc1516 = true - } else if yyj1516 == 0 && yyv1516 == nil { - yyv1516 = []ThirdPartyResource{} - yyc1516 = true + if yyj1697 < len(yyv1697) { + yyv1697 = yyv1697[:yyj1697] + yyc1697 = true + } else if yyj1697 == 0 && yyv1697 == nil { + yyv1697 = []ThirdPartyResource{} + yyc1697 = true } } - yyh1516.End() - if yyc1516 { - *v = yyv1516 + yyh1697.End() + if yyc1697 { + *v = yyv1697 } } @@ -18416,10 +20574,10 @@ func (x codecSelfer1234) encSliceDeployment(v []Deployment, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1520 := range v { + for _, yyv1701 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1521 := &yyv1520 - yy1521.CodecEncodeSelf(e) + yy1702 := &yyv1701 + yy1702.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18429,83 +20587,83 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1522 := *v - yyh1522, yyl1522 := z.DecSliceHelperStart() - var yyc1522 bool - if yyl1522 == 0 { - if yyv1522 == nil { - yyv1522 = []Deployment{} - yyc1522 = true - } else if len(yyv1522) != 0 { - yyv1522 = yyv1522[:0] - yyc1522 = true + yyv1703 := *v + yyh1703, yyl1703 := z.DecSliceHelperStart() + var yyc1703 bool + if yyl1703 == 0 { + if yyv1703 == nil { + yyv1703 = []Deployment{} + yyc1703 = true + } else if len(yyv1703) != 0 { + yyv1703 = yyv1703[:0] + yyc1703 = true } - } else if yyl1522 > 0 { - var yyrr1522, yyrl1522 int - var yyrt1522 bool - if yyl1522 > cap(yyv1522) { + } else if yyl1703 > 0 { + var yyrr1703, yyrl1703 int + var yyrt1703 bool + if yyl1703 > cap(yyv1703) { - yyrg1522 := len(yyv1522) > 0 - yyv21522 := yyv1522 - yyrl1522, yyrt1522 = z.DecInferLen(yyl1522, z.DecBasicHandle().MaxInitLen, 640) - if yyrt1522 { - if yyrl1522 <= cap(yyv1522) { - yyv1522 = yyv1522[:yyrl1522] + yyrg1703 := len(yyv1703) > 0 + yyv21703 := yyv1703 + yyrl1703, yyrt1703 = z.DecInferLen(yyl1703, z.DecBasicHandle().MaxInitLen, 640) + if yyrt1703 { + if yyrl1703 <= cap(yyv1703) { + yyv1703 = yyv1703[:yyrl1703] } else { - yyv1522 = make([]Deployment, yyrl1522) + yyv1703 = make([]Deployment, yyrl1703) } } else { - yyv1522 = make([]Deployment, yyrl1522) + yyv1703 = make([]Deployment, yyrl1703) } - yyc1522 = true - yyrr1522 = len(yyv1522) - if yyrg1522 { - copy(yyv1522, yyv21522) + yyc1703 = true + yyrr1703 = len(yyv1703) + if yyrg1703 { + copy(yyv1703, yyv21703) } - } else if yyl1522 != len(yyv1522) { - yyv1522 = yyv1522[:yyl1522] - yyc1522 = true + } else if yyl1703 != len(yyv1703) { + yyv1703 = yyv1703[:yyl1703] + yyc1703 = true } - yyj1522 := 0 - for ; yyj1522 < yyrr1522; yyj1522++ { - yyh1522.ElemContainerState(yyj1522) + yyj1703 := 0 + for ; yyj1703 < yyrr1703; yyj1703++ { + yyh1703.ElemContainerState(yyj1703) if r.TryDecodeAsNil() { - yyv1522[yyj1522] = Deployment{} + yyv1703[yyj1703] = Deployment{} } else { - yyv1523 := &yyv1522[yyj1522] - yyv1523.CodecDecodeSelf(d) + yyv1704 := &yyv1703[yyj1703] + yyv1704.CodecDecodeSelf(d) } } - if yyrt1522 { - for ; yyj1522 < yyl1522; yyj1522++ { - yyv1522 = append(yyv1522, Deployment{}) - yyh1522.ElemContainerState(yyj1522) + if yyrt1703 { + for ; yyj1703 < yyl1703; yyj1703++ { + yyv1703 = append(yyv1703, Deployment{}) + yyh1703.ElemContainerState(yyj1703) if r.TryDecodeAsNil() { - yyv1522[yyj1522] = Deployment{} + yyv1703[yyj1703] = Deployment{} } else { - yyv1524 := &yyv1522[yyj1522] - yyv1524.CodecDecodeSelf(d) + yyv1705 := &yyv1703[yyj1703] + yyv1705.CodecDecodeSelf(d) } } } } else { - yyj1522 := 0 - for ; !r.CheckBreak(); yyj1522++ { + yyj1703 := 0 + for ; !r.CheckBreak(); yyj1703++ { - if yyj1522 >= len(yyv1522) { - yyv1522 = append(yyv1522, Deployment{}) // var yyz1522 Deployment - yyc1522 = true + if yyj1703 >= len(yyv1703) { + yyv1703 = append(yyv1703, Deployment{}) // var yyz1703 Deployment + yyc1703 = true } - yyh1522.ElemContainerState(yyj1522) - if yyj1522 < len(yyv1522) { + yyh1703.ElemContainerState(yyj1703) + if yyj1703 < len(yyv1703) { if r.TryDecodeAsNil() { - yyv1522[yyj1522] = Deployment{} + yyv1703[yyj1703] = Deployment{} } else { - yyv1525 := &yyv1522[yyj1522] - yyv1525.CodecDecodeSelf(d) + yyv1706 := &yyv1703[yyj1703] + yyv1706.CodecDecodeSelf(d) } } else { @@ -18513,17 +20671,17 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode } } - if yyj1522 < len(yyv1522) { - yyv1522 = yyv1522[:yyj1522] - yyc1522 = true - } else if yyj1522 == 0 && yyv1522 == nil { - yyv1522 = []Deployment{} - yyc1522 = true + if yyj1703 < len(yyv1703) { + yyv1703 = yyv1703[:yyj1703] + yyc1703 = true + } else if yyj1703 == 0 && yyv1703 == nil { + yyv1703 = []Deployment{} + yyc1703 = true } } - yyh1522.End() - if yyc1522 { - *v = yyv1522 + yyh1703.End() + if yyc1703 { + *v = yyv1703 } } @@ -18532,10 +20690,10 @@ func (x codecSelfer1234) encSliceDaemonSet(v []DaemonSet, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1526 := range v { + for _, yyv1707 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1527 := &yyv1526 - yy1527.CodecEncodeSelf(e) + yy1708 := &yyv1707 + yy1708.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18545,83 +20703,83 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1528 := *v - yyh1528, yyl1528 := z.DecSliceHelperStart() - var yyc1528 bool - if yyl1528 == 0 { - if yyv1528 == nil { - yyv1528 = []DaemonSet{} - yyc1528 = true - } else if len(yyv1528) != 0 { - yyv1528 = yyv1528[:0] - yyc1528 = true + yyv1709 := *v + yyh1709, yyl1709 := z.DecSliceHelperStart() + var yyc1709 bool + if yyl1709 == 0 { + if yyv1709 == nil { + yyv1709 = []DaemonSet{} + yyc1709 = true + } else if len(yyv1709) != 0 { + yyv1709 = yyv1709[:0] + yyc1709 = true } - } else if yyl1528 > 0 { - var yyrr1528, yyrl1528 int - var yyrt1528 bool - if yyl1528 > cap(yyv1528) { + } else if yyl1709 > 0 { + var yyrr1709, yyrl1709 int + var yyrt1709 bool + if yyl1709 > cap(yyv1709) { - yyrg1528 := len(yyv1528) > 0 - yyv21528 := yyv1528 - yyrl1528, yyrt1528 = z.DecInferLen(yyl1528, z.DecBasicHandle().MaxInitLen, 600) - if yyrt1528 { - if yyrl1528 <= cap(yyv1528) { - yyv1528 = yyv1528[:yyrl1528] + yyrg1709 := len(yyv1709) > 0 + yyv21709 := yyv1709 + yyrl1709, yyrt1709 = z.DecInferLen(yyl1709, z.DecBasicHandle().MaxInitLen, 600) + if yyrt1709 { + if yyrl1709 <= cap(yyv1709) { + yyv1709 = yyv1709[:yyrl1709] } else { - yyv1528 = make([]DaemonSet, yyrl1528) + yyv1709 = make([]DaemonSet, yyrl1709) } } else { - yyv1528 = make([]DaemonSet, yyrl1528) + yyv1709 = make([]DaemonSet, yyrl1709) } - yyc1528 = true - yyrr1528 = len(yyv1528) - if yyrg1528 { - copy(yyv1528, yyv21528) + yyc1709 = true + yyrr1709 = len(yyv1709) + if yyrg1709 { + copy(yyv1709, yyv21709) } - } else if yyl1528 != len(yyv1528) { - yyv1528 = yyv1528[:yyl1528] - yyc1528 = true + } else if yyl1709 != len(yyv1709) { + yyv1709 = yyv1709[:yyl1709] + yyc1709 = true } - yyj1528 := 0 - for ; yyj1528 < yyrr1528; yyj1528++ { - yyh1528.ElemContainerState(yyj1528) + yyj1709 := 0 + for ; yyj1709 < yyrr1709; yyj1709++ { + yyh1709.ElemContainerState(yyj1709) if r.TryDecodeAsNil() { - yyv1528[yyj1528] = DaemonSet{} + yyv1709[yyj1709] = DaemonSet{} } else { - yyv1529 := &yyv1528[yyj1528] - yyv1529.CodecDecodeSelf(d) + yyv1710 := &yyv1709[yyj1709] + yyv1710.CodecDecodeSelf(d) } } - if yyrt1528 { - for ; yyj1528 < yyl1528; yyj1528++ { - yyv1528 = append(yyv1528, DaemonSet{}) - yyh1528.ElemContainerState(yyj1528) + if yyrt1709 { + for ; yyj1709 < yyl1709; yyj1709++ { + yyv1709 = append(yyv1709, DaemonSet{}) + yyh1709.ElemContainerState(yyj1709) if r.TryDecodeAsNil() { - yyv1528[yyj1528] = DaemonSet{} + yyv1709[yyj1709] = DaemonSet{} } else { - yyv1530 := &yyv1528[yyj1528] - yyv1530.CodecDecodeSelf(d) + yyv1711 := &yyv1709[yyj1709] + yyv1711.CodecDecodeSelf(d) } } } } else { - yyj1528 := 0 - for ; !r.CheckBreak(); yyj1528++ { + yyj1709 := 0 + for ; !r.CheckBreak(); yyj1709++ { - if yyj1528 >= len(yyv1528) { - yyv1528 = append(yyv1528, DaemonSet{}) // var yyz1528 DaemonSet - yyc1528 = true + if yyj1709 >= len(yyv1709) { + yyv1709 = append(yyv1709, DaemonSet{}) // var yyz1709 DaemonSet + yyc1709 = true } - yyh1528.ElemContainerState(yyj1528) - if yyj1528 < len(yyv1528) { + yyh1709.ElemContainerState(yyj1709) + if yyj1709 < len(yyv1709) { if r.TryDecodeAsNil() { - yyv1528[yyj1528] = DaemonSet{} + yyv1709[yyj1709] = DaemonSet{} } else { - yyv1531 := &yyv1528[yyj1528] - yyv1531.CodecDecodeSelf(d) + yyv1712 := &yyv1709[yyj1709] + yyv1712.CodecDecodeSelf(d) } } else { @@ -18629,17 +20787,17 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) } } - if yyj1528 < len(yyv1528) { - yyv1528 = yyv1528[:yyj1528] - yyc1528 = true - } else if yyj1528 == 0 && yyv1528 == nil { - yyv1528 = []DaemonSet{} - yyc1528 = true + if yyj1709 < len(yyv1709) { + yyv1709 = yyv1709[:yyj1709] + yyc1709 = true + } else if yyj1709 == 0 && yyv1709 == nil { + yyv1709 = []DaemonSet{} + yyc1709 = true } } - yyh1528.End() - if yyc1528 { - *v = yyv1528 + yyh1709.End() + if yyc1709 { + *v = yyv1709 } } @@ -18648,10 +20806,10 @@ func (x codecSelfer1234) encSliceThirdPartyResourceData(v []ThirdPartyResourceDa z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1532 := range v { + for _, yyv1713 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1533 := &yyv1532 - yy1533.CodecEncodeSelf(e) + yy1714 := &yyv1713 + yy1714.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18661,83 +20819,83 @@ func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceD z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1534 := *v - yyh1534, yyl1534 := z.DecSliceHelperStart() - var yyc1534 bool - if yyl1534 == 0 { - if yyv1534 == nil { - yyv1534 = []ThirdPartyResourceData{} - yyc1534 = true - } else if len(yyv1534) != 0 { - yyv1534 = yyv1534[:0] - yyc1534 = true + yyv1715 := *v + yyh1715, yyl1715 := z.DecSliceHelperStart() + var yyc1715 bool + if yyl1715 == 0 { + if yyv1715 == nil { + yyv1715 = []ThirdPartyResourceData{} + yyc1715 = true + } else if len(yyv1715) != 0 { + yyv1715 = yyv1715[:0] + yyc1715 = true } - } else if yyl1534 > 0 { - var yyrr1534, yyrl1534 int - var yyrt1534 bool - if yyl1534 > cap(yyv1534) { + } else if yyl1715 > 0 { + var yyrr1715, yyrl1715 int + var yyrt1715 bool + if yyl1715 > cap(yyv1715) { - yyrg1534 := len(yyv1534) > 0 - yyv21534 := yyv1534 - yyrl1534, yyrt1534 = z.DecInferLen(yyl1534, z.DecBasicHandle().MaxInitLen, 216) - if yyrt1534 { - if yyrl1534 <= cap(yyv1534) { - yyv1534 = yyv1534[:yyrl1534] + yyrg1715 := len(yyv1715) > 0 + yyv21715 := yyv1715 + yyrl1715, yyrt1715 = z.DecInferLen(yyl1715, z.DecBasicHandle().MaxInitLen, 216) + if yyrt1715 { + if yyrl1715 <= cap(yyv1715) { + yyv1715 = yyv1715[:yyrl1715] } else { - yyv1534 = make([]ThirdPartyResourceData, yyrl1534) + yyv1715 = make([]ThirdPartyResourceData, yyrl1715) } } else { - yyv1534 = make([]ThirdPartyResourceData, yyrl1534) + yyv1715 = make([]ThirdPartyResourceData, yyrl1715) } - yyc1534 = true - yyrr1534 = len(yyv1534) - if yyrg1534 { - copy(yyv1534, yyv21534) + yyc1715 = true + yyrr1715 = len(yyv1715) + if yyrg1715 { + copy(yyv1715, yyv21715) } - } else if yyl1534 != len(yyv1534) { - yyv1534 = yyv1534[:yyl1534] - yyc1534 = true + } else if yyl1715 != len(yyv1715) { + yyv1715 = yyv1715[:yyl1715] + yyc1715 = true } - yyj1534 := 0 - for ; yyj1534 < yyrr1534; yyj1534++ { - yyh1534.ElemContainerState(yyj1534) + yyj1715 := 0 + for ; yyj1715 < yyrr1715; yyj1715++ { + yyh1715.ElemContainerState(yyj1715) if r.TryDecodeAsNil() { - yyv1534[yyj1534] = ThirdPartyResourceData{} + yyv1715[yyj1715] = ThirdPartyResourceData{} } else { - yyv1535 := &yyv1534[yyj1534] - yyv1535.CodecDecodeSelf(d) + yyv1716 := &yyv1715[yyj1715] + yyv1716.CodecDecodeSelf(d) } } - if yyrt1534 { - for ; yyj1534 < yyl1534; yyj1534++ { - yyv1534 = append(yyv1534, ThirdPartyResourceData{}) - yyh1534.ElemContainerState(yyj1534) + if yyrt1715 { + for ; yyj1715 < yyl1715; yyj1715++ { + yyv1715 = append(yyv1715, ThirdPartyResourceData{}) + yyh1715.ElemContainerState(yyj1715) if r.TryDecodeAsNil() { - yyv1534[yyj1534] = ThirdPartyResourceData{} + yyv1715[yyj1715] = ThirdPartyResourceData{} } else { - yyv1536 := &yyv1534[yyj1534] - yyv1536.CodecDecodeSelf(d) + yyv1717 := &yyv1715[yyj1715] + yyv1717.CodecDecodeSelf(d) } } } } else { - yyj1534 := 0 - for ; !r.CheckBreak(); yyj1534++ { + yyj1715 := 0 + for ; !r.CheckBreak(); yyj1715++ { - if yyj1534 >= len(yyv1534) { - yyv1534 = append(yyv1534, ThirdPartyResourceData{}) // var yyz1534 ThirdPartyResourceData - yyc1534 = true + if yyj1715 >= len(yyv1715) { + yyv1715 = append(yyv1715, ThirdPartyResourceData{}) // var yyz1715 ThirdPartyResourceData + yyc1715 = true } - yyh1534.ElemContainerState(yyj1534) - if yyj1534 < len(yyv1534) { + yyh1715.ElemContainerState(yyj1715) + if yyj1715 < len(yyv1715) { if r.TryDecodeAsNil() { - yyv1534[yyj1534] = ThirdPartyResourceData{} + yyv1715[yyj1715] = ThirdPartyResourceData{} } else { - yyv1537 := &yyv1534[yyj1534] - yyv1537.CodecDecodeSelf(d) + yyv1718 := &yyv1715[yyj1715] + yyv1718.CodecDecodeSelf(d) } } else { @@ -18745,17 +20903,17 @@ func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceD } } - if yyj1534 < len(yyv1534) { - yyv1534 = yyv1534[:yyj1534] - yyc1534 = true - } else if yyj1534 == 0 && yyv1534 == nil { - yyv1534 = []ThirdPartyResourceData{} - yyc1534 = true + if yyj1715 < len(yyv1715) { + yyv1715 = yyv1715[:yyj1715] + yyc1715 = true + } else if yyj1715 == 0 && yyv1715 == nil { + yyv1715 = []ThirdPartyResourceData{} + yyc1715 = true } } - yyh1534.End() - if yyc1534 { - *v = yyv1534 + yyh1715.End() + if yyc1715 { + *v = yyv1715 } } @@ -18764,10 +20922,10 @@ func (x codecSelfer1234) encSliceJob(v []Job, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1538 := range v { + for _, yyv1719 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1539 := &yyv1538 - yy1539.CodecEncodeSelf(e) + yy1720 := &yyv1719 + yy1720.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18777,83 +20935,83 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1540 := *v - yyh1540, yyl1540 := z.DecSliceHelperStart() - var yyc1540 bool - if yyl1540 == 0 { - if yyv1540 == nil { - yyv1540 = []Job{} - yyc1540 = true - } else if len(yyv1540) != 0 { - yyv1540 = yyv1540[:0] - yyc1540 = true + yyv1721 := *v + yyh1721, yyl1721 := z.DecSliceHelperStart() + var yyc1721 bool + if yyl1721 == 0 { + if yyv1721 == nil { + yyv1721 = []Job{} + yyc1721 = true + } else if len(yyv1721) != 0 { + yyv1721 = yyv1721[:0] + yyc1721 = true } - } else if yyl1540 > 0 { - var yyrr1540, yyrl1540 int - var yyrt1540 bool - if yyl1540 > cap(yyv1540) { + } else if yyl1721 > 0 { + var yyrr1721, yyrl1721 int + var yyrt1721 bool + if yyl1721 > cap(yyv1721) { - yyrg1540 := len(yyv1540) > 0 - yyv21540 := yyv1540 - yyrl1540, yyrt1540 = z.DecInferLen(yyl1540, z.DecBasicHandle().MaxInitLen, 632) - if yyrt1540 { - if yyrl1540 <= cap(yyv1540) { - yyv1540 = yyv1540[:yyrl1540] + yyrg1721 := len(yyv1721) > 0 + yyv21721 := yyv1721 + yyrl1721, yyrt1721 = z.DecInferLen(yyl1721, z.DecBasicHandle().MaxInitLen, 632) + if yyrt1721 { + if yyrl1721 <= cap(yyv1721) { + yyv1721 = yyv1721[:yyrl1721] } else { - yyv1540 = make([]Job, yyrl1540) + yyv1721 = make([]Job, yyrl1721) } } else { - yyv1540 = make([]Job, yyrl1540) + yyv1721 = make([]Job, yyrl1721) } - yyc1540 = true - yyrr1540 = len(yyv1540) - if yyrg1540 { - copy(yyv1540, yyv21540) + yyc1721 = true + yyrr1721 = len(yyv1721) + if yyrg1721 { + copy(yyv1721, yyv21721) } - } else if yyl1540 != len(yyv1540) { - yyv1540 = yyv1540[:yyl1540] - yyc1540 = true + } else if yyl1721 != len(yyv1721) { + yyv1721 = yyv1721[:yyl1721] + yyc1721 = true } - yyj1540 := 0 - for ; yyj1540 < yyrr1540; yyj1540++ { - yyh1540.ElemContainerState(yyj1540) + yyj1721 := 0 + for ; yyj1721 < yyrr1721; yyj1721++ { + yyh1721.ElemContainerState(yyj1721) if r.TryDecodeAsNil() { - yyv1540[yyj1540] = Job{} + yyv1721[yyj1721] = Job{} } else { - yyv1541 := &yyv1540[yyj1540] - yyv1541.CodecDecodeSelf(d) + yyv1722 := &yyv1721[yyj1721] + yyv1722.CodecDecodeSelf(d) } } - if yyrt1540 { - for ; yyj1540 < yyl1540; yyj1540++ { - yyv1540 = append(yyv1540, Job{}) - yyh1540.ElemContainerState(yyj1540) + if yyrt1721 { + for ; yyj1721 < yyl1721; yyj1721++ { + yyv1721 = append(yyv1721, Job{}) + yyh1721.ElemContainerState(yyj1721) if r.TryDecodeAsNil() { - yyv1540[yyj1540] = Job{} + yyv1721[yyj1721] = Job{} } else { - yyv1542 := &yyv1540[yyj1540] - yyv1542.CodecDecodeSelf(d) + yyv1723 := &yyv1721[yyj1721] + yyv1723.CodecDecodeSelf(d) } } } } else { - yyj1540 := 0 - for ; !r.CheckBreak(); yyj1540++ { + yyj1721 := 0 + for ; !r.CheckBreak(); yyj1721++ { - if yyj1540 >= len(yyv1540) { - yyv1540 = append(yyv1540, Job{}) // var yyz1540 Job - yyc1540 = true + if yyj1721 >= len(yyv1721) { + yyv1721 = append(yyv1721, Job{}) // var yyz1721 Job + yyc1721 = true } - yyh1540.ElemContainerState(yyj1540) - if yyj1540 < len(yyv1540) { + yyh1721.ElemContainerState(yyj1721) + if yyj1721 < len(yyv1721) { if r.TryDecodeAsNil() { - yyv1540[yyj1540] = Job{} + yyv1721[yyj1721] = Job{} } else { - yyv1543 := &yyv1540[yyj1540] - yyv1543.CodecDecodeSelf(d) + yyv1724 := &yyv1721[yyj1721] + yyv1724.CodecDecodeSelf(d) } } else { @@ -18861,17 +21019,17 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { } } - if yyj1540 < len(yyv1540) { - yyv1540 = yyv1540[:yyj1540] - yyc1540 = true - } else if yyj1540 == 0 && yyv1540 == nil { - yyv1540 = []Job{} - yyc1540 = true + if yyj1721 < len(yyv1721) { + yyv1721 = yyv1721[:yyj1721] + yyc1721 = true + } else if yyj1721 == 0 && yyv1721 == nil { + yyv1721 = []Job{} + yyc1721 = true } } - yyh1540.End() - if yyc1540 { - *v = yyv1540 + yyh1721.End() + if yyc1721 { + *v = yyv1721 } } @@ -18880,10 +21038,10 @@ func (x codecSelfer1234) encSliceJobCondition(v []JobCondition, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1544 := range v { + for _, yyv1725 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1545 := &yyv1544 - yy1545.CodecEncodeSelf(e) + yy1726 := &yyv1725 + yy1726.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18893,83 +21051,83 @@ func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1546 := *v - yyh1546, yyl1546 := z.DecSliceHelperStart() - var yyc1546 bool - if yyl1546 == 0 { - if yyv1546 == nil { - yyv1546 = []JobCondition{} - yyc1546 = true - } else if len(yyv1546) != 0 { - yyv1546 = yyv1546[:0] - yyc1546 = true + yyv1727 := *v + yyh1727, yyl1727 := z.DecSliceHelperStart() + var yyc1727 bool + if yyl1727 == 0 { + if yyv1727 == nil { + yyv1727 = []JobCondition{} + yyc1727 = true + } else if len(yyv1727) != 0 { + yyv1727 = yyv1727[:0] + yyc1727 = true } - } else if yyl1546 > 0 { - var yyrr1546, yyrl1546 int - var yyrt1546 bool - if yyl1546 > cap(yyv1546) { + } else if yyl1727 > 0 { + var yyrr1727, yyrl1727 int + var yyrt1727 bool + if yyl1727 > cap(yyv1727) { - yyrg1546 := len(yyv1546) > 0 - yyv21546 := yyv1546 - yyrl1546, yyrt1546 = z.DecInferLen(yyl1546, z.DecBasicHandle().MaxInitLen, 112) - if yyrt1546 { - if yyrl1546 <= cap(yyv1546) { - yyv1546 = yyv1546[:yyrl1546] + yyrg1727 := len(yyv1727) > 0 + yyv21727 := yyv1727 + yyrl1727, yyrt1727 = z.DecInferLen(yyl1727, z.DecBasicHandle().MaxInitLen, 112) + if yyrt1727 { + if yyrl1727 <= cap(yyv1727) { + yyv1727 = yyv1727[:yyrl1727] } else { - yyv1546 = make([]JobCondition, yyrl1546) + yyv1727 = make([]JobCondition, yyrl1727) } } else { - yyv1546 = make([]JobCondition, yyrl1546) + yyv1727 = make([]JobCondition, yyrl1727) } - yyc1546 = true - yyrr1546 = len(yyv1546) - if yyrg1546 { - copy(yyv1546, yyv21546) + yyc1727 = true + yyrr1727 = len(yyv1727) + if yyrg1727 { + copy(yyv1727, yyv21727) } - } else if yyl1546 != len(yyv1546) { - yyv1546 = yyv1546[:yyl1546] - yyc1546 = true + } else if yyl1727 != len(yyv1727) { + yyv1727 = yyv1727[:yyl1727] + yyc1727 = true } - yyj1546 := 0 - for ; yyj1546 < yyrr1546; yyj1546++ { - yyh1546.ElemContainerState(yyj1546) + yyj1727 := 0 + for ; yyj1727 < yyrr1727; yyj1727++ { + yyh1727.ElemContainerState(yyj1727) if r.TryDecodeAsNil() { - yyv1546[yyj1546] = JobCondition{} + yyv1727[yyj1727] = JobCondition{} } else { - yyv1547 := &yyv1546[yyj1546] - yyv1547.CodecDecodeSelf(d) + yyv1728 := &yyv1727[yyj1727] + yyv1728.CodecDecodeSelf(d) } } - if yyrt1546 { - for ; yyj1546 < yyl1546; yyj1546++ { - yyv1546 = append(yyv1546, JobCondition{}) - yyh1546.ElemContainerState(yyj1546) + if yyrt1727 { + for ; yyj1727 < yyl1727; yyj1727++ { + yyv1727 = append(yyv1727, JobCondition{}) + yyh1727.ElemContainerState(yyj1727) if r.TryDecodeAsNil() { - yyv1546[yyj1546] = JobCondition{} + yyv1727[yyj1727] = JobCondition{} } else { - yyv1548 := &yyv1546[yyj1546] - yyv1548.CodecDecodeSelf(d) + yyv1729 := &yyv1727[yyj1727] + yyv1729.CodecDecodeSelf(d) } } } } else { - yyj1546 := 0 - for ; !r.CheckBreak(); yyj1546++ { + yyj1727 := 0 + for ; !r.CheckBreak(); yyj1727++ { - if yyj1546 >= len(yyv1546) { - yyv1546 = append(yyv1546, JobCondition{}) // var yyz1546 JobCondition - yyc1546 = true + if yyj1727 >= len(yyv1727) { + yyv1727 = append(yyv1727, JobCondition{}) // var yyz1727 JobCondition + yyc1727 = true } - yyh1546.ElemContainerState(yyj1546) - if yyj1546 < len(yyv1546) { + yyh1727.ElemContainerState(yyj1727) + if yyj1727 < len(yyv1727) { if r.TryDecodeAsNil() { - yyv1546[yyj1546] = JobCondition{} + yyv1727[yyj1727] = JobCondition{} } else { - yyv1549 := &yyv1546[yyj1546] - yyv1549.CodecDecodeSelf(d) + yyv1730 := &yyv1727[yyj1727] + yyv1730.CodecDecodeSelf(d) } } else { @@ -18977,17 +21135,17 @@ func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.De } } - if yyj1546 < len(yyv1546) { - yyv1546 = yyv1546[:yyj1546] - yyc1546 = true - } else if yyj1546 == 0 && yyv1546 == nil { - yyv1546 = []JobCondition{} - yyc1546 = true + if yyj1727 < len(yyv1727) { + yyv1727 = yyv1727[:yyj1727] + yyc1727 = true + } else if yyj1727 == 0 && yyv1727 == nil { + yyv1727 = []JobCondition{} + yyc1727 = true } } - yyh1546.End() - if yyc1546 { - *v = yyv1546 + yyh1727.End() + if yyc1727 { + *v = yyv1727 } } @@ -18996,10 +21154,10 @@ func (x codecSelfer1234) encSliceIngress(v []Ingress, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1550 := range v { + for _, yyv1731 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1551 := &yyv1550 - yy1551.CodecEncodeSelf(e) + yy1732 := &yyv1731 + yy1732.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19009,83 +21167,83 @@ func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1552 := *v - yyh1552, yyl1552 := z.DecSliceHelperStart() - var yyc1552 bool - if yyl1552 == 0 { - if yyv1552 == nil { - yyv1552 = []Ingress{} - yyc1552 = true - } else if len(yyv1552) != 0 { - yyv1552 = yyv1552[:0] - yyc1552 = true + yyv1733 := *v + yyh1733, yyl1733 := z.DecSliceHelperStart() + var yyc1733 bool + if yyl1733 == 0 { + if yyv1733 == nil { + yyv1733 = []Ingress{} + yyc1733 = true + } else if len(yyv1733) != 0 { + yyv1733 = yyv1733[:0] + yyc1733 = true } - } else if yyl1552 > 0 { - var yyrr1552, yyrl1552 int - var yyrt1552 bool - if yyl1552 > cap(yyv1552) { + } else if yyl1733 > 0 { + var yyrr1733, yyrl1733 int + var yyrt1733 bool + if yyl1733 > cap(yyv1733) { - yyrg1552 := len(yyv1552) > 0 - yyv21552 := yyv1552 - yyrl1552, yyrt1552 = z.DecInferLen(yyl1552, z.DecBasicHandle().MaxInitLen, 248) - if yyrt1552 { - if yyrl1552 <= cap(yyv1552) { - yyv1552 = yyv1552[:yyrl1552] + yyrg1733 := len(yyv1733) > 0 + yyv21733 := yyv1733 + yyrl1733, yyrt1733 = z.DecInferLen(yyl1733, z.DecBasicHandle().MaxInitLen, 248) + if yyrt1733 { + if yyrl1733 <= cap(yyv1733) { + yyv1733 = yyv1733[:yyrl1733] } else { - yyv1552 = make([]Ingress, yyrl1552) + yyv1733 = make([]Ingress, yyrl1733) } } else { - yyv1552 = make([]Ingress, yyrl1552) + yyv1733 = make([]Ingress, yyrl1733) } - yyc1552 = true - yyrr1552 = len(yyv1552) - if yyrg1552 { - copy(yyv1552, yyv21552) + yyc1733 = true + yyrr1733 = len(yyv1733) + if yyrg1733 { + copy(yyv1733, yyv21733) } - } else if yyl1552 != len(yyv1552) { - yyv1552 = yyv1552[:yyl1552] - yyc1552 = true + } else if yyl1733 != len(yyv1733) { + yyv1733 = yyv1733[:yyl1733] + yyc1733 = true } - yyj1552 := 0 - for ; yyj1552 < yyrr1552; yyj1552++ { - yyh1552.ElemContainerState(yyj1552) + yyj1733 := 0 + for ; yyj1733 < yyrr1733; yyj1733++ { + yyh1733.ElemContainerState(yyj1733) if r.TryDecodeAsNil() { - yyv1552[yyj1552] = Ingress{} + yyv1733[yyj1733] = Ingress{} } else { - yyv1553 := &yyv1552[yyj1552] - yyv1553.CodecDecodeSelf(d) + yyv1734 := &yyv1733[yyj1733] + yyv1734.CodecDecodeSelf(d) } } - if yyrt1552 { - for ; yyj1552 < yyl1552; yyj1552++ { - yyv1552 = append(yyv1552, Ingress{}) - yyh1552.ElemContainerState(yyj1552) + if yyrt1733 { + for ; yyj1733 < yyl1733; yyj1733++ { + yyv1733 = append(yyv1733, Ingress{}) + yyh1733.ElemContainerState(yyj1733) if r.TryDecodeAsNil() { - yyv1552[yyj1552] = Ingress{} + yyv1733[yyj1733] = Ingress{} } else { - yyv1554 := &yyv1552[yyj1552] - yyv1554.CodecDecodeSelf(d) + yyv1735 := &yyv1733[yyj1733] + yyv1735.CodecDecodeSelf(d) } } } } else { - yyj1552 := 0 - for ; !r.CheckBreak(); yyj1552++ { + yyj1733 := 0 + for ; !r.CheckBreak(); yyj1733++ { - if yyj1552 >= len(yyv1552) { - yyv1552 = append(yyv1552, Ingress{}) // var yyz1552 Ingress - yyc1552 = true + if yyj1733 >= len(yyv1733) { + yyv1733 = append(yyv1733, Ingress{}) // var yyz1733 Ingress + yyc1733 = true } - yyh1552.ElemContainerState(yyj1552) - if yyj1552 < len(yyv1552) { + yyh1733.ElemContainerState(yyj1733) + if yyj1733 < len(yyv1733) { if r.TryDecodeAsNil() { - yyv1552[yyj1552] = Ingress{} + yyv1733[yyj1733] = Ingress{} } else { - yyv1555 := &yyv1552[yyj1552] - yyv1555.CodecDecodeSelf(d) + yyv1736 := &yyv1733[yyj1733] + yyv1736.CodecDecodeSelf(d) } } else { @@ -19093,17 +21251,17 @@ func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) { } } - if yyj1552 < len(yyv1552) { - yyv1552 = yyv1552[:yyj1552] - yyc1552 = true - } else if yyj1552 == 0 && yyv1552 == nil { - yyv1552 = []Ingress{} - yyc1552 = true + if yyj1733 < len(yyv1733) { + yyv1733 = yyv1733[:yyj1733] + yyc1733 = true + } else if yyj1733 == 0 && yyv1733 == nil { + yyv1733 = []Ingress{} + yyc1733 = true } } - yyh1552.End() - if yyc1552 { - *v = yyv1552 + yyh1733.End() + if yyc1733 { + *v = yyv1733 } } @@ -19112,10 +21270,10 @@ func (x codecSelfer1234) encSliceIngressRule(v []IngressRule, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1556 := range v { + for _, yyv1737 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1557 := &yyv1556 - yy1557.CodecEncodeSelf(e) + yy1738 := &yyv1737 + yy1738.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19125,83 +21283,83 @@ func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1558 := *v - yyh1558, yyl1558 := z.DecSliceHelperStart() - var yyc1558 bool - if yyl1558 == 0 { - if yyv1558 == nil { - yyv1558 = []IngressRule{} - yyc1558 = true - } else if len(yyv1558) != 0 { - yyv1558 = yyv1558[:0] - yyc1558 = true + yyv1739 := *v + yyh1739, yyl1739 := z.DecSliceHelperStart() + var yyc1739 bool + if yyl1739 == 0 { + if yyv1739 == nil { + yyv1739 = []IngressRule{} + yyc1739 = true + } else if len(yyv1739) != 0 { + yyv1739 = yyv1739[:0] + yyc1739 = true } - } else if yyl1558 > 0 { - var yyrr1558, yyrl1558 int - var yyrt1558 bool - if yyl1558 > cap(yyv1558) { + } else if yyl1739 > 0 { + var yyrr1739, yyrl1739 int + var yyrt1739 bool + if yyl1739 > cap(yyv1739) { - yyrg1558 := len(yyv1558) > 0 - yyv21558 := yyv1558 - yyrl1558, yyrt1558 = z.DecInferLen(yyl1558, z.DecBasicHandle().MaxInitLen, 24) - if yyrt1558 { - if yyrl1558 <= cap(yyv1558) { - yyv1558 = yyv1558[:yyrl1558] + yyrg1739 := len(yyv1739) > 0 + yyv21739 := yyv1739 + yyrl1739, yyrt1739 = z.DecInferLen(yyl1739, z.DecBasicHandle().MaxInitLen, 24) + if yyrt1739 { + if yyrl1739 <= cap(yyv1739) { + yyv1739 = yyv1739[:yyrl1739] } else { - yyv1558 = make([]IngressRule, yyrl1558) + yyv1739 = make([]IngressRule, yyrl1739) } } else { - yyv1558 = make([]IngressRule, yyrl1558) + yyv1739 = make([]IngressRule, yyrl1739) } - yyc1558 = true - yyrr1558 = len(yyv1558) - if yyrg1558 { - copy(yyv1558, yyv21558) + yyc1739 = true + yyrr1739 = len(yyv1739) + if yyrg1739 { + copy(yyv1739, yyv21739) } - } else if yyl1558 != len(yyv1558) { - yyv1558 = yyv1558[:yyl1558] - yyc1558 = true + } else if yyl1739 != len(yyv1739) { + yyv1739 = yyv1739[:yyl1739] + yyc1739 = true } - yyj1558 := 0 - for ; yyj1558 < yyrr1558; yyj1558++ { - yyh1558.ElemContainerState(yyj1558) + yyj1739 := 0 + for ; yyj1739 < yyrr1739; yyj1739++ { + yyh1739.ElemContainerState(yyj1739) if r.TryDecodeAsNil() { - yyv1558[yyj1558] = IngressRule{} + yyv1739[yyj1739] = IngressRule{} } else { - yyv1559 := &yyv1558[yyj1558] - yyv1559.CodecDecodeSelf(d) + yyv1740 := &yyv1739[yyj1739] + yyv1740.CodecDecodeSelf(d) } } - if yyrt1558 { - for ; yyj1558 < yyl1558; yyj1558++ { - yyv1558 = append(yyv1558, IngressRule{}) - yyh1558.ElemContainerState(yyj1558) + if yyrt1739 { + for ; yyj1739 < yyl1739; yyj1739++ { + yyv1739 = append(yyv1739, IngressRule{}) + yyh1739.ElemContainerState(yyj1739) if r.TryDecodeAsNil() { - yyv1558[yyj1558] = IngressRule{} + yyv1739[yyj1739] = IngressRule{} } else { - yyv1560 := &yyv1558[yyj1558] - yyv1560.CodecDecodeSelf(d) + yyv1741 := &yyv1739[yyj1739] + yyv1741.CodecDecodeSelf(d) } } } } else { - yyj1558 := 0 - for ; !r.CheckBreak(); yyj1558++ { + yyj1739 := 0 + for ; !r.CheckBreak(); yyj1739++ { - if yyj1558 >= len(yyv1558) { - yyv1558 = append(yyv1558, IngressRule{}) // var yyz1558 IngressRule - yyc1558 = true + if yyj1739 >= len(yyv1739) { + yyv1739 = append(yyv1739, IngressRule{}) // var yyz1739 IngressRule + yyc1739 = true } - yyh1558.ElemContainerState(yyj1558) - if yyj1558 < len(yyv1558) { + yyh1739.ElemContainerState(yyj1739) + if yyj1739 < len(yyv1739) { if r.TryDecodeAsNil() { - yyv1558[yyj1558] = IngressRule{} + yyv1739[yyj1739] = IngressRule{} } else { - yyv1561 := &yyv1558[yyj1558] - yyv1561.CodecDecodeSelf(d) + yyv1742 := &yyv1739[yyj1739] + yyv1742.CodecDecodeSelf(d) } } else { @@ -19209,17 +21367,17 @@ func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Deco } } - if yyj1558 < len(yyv1558) { - yyv1558 = yyv1558[:yyj1558] - yyc1558 = true - } else if yyj1558 == 0 && yyv1558 == nil { - yyv1558 = []IngressRule{} - yyc1558 = true + if yyj1739 < len(yyv1739) { + yyv1739 = yyv1739[:yyj1739] + yyc1739 = true + } else if yyj1739 == 0 && yyv1739 == nil { + yyv1739 = []IngressRule{} + yyc1739 = true } } - yyh1558.End() - if yyc1558 { - *v = yyv1558 + yyh1739.End() + if yyc1739 { + *v = yyv1739 } } @@ -19228,10 +21386,10 @@ func (x codecSelfer1234) encSliceHTTPIngressPath(v []HTTPIngressPath, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1562 := range v { + for _, yyv1743 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1563 := &yyv1562 - yy1563.CodecEncodeSelf(e) + yy1744 := &yyv1743 + yy1744.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19241,83 +21399,83 @@ func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1564 := *v - yyh1564, yyl1564 := z.DecSliceHelperStart() - var yyc1564 bool - if yyl1564 == 0 { - if yyv1564 == nil { - yyv1564 = []HTTPIngressPath{} - yyc1564 = true - } else if len(yyv1564) != 0 { - yyv1564 = yyv1564[:0] - yyc1564 = true + yyv1745 := *v + yyh1745, yyl1745 := z.DecSliceHelperStart() + var yyc1745 bool + if yyl1745 == 0 { + if yyv1745 == nil { + yyv1745 = []HTTPIngressPath{} + yyc1745 = true + } else if len(yyv1745) != 0 { + yyv1745 = yyv1745[:0] + yyc1745 = true } - } else if yyl1564 > 0 { - var yyrr1564, yyrl1564 int - var yyrt1564 bool - if yyl1564 > cap(yyv1564) { + } else if yyl1745 > 0 { + var yyrr1745, yyrl1745 int + var yyrt1745 bool + if yyl1745 > cap(yyv1745) { - yyrg1564 := len(yyv1564) > 0 - yyv21564 := yyv1564 - yyrl1564, yyrt1564 = z.DecInferLen(yyl1564, z.DecBasicHandle().MaxInitLen, 64) - if yyrt1564 { - if yyrl1564 <= cap(yyv1564) { - yyv1564 = yyv1564[:yyrl1564] + yyrg1745 := len(yyv1745) > 0 + yyv21745 := yyv1745 + yyrl1745, yyrt1745 = z.DecInferLen(yyl1745, z.DecBasicHandle().MaxInitLen, 64) + if yyrt1745 { + if yyrl1745 <= cap(yyv1745) { + yyv1745 = yyv1745[:yyrl1745] } else { - yyv1564 = make([]HTTPIngressPath, yyrl1564) + yyv1745 = make([]HTTPIngressPath, yyrl1745) } } else { - yyv1564 = make([]HTTPIngressPath, yyrl1564) + yyv1745 = make([]HTTPIngressPath, yyrl1745) } - yyc1564 = true - yyrr1564 = len(yyv1564) - if yyrg1564 { - copy(yyv1564, yyv21564) + yyc1745 = true + yyrr1745 = len(yyv1745) + if yyrg1745 { + copy(yyv1745, yyv21745) } - } else if yyl1564 != len(yyv1564) { - yyv1564 = yyv1564[:yyl1564] - yyc1564 = true + } else if yyl1745 != len(yyv1745) { + yyv1745 = yyv1745[:yyl1745] + yyc1745 = true } - yyj1564 := 0 - for ; yyj1564 < yyrr1564; yyj1564++ { - yyh1564.ElemContainerState(yyj1564) + yyj1745 := 0 + for ; yyj1745 < yyrr1745; yyj1745++ { + yyh1745.ElemContainerState(yyj1745) if r.TryDecodeAsNil() { - yyv1564[yyj1564] = HTTPIngressPath{} + yyv1745[yyj1745] = HTTPIngressPath{} } else { - yyv1565 := &yyv1564[yyj1564] - yyv1565.CodecDecodeSelf(d) + yyv1746 := &yyv1745[yyj1745] + yyv1746.CodecDecodeSelf(d) } } - if yyrt1564 { - for ; yyj1564 < yyl1564; yyj1564++ { - yyv1564 = append(yyv1564, HTTPIngressPath{}) - yyh1564.ElemContainerState(yyj1564) + if yyrt1745 { + for ; yyj1745 < yyl1745; yyj1745++ { + yyv1745 = append(yyv1745, HTTPIngressPath{}) + yyh1745.ElemContainerState(yyj1745) if r.TryDecodeAsNil() { - yyv1564[yyj1564] = HTTPIngressPath{} + yyv1745[yyj1745] = HTTPIngressPath{} } else { - yyv1566 := &yyv1564[yyj1564] - yyv1566.CodecDecodeSelf(d) + yyv1747 := &yyv1745[yyj1745] + yyv1747.CodecDecodeSelf(d) } } } } else { - yyj1564 := 0 - for ; !r.CheckBreak(); yyj1564++ { + yyj1745 := 0 + for ; !r.CheckBreak(); yyj1745++ { - if yyj1564 >= len(yyv1564) { - yyv1564 = append(yyv1564, HTTPIngressPath{}) // var yyz1564 HTTPIngressPath - yyc1564 = true + if yyj1745 >= len(yyv1745) { + yyv1745 = append(yyv1745, HTTPIngressPath{}) // var yyz1745 HTTPIngressPath + yyc1745 = true } - yyh1564.ElemContainerState(yyj1564) - if yyj1564 < len(yyv1564) { + yyh1745.ElemContainerState(yyj1745) + if yyj1745 < len(yyv1745) { if r.TryDecodeAsNil() { - yyv1564[yyj1564] = HTTPIngressPath{} + yyv1745[yyj1745] = HTTPIngressPath{} } else { - yyv1567 := &yyv1564[yyj1564] - yyv1567.CodecDecodeSelf(d) + yyv1748 := &yyv1745[yyj1745] + yyv1748.CodecDecodeSelf(d) } } else { @@ -19325,17 +21483,17 @@ func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1 } } - if yyj1564 < len(yyv1564) { - yyv1564 = yyv1564[:yyj1564] - yyc1564 = true - } else if yyj1564 == 0 && yyv1564 == nil { - yyv1564 = []HTTPIngressPath{} - yyc1564 = true + if yyj1745 < len(yyv1745) { + yyv1745 = yyv1745[:yyj1745] + yyc1745 = true + } else if yyj1745 == 0 && yyv1745 == nil { + yyv1745 = []HTTPIngressPath{} + yyc1745 = true } } - yyh1564.End() - if yyc1564 { - *v = yyv1564 + yyh1745.End() + if yyc1745 { + *v = yyv1745 } } @@ -19344,10 +21502,10 @@ func (x codecSelfer1234) encSliceNodeUtilization(v []NodeUtilization, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1568 := range v { + for _, yyv1749 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1569 := &yyv1568 - yy1569.CodecEncodeSelf(e) + yy1750 := &yyv1749 + yy1750.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19357,83 +21515,83 @@ func (x codecSelfer1234) decSliceNodeUtilization(v *[]NodeUtilization, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1570 := *v - yyh1570, yyl1570 := z.DecSliceHelperStart() - var yyc1570 bool - if yyl1570 == 0 { - if yyv1570 == nil { - yyv1570 = []NodeUtilization{} - yyc1570 = true - } else if len(yyv1570) != 0 { - yyv1570 = yyv1570[:0] - yyc1570 = true + yyv1751 := *v + yyh1751, yyl1751 := z.DecSliceHelperStart() + var yyc1751 bool + if yyl1751 == 0 { + if yyv1751 == nil { + yyv1751 = []NodeUtilization{} + yyc1751 = true + } else if len(yyv1751) != 0 { + yyv1751 = yyv1751[:0] + yyc1751 = true } - } else if yyl1570 > 0 { - var yyrr1570, yyrl1570 int - var yyrt1570 bool - if yyl1570 > cap(yyv1570) { + } else if yyl1751 > 0 { + var yyrr1751, yyrl1751 int + var yyrt1751 bool + if yyl1751 > cap(yyv1751) { - yyrg1570 := len(yyv1570) > 0 - yyv21570 := yyv1570 - yyrl1570, yyrt1570 = z.DecInferLen(yyl1570, z.DecBasicHandle().MaxInitLen, 24) - if yyrt1570 { - if yyrl1570 <= cap(yyv1570) { - yyv1570 = yyv1570[:yyrl1570] + yyrg1751 := len(yyv1751) > 0 + yyv21751 := yyv1751 + yyrl1751, yyrt1751 = z.DecInferLen(yyl1751, z.DecBasicHandle().MaxInitLen, 24) + if yyrt1751 { + if yyrl1751 <= cap(yyv1751) { + yyv1751 = yyv1751[:yyrl1751] } else { - yyv1570 = make([]NodeUtilization, yyrl1570) + yyv1751 = make([]NodeUtilization, yyrl1751) } } else { - yyv1570 = make([]NodeUtilization, yyrl1570) + yyv1751 = make([]NodeUtilization, yyrl1751) } - yyc1570 = true - yyrr1570 = len(yyv1570) - if yyrg1570 { - copy(yyv1570, yyv21570) + yyc1751 = true + yyrr1751 = len(yyv1751) + if yyrg1751 { + copy(yyv1751, yyv21751) } - } else if yyl1570 != len(yyv1570) { - yyv1570 = yyv1570[:yyl1570] - yyc1570 = true + } else if yyl1751 != len(yyv1751) { + yyv1751 = yyv1751[:yyl1751] + yyc1751 = true } - yyj1570 := 0 - for ; yyj1570 < yyrr1570; yyj1570++ { - yyh1570.ElemContainerState(yyj1570) + yyj1751 := 0 + for ; yyj1751 < yyrr1751; yyj1751++ { + yyh1751.ElemContainerState(yyj1751) if r.TryDecodeAsNil() { - yyv1570[yyj1570] = NodeUtilization{} + yyv1751[yyj1751] = NodeUtilization{} } else { - yyv1571 := &yyv1570[yyj1570] - yyv1571.CodecDecodeSelf(d) + yyv1752 := &yyv1751[yyj1751] + yyv1752.CodecDecodeSelf(d) } } - if yyrt1570 { - for ; yyj1570 < yyl1570; yyj1570++ { - yyv1570 = append(yyv1570, NodeUtilization{}) - yyh1570.ElemContainerState(yyj1570) + if yyrt1751 { + for ; yyj1751 < yyl1751; yyj1751++ { + yyv1751 = append(yyv1751, NodeUtilization{}) + yyh1751.ElemContainerState(yyj1751) if r.TryDecodeAsNil() { - yyv1570[yyj1570] = NodeUtilization{} + yyv1751[yyj1751] = NodeUtilization{} } else { - yyv1572 := &yyv1570[yyj1570] - yyv1572.CodecDecodeSelf(d) + yyv1753 := &yyv1751[yyj1751] + yyv1753.CodecDecodeSelf(d) } } } } else { - yyj1570 := 0 - for ; !r.CheckBreak(); yyj1570++ { + yyj1751 := 0 + for ; !r.CheckBreak(); yyj1751++ { - if yyj1570 >= len(yyv1570) { - yyv1570 = append(yyv1570, NodeUtilization{}) // var yyz1570 NodeUtilization - yyc1570 = true + if yyj1751 >= len(yyv1751) { + yyv1751 = append(yyv1751, NodeUtilization{}) // var yyz1751 NodeUtilization + yyc1751 = true } - yyh1570.ElemContainerState(yyj1570) - if yyj1570 < len(yyv1570) { + yyh1751.ElemContainerState(yyj1751) + if yyj1751 < len(yyv1751) { if r.TryDecodeAsNil() { - yyv1570[yyj1570] = NodeUtilization{} + yyv1751[yyj1751] = NodeUtilization{} } else { - yyv1573 := &yyv1570[yyj1570] - yyv1573.CodecDecodeSelf(d) + yyv1754 := &yyv1751[yyj1751] + yyv1754.CodecDecodeSelf(d) } } else { @@ -19441,17 +21599,17 @@ func (x codecSelfer1234) decSliceNodeUtilization(v *[]NodeUtilization, d *codec1 } } - if yyj1570 < len(yyv1570) { - yyv1570 = yyv1570[:yyj1570] - yyc1570 = true - } else if yyj1570 == 0 && yyv1570 == nil { - yyv1570 = []NodeUtilization{} - yyc1570 = true + if yyj1751 < len(yyv1751) { + yyv1751 = yyv1751[:yyj1751] + yyc1751 = true + } else if yyj1751 == 0 && yyv1751 == nil { + yyv1751 = []NodeUtilization{} + yyc1751 = true } } - yyh1570.End() - if yyc1570 { - *v = yyv1570 + yyh1751.End() + if yyc1751 { + *v = yyv1751 } } @@ -19460,10 +21618,10 @@ func (x codecSelfer1234) encSliceClusterAutoscaler(v []ClusterAutoscaler, e *cod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1574 := range v { + for _, yyv1755 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1575 := &yyv1574 - yy1575.CodecEncodeSelf(e) + yy1756 := &yyv1755 + yy1756.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19473,83 +21631,83 @@ func (x codecSelfer1234) decSliceClusterAutoscaler(v *[]ClusterAutoscaler, d *co z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1576 := *v - yyh1576, yyl1576 := z.DecSliceHelperStart() - var yyc1576 bool - if yyl1576 == 0 { - if yyv1576 == nil { - yyv1576 = []ClusterAutoscaler{} - yyc1576 = true - } else if len(yyv1576) != 0 { - yyv1576 = yyv1576[:0] - yyc1576 = true + yyv1757 := *v + yyh1757, yyl1757 := z.DecSliceHelperStart() + var yyc1757 bool + if yyl1757 == 0 { + if yyv1757 == nil { + yyv1757 = []ClusterAutoscaler{} + yyc1757 = true + } else if len(yyv1757) != 0 { + yyv1757 = yyv1757[:0] + yyc1757 = true } - } else if yyl1576 > 0 { - var yyrr1576, yyrl1576 int - var yyrt1576 bool - if yyl1576 > cap(yyv1576) { + } else if yyl1757 > 0 { + var yyrr1757, yyrl1757 int + var yyrt1757 bool + if yyl1757 > cap(yyv1757) { - yyrg1576 := len(yyv1576) > 0 - yyv21576 := yyv1576 - yyrl1576, yyrt1576 = z.DecInferLen(yyl1576, z.DecBasicHandle().MaxInitLen, 224) - if yyrt1576 { - if yyrl1576 <= cap(yyv1576) { - yyv1576 = yyv1576[:yyrl1576] + yyrg1757 := len(yyv1757) > 0 + yyv21757 := yyv1757 + yyrl1757, yyrt1757 = z.DecInferLen(yyl1757, z.DecBasicHandle().MaxInitLen, 224) + if yyrt1757 { + if yyrl1757 <= cap(yyv1757) { + yyv1757 = yyv1757[:yyrl1757] } else { - yyv1576 = make([]ClusterAutoscaler, yyrl1576) + yyv1757 = make([]ClusterAutoscaler, yyrl1757) } } else { - yyv1576 = make([]ClusterAutoscaler, yyrl1576) + yyv1757 = make([]ClusterAutoscaler, yyrl1757) } - yyc1576 = true - yyrr1576 = len(yyv1576) - if yyrg1576 { - copy(yyv1576, yyv21576) + yyc1757 = true + yyrr1757 = len(yyv1757) + if yyrg1757 { + copy(yyv1757, yyv21757) } - } else if yyl1576 != len(yyv1576) { - yyv1576 = yyv1576[:yyl1576] - yyc1576 = true + } else if yyl1757 != len(yyv1757) { + yyv1757 = yyv1757[:yyl1757] + yyc1757 = true } - yyj1576 := 0 - for ; yyj1576 < yyrr1576; yyj1576++ { - yyh1576.ElemContainerState(yyj1576) + yyj1757 := 0 + for ; yyj1757 < yyrr1757; yyj1757++ { + yyh1757.ElemContainerState(yyj1757) if r.TryDecodeAsNil() { - yyv1576[yyj1576] = ClusterAutoscaler{} + yyv1757[yyj1757] = ClusterAutoscaler{} } else { - yyv1577 := &yyv1576[yyj1576] - yyv1577.CodecDecodeSelf(d) + yyv1758 := &yyv1757[yyj1757] + yyv1758.CodecDecodeSelf(d) } } - if yyrt1576 { - for ; yyj1576 < yyl1576; yyj1576++ { - yyv1576 = append(yyv1576, ClusterAutoscaler{}) - yyh1576.ElemContainerState(yyj1576) + if yyrt1757 { + for ; yyj1757 < yyl1757; yyj1757++ { + yyv1757 = append(yyv1757, ClusterAutoscaler{}) + yyh1757.ElemContainerState(yyj1757) if r.TryDecodeAsNil() { - yyv1576[yyj1576] = ClusterAutoscaler{} + yyv1757[yyj1757] = ClusterAutoscaler{} } else { - yyv1578 := &yyv1576[yyj1576] - yyv1578.CodecDecodeSelf(d) + yyv1759 := &yyv1757[yyj1757] + yyv1759.CodecDecodeSelf(d) } } } } else { - yyj1576 := 0 - for ; !r.CheckBreak(); yyj1576++ { + yyj1757 := 0 + for ; !r.CheckBreak(); yyj1757++ { - if yyj1576 >= len(yyv1576) { - yyv1576 = append(yyv1576, ClusterAutoscaler{}) // var yyz1576 ClusterAutoscaler - yyc1576 = true + if yyj1757 >= len(yyv1757) { + yyv1757 = append(yyv1757, ClusterAutoscaler{}) // var yyz1757 ClusterAutoscaler + yyc1757 = true } - yyh1576.ElemContainerState(yyj1576) - if yyj1576 < len(yyv1576) { + yyh1757.ElemContainerState(yyj1757) + if yyj1757 < len(yyv1757) { if r.TryDecodeAsNil() { - yyv1576[yyj1576] = ClusterAutoscaler{} + yyv1757[yyj1757] = ClusterAutoscaler{} } else { - yyv1579 := &yyv1576[yyj1576] - yyv1579.CodecDecodeSelf(d) + yyv1760 := &yyv1757[yyj1757] + yyv1760.CodecDecodeSelf(d) } } else { @@ -19557,17 +21715,17 @@ func (x codecSelfer1234) decSliceClusterAutoscaler(v *[]ClusterAutoscaler, d *co } } - if yyj1576 < len(yyv1576) { - yyv1576 = yyv1576[:yyj1576] - yyc1576 = true - } else if yyj1576 == 0 && yyv1576 == nil { - yyv1576 = []ClusterAutoscaler{} - yyc1576 = true + if yyj1757 < len(yyv1757) { + yyv1757 = yyv1757[:yyj1757] + yyc1757 = true + } else if yyj1757 == 0 && yyv1757 == nil { + yyv1757 = []ClusterAutoscaler{} + yyc1757 = true } } - yyh1576.End() - if yyc1576 { - *v = yyv1576 + yyh1757.End() + if yyc1757 { + *v = yyv1757 } } @@ -19576,10 +21734,10 @@ func (x codecSelfer1234) encSliceLabelSelectorRequirement(v []LabelSelectorRequi z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1580 := range v { + for _, yyv1761 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1581 := &yyv1580 - yy1581.CodecEncodeSelf(e) + yy1762 := &yyv1761 + yy1762.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19589,83 +21747,83 @@ func (x codecSelfer1234) decSliceLabelSelectorRequirement(v *[]LabelSelectorRequ z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1582 := *v - yyh1582, yyl1582 := z.DecSliceHelperStart() - var yyc1582 bool - if yyl1582 == 0 { - if yyv1582 == nil { - yyv1582 = []LabelSelectorRequirement{} - yyc1582 = true - } else if len(yyv1582) != 0 { - yyv1582 = yyv1582[:0] - yyc1582 = true + yyv1763 := *v + yyh1763, yyl1763 := z.DecSliceHelperStart() + var yyc1763 bool + if yyl1763 == 0 { + if yyv1763 == nil { + yyv1763 = []LabelSelectorRequirement{} + yyc1763 = true + } else if len(yyv1763) != 0 { + yyv1763 = yyv1763[:0] + yyc1763 = true } - } else if yyl1582 > 0 { - var yyrr1582, yyrl1582 int - var yyrt1582 bool - if yyl1582 > cap(yyv1582) { + } else if yyl1763 > 0 { + var yyrr1763, yyrl1763 int + var yyrt1763 bool + if yyl1763 > cap(yyv1763) { - yyrg1582 := len(yyv1582) > 0 - yyv21582 := yyv1582 - yyrl1582, yyrt1582 = z.DecInferLen(yyl1582, z.DecBasicHandle().MaxInitLen, 56) - if yyrt1582 { - if yyrl1582 <= cap(yyv1582) { - yyv1582 = yyv1582[:yyrl1582] + yyrg1763 := len(yyv1763) > 0 + yyv21763 := yyv1763 + yyrl1763, yyrt1763 = z.DecInferLen(yyl1763, z.DecBasicHandle().MaxInitLen, 56) + if yyrt1763 { + if yyrl1763 <= cap(yyv1763) { + yyv1763 = yyv1763[:yyrl1763] } else { - yyv1582 = make([]LabelSelectorRequirement, yyrl1582) + yyv1763 = make([]LabelSelectorRequirement, yyrl1763) } } else { - yyv1582 = make([]LabelSelectorRequirement, yyrl1582) + yyv1763 = make([]LabelSelectorRequirement, yyrl1763) } - yyc1582 = true - yyrr1582 = len(yyv1582) - if yyrg1582 { - copy(yyv1582, yyv21582) + yyc1763 = true + yyrr1763 = len(yyv1763) + if yyrg1763 { + copy(yyv1763, yyv21763) } - } else if yyl1582 != len(yyv1582) { - yyv1582 = yyv1582[:yyl1582] - yyc1582 = true + } else if yyl1763 != len(yyv1763) { + yyv1763 = yyv1763[:yyl1763] + yyc1763 = true } - yyj1582 := 0 - for ; yyj1582 < yyrr1582; yyj1582++ { - yyh1582.ElemContainerState(yyj1582) + yyj1763 := 0 + for ; yyj1763 < yyrr1763; yyj1763++ { + yyh1763.ElemContainerState(yyj1763) if r.TryDecodeAsNil() { - yyv1582[yyj1582] = LabelSelectorRequirement{} + yyv1763[yyj1763] = LabelSelectorRequirement{} } else { - yyv1583 := &yyv1582[yyj1582] - yyv1583.CodecDecodeSelf(d) + yyv1764 := &yyv1763[yyj1763] + yyv1764.CodecDecodeSelf(d) } } - if yyrt1582 { - for ; yyj1582 < yyl1582; yyj1582++ { - yyv1582 = append(yyv1582, LabelSelectorRequirement{}) - yyh1582.ElemContainerState(yyj1582) + if yyrt1763 { + for ; yyj1763 < yyl1763; yyj1763++ { + yyv1763 = append(yyv1763, LabelSelectorRequirement{}) + yyh1763.ElemContainerState(yyj1763) if r.TryDecodeAsNil() { - yyv1582[yyj1582] = LabelSelectorRequirement{} + yyv1763[yyj1763] = LabelSelectorRequirement{} } else { - yyv1584 := &yyv1582[yyj1582] - yyv1584.CodecDecodeSelf(d) + yyv1765 := &yyv1763[yyj1763] + yyv1765.CodecDecodeSelf(d) } } } } else { - yyj1582 := 0 - for ; !r.CheckBreak(); yyj1582++ { + yyj1763 := 0 + for ; !r.CheckBreak(); yyj1763++ { - if yyj1582 >= len(yyv1582) { - yyv1582 = append(yyv1582, LabelSelectorRequirement{}) // var yyz1582 LabelSelectorRequirement - yyc1582 = true + if yyj1763 >= len(yyv1763) { + yyv1763 = append(yyv1763, LabelSelectorRequirement{}) // var yyz1763 LabelSelectorRequirement + yyc1763 = true } - yyh1582.ElemContainerState(yyj1582) - if yyj1582 < len(yyv1582) { + yyh1763.ElemContainerState(yyj1763) + if yyj1763 < len(yyv1763) { if r.TryDecodeAsNil() { - yyv1582[yyj1582] = LabelSelectorRequirement{} + yyv1763[yyj1763] = LabelSelectorRequirement{} } else { - yyv1585 := &yyv1582[yyj1582] - yyv1585.CodecDecodeSelf(d) + yyv1766 := &yyv1763[yyj1763] + yyv1766.CodecDecodeSelf(d) } } else { @@ -19673,17 +21831,17 @@ func (x codecSelfer1234) decSliceLabelSelectorRequirement(v *[]LabelSelectorRequ } } - if yyj1582 < len(yyv1582) { - yyv1582 = yyv1582[:yyj1582] - yyc1582 = true - } else if yyj1582 == 0 && yyv1582 == nil { - yyv1582 = []LabelSelectorRequirement{} - yyc1582 = true + if yyj1763 < len(yyv1763) { + yyv1763 = yyv1763[:yyj1763] + yyc1763 = true + } else if yyj1763 == 0 && yyv1763 == nil { + yyv1763 = []LabelSelectorRequirement{} + yyc1763 = true } } - yyh1582.End() - if yyc1582 { - *v = yyv1582 + yyh1763.End() + if yyc1763 { + *v = yyv1763 } } @@ -19692,10 +21850,10 @@ func (x codecSelfer1234) encSliceReplicaSet(v []ReplicaSet, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1586 := range v { + for _, yyv1767 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1587 := &yyv1586 - yy1587.CodecEncodeSelf(e) + yy1768 := &yyv1767 + yy1768.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19705,83 +21863,83 @@ func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1588 := *v - yyh1588, yyl1588 := z.DecSliceHelperStart() - var yyc1588 bool - if yyl1588 == 0 { - if yyv1588 == nil { - yyv1588 = []ReplicaSet{} - yyc1588 = true - } else if len(yyv1588) != 0 { - yyv1588 = yyv1588[:0] - yyc1588 = true + yyv1769 := *v + yyh1769, yyl1769 := z.DecSliceHelperStart() + var yyc1769 bool + if yyl1769 == 0 { + if yyv1769 == nil { + yyv1769 = []ReplicaSet{} + yyc1769 = true + } else if len(yyv1769) != 0 { + yyv1769 = yyv1769[:0] + yyc1769 = true } - } else if yyl1588 > 0 { - var yyrr1588, yyrl1588 int - var yyrt1588 bool - if yyl1588 > cap(yyv1588) { + } else if yyl1769 > 0 { + var yyrr1769, yyrl1769 int + var yyrt1769 bool + if yyl1769 > cap(yyv1769) { - yyrg1588 := len(yyv1588) > 0 - yyv21588 := yyv1588 - yyrl1588, yyrt1588 = z.DecInferLen(yyl1588, z.DecBasicHandle().MaxInitLen, 232) - if yyrt1588 { - if yyrl1588 <= cap(yyv1588) { - yyv1588 = yyv1588[:yyrl1588] + yyrg1769 := len(yyv1769) > 0 + yyv21769 := yyv1769 + yyrl1769, yyrt1769 = z.DecInferLen(yyl1769, z.DecBasicHandle().MaxInitLen, 232) + if yyrt1769 { + if yyrl1769 <= cap(yyv1769) { + yyv1769 = yyv1769[:yyrl1769] } else { - yyv1588 = make([]ReplicaSet, yyrl1588) + yyv1769 = make([]ReplicaSet, yyrl1769) } } else { - yyv1588 = make([]ReplicaSet, yyrl1588) + yyv1769 = make([]ReplicaSet, yyrl1769) } - yyc1588 = true - yyrr1588 = len(yyv1588) - if yyrg1588 { - copy(yyv1588, yyv21588) + yyc1769 = true + yyrr1769 = len(yyv1769) + if yyrg1769 { + copy(yyv1769, yyv21769) } - } else if yyl1588 != len(yyv1588) { - yyv1588 = yyv1588[:yyl1588] - yyc1588 = true + } else if yyl1769 != len(yyv1769) { + yyv1769 = yyv1769[:yyl1769] + yyc1769 = true } - yyj1588 := 0 - for ; yyj1588 < yyrr1588; yyj1588++ { - yyh1588.ElemContainerState(yyj1588) + yyj1769 := 0 + for ; yyj1769 < yyrr1769; yyj1769++ { + yyh1769.ElemContainerState(yyj1769) if r.TryDecodeAsNil() { - yyv1588[yyj1588] = ReplicaSet{} + yyv1769[yyj1769] = ReplicaSet{} } else { - yyv1589 := &yyv1588[yyj1588] - yyv1589.CodecDecodeSelf(d) + yyv1770 := &yyv1769[yyj1769] + yyv1770.CodecDecodeSelf(d) } } - if yyrt1588 { - for ; yyj1588 < yyl1588; yyj1588++ { - yyv1588 = append(yyv1588, ReplicaSet{}) - yyh1588.ElemContainerState(yyj1588) + if yyrt1769 { + for ; yyj1769 < yyl1769; yyj1769++ { + yyv1769 = append(yyv1769, ReplicaSet{}) + yyh1769.ElemContainerState(yyj1769) if r.TryDecodeAsNil() { - yyv1588[yyj1588] = ReplicaSet{} + yyv1769[yyj1769] = ReplicaSet{} } else { - yyv1590 := &yyv1588[yyj1588] - yyv1590.CodecDecodeSelf(d) + yyv1771 := &yyv1769[yyj1769] + yyv1771.CodecDecodeSelf(d) } } } } else { - yyj1588 := 0 - for ; !r.CheckBreak(); yyj1588++ { + yyj1769 := 0 + for ; !r.CheckBreak(); yyj1769++ { - if yyj1588 >= len(yyv1588) { - yyv1588 = append(yyv1588, ReplicaSet{}) // var yyz1588 ReplicaSet - yyc1588 = true + if yyj1769 >= len(yyv1769) { + yyv1769 = append(yyv1769, ReplicaSet{}) // var yyz1769 ReplicaSet + yyc1769 = true } - yyh1588.ElemContainerState(yyj1588) - if yyj1588 < len(yyv1588) { + yyh1769.ElemContainerState(yyj1769) + if yyj1769 < len(yyv1769) { if r.TryDecodeAsNil() { - yyv1588[yyj1588] = ReplicaSet{} + yyv1769[yyj1769] = ReplicaSet{} } else { - yyv1591 := &yyv1588[yyj1588] - yyv1591.CodecDecodeSelf(d) + yyv1772 := &yyv1769[yyj1769] + yyv1772.CodecDecodeSelf(d) } } else { @@ -19789,16 +21947,584 @@ func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decode } } - if yyj1588 < len(yyv1588) { - yyv1588 = yyv1588[:yyj1588] - yyc1588 = true - } else if yyj1588 == 0 && yyv1588 == nil { - yyv1588 = []ReplicaSet{} - yyc1588 = true + if yyj1769 < len(yyv1769) { + yyv1769 = yyv1769[:yyj1769] + yyc1769 = true + } else if yyj1769 == 0 && yyv1769 == nil { + yyv1769 = []ReplicaSet{} + yyc1769 = true } } - yyh1588.End() - if yyc1588 { - *v = yyv1588 + yyh1769.End() + if yyc1769 { + *v = yyv1769 + } +} + +func (x codecSelfer1234) encSlicev1_Capability(v []pkg2_v1.Capability, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1773 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym1774 := z.EncBinary() + _ = yym1774 + if false { + } else if z.HasExtensions() && z.EncExt(yyv1773) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yyv1773)) + } + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1775 := *v + yyh1775, yyl1775 := z.DecSliceHelperStart() + var yyc1775 bool + if yyl1775 == 0 { + if yyv1775 == nil { + yyv1775 = []pkg2_v1.Capability{} + yyc1775 = true + } else if len(yyv1775) != 0 { + yyv1775 = yyv1775[:0] + yyc1775 = true + } + } else if yyl1775 > 0 { + var yyrr1775, yyrl1775 int + var yyrt1775 bool + if yyl1775 > cap(yyv1775) { + + yyrl1775, yyrt1775 = z.DecInferLen(yyl1775, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1775 { + if yyrl1775 <= cap(yyv1775) { + yyv1775 = yyv1775[:yyrl1775] + } else { + yyv1775 = make([]pkg2_v1.Capability, yyrl1775) + } + } else { + yyv1775 = make([]pkg2_v1.Capability, yyrl1775) + } + yyc1775 = true + yyrr1775 = len(yyv1775) + } else if yyl1775 != len(yyv1775) { + yyv1775 = yyv1775[:yyl1775] + yyc1775 = true + } + yyj1775 := 0 + for ; yyj1775 < yyrr1775; yyj1775++ { + yyh1775.ElemContainerState(yyj1775) + if r.TryDecodeAsNil() { + yyv1775[yyj1775] = "" + } else { + yyv1775[yyj1775] = pkg2_v1.Capability(r.DecodeString()) + } + + } + if yyrt1775 { + for ; yyj1775 < yyl1775; yyj1775++ { + yyv1775 = append(yyv1775, "") + yyh1775.ElemContainerState(yyj1775) + if r.TryDecodeAsNil() { + yyv1775[yyj1775] = "" + } else { + yyv1775[yyj1775] = pkg2_v1.Capability(r.DecodeString()) + } + + } + } + + } else { + yyj1775 := 0 + for ; !r.CheckBreak(); yyj1775++ { + + if yyj1775 >= len(yyv1775) { + yyv1775 = append(yyv1775, "") // var yyz1775 pkg2_v1.Capability + yyc1775 = true + } + yyh1775.ElemContainerState(yyj1775) + if yyj1775 < len(yyv1775) { + if r.TryDecodeAsNil() { + yyv1775[yyj1775] = "" + } else { + yyv1775[yyj1775] = pkg2_v1.Capability(r.DecodeString()) + } + + } else { + z.DecSwallow() + } + + } + if yyj1775 < len(yyv1775) { + yyv1775 = yyv1775[:yyj1775] + yyc1775 = true + } else if yyj1775 == 0 && yyv1775 == nil { + yyv1775 = []pkg2_v1.Capability{} + yyc1775 = true + } + } + yyh1775.End() + if yyc1775 { + *v = yyv1775 + } +} + +func (x codecSelfer1234) encSliceFSType(v []FSType, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1779 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yyv1779.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceFSType(v *[]FSType, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1780 := *v + yyh1780, yyl1780 := z.DecSliceHelperStart() + var yyc1780 bool + if yyl1780 == 0 { + if yyv1780 == nil { + yyv1780 = []FSType{} + yyc1780 = true + } else if len(yyv1780) != 0 { + yyv1780 = yyv1780[:0] + yyc1780 = true + } + } else if yyl1780 > 0 { + var yyrr1780, yyrl1780 int + var yyrt1780 bool + if yyl1780 > cap(yyv1780) { + + yyrl1780, yyrt1780 = z.DecInferLen(yyl1780, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1780 { + if yyrl1780 <= cap(yyv1780) { + yyv1780 = yyv1780[:yyrl1780] + } else { + yyv1780 = make([]FSType, yyrl1780) + } + } else { + yyv1780 = make([]FSType, yyrl1780) + } + yyc1780 = true + yyrr1780 = len(yyv1780) + } else if yyl1780 != len(yyv1780) { + yyv1780 = yyv1780[:yyl1780] + yyc1780 = true + } + yyj1780 := 0 + for ; yyj1780 < yyrr1780; yyj1780++ { + yyh1780.ElemContainerState(yyj1780) + if r.TryDecodeAsNil() { + yyv1780[yyj1780] = "" + } else { + yyv1780[yyj1780] = FSType(r.DecodeString()) + } + + } + if yyrt1780 { + for ; yyj1780 < yyl1780; yyj1780++ { + yyv1780 = append(yyv1780, "") + yyh1780.ElemContainerState(yyj1780) + if r.TryDecodeAsNil() { + yyv1780[yyj1780] = "" + } else { + yyv1780[yyj1780] = FSType(r.DecodeString()) + } + + } + } + + } else { + yyj1780 := 0 + for ; !r.CheckBreak(); yyj1780++ { + + if yyj1780 >= len(yyv1780) { + yyv1780 = append(yyv1780, "") // var yyz1780 FSType + yyc1780 = true + } + yyh1780.ElemContainerState(yyj1780) + if yyj1780 < len(yyv1780) { + if r.TryDecodeAsNil() { + yyv1780[yyj1780] = "" + } else { + yyv1780[yyj1780] = FSType(r.DecodeString()) + } + + } else { + z.DecSwallow() + } + + } + if yyj1780 < len(yyv1780) { + yyv1780 = yyv1780[:yyj1780] + yyc1780 = true + } else if yyj1780 == 0 && yyv1780 == nil { + yyv1780 = []FSType{} + yyc1780 = true + } + } + yyh1780.End() + if yyc1780 { + *v = yyv1780 + } +} + +func (x codecSelfer1234) encSliceHostPortRange(v []HostPortRange, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1784 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy1785 := &yyv1784 + yy1785.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceHostPortRange(v *[]HostPortRange, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1786 := *v + yyh1786, yyl1786 := z.DecSliceHelperStart() + var yyc1786 bool + if yyl1786 == 0 { + if yyv1786 == nil { + yyv1786 = []HostPortRange{} + yyc1786 = true + } else if len(yyv1786) != 0 { + yyv1786 = yyv1786[:0] + yyc1786 = true + } + } else if yyl1786 > 0 { + var yyrr1786, yyrl1786 int + var yyrt1786 bool + if yyl1786 > cap(yyv1786) { + + yyrg1786 := len(yyv1786) > 0 + yyv21786 := yyv1786 + yyrl1786, yyrt1786 = z.DecInferLen(yyl1786, z.DecBasicHandle().MaxInitLen, 8) + if yyrt1786 { + if yyrl1786 <= cap(yyv1786) { + yyv1786 = yyv1786[:yyrl1786] + } else { + yyv1786 = make([]HostPortRange, yyrl1786) + } + } else { + yyv1786 = make([]HostPortRange, yyrl1786) + } + yyc1786 = true + yyrr1786 = len(yyv1786) + if yyrg1786 { + copy(yyv1786, yyv21786) + } + } else if yyl1786 != len(yyv1786) { + yyv1786 = yyv1786[:yyl1786] + yyc1786 = true + } + yyj1786 := 0 + for ; yyj1786 < yyrr1786; yyj1786++ { + yyh1786.ElemContainerState(yyj1786) + if r.TryDecodeAsNil() { + yyv1786[yyj1786] = HostPortRange{} + } else { + yyv1787 := &yyv1786[yyj1786] + yyv1787.CodecDecodeSelf(d) + } + + } + if yyrt1786 { + for ; yyj1786 < yyl1786; yyj1786++ { + yyv1786 = append(yyv1786, HostPortRange{}) + yyh1786.ElemContainerState(yyj1786) + if r.TryDecodeAsNil() { + yyv1786[yyj1786] = HostPortRange{} + } else { + yyv1788 := &yyv1786[yyj1786] + yyv1788.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1786 := 0 + for ; !r.CheckBreak(); yyj1786++ { + + if yyj1786 >= len(yyv1786) { + yyv1786 = append(yyv1786, HostPortRange{}) // var yyz1786 HostPortRange + yyc1786 = true + } + yyh1786.ElemContainerState(yyj1786) + if yyj1786 < len(yyv1786) { + if r.TryDecodeAsNil() { + yyv1786[yyj1786] = HostPortRange{} + } else { + yyv1789 := &yyv1786[yyj1786] + yyv1789.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1786 < len(yyv1786) { + yyv1786 = yyv1786[:yyj1786] + yyc1786 = true + } else if yyj1786 == 0 && yyv1786 == nil { + yyv1786 = []HostPortRange{} + yyc1786 = true + } + } + yyh1786.End() + if yyc1786 { + *v = yyv1786 + } +} + +func (x codecSelfer1234) encSliceIDRange(v []IDRange, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1790 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy1791 := &yyv1790 + yy1791.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceIDRange(v *[]IDRange, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1792 := *v + yyh1792, yyl1792 := z.DecSliceHelperStart() + var yyc1792 bool + if yyl1792 == 0 { + if yyv1792 == nil { + yyv1792 = []IDRange{} + yyc1792 = true + } else if len(yyv1792) != 0 { + yyv1792 = yyv1792[:0] + yyc1792 = true + } + } else if yyl1792 > 0 { + var yyrr1792, yyrl1792 int + var yyrt1792 bool + if yyl1792 > cap(yyv1792) { + + yyrg1792 := len(yyv1792) > 0 + yyv21792 := yyv1792 + yyrl1792, yyrt1792 = z.DecInferLen(yyl1792, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1792 { + if yyrl1792 <= cap(yyv1792) { + yyv1792 = yyv1792[:yyrl1792] + } else { + yyv1792 = make([]IDRange, yyrl1792) + } + } else { + yyv1792 = make([]IDRange, yyrl1792) + } + yyc1792 = true + yyrr1792 = len(yyv1792) + if yyrg1792 { + copy(yyv1792, yyv21792) + } + } else if yyl1792 != len(yyv1792) { + yyv1792 = yyv1792[:yyl1792] + yyc1792 = true + } + yyj1792 := 0 + for ; yyj1792 < yyrr1792; yyj1792++ { + yyh1792.ElemContainerState(yyj1792) + if r.TryDecodeAsNil() { + yyv1792[yyj1792] = IDRange{} + } else { + yyv1793 := &yyv1792[yyj1792] + yyv1793.CodecDecodeSelf(d) + } + + } + if yyrt1792 { + for ; yyj1792 < yyl1792; yyj1792++ { + yyv1792 = append(yyv1792, IDRange{}) + yyh1792.ElemContainerState(yyj1792) + if r.TryDecodeAsNil() { + yyv1792[yyj1792] = IDRange{} + } else { + yyv1794 := &yyv1792[yyj1792] + yyv1794.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1792 := 0 + for ; !r.CheckBreak(); yyj1792++ { + + if yyj1792 >= len(yyv1792) { + yyv1792 = append(yyv1792, IDRange{}) // var yyz1792 IDRange + yyc1792 = true + } + yyh1792.ElemContainerState(yyj1792) + if yyj1792 < len(yyv1792) { + if r.TryDecodeAsNil() { + yyv1792[yyj1792] = IDRange{} + } else { + yyv1795 := &yyv1792[yyj1792] + yyv1795.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1792 < len(yyv1792) { + yyv1792 = yyv1792[:yyj1792] + yyc1792 = true + } else if yyj1792 == 0 && yyv1792 == nil { + yyv1792 = []IDRange{} + yyc1792 = true + } + } + yyh1792.End() + if yyc1792 { + *v = yyv1792 + } +} + +func (x codecSelfer1234) encSlicePodSecurityPolicy(v []PodSecurityPolicy, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1796 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy1797 := &yyv1796 + yy1797.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSlicePodSecurityPolicy(v *[]PodSecurityPolicy, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1798 := *v + yyh1798, yyl1798 := z.DecSliceHelperStart() + var yyc1798 bool + if yyl1798 == 0 { + if yyv1798 == nil { + yyv1798 = []PodSecurityPolicy{} + yyc1798 = true + } else if len(yyv1798) != 0 { + yyv1798 = yyv1798[:0] + yyc1798 = true + } + } else if yyl1798 > 0 { + var yyrr1798, yyrl1798 int + var yyrt1798 bool + if yyl1798 > cap(yyv1798) { + + yyrg1798 := len(yyv1798) > 0 + yyv21798 := yyv1798 + yyrl1798, yyrt1798 = z.DecInferLen(yyl1798, z.DecBasicHandle().MaxInitLen, 352) + if yyrt1798 { + if yyrl1798 <= cap(yyv1798) { + yyv1798 = yyv1798[:yyrl1798] + } else { + yyv1798 = make([]PodSecurityPolicy, yyrl1798) + } + } else { + yyv1798 = make([]PodSecurityPolicy, yyrl1798) + } + yyc1798 = true + yyrr1798 = len(yyv1798) + if yyrg1798 { + copy(yyv1798, yyv21798) + } + } else if yyl1798 != len(yyv1798) { + yyv1798 = yyv1798[:yyl1798] + yyc1798 = true + } + yyj1798 := 0 + for ; yyj1798 < yyrr1798; yyj1798++ { + yyh1798.ElemContainerState(yyj1798) + if r.TryDecodeAsNil() { + yyv1798[yyj1798] = PodSecurityPolicy{} + } else { + yyv1799 := &yyv1798[yyj1798] + yyv1799.CodecDecodeSelf(d) + } + + } + if yyrt1798 { + for ; yyj1798 < yyl1798; yyj1798++ { + yyv1798 = append(yyv1798, PodSecurityPolicy{}) + yyh1798.ElemContainerState(yyj1798) + if r.TryDecodeAsNil() { + yyv1798[yyj1798] = PodSecurityPolicy{} + } else { + yyv1800 := &yyv1798[yyj1798] + yyv1800.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1798 := 0 + for ; !r.CheckBreak(); yyj1798++ { + + if yyj1798 >= len(yyv1798) { + yyv1798 = append(yyv1798, PodSecurityPolicy{}) // var yyz1798 PodSecurityPolicy + yyc1798 = true + } + yyh1798.ElemContainerState(yyj1798) + if yyj1798 < len(yyv1798) { + if r.TryDecodeAsNil() { + yyv1798[yyj1798] = PodSecurityPolicy{} + } else { + yyv1801 := &yyv1798[yyj1798] + yyv1801.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1798 < len(yyv1798) { + yyv1798 = yyv1798[:yyj1798] + yyc1798 = true + } else if yyj1798 == 0 && yyv1798 == nil { + yyv1798 = []PodSecurityPolicy{} + yyc1798 = true + } + } + yyh1798.End() + if yyc1798 { + *v = yyv1798 } } diff --git a/pkg/apis/extensions/v1beta1/types.go b/pkg/apis/extensions/v1beta1/types.go index 9a50c73978d..d3fe1d25fb9 100644 --- a/pkg/apis/extensions/v1beta1/types.go +++ b/pkg/apis/extensions/v1beta1/types.go @@ -917,3 +917,128 @@ type ReplicaSetStatus struct { // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. ObservedGeneration int64 `json:"observedGeneration,omitempty"` } + +// Pod Security Policy governs the ability to make requests that affect the Security Context +// that will be applied to a pod and container. +type PodSecurityPolicy struct { + unversioned.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + v1.ObjectMeta `json:"metadata,omitempty"` + + // Spec defines the policy enforced. + Spec PodSecurityPolicySpec `json:"spec,omitempty"` +} + +// Pod Security Policy Spec defines the policy enforced. +type PodSecurityPolicySpec struct { + // privileged determines if a pod can request to be run as privileged. + Privileged bool `json:"privileged,omitempty"` + // capabilities is a list of capabilities that can be added. + Capabilities []v1.Capability `json:"capabilities,omitempty"` + // volumes is a white list of allowed volume plugins. Empty indicates that all plugins + // may be used. + Volumes []FSType `json:"volumes,omitempty"` + // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. + HostNetwork bool `json:"hostNetwork,omitempty"` + // hostPorts determines which host port ranges are allowed to be exposed. + HostPorts []HostPortRange `json:"hostPorts,omitempty"` + // hostPID determines if the policy allows the use of HostPID in the pod spec. + HostPID bool `json:"hostPID,omitempty"` + // hostIPC determines if the policy allows the use of HostIPC in the pod spec. + HostIPC bool `json:"hostIPC,omitempty"` + // seLinuxContext is the strategy that will dictate the allowable labels that may be set. + SELinuxContext SELinuxContextStrategyOptions `json:"seLinuxContext,omitempty"` + // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. + RunAsUser RunAsUserStrategyOptions `json:"runAsUser,omitempty"` +} + +// FS Type gives strong typing to different file systems that are used by volumes. +type FSType string + +var ( + HostPath FSType = "hostPath" + EmptyDir FSType = "emptyDir" + GCEPersistentDisk FSType = "gcePersistentDisk" + AWSElasticBlockStore FSType = "awsElasticBlockStore" + GitRepo FSType = "gitRepo" + Secret FSType = "secret" + NFS FSType = "nfs" + ISCSI FSType = "iscsi" + Glusterfs FSType = "glusterfs" + PersistentVolumeClaim FSType = "persistentVolumeClaim" + RBD FSType = "rbd" + Cinder FSType = "cinder" + CephFS FSType = "cephFS" + DownwardAPI FSType = "downwardAPI" + FC FSType = "fc" +) + +// Host Port Range defines a range of host ports that will be enabled by a policy +// for pods to use. It requires both the start and end to be defined. +type HostPortRange struct { + // min is the start of the range, inclusive. + Min int32 `json:"min"` + // max is the end of the range, inclusive. + Max int32 `json:"max"` +} + +// SELinux Context Strategy Options defines the strategy type and any options used to create the strategy. +type SELinuxContextStrategyOptions struct { + // type is the strategy that will dictate the allowable labels that may be set. + Type SELinuxContextStrategy `json:"type"` + // seLinuxOptions required to run as; required for MustRunAs + // More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context + SELinuxOptions *v1.SELinuxOptions `json:"seLinuxOptions,omitempty"` +} + +// SELinux Context Strategy Type denotes strategy types for generating SELinux options for a +// Security Context. +type SELinuxContextStrategy string + +const ( + // container must have SELinux labels of X applied. + SELinuxStrategyMustRunAs SELinuxContextStrategy = "MustRunAs" + // container may make requests for any SELinux context labels. + SELinuxStrategyRunAsAny SELinuxContextStrategy = "RunAsAny" +) + +// Run A sUser Strategy Options defines the strategy type and any options used to create the strategy. +type RunAsUserStrategyOptions struct { + // type is the strategy that will dictate the allowable RunAsUser values that may be set. + Type RunAsUserStrategy `json:"type"` + // Ranges are the allowed ranges of uids that may be used. + Ranges []IDRange `json:"ranges,omitempty"` +} + +// ID Range provides a min/max of an allowed range of IDs. +type IDRange struct { + // Min is the start of the range, inclusive. + Min int64 `json:"min"` + // Max is the end of the range, inclusive. + Max int64 `json:"max"` +} + +// Run As User Strategy Type denotes strategy types for generating RunAsUser values for a +// Security Context. +type RunAsUserStrategy string + +const ( + // container must run as a particular uid. + RunAsUserStrategyMustRunAs RunAsUserStrategy = "MustRunAs" + // container must run as a non-root uid + RunAsUserStrategyMustRunAsNonRoot RunAsUserStrategy = "MustRunAsNonRoot" + // container may make requests for any uid. + RunAsUserStrategyRunAsAny RunAsUserStrategy = "RunAsAny" +) + +// Pod Security Policy List is a list of PodSecurityPolicy objects. +type PodSecurityPolicyList struct { + unversioned.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: http://docs.k8s.io/api-conventions.md#metadata + unversioned.ListMeta `json:"metadata,omitempty"` + + // Items is a list of schema objects. + Items []PodSecurityPolicy `json:"items"` +} diff --git a/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go b/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go index 831f7781197..959aa52194d 100644 --- a/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go +++ b/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go @@ -292,6 +292,26 @@ func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string { return map_HorizontalPodAutoscalerStatus } +var map_HostPortRange = map[string]string{ + "": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + "min": "min is the start of the range, inclusive.", + "max": "max is the end of the range, inclusive.", +} + +func (HostPortRange) SwaggerDoc() map[string]string { + return map_HostPortRange +} + +var map_IDRange = map[string]string{ + "": "ID Range provides a min/max of an allowed range of IDs.", + "min": "Min is the start of the range, inclusive.", + "max": "Max is the end of the range, inclusive.", +} + +func (IDRange) SwaggerDoc() map[string]string { + return map_IDRange +} + var map_Ingress = map[string]string{ "": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", @@ -464,6 +484,43 @@ func (NodeUtilization) SwaggerDoc() map[string]string { return map_NodeUtilization } +var map_PodSecurityPolicy = map[string]string{ + "": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", + "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "spec": "Spec defines the policy enforced.", +} + +func (PodSecurityPolicy) SwaggerDoc() map[string]string { + return map_PodSecurityPolicy +} + +var map_PodSecurityPolicyList = map[string]string{ + "": "Pod Security Policy List is a list of PodSecurityPolicy objects.", + "metadata": "Standard list metadata. More info: http://docs.k8s.io/api-conventions.md#metadata", + "items": "Items is a list of schema objects.", +} + +func (PodSecurityPolicyList) SwaggerDoc() map[string]string { + return map_PodSecurityPolicyList +} + +var map_PodSecurityPolicySpec = map[string]string{ + "": "Pod Security Policy Spec defines the policy enforced.", + "privileged": "privileged determines if a pod can request to be run as privileged.", + "capabilities": "capabilities is a list of capabilities that can be added.", + "volumes": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used.", + "hostNetwork": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", + "hostPorts": "hostPorts determines which host port ranges are allowed to be exposed.", + "hostPID": "hostPID determines if the policy allows the use of HostPID in the pod spec.", + "hostIPC": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", + "seLinuxContext": "seLinuxContext is the strategy that will dictate the allowable labels that may be set.", + "runAsUser": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", +} + +func (PodSecurityPolicySpec) SwaggerDoc() map[string]string { + return map_PodSecurityPolicySpec +} + var map_ReplicaSet = map[string]string{ "": "ReplicaSet represents the configuration of a ReplicaSet.", "metadata": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", @@ -542,6 +599,26 @@ func (RollingUpdateDeployment) SwaggerDoc() map[string]string { return map_RollingUpdateDeployment } +var map_RunAsUserStrategyOptions = map[string]string{ + "": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.", + "type": "type is the strategy that will dictate the allowable RunAsUser values that may be set.", + "ranges": "Ranges are the allowed ranges of uids that may be used.", +} + +func (RunAsUserStrategyOptions) SwaggerDoc() map[string]string { + return map_RunAsUserStrategyOptions +} + +var map_SELinuxContextStrategyOptions = map[string]string{ + "": "SELinux Context Strategy Options defines the strategy type and any options used to create the strategy.", + "type": "type is the strategy that will dictate the allowable labels that may be set.", + "seLinuxOptions": "seLinuxOptions required to run as; required for MustRunAs More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context", +} + +func (SELinuxContextStrategyOptions) SwaggerDoc() map[string]string { + return map_SELinuxContextStrategyOptions +} + var map_Scale = map[string]string{ "": "represents a scaling request for a resource.", "metadata": "Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.", diff --git a/pkg/apis/extensions/validation/validation.go b/pkg/apis/extensions/validation/validation.go index ab541fdfba1..8829d8388c1 100644 --- a/pkg/apis/extensions/validation/validation.go +++ b/pkg/apis/extensions/validation/validation.go @@ -697,3 +697,116 @@ func ValidatePodTemplateSpecForReplicaSet(template *api.PodTemplateSpec, selecto } return allErrs } + +// ValidatePodSecurityPolicyName can be used to check whether the given +// pod security policy name is valid. +// Prefix indicates this name will be used as part of generation, in which case +// trailing dashes are allowed. +func ValidatePodSecurityPolicyName(name string, prefix bool) (bool, string) { + return apivalidation.NameIsDNSSubdomain(name, prefix) +} + +func ValidatePodSecurityPolicy(psp *extensions.PodSecurityPolicy) field.ErrorList { + allErrs := field.ErrorList{} + allErrs = append(allErrs, apivalidation.ValidateObjectMeta(&psp.ObjectMeta, false, ValidatePodSecurityPolicyName, field.NewPath("metadata"))...) + allErrs = append(allErrs, ValidatePodSecurityPolicySpec(&psp.Spec, field.NewPath("spec"))...) + return allErrs +} + +func ValidatePodSecurityPolicySpec(spec *extensions.PodSecurityPolicySpec, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + allErrs = append(allErrs, validatePSPRunAsUser(fldPath.Child("runAsUser"), &spec.RunAsUser)...) + allErrs = append(allErrs, validatePSPSELinuxContext(fldPath.Child("seLinuxContext"), &spec.SELinuxContext)...) + allErrs = append(allErrs, validatePodSecurityPolicyVolumes(fldPath, spec.Volumes)...) + + return allErrs +} + +// validatePSPSELinuxContext validates the SELinuxContext fields of PodSecurityPolicy. +func validatePSPSELinuxContext(fldPath *field.Path, seLinuxContext *extensions.SELinuxContextStrategyOptions) field.ErrorList { + allErrs := field.ErrorList{} + + // ensure the selinux strategy has a valid type + supportedSELinuxContextTypes := sets.NewString(string(extensions.SELinuxStrategyMustRunAs), + string(extensions.SELinuxStrategyRunAsAny)) + if !supportedSELinuxContextTypes.Has(string(seLinuxContext.Type)) { + allErrs = append(allErrs, field.NotSupported(fldPath.Child("type"), seLinuxContext.Type, supportedSELinuxContextTypes.List())) + } + + return allErrs +} + +// validatePSPRunAsUser validates the RunAsUser fields of PodSecurityPolicy. +func validatePSPRunAsUser(fldPath *field.Path, runAsUser *extensions.RunAsUserStrategyOptions) field.ErrorList { + allErrs := field.ErrorList{} + + // ensure the user strategy has a valid type + supportedRunAsUserTypes := sets.NewString(string(extensions.RunAsUserStrategyMustRunAs), + string(extensions.RunAsUserStrategyMustRunAsNonRoot), + string(extensions.RunAsUserStrategyRunAsAny)) + if !supportedRunAsUserTypes.Has(string(runAsUser.Type)) { + allErrs = append(allErrs, field.NotSupported(fldPath.Child("type"), runAsUser.Type, supportedRunAsUserTypes.List())) + } + + // validate range settings + for idx, rng := range runAsUser.Ranges { + allErrs = append(allErrs, validateIDRanges(fldPath.Child("ranges").Index(idx), rng)...) + } + + return allErrs +} + +// validatePodSecurityPolicyVolumes validates the volume fields of PodSecurityPolicy. +func validatePodSecurityPolicyVolumes(fldPath *field.Path, volumes []extensions.FSType) field.ErrorList { + allErrs := field.ErrorList{} + allowed := sets.NewString(string(extensions.HostPath), + string(extensions.EmptyDir), + string(extensions.GCEPersistentDisk), + string(extensions.AWSElasticBlockStore), + string(extensions.GitRepo), + string(extensions.Secret), + string(extensions.NFS), + string(extensions.ISCSI), + string(extensions.Glusterfs), + string(extensions.PersistentVolumeClaim), + string(extensions.RBD), + string(extensions.Cinder), + string(extensions.CephFS), + string(extensions.DownwardAPI), + string(extensions.FC)) + for _, v := range volumes { + if !allowed.Has(string(v)) { + allErrs = append(allErrs, field.NotSupported(fldPath.Child("volumes"), v, allowed.List())) + } + } + + return allErrs +} + +// validateIDRanges ensures the range is valid. +func validateIDRanges(fldPath *field.Path, rng extensions.IDRange) field.ErrorList { + allErrs := field.ErrorList{} + + // if 0 <= Min <= Max then we do not need to validate max. It is always greater than or + // equal to 0 and Min. + if rng.Min < 0 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("min"), rng.Min, "min cannot be negative")) + } + if rng.Max < 0 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("max"), rng.Max, "max cannot be negative")) + } + if rng.Min > rng.Max { + allErrs = append(allErrs, field.Invalid(fldPath.Child("min"), rng.Min, "min cannot be greater than max")) + } + + return allErrs +} + +// ValidatePodSecurityPolicyUpdate validates a PSP for updates. +func ValidatePodSecurityPolicyUpdate(old *extensions.PodSecurityPolicy, new *extensions.PodSecurityPolicy) field.ErrorList { + allErrs := field.ErrorList{} + allErrs = append(allErrs, apivalidation.ValidateObjectMetaUpdate(&old.ObjectMeta, &new.ObjectMeta, field.NewPath("metadata"))...) + allErrs = append(allErrs, ValidatePodSecurityPolicySpec(&new.Spec, field.NewPath("spec"))...) + return allErrs +} diff --git a/pkg/apis/extensions/validation/validation_test.go b/pkg/apis/extensions/validation/validation_test.go index d98596bf622..e6ab969a00e 100644 --- a/pkg/apis/extensions/validation/validation_test.go +++ b/pkg/apis/extensions/validation/validation_test.go @@ -1977,3 +1977,126 @@ func newInt(val int) *int { *p = val return p } + +func TestValidatePodSecurityPolicy(t *testing.T) { + validSCC := func() *extensions.PodSecurityPolicy { + return &extensions.PodSecurityPolicy{ + ObjectMeta: api.ObjectMeta{Name: "foo"}, + Spec: extensions.PodSecurityPolicySpec{ + SELinuxContext: extensions.SELinuxContextStrategyOptions{ + Type: extensions.SELinuxStrategyRunAsAny, + }, + RunAsUser: extensions.RunAsUserStrategyOptions{ + Type: extensions.RunAsUserStrategyRunAsAny, + }, + }, + } + } + + noUserOptions := validSCC() + noUserOptions.Spec.RunAsUser.Type = "" + + noSELinuxOptions := validSCC() + noSELinuxOptions.Spec.SELinuxContext.Type = "" + + invalidUserStratType := validSCC() + invalidUserStratType.Spec.RunAsUser.Type = "invalid" + + invalidSELinuxStratType := validSCC() + invalidSELinuxStratType.Spec.SELinuxContext.Type = "invalid" + + missingObjectMetaName := validSCC() + missingObjectMetaName.ObjectMeta.Name = "" + + invalidRangeMinGreaterThanMax := validSCC() + invalidRangeMinGreaterThanMax.Spec.RunAsUser.Ranges = []extensions.IDRange{ + {Min: 2, Max: 1}, + } + + invalidRangeNegativeMin := validSCC() + invalidRangeNegativeMin.Spec.RunAsUser.Ranges = []extensions.IDRange{ + {Min: -1, Max: 10}, + } + + invalidRangeNegativeMax := validSCC() + invalidRangeNegativeMax.Spec.RunAsUser.Ranges = []extensions.IDRange{ + {Min: 1, Max: -10}, + } + + errorCases := map[string]struct { + scc *extensions.PodSecurityPolicy + errorDetail string + }{ + "no user options": { + scc: noUserOptions, + errorDetail: "supported values: MustRunAs, MustRunAsNonRoot, RunAsAny", + }, + "no selinux options": { + scc: noSELinuxOptions, + errorDetail: "supported values: MustRunAs, RunAsAny", + }, + "invalid user strategy type": { + scc: invalidUserStratType, + errorDetail: "supported values: MustRunAs, MustRunAsNonRoot, RunAsAny", + }, + "invalid selinux strategy type": { + scc: invalidSELinuxStratType, + errorDetail: "supported values: MustRunAs, RunAsAny", + }, + "missing object meta name": { + scc: missingObjectMetaName, + errorDetail: "name or generateName is required", + }, + "invalid range min greater than max": { + scc: invalidRangeMinGreaterThanMax, + errorDetail: "min cannot be greater than max", + }, + "invalid range negative min": { + scc: invalidRangeNegativeMin, + errorDetail: "min cannot be negative", + }, + "invalid range negative max": { + scc: invalidRangeNegativeMax, + errorDetail: "max cannot be negative", + }, + } + + for k, v := range errorCases { + if errs := ValidatePodSecurityPolicy(v.scc); len(errs) == 0 || errs[0].Detail != v.errorDetail { + t.Errorf("Expected error with detail %s for %s, got %v", v.errorDetail, k, errs[0].Detail) + } + } + + mustRunAs := validSCC() + mustRunAs.Spec.RunAsUser.Type = extensions.RunAsUserStrategyMustRunAs + mustRunAs.Spec.RunAsUser.Ranges = []extensions.IDRange{ + { + Min: 1, + Max: 1, + }, + } + mustRunAs.Spec.SELinuxContext.Type = extensions.SELinuxStrategyMustRunAs + + runAsNonRoot := validSCC() + runAsNonRoot.Spec.RunAsUser.Type = extensions.RunAsUserStrategyMustRunAsNonRoot + + successCases := map[string]struct { + scc *extensions.PodSecurityPolicy + }{ + "must run as": { + scc: mustRunAs, + }, + "run as any": { + scc: validSCC(), + }, + "run as non-root (user only)": { + scc: runAsNonRoot, + }, + } + + for k, v := range successCases { + if errs := ValidatePodSecurityPolicy(v.scc); len(errs) != 0 { + t.Errorf("Expected success for %s, got %v", k, errs) + } + } +} diff --git a/pkg/client/unversioned/extensions.go b/pkg/client/unversioned/extensions.go index 1044b876cdf..a95bd1b8921 100644 --- a/pkg/client/unversioned/extensions.go +++ b/pkg/client/unversioned/extensions.go @@ -35,6 +35,7 @@ type ExtensionsInterface interface { IngressNamespacer ThirdPartyResourceNamespacer ReplicaSetsNamespacer + PodSecurityPoliciesInterface } // ExtensionsClient is used to interact with experimental Kubernetes features. @@ -44,6 +45,10 @@ type ExtensionsClient struct { *RESTClient } +func (c *ExtensionsClient) PodSecurityPolicies() PodSecurityPolicyInterface { + return newPodSecurityPolicy(c) +} + func (c *ExtensionsClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { return newHorizontalPodAutoscalers(c, namespace) } diff --git a/pkg/client/unversioned/podsecuritypolicy.go b/pkg/client/unversioned/podsecuritypolicy.go new file mode 100644 index 00000000000..64a34b4b23b --- /dev/null +++ b/pkg/client/unversioned/podsecuritypolicy.go @@ -0,0 +1,111 @@ +/* +Copyright 2014 The Kubernetes Authors All rights reserved. + +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 unversioned + +import ( + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/watch" +) + +type PodSecurityPoliciesInterface interface { + PodSecurityPolicies() PodSecurityPolicyInterface +} + +type PodSecurityPolicyInterface interface { + Get(name string) (result *extensions.PodSecurityPolicy, err error) + Create(scc *extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error) + List(opts api.ListOptions) (*extensions.PodSecurityPolicyList, error) + Delete(name string) error + Update(*extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error) + Watch(opts api.ListOptions) (watch.Interface, error) +} + +// podSecurityPolicy implements PodSecurityPolicyInterface +type podSecurityPolicy struct { + client *ExtensionsClient +} + +// newPodSecurityPolicy returns a podSecurityPolicy object. +func newPodSecurityPolicy(c *ExtensionsClient) *podSecurityPolicy { + return &podSecurityPolicy{c} +} + +func (s *podSecurityPolicy) Create(scc *extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error) { + result := &extensions.PodSecurityPolicy{} + err := s.client.Post(). + Resource("podsecuritypolicies"). + Body(scc). + Do(). + Into(result) + + return result, err +} + +// List returns a list of PodSecurityPolicies matching the selectors. +func (s *podSecurityPolicy) List(opts api.ListOptions) (*extensions.PodSecurityPolicyList, error) { + result := &extensions.PodSecurityPolicyList{} + + err := s.client.Get(). + Resource("podsecuritypolicies"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + + return result, err +} + +// Get returns the given PodSecurityPolicy, or an error. +func (s *podSecurityPolicy) Get(name string) (*extensions.PodSecurityPolicy, error) { + result := &extensions.PodSecurityPolicy{} + err := s.client.Get(). + Resource("podsecuritypolicies"). + Name(name). + Do(). + Into(result) + + return result, err +} + +// Watch starts watching for PodSecurityPolicies matching the given selectors. +func (s *podSecurityPolicy) Watch(opts api.ListOptions) (watch.Interface, error) { + return s.client.Get(). + Prefix("watch"). + Resource("podsecuritypolicies"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +func (s *podSecurityPolicy) Delete(name string) error { + return s.client.Delete(). + Resource("podsecuritypolicies"). + Name(name). + Do(). + Error() +} + +func (s *podSecurityPolicy) Update(psp *extensions.PodSecurityPolicy) (result *extensions.PodSecurityPolicy, err error) { + result = &extensions.PodSecurityPolicy{} + err = s.client.Put(). + Resource("podsecuritypolicies"). + Name(psp.Name). + Body(psp). + Do(). + Into(result) + + return +} diff --git a/pkg/client/unversioned/podsecuritypolicy_test.go b/pkg/client/unversioned/podsecuritypolicy_test.go new file mode 100644 index 00000000000..dee0f59351f --- /dev/null +++ b/pkg/client/unversioned/podsecuritypolicy_test.go @@ -0,0 +1,138 @@ +/* +Copyright 2015 The Kubernetes Authors All rights reserved. + +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 unversioned_test + +import ( + "fmt" + "net/url" + "testing" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/testapi" + "k8s.io/kubernetes/pkg/apis/extensions" + . "k8s.io/kubernetes/pkg/client/unversioned" + "k8s.io/kubernetes/pkg/client/unversioned/testclient/simple" +) + +func TestPodSecurityPolicyCreate(t *testing.T) { + ns := api.NamespaceNone + scc := &extensions.PodSecurityPolicy{ + ObjectMeta: api.ObjectMeta{ + Name: "abc", + }, + } + + c := &simple.Client{ + Request: simple.Request{ + Method: "POST", + Path: testapi.Extensions.ResourcePath(getPSPResourcename(), ns, ""), + Query: simple.BuildQueryValues(nil), + Body: scc, + }, + Response: simple.Response{StatusCode: 200, Body: scc}, + } + + response, err := c.Setup(t).PodSecurityPolicies().Create(scc) + c.Validate(t, response, err) +} + +func TestPodSecurityPolicyGet(t *testing.T) { + ns := api.NamespaceNone + scc := &extensions.PodSecurityPolicy{ + ObjectMeta: api.ObjectMeta{ + Name: "abc", + }, + } + c := &simple.Client{ + Request: simple.Request{ + Method: "GET", + Path: testapi.Extensions.ResourcePath(getPSPResourcename(), ns, "abc"), + Query: simple.BuildQueryValues(nil), + Body: nil, + }, + Response: simple.Response{StatusCode: 200, Body: scc}, + } + + response, err := c.Setup(t).PodSecurityPolicies().Get("abc") + c.Validate(t, response, err) +} + +func TestPodSecurityPolicyList(t *testing.T) { + ns := api.NamespaceNone + sccList := &extensions.PodSecurityPolicyList{ + Items: []extensions.PodSecurityPolicy{ + { + ObjectMeta: api.ObjectMeta{ + Name: "abc", + }, + }, + }, + } + c := &simple.Client{ + Request: simple.Request{ + Method: "GET", + Path: testapi.Extensions.ResourcePath(getPSPResourcename(), ns, ""), + Query: simple.BuildQueryValues(nil), + Body: nil, + }, + Response: simple.Response{StatusCode: 200, Body: sccList}, + } + response, err := c.Setup(t).PodSecurityPolicies().List(api.ListOptions{}) + c.Validate(t, response, err) +} + +func TestPodSecurityPolicyUpdate(t *testing.T) { + ns := api.NamespaceNone + scc := &extensions.PodSecurityPolicy{ + ObjectMeta: api.ObjectMeta{ + Name: "abc", + ResourceVersion: "1", + }, + } + c := &simple.Client{ + Request: simple.Request{Method: "PUT", Path: testapi.Extensions.ResourcePath(getPSPResourcename(), ns, "abc"), Query: simple.BuildQueryValues(nil)}, + Response: simple.Response{StatusCode: 200, Body: scc}, + } + response, err := c.Setup(t).PodSecurityPolicies().Update(scc) + c.Validate(t, response, err) +} + +func TestPodSecurityPolicyDelete(t *testing.T) { + ns := api.NamespaceNone + c := &simple.Client{ + Request: simple.Request{Method: "DELETE", Path: testapi.Extensions.ResourcePath(getPSPResourcename(), ns, "foo"), Query: simple.BuildQueryValues(nil)}, + Response: simple.Response{StatusCode: 200}, + } + err := c.Setup(t).PodSecurityPolicies().Delete("foo") + c.Validate(t, nil, err) +} + +func TestPodSecurityPolicyWatch(t *testing.T) { + c := &simple.Client{ + Request: simple.Request{ + Method: "GET", + Path: fmt.Sprintf("%s/watch/%s", testapi.Extensions.ResourcePath("", "", ""), getPSPResourcename()), + Query: url.Values{"resourceVersion": []string{}}}, + Response: simple.Response{StatusCode: 200}, + } + _, err := c.Setup(t).PodSecurityPolicies().Watch(api.ListOptions{}) + c.Validate(t, nil, err) +} + +func getPSPResourcename() string { + return "podsecuritypolicies" +} diff --git a/pkg/client/unversioned/testclient/fake_podsecuritypolicy.go b/pkg/client/unversioned/testclient/fake_podsecuritypolicy.go new file mode 100644 index 00000000000..bb611d322c5 --- /dev/null +++ b/pkg/client/unversioned/testclient/fake_podsecuritypolicy.go @@ -0,0 +1,73 @@ +/* +Copyright 2014 The Kubernetes Authors All rights reserved. + +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 testclient + +import ( + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/watch" +) + +// FakePodSecurityPolicy implements PodSecurityPolicyInterface. Meant to be +// embedded into a struct to get a default implementation. This makes faking out just +// the method you want to test easier. +type FakePodSecurityPolicy struct { + Fake *Fake + Namespace string +} + +func (c *FakePodSecurityPolicy) List(opts api.ListOptions) (*extensions.PodSecurityPolicyList, error) { + obj, err := c.Fake.Invokes(NewListAction("podsecuritypolicies", c.Namespace, opts), &extensions.PodSecurityPolicyList{}) + if obj == nil { + return nil, err + } + + return obj.(*extensions.PodSecurityPolicyList), err +} + +func (c *FakePodSecurityPolicy) Get(name string) (*extensions.PodSecurityPolicy, error) { + obj, err := c.Fake.Invokes(NewGetAction("podsecuritypolicies", c.Namespace, name), &extensions.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*extensions.PodSecurityPolicy), err +} + +func (c *FakePodSecurityPolicy) Create(scc *extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error) { + obj, err := c.Fake.Invokes(NewCreateAction("podsecuritypolicies", c.Namespace, scc), &extensions.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*extensions.PodSecurityPolicy), err +} + +func (c *FakePodSecurityPolicy) Update(scc *extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error) { + obj, err := c.Fake.Invokes(NewUpdateAction("podsecuritypolicies", c.Namespace, scc), &extensions.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*extensions.PodSecurityPolicy), err +} + +func (c *FakePodSecurityPolicy) Delete(name string) error { + _, err := c.Fake.Invokes(NewDeleteAction("podsecuritypolicies", c.Namespace, name), &extensions.PodSecurityPolicy{}) + return err +} + +func (c *FakePodSecurityPolicy) Watch(opts api.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(NewWatchAction("podsecuritypolicies", c.Namespace, opts)) +} diff --git a/pkg/client/unversioned/testclient/testclient.go b/pkg/client/unversioned/testclient/testclient.go index d66a4dda36f..0da88798418 100644 --- a/pkg/client/unversioned/testclient/testclient.go +++ b/pkg/client/unversioned/testclient/testclient.go @@ -230,6 +230,10 @@ func (c *Fake) Nodes() client.NodeInterface { return &FakeNodes{Fake: c} } +func (c *Fake) PodSecurityPolicies() client.PodSecurityPolicyInterface { + return &FakePodSecurityPolicy{Fake: c} +} + func (c *Fake) Events(namespace string) client.EventInterface { return &FakeEvents{Fake: c, Namespace: namespace} } diff --git a/pkg/kubectl/kubectl.go b/pkg/kubectl/kubectl.go index f2f4d6a9bbb..c7ce1bf6a0e 100644 --- a/pkg/kubectl/kubectl.go +++ b/pkg/kubectl/kubectl.go @@ -113,6 +113,7 @@ func expandResourceShortcut(resource unversioned.GroupVersionResource) unversion "no": api.SchemeGroupVersion.WithResource("nodes"), "ns": api.SchemeGroupVersion.WithResource("namespaces"), "po": api.SchemeGroupVersion.WithResource("pods"), + "psp": api.SchemeGroupVersion.WithResource("podSecurityPolicies"), "pvc": api.SchemeGroupVersion.WithResource("persistentvolumeclaims"), "pv": api.SchemeGroupVersion.WithResource("persistentvolumes"), "quota": api.SchemeGroupVersion.WithResource("resourcequotas"), diff --git a/pkg/kubectl/resource_printer.go b/pkg/kubectl/resource_printer.go index d819af91506..0a4044430dd 100644 --- a/pkg/kubectl/resource_printer.go +++ b/pkg/kubectl/resource_printer.go @@ -415,6 +415,7 @@ var horizontalPodAutoscalerColumns = []string{"NAME", "REFERENCE", "TARGET", "CU var withNamespacePrefixColumns = []string{"NAMESPACE"} // TODO(erictune): print cluster name too. var deploymentColumns = []string{"NAME", "DESIRED", "CURRENT", "UP-TO-DATE", "AVAILABLE", "AGE"} var configMapColumns = []string{"NAME", "DATA", "AGE"} +var podSecurityPolicyColumns = []string{"NAME", "PRIV", "CAPS", "VOLUMEPLUGINS", "SELINUX", "RUNASUSER"} // addDefaultHandlers adds print handlers for default Kubernetes types. func (h *HumanReadablePrinter) addDefaultHandlers() { @@ -462,6 +463,8 @@ func (h *HumanReadablePrinter) addDefaultHandlers() { h.Handler(horizontalPodAutoscalerColumns, printHorizontalPodAutoscalerList) h.Handler(configMapColumns, printConfigMap) h.Handler(configMapColumns, printConfigMapList) + h.Handler(podSecurityPolicyColumns, printPodSecurityPolicy) + h.Handler(podSecurityPolicyColumns, printPodSecurityPolicyList) } func (h *HumanReadablePrinter) unknown(data []byte, w io.Writer) error { @@ -1478,6 +1481,23 @@ func printConfigMapList(list *api.ConfigMapList, w io.Writer, options PrintOptio return nil } +func printPodSecurityPolicy(item *extensions.PodSecurityPolicy, w io.Writer, options PrintOptions) error { + _, err := fmt.Fprintf(w, "%s\t%t\t%v\t%t\t%s\t%s\n", item.Name, item.Spec.Privileged, + item.Spec.Capabilities, item.Spec.Volumes, item.Spec.SELinuxContext.Type, + item.Spec.RunAsUser.Type) + return err +} + +func printPodSecurityPolicyList(list *extensions.PodSecurityPolicyList, w io.Writer, options PrintOptions) error { + for _, item := range list.Items { + if err := printPodSecurityPolicy(&item, w, options); err != nil { + return err + } + } + + return nil +} + func appendLabels(itemLabels map[string]string, columnLabels []string) string { var buffer bytes.Buffer diff --git a/pkg/master/master.go b/pkg/master/master.go index 1beca735b6f..4c4a865fb21 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -57,6 +57,7 @@ import ( pvetcd "k8s.io/kubernetes/pkg/registry/persistentvolume/etcd" pvcetcd "k8s.io/kubernetes/pkg/registry/persistentvolumeclaim/etcd" podetcd "k8s.io/kubernetes/pkg/registry/pod/etcd" + pspetcd "k8s.io/kubernetes/pkg/registry/podsecuritypolicy/etcd" podtemplateetcd "k8s.io/kubernetes/pkg/registry/podtemplate/etcd" resourcequotaetcd "k8s.io/kubernetes/pkg/registry/resourcequota/etcd" secretetcd "k8s.io/kubernetes/pkg/registry/secret/etcd" @@ -587,7 +588,7 @@ func (m *Master) thirdpartyapi(group, kind, version string) *apiserver.APIGroupV // getExperimentalResources returns the resources for extenstions api func (m *Master) getExtensionResources(c *Config) map[string]rest.Storage { // All resources except these are disabled by default. - enabledResources := sets.NewString("jobs", "horizontalpodautoscalers", "ingresses") + enabledResources := sets.NewString("jobs", "horizontalpodautoscalers", "ingresses", "podsecuritypolicy") resourceOverrides := m.ApiGroupVersionOverrides["extensions/v1beta1"].ResourceOverrides isEnabled := func(resource string) bool { // Check if the resource has been overriden. @@ -650,6 +651,10 @@ func (m *Master) getExtensionResources(c *Config) map[string]rest.Storage { storage["ingresses"] = ingressStorage storage["ingresses/status"] = ingressStatusStorage } + if isEnabled("podsecuritypolicy") { + podSecurityPolicyStorage := pspetcd.NewREST(dbClient("podsecuritypolicy"), storageDecorator) + storage["podSecurityPolicies"] = podSecurityPolicyStorage + } return storage } diff --git a/pkg/registry/podsecuritypolicy/doc.go b/pkg/registry/podsecuritypolicy/doc.go new file mode 100644 index 00000000000..fa50db8e4ee --- /dev/null +++ b/pkg/registry/podsecuritypolicy/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2015 The Kubernetes Authors All rights reserved. + +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 podsecuritypolicy provides Registry interface and its REST +// implementation for storing PodSecurityPolicy api objects. +package podsecuritypolicy diff --git a/pkg/registry/podsecuritypolicy/etcd/etcd.go b/pkg/registry/podsecuritypolicy/etcd/etcd.go new file mode 100644 index 00000000000..40b181da639 --- /dev/null +++ b/pkg/registry/podsecuritypolicy/etcd/etcd.go @@ -0,0 +1,67 @@ +/* +Copyright 2014 The Kubernetes Authors All rights reserved. + +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 etcd + +import ( + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/fields" + "k8s.io/kubernetes/pkg/labels" + "k8s.io/kubernetes/pkg/registry/generic" + etcdgeneric "k8s.io/kubernetes/pkg/registry/generic/etcd" + "k8s.io/kubernetes/pkg/registry/podsecuritypolicy" + "k8s.io/kubernetes/pkg/runtime" + "k8s.io/kubernetes/pkg/storage" +) + +// REST implements a RESTStorage for PodSecurityPolicies against etcd. +type REST struct { + *etcdgeneric.Etcd +} + +const Prefix = "/podsecuritypolicies" + +// NewREST returns a RESTStorage object that will work against PodSecurityPolicy objects. +func NewREST(s storage.Interface, storageDecorator generic.StorageDecorator) *REST { + newListFunc := func() runtime.Object { return &extensions.PodSecurityPolicyList{} } + storageInterface := storageDecorator( + s, 100, &extensions.PodSecurityPolicy{}, Prefix, podsecuritypolicy.Strategy, newListFunc) + + store := &etcdgeneric.Etcd{ + NewFunc: func() runtime.Object { return &extensions.PodSecurityPolicy{} }, + NewListFunc: newListFunc, + KeyRootFunc: func(ctx api.Context) string { + return Prefix + }, + KeyFunc: func(ctx api.Context, name string) (string, error) { + return etcdgeneric.NoNamespaceKeyFunc(ctx, Prefix, name) + }, + ObjectNameFunc: func(obj runtime.Object) (string, error) { + return obj.(*extensions.PodSecurityPolicy).Name, nil + }, + PredicateFunc: func(label labels.Selector, field fields.Selector) generic.Matcher { + return podsecuritypolicy.MatchPodSecurityPolicy(label, field) + }, + QualifiedResource: extensions.Resource("podsecuritypolicies"), + + CreateStrategy: podsecuritypolicy.Strategy, + UpdateStrategy: podsecuritypolicy.Strategy, + ReturnDeletedObject: true, + Storage: storageInterface, + } + return &REST{store} +} diff --git a/pkg/registry/podsecuritypolicy/etcd/etcd_test.go b/pkg/registry/podsecuritypolicy/etcd/etcd_test.go new file mode 100644 index 00000000000..4fd96066e5c --- /dev/null +++ b/pkg/registry/podsecuritypolicy/etcd/etcd_test.go @@ -0,0 +1,130 @@ +/* +Copyright 2014 The Kubernetes Authors All rights reserved. + +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 etcd + +import ( + "testing" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/extensions" + // Ensure that extensions/v1beta1 package is initialized. + _ "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" + "k8s.io/kubernetes/pkg/fields" + "k8s.io/kubernetes/pkg/labels" + "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/registry/registrytest" + "k8s.io/kubernetes/pkg/runtime" + etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" +) + +func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { + etcdStorage, server := registrytest.NewEtcdStorage(t, "extensions") + return NewREST(etcdStorage, generic.UndecoratedStorage), server +} + +func validNewPodSecurityPolicy() *extensions.PodSecurityPolicy { + return &extensions.PodSecurityPolicy{ + ObjectMeta: api.ObjectMeta{ + Name: "foo", + }, + Spec: extensions.PodSecurityPolicySpec{ + SELinuxContext: extensions.SELinuxContextStrategyOptions{ + Type: extensions.SELinuxStrategyRunAsAny, + }, + RunAsUser: extensions.RunAsUserStrategyOptions{ + Type: extensions.RunAsUserStrategyRunAsAny, + }, + }, + } +} + +func TestCreate(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + test := registrytest.New(t, storage.Etcd).ClusterScope() + scc := validNewPodSecurityPolicy() + scc.ObjectMeta = api.ObjectMeta{GenerateName: "foo-"} + test.TestCreate( + // valid + scc, + // invalid + &extensions.PodSecurityPolicy{ + ObjectMeta: api.ObjectMeta{Name: "name with spaces"}, + }, + ) +} + +func TestUpdate(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + test := registrytest.New(t, storage.Etcd).ClusterScope() + test.TestUpdate( + // valid + validNewPodSecurityPolicy(), + // updateFunc + func(obj runtime.Object) runtime.Object { + object := obj.(*extensions.PodSecurityPolicy) + object.Labels = map[string]string{"a": "b"} + return object + }, + ) +} + +func TestDelete(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + test := registrytest.New(t, storage.Etcd).ClusterScope().ReturnDeletedObject() + test.TestDelete(validNewPodSecurityPolicy()) +} + +func TestGet(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + test := registrytest.New(t, storage.Etcd).ClusterScope() + test.TestGet(validNewPodSecurityPolicy()) +} + +func TestList(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + test := registrytest.New(t, storage.Etcd).ClusterScope() + test.TestList(validNewPodSecurityPolicy()) +} + +func TestWatch(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + test := registrytest.New(t, storage.Etcd).ClusterScope() + test.TestWatch( + validNewPodSecurityPolicy(), + // matching labels + []labels.Set{}, + // not matching labels + []labels.Set{ + {"foo": "bar"}, + }, + // matching fields + []fields.Set{ + {"metadata.name": "foo"}, + }, + // not matching fields + []fields.Set{ + {"metadata.name": "bar"}, + {"name": "foo"}, + }, + ) +} diff --git a/pkg/registry/podsecuritypolicy/strategy.go b/pkg/registry/podsecuritypolicy/strategy.go new file mode 100644 index 00000000000..905be4dc6db --- /dev/null +++ b/pkg/registry/podsecuritypolicy/strategy.go @@ -0,0 +1,93 @@ +/* +Copyright 2015 The Kubernetes Authors All rights reserved. + +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 podsecuritypolicy + +import ( + "fmt" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/rest" + "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/apis/extensions/validation" + "k8s.io/kubernetes/pkg/fields" + "k8s.io/kubernetes/pkg/labels" + "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/runtime" + "k8s.io/kubernetes/pkg/util/validation/field" +) + +// strategy implements behavior for PodSecurityPolicy objects +type strategy struct { + runtime.ObjectTyper + api.NameGenerator +} + +// Strategy is the default logic that applies when creating and updating PodSecurityPolicy +// objects via the REST API. +var Strategy = strategy{api.Scheme, api.SimpleNameGenerator} + +var _ = rest.RESTCreateStrategy(Strategy) + +var _ = rest.RESTUpdateStrategy(Strategy) + +func (strategy) NamespaceScoped() bool { + return false +} + +func (strategy) AllowCreateOnUpdate() bool { + return false +} + +func (strategy) AllowUnconditionalUpdate() bool { + return true +} + +func (strategy) PrepareForCreate(obj runtime.Object) { +} + +func (strategy) PrepareForUpdate(obj, old runtime.Object) { +} + +func (strategy) Canonicalize(obj runtime.Object) { +} + +func (strategy) Validate(ctx api.Context, obj runtime.Object) field.ErrorList { + return validation.ValidatePodSecurityPolicy(obj.(*extensions.PodSecurityPolicy)) +} + +func (strategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList { + return validation.ValidatePodSecurityPolicyUpdate(old.(*extensions.PodSecurityPolicy), obj.(*extensions.PodSecurityPolicy)) +} + +// Matcher returns a generic matcher for a given label and field selector. +func MatchPodSecurityPolicy(label labels.Selector, field fields.Selector) generic.Matcher { + return &generic.SelectionPredicate{ + Label: label, + Field: field, + GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) { + psp, ok := obj.(*extensions.PodSecurityPolicy) + if !ok { + return nil, nil, fmt.Errorf("given object is not a pod security policy.") + } + return labels.Set(psp.ObjectMeta.Labels), PodSecurityPolicyToSelectableFields(psp), nil + }, + } +} + +// PodSecurityPolicyToSelectableFields returns a label set that represents the object +func PodSecurityPolicyToSelectableFields(obj *extensions.PodSecurityPolicy) fields.Set { + return generic.ObjectMetaFieldsSet(obj.ObjectMeta, false) +}