diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index bfe4305d2fe..1ea7e7f232b 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -14382,9 +14382,9 @@ } } }, - "/apis/apps/v1alpha1/namespaces/{namespace}/petsets": { + "/apis/apps/v1alpha1/namespaces/{namespace}/statefulsets": { "get": { - "description": "list or watch objects of kind PetSet", + "description": "list or watch objects of kind StatefulSet", "consumes": [ "*/*" ], @@ -14399,7 +14399,7 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "listAppsV1alpha1NamespacedPetSet", + "operationId": "listAppsV1alpha1NamespacedStatefulSet", "parameters": [ { "uniqueItems": true, @@ -14441,7 +14441,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.PetSetList" + "$ref": "#/definitions/v1alpha1.StatefulSetList" } }, "401": { @@ -14450,7 +14450,7 @@ } }, "post": { - "description": "create a PetSet", + "description": "create a StatefulSet", "consumes": [ "*/*" ], @@ -14465,14 +14465,14 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "createAppsV1alpha1NamespacedPetSet", + "operationId": "createAppsV1alpha1NamespacedStatefulSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.PetSet" + "$ref": "#/definitions/v1alpha1.StatefulSet" } } ], @@ -14480,7 +14480,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.PetSet" + "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { @@ -14489,7 +14489,7 @@ } }, "delete": { - "description": "delete collection of PetSet", + "description": "delete collection of StatefulSet", "consumes": [ "*/*" ], @@ -14504,7 +14504,7 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "deleteAppsV1alpha1CollectionNamespacedPetSet", + "operationId": "deleteAppsV1alpha1CollectionNamespacedStatefulSet", "parameters": [ { "uniqueItems": true, @@ -14572,9 +14572,9 @@ } ] }, - "/apis/apps/v1alpha1/namespaces/{namespace}/petsets/{name}": { + "/apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}": { "get": { - "description": "read the specified PetSet", + "description": "read the specified StatefulSet", "consumes": [ "*/*" ], @@ -14589,7 +14589,7 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "readAppsV1alpha1NamespacedPetSet", + "operationId": "readAppsV1alpha1NamespacedStatefulSet", "parameters": [ { "uniqueItems": true, @@ -14610,7 +14610,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.PetSet" + "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { @@ -14619,7 +14619,7 @@ } }, "put": { - "description": "replace the specified PetSet", + "description": "replace the specified StatefulSet", "consumes": [ "*/*" ], @@ -14634,14 +14634,14 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "replaceAppsV1alpha1NamespacedPetSet", + "operationId": "replaceAppsV1alpha1NamespacedStatefulSet", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.PetSet" + "$ref": "#/definitions/v1alpha1.StatefulSet" } } ], @@ -14649,7 +14649,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.PetSet" + "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { @@ -14658,7 +14658,7 @@ } }, "delete": { - "description": "delete a PetSet", + "description": "delete a StatefulSet", "consumes": [ "*/*" ], @@ -14673,7 +14673,7 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "deleteAppsV1alpha1NamespacedPetSet", + "operationId": "deleteAppsV1alpha1NamespacedStatefulSet", "parameters": [ { "name": "body", @@ -14697,7 +14697,7 @@ } }, "patch": { - "description": "partially update the specified PetSet", + "description": "partially update the specified StatefulSet", "consumes": [ "application/json-patch+json", "application/merge-patch+json", @@ -14714,7 +14714,7 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "patchAppsV1alpha1NamespacedPetSet", + "operationId": "patchAppsV1alpha1NamespacedStatefulSet", "parameters": [ { "name": "body", @@ -14729,7 +14729,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.PetSet" + "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { @@ -14741,7 +14741,7 @@ { "uniqueItems": true, "type": "string", - "description": "name of the PetSet", + "description": "name of the StatefulSet", "name": "name", "in": "path", "required": true @@ -14763,9 +14763,9 @@ } ] }, - "/apis/apps/v1alpha1/namespaces/{namespace}/petsets/{name}/status": { + "/apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}/status": { "get": { - "description": "read status of the specified PetSet", + "description": "read status of the specified StatefulSet", "consumes": [ "*/*" ], @@ -14780,12 +14780,12 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "readAppsV1alpha1NamespacedPetSetStatus", + "operationId": "readAppsV1alpha1NamespacedStatefulSetStatus", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.PetSet" + "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { @@ -14794,7 +14794,7 @@ } }, "put": { - "description": "replace status of the specified PetSet", + "description": "replace status of the specified StatefulSet", "consumes": [ "*/*" ], @@ -14809,14 +14809,14 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "replaceAppsV1alpha1NamespacedPetSetStatus", + "operationId": "replaceAppsV1alpha1NamespacedStatefulSetStatus", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.PetSet" + "$ref": "#/definitions/v1alpha1.StatefulSet" } } ], @@ -14824,7 +14824,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.PetSet" + "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { @@ -14833,7 +14833,7 @@ } }, "patch": { - "description": "partially update status of the specified PetSet", + "description": "partially update status of the specified StatefulSet", "consumes": [ "application/json-patch+json", "application/merge-patch+json", @@ -14850,7 +14850,7 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "patchAppsV1alpha1NamespacedPetSetStatus", + "operationId": "patchAppsV1alpha1NamespacedStatefulSetStatus", "parameters": [ { "name": "body", @@ -14865,7 +14865,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.PetSet" + "$ref": "#/definitions/v1alpha1.StatefulSet" } }, "401": { @@ -14877,7 +14877,7 @@ { "uniqueItems": true, "type": "string", - "description": "name of the PetSet", + "description": "name of the StatefulSet", "name": "name", "in": "path", "required": true @@ -14899,9 +14899,9 @@ } ] }, - "/apis/apps/v1alpha1/petsets": { + "/apis/apps/v1alpha1/statefulsets": { "get": { - "description": "list or watch objects of kind PetSet", + "description": "list or watch objects of kind StatefulSet", "consumes": [ "*/*" ], @@ -14916,12 +14916,12 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "listAppsV1alpha1PetSetForAllNamespaces", + "operationId": "listAppsV1alpha1StatefulSetForAllNamespaces", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.PetSetList" + "$ref": "#/definitions/v1alpha1.StatefulSetList" } }, "401": { @@ -14974,9 +14974,9 @@ } ] }, - "/apis/apps/v1alpha1/watch/namespaces/{namespace}/petsets": { + "/apis/apps/v1alpha1/watch/namespaces/{namespace}/statefulsets": { "get": { - "description": "watch individual changes to a list of PetSet", + "description": "watch individual changes to a list of StatefulSet", "consumes": [ "*/*" ], @@ -14992,7 +14992,7 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "watchAppsV1alpha1NamespacedPetSetList", + "operationId": "watchAppsV1alpha1NamespacedStatefulSetList", "responses": { "200": { "description": "OK", @@ -15058,9 +15058,9 @@ } ] }, - "/apis/apps/v1alpha1/watch/namespaces/{namespace}/petsets/{name}": { + "/apis/apps/v1alpha1/watch/namespaces/{namespace}/statefulsets/{name}": { "get": { - "description": "watch changes to an object of kind PetSet", + "description": "watch changes to an object of kind StatefulSet", "consumes": [ "*/*" ], @@ -15076,7 +15076,7 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "watchAppsV1alpha1NamespacedPetSet", + "operationId": "watchAppsV1alpha1NamespacedStatefulSet", "responses": { "200": { "description": "OK", @@ -15107,7 +15107,7 @@ { "uniqueItems": true, "type": "string", - "description": "name of the PetSet", + "description": "name of the StatefulSet", "name": "name", "in": "path", "required": true @@ -15150,9 +15150,9 @@ } ] }, - "/apis/apps/v1alpha1/watch/petsets": { + "/apis/apps/v1alpha1/watch/statefulsets": { "get": { - "description": "watch individual changes to a list of PetSet", + "description": "watch individual changes to a list of StatefulSet", "consumes": [ "*/*" ], @@ -15168,7 +15168,7 @@ "tags": [ "apps_v1alpha1" ], - "operationId": "watchAppsV1alpha1PetSetListForAllNamespaces", + "operationId": "watchAppsV1alpha1StatefulSetListForAllNamespaces", "responses": { "200": { "description": "OK", @@ -32209,90 +32209,6 @@ } } }, - "v1alpha1.PetSet": { - "description": "PetSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe PetSet guarantees that a given network identity will always map to the same storage identity. PetSet is currently in alpha and subject to change without notice.", - "properties": { - "metadata": { - "$ref": "#/definitions/v1.ObjectMeta" - }, - "spec": { - "description": "Spec defines the desired identities of pets in this set.", - "$ref": "#/definitions/v1alpha1.PetSetSpec" - }, - "status": { - "description": "Status is the current status of Pets in this PetSet. This data may be out of date by some window of time.", - "$ref": "#/definitions/v1alpha1.PetSetStatus" - } - } - }, - "v1alpha1.PetSetList": { - "description": "PetSetList is a collection of PetSets.", - "required": [ - "items" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1.PetSet" - } - }, - "metadata": { - "$ref": "#/definitions/unversioned.ListMeta" - } - } - }, - "v1alpha1.PetSetSpec": { - "description": "A PetSetSpec is the specification of a PetSet.", - "required": [ - "template", - "serviceName" - ], - "properties": { - "replicas": { - "description": "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", - "$ref": "#/definitions/unversioned.LabelSelector" - }, - "serviceName": { - "description": "ServiceName is the name of the service that governs this PetSet. This service must exist before the PetSet, and is responsible for the network identity of the set. Pets get DNS/hostnames that follow the pattern: pet-specific-string.serviceName.default.svc.cluster.local where \"pet-specific-string\" is managed by the PetSet controller.", - "type": "string" - }, - "template": { - "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the PetSet will fulfill this Template, but have a unique identity from the rest of the PetSet.", - "$ref": "#/definitions/v1.PodTemplateSpec" - }, - "volumeClaimTemplates": { - "description": "VolumeClaimTemplates is a list of claims that pets are allowed to reference. The PetSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pet. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", - "type": "array", - "items": { - "$ref": "#/definitions/v1.PersistentVolumeClaim" - } - } - } - }, - "v1alpha1.PetSetStatus": { - "description": "PetSetStatus represents the current state of a PetSet.", - "required": [ - "replicas" - ], - "properties": { - "observedGeneration": { - "description": "most recent generation observed by this autoscaler.", - "type": "integer", - "format": "int64" - }, - "replicas": { - "description": "Replicas is the number of actual replicas.", - "type": "integer", - "format": "int32" - } - } - }, "v1alpha1.PodDisruptionBudget": { "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", "properties": { @@ -32519,6 +32435,90 @@ } } }, + "v1alpha1.StatefulSet": { + "description": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity. StatefulSet is currently in alpha and subject to change without notice.", + "properties": { + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the desired identities of pods in this set.", + "$ref": "#/definitions/v1alpha1.StatefulSetSpec" + }, + "status": { + "description": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", + "$ref": "#/definitions/v1alpha1.StatefulSetStatus" + } + } + }, + "v1alpha1.StatefulSetList": { + "description": "StatefulSetList is a collection of StatefulSets.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1.StatefulSet" + } + }, + "metadata": { + "$ref": "#/definitions/unversioned.ListMeta" + } + } + }, + "v1alpha1.StatefulSetSpec": { + "description": "A StatefulSetSpec is the specification of a StatefulSet.", + "required": [ + "template", + "serviceName" + ], + "properties": { + "replicas": { + "description": "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "$ref": "#/definitions/unversioned.LabelSelector" + }, + "serviceName": { + "description": "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", + "type": "string" + }, + "template": { + "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + "$ref": "#/definitions/v1.PodTemplateSpec" + }, + "volumeClaimTemplates": { + "description": "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + } + } + }, + "v1alpha1.StatefulSetStatus": { + "description": "StatefulSetStatus represents the current state of a StatefulSet.", + "required": [ + "replicas" + ], + "properties": { + "observedGeneration": { + "description": "most recent generation observed by this autoscaler.", + "type": "integer", + "format": "int64" + }, + "replicas": { + "description": "Replicas is the number of actual replicas.", + "type": "integer", + "format": "int32" + } + } + }, "v1alpha1.Subject": { "description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", "required": [ diff --git a/api/swagger-spec/apps_v1alpha1.json b/api/swagger-spec/apps_v1alpha1.json index b6189b019f9..825c60ff9db 100644 --- a/api/swagger-spec/apps_v1alpha1.json +++ b/api/swagger-spec/apps_v1alpha1.json @@ -9,14 +9,14 @@ }, "apis": [ { - "path": "/apis/apps/v1alpha1/namespaces/{namespace}/petsets", + "path": "/apis/apps/v1alpha1/namespaces/{namespace}/statefulsets", "description": "API at /apis/apps/v1alpha1", "operations": [ { - "type": "v1alpha1.PetSetList", + "type": "v1alpha1.StatefulSetList", "method": "GET", - "summary": "list or watch objects of kind PetSet", - "nickname": "listNamespacedPetSet", + "summary": "list or watch objects of kind StatefulSet", + "nickname": "listNamespacedStatefulSet", "parameters": [ { "type": "string", @@ -79,7 +79,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.PetSetList" + "responseModel": "v1alpha1.StatefulSetList" } ], "produces": [ @@ -92,10 +92,10 @@ ] }, { - "type": "v1alpha1.PetSet", + "type": "v1alpha1.StatefulSet", "method": "POST", - "summary": "create a PetSet", - "nickname": "createNamespacedPetSet", + "summary": "create a StatefulSet", + "nickname": "createNamespacedStatefulSet", "parameters": [ { "type": "string", @@ -106,7 +106,7 @@ "allowMultiple": false }, { - "type": "v1alpha1.PetSet", + "type": "v1alpha1.StatefulSet", "paramType": "body", "name": "body", "description": "", @@ -126,7 +126,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.PetSet" + "responseModel": "v1alpha1.StatefulSet" } ], "produces": [ @@ -141,8 +141,8 @@ { "type": "unversioned.Status", "method": "DELETE", - "summary": "delete collection of PetSet", - "nickname": "deletecollectionNamespacedPetSet", + "summary": "delete collection of StatefulSet", + "nickname": "deletecollectionNamespacedStatefulSet", "parameters": [ { "type": "string", @@ -220,14 +220,14 @@ ] }, { - "path": "/apis/apps/v1alpha1/watch/namespaces/{namespace}/petsets", + "path": "/apis/apps/v1alpha1/watch/namespaces/{namespace}/statefulsets", "description": "API at /apis/apps/v1alpha1", "operations": [ { "type": "versioned.Event", "method": "GET", - "summary": "watch individual changes to a list of PetSet", - "nickname": "watchNamespacedPetSetList", + "summary": "watch individual changes to a list of StatefulSet", + "nickname": "watchNamespacedStatefulSetList", "parameters": [ { "type": "string", @@ -306,14 +306,14 @@ ] }, { - "path": "/apis/apps/v1alpha1/namespaces/{namespace}/petsets/{name}", + "path": "/apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}", "description": "API at /apis/apps/v1alpha1", "operations": [ { - "type": "v1alpha1.PetSet", + "type": "v1alpha1.StatefulSet", "method": "GET", - "summary": "read the specified PetSet", - "nickname": "readNamespacedPetSet", + "summary": "read the specified StatefulSet", + "nickname": "readNamespacedStatefulSet", "parameters": [ { "type": "string", @@ -351,7 +351,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the PetSet", + "description": "name of the StatefulSet", "required": true, "allowMultiple": false } @@ -360,7 +360,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.PetSet" + "responseModel": "v1alpha1.StatefulSet" } ], "produces": [ @@ -373,10 +373,10 @@ ] }, { - "type": "v1alpha1.PetSet", + "type": "v1alpha1.StatefulSet", "method": "PUT", - "summary": "replace the specified PetSet", - "nickname": "replaceNamespacedPetSet", + "summary": "replace the specified StatefulSet", + "nickname": "replaceNamespacedStatefulSet", "parameters": [ { "type": "string", @@ -387,7 +387,7 @@ "allowMultiple": false }, { - "type": "v1alpha1.PetSet", + "type": "v1alpha1.StatefulSet", "paramType": "body", "name": "body", "description": "", @@ -406,7 +406,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the PetSet", + "description": "name of the StatefulSet", "required": true, "allowMultiple": false } @@ -415,7 +415,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.PetSet" + "responseModel": "v1alpha1.StatefulSet" } ], "produces": [ @@ -428,10 +428,10 @@ ] }, { - "type": "v1alpha1.PetSet", + "type": "v1alpha1.StatefulSet", "method": "PATCH", - "summary": "partially update the specified PetSet", - "nickname": "patchNamespacedPetSet", + "summary": "partially update the specified StatefulSet", + "nickname": "patchNamespacedStatefulSet", "parameters": [ { "type": "string", @@ -461,7 +461,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the PetSet", + "description": "name of the StatefulSet", "required": true, "allowMultiple": false } @@ -470,7 +470,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.PetSet" + "responseModel": "v1alpha1.StatefulSet" } ], "produces": [ @@ -487,8 +487,8 @@ { "type": "unversioned.Status", "method": "DELETE", - "summary": "delete a PetSet", - "nickname": "deleteNamespacedPetSet", + "summary": "delete a StatefulSet", + "nickname": "deleteNamespacedStatefulSet", "parameters": [ { "type": "string", @@ -518,7 +518,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the PetSet", + "description": "name of the StatefulSet", "required": true, "allowMultiple": false } @@ -542,14 +542,14 @@ ] }, { - "path": "/apis/apps/v1alpha1/watch/namespaces/{namespace}/petsets/{name}", + "path": "/apis/apps/v1alpha1/watch/namespaces/{namespace}/statefulsets/{name}", "description": "API at /apis/apps/v1alpha1", "operations": [ { "type": "versioned.Event", "method": "GET", - "summary": "watch changes to an object of kind PetSet", - "nickname": "watchNamespacedPetSet", + "summary": "watch changes to an object of kind StatefulSet", + "nickname": "watchNamespacedStatefulSet", "parameters": [ { "type": "string", @@ -611,7 +611,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the PetSet", + "description": "name of the StatefulSet", "required": true, "allowMultiple": false } @@ -636,14 +636,14 @@ ] }, { - "path": "/apis/apps/v1alpha1/petsets", + "path": "/apis/apps/v1alpha1/statefulsets", "description": "API at /apis/apps/v1alpha1", "operations": [ { - "type": "v1alpha1.PetSetList", + "type": "v1alpha1.StatefulSetList", "method": "GET", - "summary": "list or watch objects of kind PetSet", - "nickname": "listPetSetForAllNamespaces", + "summary": "list or watch objects of kind StatefulSet", + "nickname": "listStatefulSetForAllNamespaces", "parameters": [ { "type": "string", @@ -698,7 +698,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.PetSetList" + "responseModel": "v1alpha1.StatefulSetList" } ], "produces": [ @@ -713,14 +713,14 @@ ] }, { - "path": "/apis/apps/v1alpha1/watch/petsets", + "path": "/apis/apps/v1alpha1/watch/statefulsets", "description": "API at /apis/apps/v1alpha1", "operations": [ { "type": "versioned.Event", "method": "GET", - "summary": "watch individual changes to a list of PetSet", - "nickname": "watchPetSetListForAllNamespaces", + "summary": "watch individual changes to a list of StatefulSet", + "nickname": "watchStatefulSetListForAllNamespaces", "parameters": [ { "type": "string", @@ -791,14 +791,14 @@ ] }, { - "path": "/apis/apps/v1alpha1/namespaces/{namespace}/petsets/{name}/status", + "path": "/apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}/status", "description": "API at /apis/apps/v1alpha1", "operations": [ { - "type": "v1alpha1.PetSet", + "type": "v1alpha1.StatefulSet", "method": "GET", - "summary": "read status of the specified PetSet", - "nickname": "readNamespacedPetSetStatus", + "summary": "read status of the specified StatefulSet", + "nickname": "readNamespacedStatefulSetStatus", "parameters": [ { "type": "string", @@ -820,7 +820,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the PetSet", + "description": "name of the StatefulSet", "required": true, "allowMultiple": false } @@ -829,7 +829,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.PetSet" + "responseModel": "v1alpha1.StatefulSet" } ], "produces": [ @@ -842,10 +842,10 @@ ] }, { - "type": "v1alpha1.PetSet", + "type": "v1alpha1.StatefulSet", "method": "PUT", - "summary": "replace status of the specified PetSet", - "nickname": "replaceNamespacedPetSetStatus", + "summary": "replace status of the specified StatefulSet", + "nickname": "replaceNamespacedStatefulSetStatus", "parameters": [ { "type": "string", @@ -856,7 +856,7 @@ "allowMultiple": false }, { - "type": "v1alpha1.PetSet", + "type": "v1alpha1.StatefulSet", "paramType": "body", "name": "body", "description": "", @@ -875,7 +875,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the PetSet", + "description": "name of the StatefulSet", "required": true, "allowMultiple": false } @@ -884,7 +884,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.PetSet" + "responseModel": "v1alpha1.StatefulSet" } ], "produces": [ @@ -897,10 +897,10 @@ ] }, { - "type": "v1alpha1.PetSet", + "type": "v1alpha1.StatefulSet", "method": "PATCH", - "summary": "partially update status of the specified PetSet", - "nickname": "patchNamespacedPetSetStatus", + "summary": "partially update status of the specified StatefulSet", + "nickname": "patchNamespacedStatefulSetStatus", "parameters": [ { "type": "string", @@ -930,7 +930,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the PetSet", + "description": "name of the StatefulSet", "required": true, "allowMultiple": false } @@ -939,7 +939,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.PetSet" + "responseModel": "v1alpha1.StatefulSet" } ], "produces": [ @@ -980,9 +980,9 @@ } ], "models": { - "v1alpha1.PetSetList": { - "id": "v1alpha1.PetSetList", - "description": "PetSetList is a collection of PetSets.", + "v1alpha1.StatefulSetList": { + "id": "v1alpha1.StatefulSetList", + "description": "StatefulSetList is a collection of StatefulSets.", "required": [ "items" ], @@ -1001,7 +1001,7 @@ "items": { "type": "array", "items": { - "$ref": "v1alpha1.PetSet" + "$ref": "v1alpha1.StatefulSet" } } } @@ -1020,9 +1020,9 @@ } } }, - "v1alpha1.PetSet": { - "id": "v1alpha1.PetSet", - "description": "PetSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe PetSet guarantees that a given network identity will always map to the same storage identity. PetSet is currently in alpha and subject to change without notice.", + "v1alpha1.StatefulSet": { + "id": "v1alpha1.StatefulSet", + "description": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity. StatefulSet is currently in alpha and subject to change without notice.", "properties": { "kind": { "type": "string", @@ -1036,12 +1036,12 @@ "$ref": "v1.ObjectMeta" }, "spec": { - "$ref": "v1alpha1.PetSetSpec", - "description": "Spec defines the desired identities of pets in this set." + "$ref": "v1alpha1.StatefulSetSpec", + "description": "Spec defines the desired identities of pods in this set." }, "status": { - "$ref": "v1alpha1.PetSetStatus", - "description": "Status is the current status of Pets in this PetSet. This data may be out of date by some window of time." + "$ref": "v1alpha1.StatefulSetStatus", + "description": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time." } } }, @@ -1153,9 +1153,9 @@ } } }, - "v1alpha1.PetSetSpec": { - "id": "v1alpha1.PetSetSpec", - "description": "A PetSetSpec is the specification of a PetSet.", + "v1alpha1.StatefulSetSpec": { + "id": "v1alpha1.StatefulSetSpec", + "description": "A StatefulSetSpec is the specification of a StatefulSet.", "required": [ "template", "serviceName" @@ -1172,18 +1172,18 @@ }, "template": { "$ref": "v1.PodTemplateSpec", - "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the PetSet will fulfill this Template, but have a unique identity from the rest of the PetSet." + "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet." }, "volumeClaimTemplates": { "type": "array", "items": { "$ref": "v1.PersistentVolumeClaim" }, - "description": "VolumeClaimTemplates is a list of claims that pets are allowed to reference. The PetSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pet. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name." + "description": "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name." }, "serviceName": { "type": "string", - "description": "ServiceName is the name of the service that governs this PetSet. This service must exist before the PetSet, and is responsible for the network identity of the set. Pets get DNS/hostnames that follow the pattern: pet-specific-string.serviceName.default.svc.cluster.local where \"pet-specific-string\" is managed by the PetSet controller." + "description": "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller." } } }, @@ -2641,9 +2641,9 @@ } } }, - "v1alpha1.PetSetStatus": { - "id": "v1alpha1.PetSetStatus", - "description": "PetSetStatus represents the current state of a PetSet.", + "v1alpha1.StatefulSetStatus": { + "id": "v1alpha1.StatefulSetStatus", + "description": "StatefulSetStatus represents the current state of a StatefulSet.", "required": [ "replicas" ], diff --git a/docs/api-reference/apps/v1alpha1/definitions.html b/docs/api-reference/apps/v1alpha1/definitions.html index aae29de1fba..6b791be9c48 100755 --- a/docs/api-reference/apps/v1alpha1/definitions.html +++ b/docs/api-reference/apps/v1alpha1/definitions.html @@ -370,10 +370,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
@@ -817,6 +817,68 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } + +
+

v1alpha1.StatefulSetSpec

+
+

A StatefulSetSpec is the specification of a StatefulSet.

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

replicas

Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.

false

integer (int32)

selector

Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors

false

unversioned.LabelSelector

template

Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.

true

v1.PodTemplateSpec

volumeClaimTemplates

VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.

false

v1.PersistentVolumeClaim array

serviceName

ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller.

true

string

+

v1.FCVolumeSource

@@ -1508,6 +1570,47 @@ Examples:
+
+
+

v1alpha1.StatefulSetStatus

+
+

StatefulSetStatus represents the current state of a StatefulSet.

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

observedGeneration

most recent generation observed by this autoscaler.

false

integer (int64)

replicas

Replicas is the number of actual replicas.

true

integer (int32)

+

v1.PodSecurityContext

@@ -1969,68 +2072,6 @@ Populated by the system when a graceful deletion is requested. Read-only. More i -
-
-

v1alpha1.PetSetSpec

-
-

A PetSetSpec is the specification of a PetSet.

-
- ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionRequiredSchemaDefault

replicas

Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.

false

integer (int32)

selector

Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors

false

unversioned.LabelSelector

template

Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the PetSet will fulfill this Template, but have a unique identity from the rest of the PetSet.

true

v1.PodTemplateSpec

volumeClaimTemplates

VolumeClaimTemplates is a list of claims that pets are allowed to reference. The PetSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pet. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.

false

v1.PersistentVolumeClaim array

serviceName

ServiceName is the name of the service that governs this PetSet. This service must exist before the PetSet, and is responsible for the network identity of the set. Pets get DNS/hostnames that follow the pattern: pet-specific-string.serviceName.default.svc.cluster.local where "pet-specific-string" is managed by the PetSet controller.

true

string

-

v1.EmptyDirVolumeSource

@@ -2543,12 +2584,50 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
-

v1alpha1.PetSet

+

unversioned.LabelSelector

-

PetSet represents a set of pods with consistent identities. Identities are defined as:
- - Network: A single stable DNS and hostname.
- - Storage: As many VolumeClaims as requested.
-The PetSet guarantees that a given network identity will always map to the same storage identity. PetSet is currently in alpha and subject to change without notice.

+

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

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

matchLabels

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

false

object

matchExpressions

matchExpressions is a list of label selector requirements. The requirements are ANDed.

false

unversioned.LabelSelectorRequirement array

+ +
+
+

v1alpha1.StatefulSetList

+
+

StatefulSetList is a collection of StatefulSets.

@@ -2586,62 +2665,14 @@ The PetSet guarantees that a given network identity will always map to the same - + - - - - + - - - - - - - - - -

metadata

false

v1.ObjectMeta

unversioned.ListMeta

spec

Spec defines the desired identities of pets in this set.

false

v1alpha1.PetSetSpec

items

status

Status is the current status of Pets in this PetSet. This data may be out of date by some window of time.

false

v1alpha1.PetSetStatus

- -
-
-

unversioned.LabelSelector

-
-

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

-
- ------- - - - - - - - - - - - - - - - - - - - - - - + + @@ -3100,47 +3131,6 @@ The PetSet guarantees that a given network identity will always map to the same
NameDescriptionRequiredSchemaDefault

matchLabels

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

false

object

matchExpressions

matchExpressions is a list of label selector requirements. The requirements are ANDed.

false

unversioned.LabelSelectorRequirement array

true

v1alpha1.StatefulSet array

-
-
-

v1alpha1.PetSetStatus

-
-

PetSetStatus represents the current state of a PetSet.

-
- ------- - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionRequiredSchemaDefault

observedGeneration

most recent generation observed by this autoscaler.

false

integer (int64)

replicas

Replicas is the number of actual replicas.

true

integer (int32)

-

v1.DeleteOptions

@@ -4244,9 +4234,12 @@ The PetSet guarantees that a given network identity will always map to the same
-

v1alpha1.PetSetList

+

v1alpha1.StatefulSet

-

PetSetList is a collection of PetSets.

+

StatefulSet represents a set of pods with consistent identities. Identities are defined as:
+ - Network: A single stable DNS and hostname.
+ - Storage: As many VolumeClaims as requested.
+The StatefulSet guarantees that a given network identity will always map to the same storage identity. StatefulSet is currently in alpha and subject to change without notice.

@@ -4284,14 +4277,21 @@ The PetSet guarantees that a given network identity will always map to the same - + - + + + + - - + + + + + + @@ -4396,7 +4396,7 @@ The PetSet guarantees that a given network identity will always map to the same diff --git a/docs/api-reference/apps/v1alpha1/operations.html b/docs/api-reference/apps/v1alpha1/operations.html index 61dc6d36f1e..03ba04c6872 100755 --- a/docs/api-reference/apps/v1alpha1/operations.html +++ b/docs/api-reference/apps/v1alpha1/operations.html @@ -443,10 +443,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

list or watch objects of kind PetSet

+

list or watch objects of kind StatefulSet

-
GET /apis/apps/v1alpha1/namespaces/{namespace}/petsets
+
GET /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets
@@ -550,7 +550,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
- +

metadata

false

unversioned.ListMeta

v1.ObjectMeta

items

spec

Spec defines the desired identities of pods in this set.

false

v1alpha1.StatefulSetSpec

true

v1alpha1.PetSet array

status

Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.

false

v1alpha1.StatefulSetStatus

200

success

v1alpha1.PetSetList

v1alpha1.StatefulSetList

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

delete collection of PetSet

+

delete collection of StatefulSet

-
DELETE /apis/apps/v1alpha1/namespaces/{namespace}/petsets
+
DELETE /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets
@@ -745,10 +745,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

create a PetSet

+

create a StatefulSet

-
POST /apis/apps/v1alpha1/namespaces/{namespace}/petsets
+
POST /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets
@@ -786,7 +786,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

body

true

-

v1alpha1.PetSet

+

v1alpha1.StatefulSet

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

200

success

-

v1alpha1.PetSet

+

v1alpha1.StatefulSet

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

read the specified PetSet

+

read the specified StatefulSet

-
GET /apis/apps/v1alpha1/namespaces/{namespace}/petsets/{name}
+
GET /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}
@@ -927,7 +927,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

PathParameter

name

-

name of the PetSet

+

name of the StatefulSet

true

string

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

200

success

-

v1alpha1.PetSet

+

v1alpha1.StatefulSet

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

replace the specified PetSet

+

replace the specified StatefulSet

-
PUT /apis/apps/v1alpha1/namespaces/{namespace}/petsets/{name}
+
PUT /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}
@@ -1040,7 +1040,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

body

true

-

v1alpha1.PetSet

+

v1alpha1.StatefulSet

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

PathParameter

name

-

name of the PetSet

+

name of the StatefulSet

true

string

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

200

success

-

v1alpha1.PetSet

+

v1alpha1.StatefulSet

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

delete a PetSet

+

delete a StatefulSet

-
DELETE /apis/apps/v1alpha1/namespaces/{namespace}/petsets/{name}
+
DELETE /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}
@@ -1181,7 +1181,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

PathParameter

name

-

name of the PetSet

+

name of the StatefulSet

true

string

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

partially update the specified PetSet

+

partially update the specified StatefulSet

-
PATCH /apis/apps/v1alpha1/namespaces/{namespace}/petsets/{name}
+
PATCH /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}
@@ -1308,7 +1308,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

PathParameter

name

-

name of the PetSet

+

name of the StatefulSet

true

string

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

200

success

-

v1alpha1.PetSet

+

v1alpha1.StatefulSet

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

read status of the specified PetSet

+

read status of the specified StatefulSet

-
GET /apis/apps/v1alpha1/namespaces/{namespace}/petsets/{name}/status
+
GET /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}/status
@@ -1433,7 +1433,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

PathParameter

name

-

name of the PetSet

+

name of the StatefulSet

true

string

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

200

success

-

v1alpha1.PetSet

+

v1alpha1.StatefulSet

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

replace status of the specified PetSet

+

replace status of the specified StatefulSet

-
PUT /apis/apps/v1alpha1/namespaces/{namespace}/petsets/{name}/status
+
PUT /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}/status
@@ -1546,7 +1546,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

body

true

-

v1alpha1.PetSet

+

v1alpha1.StatefulSet

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

PathParameter

name

-

name of the PetSet

+

name of the StatefulSet

true

string

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

200

success

-

v1alpha1.PetSet

+

v1alpha1.StatefulSet

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

partially update status of the specified PetSet

+

partially update status of the specified StatefulSet

-
PATCH /apis/apps/v1alpha1/namespaces/{namespace}/petsets/{name}/status
+
PATCH /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}/status
@@ -1687,7 +1687,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

PathParameter

name

-

name of the PetSet

+

name of the StatefulSet

true

string

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

200

success

-

v1alpha1.PetSet

+

v1alpha1.StatefulSet

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

list or watch objects of kind PetSet

+

list or watch objects of kind StatefulSet

-
GET /apis/apps/v1alpha1/petsets
+
GET /apis/apps/v1alpha1/statefulsets
@@ -1864,7 +1864,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

200

success

-

v1alpha1.PetSetList

+

v1alpha1.StatefulSetList

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

watch individual changes to a list of PetSet

+

watch individual changes to a list of StatefulSet

-
GET /apis/apps/v1alpha1/watch/namespaces/{namespace}/petsets
+
GET /apis/apps/v1alpha1/watch/namespaces/{namespace}/statefulsets
@@ -2062,10 +2062,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

watch changes to an object of kind PetSet

+

watch changes to an object of kind StatefulSet

-
GET /apis/apps/v1alpha1/watch/namespaces/{namespace}/petsets/{name}
+
GET /apis/apps/v1alpha1/watch/namespaces/{namespace}/statefulsets/{name}
@@ -2149,7 +2149,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

PathParameter

name

-

name of the PetSet

+

name of the StatefulSet

true

string

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

watch individual changes to a list of PetSet

+

watch individual changes to a list of StatefulSet

-
GET /apis/apps/v1alpha1/watch/petsets
+
GET /apis/apps/v1alpha1/watch/statefulsets
@@ -2374,7 +2374,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
diff --git a/examples/storage/cassandra/README.md b/examples/storage/cassandra/README.md index 979e8cc6b1f..a5780ba1641 100644 --- a/examples/storage/cassandra/README.md +++ b/examples/storage/cassandra/README.md @@ -180,7 +180,7 @@ of three pods. ```yaml apiVersion: "apps/v1alpha1" -kind: PetSet +kind: StatefulSet metadata: name: cassandra spec: diff --git a/pkg/apis/apps/types.generated.go b/pkg/apis/apps/types.generated.go new file mode 100644 index 00000000000..444717153e2 --- /dev/null +++ b/pkg/apis/apps/types.generated.go @@ -0,0 +1,1628 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package apps + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg2_api "k8s.io/kubernetes/pkg/api" + pkg4_resource "k8s.io/kubernetes/pkg/api/resource" + pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned" + pkg3_types "k8s.io/kubernetes/pkg/types" + pkg5_intstr "k8s.io/kubernetes/pkg/util/intstr" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg2_api.ObjectMeta + var v1 pkg4_resource.Quantity + var v2 pkg1_unversioned.TypeMeta + var v3 pkg3_types.UID + var v4 pkg5_intstr.IntOrString + var v5 time.Time + _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 + } +} + +func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yy10.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy11 := &x.ObjectMeta + yy11.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy13 := &x.Spec + yy13.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy14 := &x.Spec + yy14.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy16 := &x.Status + yy16.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Status + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSet) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct19 := r.ContainerType() + if yyct19 == codecSelferValueTypeMap1234 { + yyl19 := r.ReadMapStart() + if yyl19 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl19, d) + } + } else if yyct19 == codecSelferValueTypeArray1234 { + yyl19 := r.ReadArrayStart() + if yyl19 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl19, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys20Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys20Slc + var yyhl20 bool = l >= 0 + for yyj20 := 0; ; yyj20++ { + if yyhl20 { + if yyj20 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys20Slc = r.DecodeBytes(yys20Slc, true, true) + yys20 := string(yys20Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys20 { + 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 { + yyv23 := &x.ObjectMeta + yyv23.CodecDecodeSelf(d) + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = StatefulSetSpec{} + } else { + yyv24 := &x.Spec + yyv24.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = StatefulSetStatus{} + } else { + yyv25 := &x.Status + yyv25.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys20) + } // end switch yys20 + } // end for yyj20 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj26 int + var yyb26 bool + var yyhl26 bool = l >= 0 + yyj26++ + if yyhl26 { + yyb26 = yyj26 > l + } else { + yyb26 = r.CheckBreak() + } + if yyb26 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj26++ + if yyhl26 { + yyb26 = yyj26 > l + } else { + yyb26 = r.CheckBreak() + } + if yyb26 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj26++ + if yyhl26 { + yyb26 = yyj26 > l + } else { + yyb26 = r.CheckBreak() + } + if yyb26 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_api.ObjectMeta{} + } else { + yyv29 := &x.ObjectMeta + yyv29.CodecDecodeSelf(d) + } + yyj26++ + if yyhl26 { + yyb26 = yyj26 > l + } else { + yyb26 = r.CheckBreak() + } + if yyb26 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = StatefulSetSpec{} + } else { + yyv30 := &x.Spec + yyv30.CodecDecodeSelf(d) + } + yyj26++ + if yyhl26 { + yyb26 = yyj26 > l + } else { + yyb26 = r.CheckBreak() + } + if yyb26 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = StatefulSetStatus{} + } else { + yyv31 := &x.Status + yyv31.CodecDecodeSelf(d) + } + for { + yyj26++ + if yyhl26 { + yyb26 = yyj26 > l + } else { + yyb26 = r.CheckBreak() + } + if yyb26 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj26-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym32 := z.EncBinary() + _ = yym32 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep33 := !z.EncBinary() + yy2arr33 := z.EncBasicHandle().StructToArray + var yyq33 [5]bool + _, _, _ = yysep33, yyq33, yy2arr33 + const yyr33 bool = false + yyq33[0] = x.Replicas != 0 + yyq33[1] = x.Selector != nil + yyq33[3] = len(x.VolumeClaimTemplates) != 0 + var yynn33 int + if yyr33 || yy2arr33 { + r.EncodeArrayStart(5) + } else { + yynn33 = 2 + for _, b := range yyq33 { + if b { + yynn33++ + } + } + r.EncodeMapStart(yynn33) + yynn33 = 0 + } + if yyr33 || yy2arr33 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq33[0] { + yym35 := z.EncBinary() + _ = yym35 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq33[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym36 := z.EncBinary() + _ = yym36 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + } + if yyr33 || yy2arr33 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq33[1] { + if x.Selector == nil { + r.EncodeNil() + } else { + yym38 := z.EncBinary() + _ = yym38 + if false { + } else if z.HasExtensions() && z.EncExt(x.Selector) { + } else { + z.EncFallback(x.Selector) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq33[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("selector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Selector == nil { + r.EncodeNil() + } else { + yym39 := z.EncBinary() + _ = yym39 + if false { + } else if z.HasExtensions() && z.EncExt(x.Selector) { + } else { + z.EncFallback(x.Selector) + } + } + } + } + if yyr33 || yy2arr33 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy41 := &x.Template + yy41.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("template")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy42 := &x.Template + yy42.CodecEncodeSelf(e) + } + if yyr33 || yy2arr33 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq33[3] { + if x.VolumeClaimTemplates == nil { + r.EncodeNil() + } else { + yym44 := z.EncBinary() + _ = yym44 + if false { + } else { + h.encSliceapi_PersistentVolumeClaim(([]pkg2_api.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq33[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("volumeClaimTemplates")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.VolumeClaimTemplates == nil { + r.EncodeNil() + } else { + yym45 := z.EncBinary() + _ = yym45 + if false { + } else { + h.encSliceapi_PersistentVolumeClaim(([]pkg2_api.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) + } + } + } + } + if yyr33 || yy2arr33 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym47 := z.EncBinary() + _ = yym47 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("serviceName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym48 := z.EncBinary() + _ = yym48 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) + } + } + if yyr33 || yy2arr33 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSetSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym49 := z.DecBinary() + _ = yym49 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct50 := r.ContainerType() + if yyct50 == codecSelferValueTypeMap1234 { + yyl50 := r.ReadMapStart() + if yyl50 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl50, d) + } + } else if yyct50 == codecSelferValueTypeArray1234 { + yyl50 := r.ReadArrayStart() + if yyl50 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl50, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys51Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys51Slc + var yyhl51 bool = l >= 0 + for yyj51 := 0; ; yyj51++ { + if yyhl51 { + if yyj51 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys51Slc = r.DecodeBytes(yys51Slc, true, true) + yys51 := string(yys51Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys51 { + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + x.Replicas = int32(r.DecodeInt(32)) + } + case "selector": + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(pkg1_unversioned.LabelSelector) + } + yym54 := z.DecBinary() + _ = yym54 + if false { + } else if z.HasExtensions() && z.DecExt(x.Selector) { + } else { + z.DecFallback(x.Selector, false) + } + } + case "template": + if r.TryDecodeAsNil() { + x.Template = pkg2_api.PodTemplateSpec{} + } else { + yyv55 := &x.Template + yyv55.CodecDecodeSelf(d) + } + case "volumeClaimTemplates": + if r.TryDecodeAsNil() { + x.VolumeClaimTemplates = nil + } else { + yyv56 := &x.VolumeClaimTemplates + yym57 := z.DecBinary() + _ = yym57 + if false { + } else { + h.decSliceapi_PersistentVolumeClaim((*[]pkg2_api.PersistentVolumeClaim)(yyv56), d) + } + } + case "serviceName": + if r.TryDecodeAsNil() { + x.ServiceName = "" + } else { + x.ServiceName = string(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys51) + } // end switch yys51 + } // end for yyj51 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj59 int + var yyb59 bool + var yyhl59 bool = l >= 0 + yyj59++ + if yyhl59 { + yyb59 = yyj59 > l + } else { + yyb59 = r.CheckBreak() + } + if yyb59 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + x.Replicas = int32(r.DecodeInt(32)) + } + yyj59++ + if yyhl59 { + yyb59 = yyj59 > l + } else { + yyb59 = r.CheckBreak() + } + if yyb59 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(pkg1_unversioned.LabelSelector) + } + yym62 := z.DecBinary() + _ = yym62 + if false { + } else if z.HasExtensions() && z.DecExt(x.Selector) { + } else { + z.DecFallback(x.Selector, false) + } + } + yyj59++ + if yyhl59 { + yyb59 = yyj59 > l + } else { + yyb59 = r.CheckBreak() + } + if yyb59 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Template = pkg2_api.PodTemplateSpec{} + } else { + yyv63 := &x.Template + yyv63.CodecDecodeSelf(d) + } + yyj59++ + if yyhl59 { + yyb59 = yyj59 > l + } else { + yyb59 = r.CheckBreak() + } + if yyb59 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.VolumeClaimTemplates = nil + } else { + yyv64 := &x.VolumeClaimTemplates + yym65 := z.DecBinary() + _ = yym65 + if false { + } else { + h.decSliceapi_PersistentVolumeClaim((*[]pkg2_api.PersistentVolumeClaim)(yyv64), d) + } + } + yyj59++ + if yyhl59 { + yyb59 = yyj59 > l + } else { + yyb59 = r.CheckBreak() + } + if yyb59 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ServiceName = "" + } else { + x.ServiceName = string(r.DecodeString()) + } + for { + yyj59++ + if yyhl59 { + yyb59 = yyj59 > l + } else { + yyb59 = r.CheckBreak() + } + if yyb59 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj59-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *StatefulSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym67 := z.EncBinary() + _ = yym67 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep68 := !z.EncBinary() + yy2arr68 := z.EncBasicHandle().StructToArray + var yyq68 [2]bool + _, _, _ = yysep68, yyq68, yy2arr68 + const yyr68 bool = false + yyq68[0] = x.ObservedGeneration != nil + var yynn68 int + if yyr68 || yy2arr68 { + r.EncodeArrayStart(2) + } else { + yynn68 = 1 + for _, b := range yyq68 { + if b { + yynn68++ + } + } + r.EncodeMapStart(yynn68) + yynn68 = 0 + } + if yyr68 || yy2arr68 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq68[0] { + if x.ObservedGeneration == nil { + r.EncodeNil() + } else { + yy70 := *x.ObservedGeneration + yym71 := z.EncBinary() + _ = yym71 + if false { + } else { + r.EncodeInt(int64(yy70)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq68[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ObservedGeneration == nil { + r.EncodeNil() + } else { + yy72 := *x.ObservedGeneration + yym73 := z.EncBinary() + _ = yym73 + if false { + } else { + r.EncodeInt(int64(yy72)) + } + } + } + } + if yyr68 || yy2arr68 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym75 := z.EncBinary() + _ = yym75 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym76 := z.EncBinary() + _ = yym76 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + if yyr68 || yy2arr68 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSetStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym77 := z.DecBinary() + _ = yym77 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct78 := r.ContainerType() + if yyct78 == codecSelferValueTypeMap1234 { + yyl78 := r.ReadMapStart() + if yyl78 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl78, d) + } + } else if yyct78 == codecSelferValueTypeArray1234 { + yyl78 := r.ReadArrayStart() + if yyl78 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl78, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys79Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys79Slc + var yyhl79 bool = l >= 0 + for yyj79 := 0; ; yyj79++ { + if yyhl79 { + if yyj79 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys79Slc = r.DecodeBytes(yys79Slc, true, true) + yys79 := string(yys79Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys79 { + case "observedGeneration": + if r.TryDecodeAsNil() { + if x.ObservedGeneration != nil { + x.ObservedGeneration = nil + } + } else { + if x.ObservedGeneration == nil { + x.ObservedGeneration = new(int64) + } + yym81 := z.DecBinary() + _ = yym81 + if false { + } else { + *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) + } + } + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + x.Replicas = int32(r.DecodeInt(32)) + } + default: + z.DecStructFieldNotFound(-1, yys79) + } // end switch yys79 + } // end for yyj79 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj83 int + var yyb83 bool + var yyhl83 bool = l >= 0 + yyj83++ + if yyhl83 { + yyb83 = yyj83 > l + } else { + yyb83 = r.CheckBreak() + } + if yyb83 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ObservedGeneration != nil { + x.ObservedGeneration = nil + } + } else { + if x.ObservedGeneration == nil { + x.ObservedGeneration = new(int64) + } + yym85 := z.DecBinary() + _ = yym85 + if false { + } else { + *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) + } + } + yyj83++ + if yyhl83 { + yyb83 = yyj83 > l + } else { + yyb83 = r.CheckBreak() + } + if yyb83 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + x.Replicas = int32(r.DecodeInt(32)) + } + for { + yyj83++ + if yyhl83 { + yyb83 = yyj83 > l + } else { + yyb83 = r.CheckBreak() + } + if yyb83 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj83-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *StatefulSetList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym87 := z.EncBinary() + _ = yym87 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep88 := !z.EncBinary() + yy2arr88 := z.EncBasicHandle().StructToArray + var yyq88 [4]bool + _, _, _ = yysep88, yyq88, yy2arr88 + const yyr88 bool = false + yyq88[0] = x.Kind != "" + yyq88[1] = x.APIVersion != "" + yyq88[2] = true + var yynn88 int + if yyr88 || yy2arr88 { + r.EncodeArrayStart(4) + } else { + yynn88 = 1 + for _, b := range yyq88 { + if b { + yynn88++ + } + } + r.EncodeMapStart(yynn88) + yynn88 = 0 + } + if yyr88 || yy2arr88 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq88[0] { + yym90 := z.EncBinary() + _ = yym90 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq88[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym91 := z.EncBinary() + _ = yym91 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr88 || yy2arr88 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq88[1] { + yym93 := z.EncBinary() + _ = yym93 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq88[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym94 := z.EncBinary() + _ = yym94 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr88 || yy2arr88 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq88[2] { + yy96 := &x.ListMeta + yym97 := z.EncBinary() + _ = yym97 + if false { + } else if z.HasExtensions() && z.EncExt(yy96) { + } else { + z.EncFallback(yy96) + } + } else { + r.EncodeNil() + } + } else { + if yyq88[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy98 := &x.ListMeta + yym99 := z.EncBinary() + _ = yym99 + if false { + } else if z.HasExtensions() && z.EncExt(yy98) { + } else { + z.EncFallback(yy98) + } + } + } + if yyr88 || yy2arr88 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym101 := z.EncBinary() + _ = yym101 + if false { + } else { + h.encSliceStatefulSet(([]StatefulSet)(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 { + yym102 := z.EncBinary() + _ = yym102 + if false { + } else { + h.encSliceStatefulSet(([]StatefulSet)(x.Items), e) + } + } + } + if yyr88 || yy2arr88 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSetList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym103 := z.DecBinary() + _ = yym103 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct104 := r.ContainerType() + if yyct104 == codecSelferValueTypeMap1234 { + yyl104 := r.ReadMapStart() + if yyl104 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl104, d) + } + } else if yyct104 == codecSelferValueTypeArray1234 { + yyl104 := r.ReadArrayStart() + if yyl104 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl104, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys105Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys105Slc + var yyhl105 bool = l >= 0 + for yyj105 := 0; ; yyj105++ { + if yyhl105 { + if yyj105 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys105Slc = r.DecodeBytes(yys105Slc, true, true) + yys105 := string(yys105Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys105 { + 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 { + yyv108 := &x.ListMeta + yym109 := z.DecBinary() + _ = yym109 + if false { + } else if z.HasExtensions() && z.DecExt(yyv108) { + } else { + z.DecFallback(yyv108, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv110 := &x.Items + yym111 := z.DecBinary() + _ = yym111 + if false { + } else { + h.decSliceStatefulSet((*[]StatefulSet)(yyv110), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys105) + } // end switch yys105 + } // end for yyj105 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj112 int + var yyb112 bool + var yyhl112 bool = l >= 0 + yyj112++ + if yyhl112 { + yyb112 = yyj112 > l + } else { + yyb112 = r.CheckBreak() + } + if yyb112 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj112++ + if yyhl112 { + yyb112 = yyj112 > l + } else { + yyb112 = r.CheckBreak() + } + if yyb112 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj112++ + if yyhl112 { + yyb112 = yyj112 > l + } else { + yyb112 = r.CheckBreak() + } + if yyb112 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv115 := &x.ListMeta + yym116 := z.DecBinary() + _ = yym116 + if false { + } else if z.HasExtensions() && z.DecExt(yyv115) { + } else { + z.DecFallback(yyv115, false) + } + } + yyj112++ + if yyhl112 { + yyb112 = yyj112 > l + } else { + yyb112 = r.CheckBreak() + } + if yyb112 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv117 := &x.Items + yym118 := z.DecBinary() + _ = yym118 + if false { + } else { + h.decSliceStatefulSet((*[]StatefulSet)(yyv117), d) + } + } + for { + yyj112++ + if yyhl112 { + yyb112 = yyj112 > l + } else { + yyb112 = r.CheckBreak() + } + if yyb112 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj112-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encSliceapi_PersistentVolumeClaim(v []pkg2_api.PersistentVolumeClaim, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv119 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy120 := &yyv119 + yy120.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceapi_PersistentVolumeClaim(v *[]pkg2_api.PersistentVolumeClaim, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv121 := *v + yyh121, yyl121 := z.DecSliceHelperStart() + var yyc121 bool + if yyl121 == 0 { + if yyv121 == nil { + yyv121 = []pkg2_api.PersistentVolumeClaim{} + yyc121 = true + } else if len(yyv121) != 0 { + yyv121 = yyv121[:0] + yyc121 = true + } + } else if yyl121 > 0 { + var yyrr121, yyrl121 int + var yyrt121 bool + if yyl121 > cap(yyv121) { + + yyrg121 := len(yyv121) > 0 + yyv2121 := yyv121 + yyrl121, yyrt121 = z.DecInferLen(yyl121, z.DecBasicHandle().MaxInitLen, 368) + if yyrt121 { + if yyrl121 <= cap(yyv121) { + yyv121 = yyv121[:yyrl121] + } else { + yyv121 = make([]pkg2_api.PersistentVolumeClaim, yyrl121) + } + } else { + yyv121 = make([]pkg2_api.PersistentVolumeClaim, yyrl121) + } + yyc121 = true + yyrr121 = len(yyv121) + if yyrg121 { + copy(yyv121, yyv2121) + } + } else if yyl121 != len(yyv121) { + yyv121 = yyv121[:yyl121] + yyc121 = true + } + yyj121 := 0 + for ; yyj121 < yyrr121; yyj121++ { + yyh121.ElemContainerState(yyj121) + if r.TryDecodeAsNil() { + yyv121[yyj121] = pkg2_api.PersistentVolumeClaim{} + } else { + yyv122 := &yyv121[yyj121] + yyv122.CodecDecodeSelf(d) + } + + } + if yyrt121 { + for ; yyj121 < yyl121; yyj121++ { + yyv121 = append(yyv121, pkg2_api.PersistentVolumeClaim{}) + yyh121.ElemContainerState(yyj121) + if r.TryDecodeAsNil() { + yyv121[yyj121] = pkg2_api.PersistentVolumeClaim{} + } else { + yyv123 := &yyv121[yyj121] + yyv123.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj121 := 0 + for ; !r.CheckBreak(); yyj121++ { + + if yyj121 >= len(yyv121) { + yyv121 = append(yyv121, pkg2_api.PersistentVolumeClaim{}) // var yyz121 pkg2_api.PersistentVolumeClaim + yyc121 = true + } + yyh121.ElemContainerState(yyj121) + if yyj121 < len(yyv121) { + if r.TryDecodeAsNil() { + yyv121[yyj121] = pkg2_api.PersistentVolumeClaim{} + } else { + yyv124 := &yyv121[yyj121] + yyv124.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj121 < len(yyv121) { + yyv121 = yyv121[:yyj121] + yyc121 = true + } else if yyj121 == 0 && yyv121 == nil { + yyv121 = []pkg2_api.PersistentVolumeClaim{} + yyc121 = true + } + } + yyh121.End() + if yyc121 { + *v = yyv121 + } +} + +func (x codecSelfer1234) encSliceStatefulSet(v []StatefulSet, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv125 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy126 := &yyv125 + yy126.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv127 := *v + yyh127, yyl127 := z.DecSliceHelperStart() + var yyc127 bool + if yyl127 == 0 { + if yyv127 == nil { + yyv127 = []StatefulSet{} + yyc127 = true + } else if len(yyv127) != 0 { + yyv127 = yyv127[:0] + yyc127 = true + } + } else if yyl127 > 0 { + var yyrr127, yyrl127 int + var yyrt127 bool + if yyl127 > cap(yyv127) { + + yyrg127 := len(yyv127) > 0 + yyv2127 := yyv127 + yyrl127, yyrt127 = z.DecInferLen(yyl127, z.DecBasicHandle().MaxInitLen, 776) + if yyrt127 { + if yyrl127 <= cap(yyv127) { + yyv127 = yyv127[:yyrl127] + } else { + yyv127 = make([]StatefulSet, yyrl127) + } + } else { + yyv127 = make([]StatefulSet, yyrl127) + } + yyc127 = true + yyrr127 = len(yyv127) + if yyrg127 { + copy(yyv127, yyv2127) + } + } else if yyl127 != len(yyv127) { + yyv127 = yyv127[:yyl127] + yyc127 = true + } + yyj127 := 0 + for ; yyj127 < yyrr127; yyj127++ { + yyh127.ElemContainerState(yyj127) + if r.TryDecodeAsNil() { + yyv127[yyj127] = StatefulSet{} + } else { + yyv128 := &yyv127[yyj127] + yyv128.CodecDecodeSelf(d) + } + + } + if yyrt127 { + for ; yyj127 < yyl127; yyj127++ { + yyv127 = append(yyv127, StatefulSet{}) + yyh127.ElemContainerState(yyj127) + if r.TryDecodeAsNil() { + yyv127[yyj127] = StatefulSet{} + } else { + yyv129 := &yyv127[yyj127] + yyv129.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj127 := 0 + for ; !r.CheckBreak(); yyj127++ { + + if yyj127 >= len(yyv127) { + yyv127 = append(yyv127, StatefulSet{}) // var yyz127 StatefulSet + yyc127 = true + } + yyh127.ElemContainerState(yyj127) + if yyj127 < len(yyv127) { + if r.TryDecodeAsNil() { + yyv127[yyj127] = StatefulSet{} + } else { + yyv130 := &yyv127[yyj127] + yyv130.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj127 < len(yyv127) { + yyv127 = yyv127[:yyj127] + yyc127 = true + } else if yyj127 == 0 && yyv127 == nil { + yyv127 = []StatefulSet{} + yyc127 = true + } + } + yyh127.End() + if yyc127 { + *v = yyv127 + } +} diff --git a/pkg/apis/apps/v1alpha1/generated.pb.go b/pkg/apis/apps/v1alpha1/generated.pb.go index 82dcb9022d7..1bad5e7f4f5 100644 --- a/pkg/apis/apps/v1alpha1/generated.pb.go +++ b/pkg/apis/apps/v1alpha1/generated.pb.go @@ -25,10 +25,10 @@ limitations under the License. k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto It has these top-level messages: - PetSet - PetSetList - PetSetSpec - PetSetStatus + StatefulSet + StatefulSetList + StatefulSetSpec + StatefulSetStatus */ package v1alpha1 @@ -53,29 +53,29 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. const _ = proto.GoGoProtoPackageIsVersion1 -func (m *PetSet) Reset() { *m = PetSet{} } -func (*PetSet) ProtoMessage() {} -func (*PetSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } +func (m *StatefulSet) Reset() { *m = StatefulSet{} } +func (*StatefulSet) ProtoMessage() {} +func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } -func (m *PetSetList) Reset() { *m = PetSetList{} } -func (*PetSetList) ProtoMessage() {} -func (*PetSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } +func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } +func (*StatefulSetList) ProtoMessage() {} +func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } -func (m *PetSetSpec) Reset() { *m = PetSetSpec{} } -func (*PetSetSpec) ProtoMessage() {} -func (*PetSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } +func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } +func (*StatefulSetSpec) ProtoMessage() {} +func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } -func (m *PetSetStatus) Reset() { *m = PetSetStatus{} } -func (*PetSetStatus) ProtoMessage() {} -func (*PetSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } +func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } +func (*StatefulSetStatus) ProtoMessage() {} +func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } func init() { - proto.RegisterType((*PetSet)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSet") - proto.RegisterType((*PetSetList)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetList") - proto.RegisterType((*PetSetSpec)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetSpec") - proto.RegisterType((*PetSetStatus)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetStatus") + proto.RegisterType((*StatefulSet)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.StatefulSet") + proto.RegisterType((*StatefulSetList)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.StatefulSetList") + proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.StatefulSetSpec") + proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.StatefulSetStatus") } -func (m *PetSet) Marshal() (data []byte, err error) { +func (m *StatefulSet) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -85,7 +85,7 @@ func (m *PetSet) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *PetSet) MarshalTo(data []byte) (int, error) { +func (m *StatefulSet) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -117,7 +117,7 @@ func (m *PetSet) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *PetSetList) Marshal() (data []byte, err error) { +func (m *StatefulSetList) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -127,7 +127,7 @@ func (m *PetSetList) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *PetSetList) MarshalTo(data []byte) (int, error) { +func (m *StatefulSetList) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -155,7 +155,7 @@ func (m *PetSetList) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *PetSetSpec) Marshal() (data []byte, err error) { +func (m *StatefulSetSpec) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -165,7 +165,7 @@ func (m *PetSetSpec) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *PetSetSpec) MarshalTo(data []byte) (int, error) { +func (m *StatefulSetSpec) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -212,7 +212,7 @@ func (m *PetSetSpec) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *PetSetStatus) Marshal() (data []byte, err error) { +func (m *StatefulSetStatus) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -222,7 +222,7 @@ func (m *PetSetStatus) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *PetSetStatus) MarshalTo(data []byte) (int, error) { +func (m *StatefulSetStatus) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -265,7 +265,7 @@ func encodeVarintGenerated(data []byte, offset int, v uint64) int { data[offset] = uint8(v) return offset + 1 } -func (m *PetSet) Size() (n int) { +func (m *StatefulSet) Size() (n int) { var l int _ = l l = m.ObjectMeta.Size() @@ -277,7 +277,7 @@ func (m *PetSet) Size() (n int) { return n } -func (m *PetSetList) Size() (n int) { +func (m *StatefulSetList) Size() (n int) { var l int _ = l l = m.ListMeta.Size() @@ -291,7 +291,7 @@ func (m *PetSetList) Size() (n int) { return n } -func (m *PetSetSpec) Size() (n int) { +func (m *StatefulSetSpec) Size() (n int) { var l int _ = l if m.Replicas != nil { @@ -314,7 +314,7 @@ func (m *PetSetSpec) Size() (n int) { return n } -func (m *PetSetStatus) Size() (n int) { +func (m *StatefulSetStatus) Size() (n int) { var l int _ = l if m.ObservedGeneration != nil { @@ -337,34 +337,34 @@ func sovGenerated(x uint64) (n int) { func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *PetSet) String() string { +func (this *StatefulSet) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PetSet{`, + s := strings.Join([]string{`&StatefulSet{`, `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PetSetSpec", "PetSetSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PetSetStatus", "PetSetStatus", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *PetSetList) String() string { +func (this *StatefulSetList) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PetSetList{`, + s := strings.Join([]string{`&StatefulSetList{`, `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PetSet", "PetSet", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StatefulSet", "StatefulSet", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *PetSetSpec) String() string { +func (this *StatefulSetSpec) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PetSetSpec{`, + s := strings.Join([]string{`&StatefulSetSpec{`, `Replicas:` + valueToStringGenerated(this.Replicas) + `,`, `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_kubernetes_pkg_api_unversioned.LabelSelector", 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, @@ -374,11 +374,11 @@ func (this *PetSetSpec) String() string { }, "") return s } -func (this *PetSetStatus) String() string { +func (this *StatefulSetStatus) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PetSetStatus{`, + s := strings.Join([]string{`&StatefulSetStatus{`, `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`, `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, `}`, @@ -393,7 +393,7 @@ func valueToStringGenerated(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } -func (m *PetSet) Unmarshal(data []byte) error { +func (m *StatefulSet) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -416,10 +416,10 @@ func (m *PetSet) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PetSet: wiretype end group for non-group") + return fmt.Errorf("proto: StatefulSet: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PetSet: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StatefulSet: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -533,7 +533,7 @@ func (m *PetSet) Unmarshal(data []byte) error { } return nil } -func (m *PetSetList) Unmarshal(data []byte) error { +func (m *StatefulSetList) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -556,10 +556,10 @@ func (m *PetSetList) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PetSetList: wiretype end group for non-group") + return fmt.Errorf("proto: StatefulSetList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PetSetList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StatefulSetList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -618,7 +618,7 @@ func (m *PetSetList) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, PetSet{}) + m.Items = append(m.Items, StatefulSet{}) if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } @@ -644,7 +644,7 @@ func (m *PetSetList) Unmarshal(data []byte) error { } return nil } -func (m *PetSetSpec) Unmarshal(data []byte) error { +func (m *StatefulSetSpec) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -667,10 +667,10 @@ func (m *PetSetSpec) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PetSetSpec: wiretype end group for non-group") + return fmt.Errorf("proto: StatefulSetSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PetSetSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StatefulSetSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -837,7 +837,7 @@ func (m *PetSetSpec) Unmarshal(data []byte) error { } return nil } -func (m *PetSetStatus) Unmarshal(data []byte) error { +func (m *StatefulSetStatus) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -860,10 +860,10 @@ func (m *PetSetStatus) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PetSetStatus: wiretype end group for non-group") + return fmt.Errorf("proto: StatefulSetStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PetSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StatefulSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1032,44 +1032,45 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 619 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x93, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0xe3, 0xa4, 0xa9, 0xc2, 0xa6, 0x20, 0xb4, 0x54, 0x28, 0x8a, 0x90, 0x5b, 0xe5, 0x14, - 0xa1, 0x76, 0x4d, 0x0a, 0x45, 0x3d, 0x1b, 0x09, 0x84, 0x04, 0xb4, 0x72, 0xa0, 0x42, 0x20, 0x2a, - 0xad, 0x9d, 0xc1, 0x5d, 0x62, 0x7b, 0x2d, 0xef, 0xda, 0x67, 0x0e, 0x70, 0xe7, 0xcc, 0x63, 0xf0, - 0x08, 0x9c, 0x7a, 0xec, 0x91, 0x53, 0x45, 0xcd, 0x8b, 0x20, 0xaf, 0xff, 0x24, 0xd4, 0x49, 0x4b, - 0x6f, 0x99, 0xf5, 0x7c, 0xbf, 0x99, 0xf9, 0x66, 0x82, 0xf6, 0xa6, 0x7b, 0x82, 0x30, 0x6e, 0x4c, - 0x63, 0x1b, 0xa2, 0x00, 0x24, 0x08, 0x23, 0x9c, 0xba, 0x06, 0x0d, 0x99, 0x30, 0x68, 0x18, 0x0a, - 0x23, 0x19, 0x51, 0x2f, 0x3c, 0xa6, 0x23, 0xc3, 0x85, 0x00, 0x22, 0x2a, 0x61, 0x42, 0xc2, 0x88, - 0x4b, 0x8e, 0x87, 0xb9, 0x92, 0xcc, 0x94, 0x24, 0x9c, 0xba, 0x24, 0x53, 0x92, 0x4c, 0x49, 0x4a, - 0x65, 0x7f, 0xdb, 0x65, 0xf2, 0x38, 0xb6, 0x89, 0xc3, 0x7d, 0xc3, 0xe5, 0x2e, 0x37, 0x14, 0xc0, - 0x8e, 0x3f, 0xaa, 0x48, 0x05, 0xea, 0x57, 0x0e, 0xee, 0xef, 0x2c, 0x6d, 0xc9, 0x88, 0x40, 0xf0, - 0x38, 0x72, 0xe0, 0x62, 0x33, 0xfd, 0xdd, 0xe5, 0x9a, 0x38, 0x48, 0x20, 0x12, 0x8c, 0x07, 0x30, - 0xa9, 0xc9, 0xb6, 0x96, 0xcb, 0x92, 0xda, 0xc4, 0xfd, 0xed, 0xc5, 0xd9, 0x51, 0x1c, 0x48, 0xe6, - 0xd7, 0x7b, 0x1a, 0x2d, 0x4e, 0x8f, 0x25, 0xf3, 0x0c, 0x16, 0x48, 0x21, 0xa3, 0x8b, 0x92, 0xc1, - 0xf7, 0x26, 0x5a, 0x3d, 0x00, 0x39, 0x06, 0x89, 0xdf, 0xa2, 0x8e, 0x0f, 0x92, 0x4e, 0xa8, 0xa4, - 0x3d, 0x6d, 0x53, 0x1b, 0x76, 0x77, 0x86, 0x64, 0xa9, 0xe3, 0x24, 0x19, 0x91, 0x7d, 0xfb, 0x13, - 0x38, 0xf2, 0x25, 0x48, 0x6a, 0xe2, 0x93, 0xb3, 0x8d, 0x46, 0x7a, 0xb6, 0x81, 0x66, 0x6f, 0x56, - 0x45, 0xc3, 0x87, 0x68, 0x45, 0x84, 0xe0, 0xf4, 0x9a, 0x8a, 0xfa, 0x88, 0xfc, 0xef, 0x1e, 0x49, - 0xde, 0xd9, 0x38, 0x04, 0xc7, 0x5c, 0x2b, 0x2a, 0xac, 0x64, 0x91, 0xa5, 0x78, 0xf8, 0x08, 0xad, - 0x0a, 0x49, 0x65, 0x2c, 0x7a, 0x2d, 0x45, 0x7e, 0x7c, 0x6d, 0xb2, 0x52, 0x9b, 0xb7, 0x0a, 0xf6, - 0x6a, 0x1e, 0x5b, 0x05, 0x75, 0xf0, 0x53, 0x43, 0x28, 0x4f, 0x7c, 0xc1, 0x84, 0xc4, 0x1f, 0x6a, - 0x06, 0x19, 0x97, 0x18, 0x34, 0x77, 0x05, 0x24, 0x93, 0x2b, 0x9f, 0x6e, 0x17, 0x95, 0x3a, 0xe5, - 0xcb, 0x9c, 0x4b, 0x6f, 0x50, 0x9b, 0x49, 0xf0, 0x45, 0xaf, 0xb9, 0xd9, 0x1a, 0x76, 0x77, 0x1e, - 0x5c, 0x77, 0x18, 0xf3, 0x66, 0x01, 0x6f, 0x3f, 0xcf, 0x30, 0x56, 0x4e, 0x1b, 0xfc, 0x68, 0x95, - 0x43, 0x64, 0xce, 0xe1, 0x21, 0xea, 0x44, 0x10, 0x7a, 0xcc, 0xa1, 0x42, 0x0d, 0xd1, 0x36, 0xd7, - 0xb2, 0x7e, 0xac, 0xe2, 0xcd, 0xaa, 0xbe, 0xe2, 0x23, 0xd4, 0x11, 0xe0, 0x81, 0x23, 0x79, 0x74, - 0xf5, 0xe6, 0xfe, 0x1d, 0x97, 0xda, 0xe0, 0x8d, 0x0b, 0x6d, 0xce, 0x2f, 0x23, 0xab, 0x62, 0xe2, - 0xf7, 0xa8, 0x23, 0xc1, 0x0f, 0x3d, 0x2a, 0xa1, 0xd8, 0xdf, 0xf6, 0xe5, 0xf7, 0x76, 0xc0, 0x27, - 0xaf, 0x0b, 0x81, 0x3a, 0x89, 0xca, 0xcc, 0xf2, 0xd5, 0xaa, 0x80, 0xf8, 0xab, 0x86, 0xd6, 0x13, - 0xee, 0xc5, 0x3e, 0x3c, 0xf1, 0x28, 0xf3, 0xcb, 0x0c, 0xd1, 0x5b, 0x51, 0xe6, 0x3e, 0xbc, 0xa2, - 0x52, 0x36, 0x8a, 0x90, 0x10, 0xc8, 0xc3, 0x19, 0xc3, 0xbc, 0x57, 0xd4, 0x5b, 0x3f, 0x5c, 0x00, - 0xb6, 0x16, 0x96, 0xc3, 0xbb, 0xa8, 0x2b, 0x20, 0x4a, 0x98, 0x03, 0xaf, 0xa8, 0x0f, 0xbd, 0xf6, - 0xa6, 0x36, 0xbc, 0x61, 0xde, 0x29, 0x40, 0xdd, 0xf1, 0xec, 0x93, 0x35, 0x9f, 0x37, 0xf8, 0xa2, - 0xa1, 0xb5, 0xf9, 0x13, 0xc5, 0x4f, 0x11, 0xe6, 0x76, 0x96, 0x01, 0x93, 0x67, 0xf9, 0x5f, 0x98, - 0xf1, 0x40, 0x2d, 0xb0, 0x65, 0xde, 0x4d, 0xcf, 0x36, 0xf0, 0x7e, 0xed, 0xab, 0xb5, 0x40, 0x81, - 0xb7, 0xe6, 0xd6, 0xdf, 0x54, 0xeb, 0xaf, 0x5c, 0xac, 0x9f, 0x80, 0x79, 0xff, 0xe4, 0x5c, 0x6f, - 0x9c, 0x9e, 0xeb, 0x8d, 0x5f, 0xe7, 0x7a, 0xe3, 0x73, 0xaa, 0x6b, 0x27, 0xa9, 0xae, 0x9d, 0xa6, - 0xba, 0xf6, 0x3b, 0xd5, 0xb5, 0x6f, 0x7f, 0xf4, 0xc6, 0xbb, 0x4e, 0x79, 0x84, 0x7f, 0x03, 0x00, - 0x00, 0xff, 0xff, 0x14, 0xcf, 0x45, 0x01, 0xd8, 0x05, 0x00, 0x00, + // 628 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x93, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xc7, 0xe3, 0xa4, 0xa9, 0xc2, 0xa6, 0x7c, 0x2d, 0x15, 0x8a, 0x22, 0xe4, 0x56, 0x39, 0x45, + 0xa8, 0x5d, 0x2b, 0x85, 0x4a, 0x45, 0xdc, 0x8c, 0x04, 0x42, 0x02, 0x8a, 0x1c, 0x54, 0xa1, 0x56, + 0x20, 0x6d, 0x9c, 0x69, 0xba, 0xc4, 0xf6, 0x5a, 0xde, 0x71, 0xce, 0x5c, 0x38, 0x70, 0xe3, 0x35, + 0x78, 0x02, 0x5e, 0xa1, 0x07, 0x0e, 0x3d, 0x72, 0xaa, 0x48, 0x78, 0x11, 0xe4, 0xcd, 0xe6, 0x83, + 0x3a, 0x29, 0x55, 0x6f, 0x9e, 0xdd, 0xf9, 0xff, 0x66, 0xe6, 0xbf, 0x63, 0xb2, 0xd7, 0xdf, 0x53, + 0x4c, 0x48, 0xa7, 0x9f, 0x76, 0x20, 0x89, 0x00, 0x41, 0x39, 0x71, 0xbf, 0xe7, 0xf0, 0x58, 0x28, + 0x87, 0xc7, 0xb1, 0x72, 0x06, 0x2d, 0x1e, 0xc4, 0x27, 0xbc, 0xe5, 0xf4, 0x20, 0x82, 0x84, 0x23, + 0x74, 0x59, 0x9c, 0x48, 0x94, 0xb4, 0x39, 0x56, 0xb2, 0x99, 0x92, 0xc5, 0xfd, 0x1e, 0xcb, 0x94, + 0x2c, 0x53, 0xb2, 0x89, 0xb2, 0xbe, 0xdd, 0x13, 0x78, 0x92, 0x76, 0x98, 0x2f, 0x43, 0xa7, 0x27, + 0x7b, 0xd2, 0xd1, 0x80, 0x4e, 0x7a, 0xac, 0x23, 0x1d, 0xe8, 0xaf, 0x31, 0xb8, 0xbe, 0xb3, 0xb4, + 0x25, 0x27, 0x01, 0x25, 0xd3, 0xc4, 0x87, 0x8b, 0xcd, 0xd4, 0x77, 0x97, 0x6b, 0xd2, 0x68, 0x00, + 0x89, 0x12, 0x32, 0x82, 0x6e, 0x4e, 0xb6, 0xb5, 0x5c, 0x36, 0xc8, 0x4d, 0x5c, 0xdf, 0x5e, 0x9c, + 0x9d, 0xa4, 0x11, 0x8a, 0x30, 0xdf, 0x53, 0x6b, 0x71, 0x7a, 0x8a, 0x22, 0x70, 0x44, 0x84, 0x0a, + 0x93, 0x8b, 0x92, 0xc6, 0xf7, 0x22, 0xa9, 0xb6, 0x91, 0x23, 0x1c, 0xa7, 0x41, 0x1b, 0x90, 0xbe, + 0x27, 0x95, 0x10, 0x90, 0x77, 0x39, 0xf2, 0x9a, 0xb5, 0x69, 0x35, 0xab, 0x3b, 0x4d, 0xb6, 0xd4, + 0x76, 0x36, 0x68, 0xb1, 0xfd, 0xce, 0x27, 0xf0, 0xf1, 0x35, 0x20, 0x77, 0xe9, 0xe9, 0xf9, 0x46, + 0x61, 0x74, 0xbe, 0x41, 0x66, 0x67, 0xde, 0x94, 0x46, 0x8f, 0xc8, 0x8a, 0x8a, 0xc1, 0xaf, 0x15, + 0x35, 0xf5, 0x09, 0xbb, 0xea, 0x63, 0xb2, 0xb9, 0xf6, 0xda, 0x31, 0xf8, 0xee, 0x9a, 0x29, 0xb3, + 0x92, 0x45, 0x9e, 0x86, 0x52, 0x9f, 0xac, 0x2a, 0xe4, 0x98, 0xaa, 0x5a, 0x49, 0xe3, 0x9f, 0x5e, + 0x0f, 0xaf, 0x11, 0xee, 0x2d, 0x53, 0x60, 0x75, 0x1c, 0x7b, 0x06, 0xdd, 0xf8, 0x69, 0x91, 0xdb, + 0x73, 0xd9, 0xaf, 0x84, 0x42, 0xfa, 0x21, 0xe7, 0x97, 0x73, 0x89, 0x5f, 0x73, 0x9b, 0xc1, 0x32, + 0xb9, 0xb6, 0xed, 0x8e, 0x29, 0x57, 0x99, 0x9c, 0xcc, 0x99, 0x76, 0x48, 0xca, 0x02, 0x21, 0x54, + 0xb5, 0xe2, 0x66, 0xa9, 0x59, 0xdd, 0xd9, 0xbd, 0xd6, 0x58, 0xee, 0x4d, 0x53, 0xa1, 0xfc, 0x32, + 0x63, 0x79, 0x63, 0x64, 0xe3, 0x47, 0xe9, 0x9f, 0x71, 0x32, 0x37, 0x69, 0x93, 0x54, 0x12, 0x88, + 0x03, 0xe1, 0x73, 0xa5, 0xc7, 0x29, 0xbb, 0x6b, 0x59, 0x67, 0x9e, 0x39, 0xf3, 0xa6, 0xb7, 0xf4, + 0x23, 0xa9, 0x28, 0x08, 0xc0, 0x47, 0x99, 0x98, 0x27, 0x7d, 0x7c, 0xd5, 0xc1, 0x79, 0x07, 0x82, + 0xb6, 0xd1, 0x8e, 0xf9, 0x93, 0xc8, 0x9b, 0x32, 0xe9, 0x11, 0xa9, 0x20, 0x84, 0x71, 0xc0, 0x11, + 0xcc, 0x9b, 0x6e, 0x5f, 0xbe, 0x88, 0x6f, 0x65, 0xf7, 0x9d, 0x11, 0xe8, 0x35, 0x99, 0xda, 0x3a, + 0x39, 0xf5, 0xa6, 0x40, 0xfa, 0xc5, 0x22, 0xeb, 0x03, 0x19, 0xa4, 0x21, 0x3c, 0x0b, 0xb8, 0x08, + 0x27, 0x19, 0xaa, 0xb6, 0xa2, 0x6d, 0x7e, 0xf4, 0x9f, 0x4a, 0xd9, 0x28, 0x0a, 0x21, 0xc2, 0x83, + 0x19, 0xc3, 0x7d, 0x60, 0xea, 0xad, 0x1f, 0x2c, 0x00, 0x7b, 0x0b, 0xcb, 0xd1, 0x5d, 0x52, 0x55, + 0x90, 0x0c, 0x84, 0x0f, 0x6f, 0x78, 0x08, 0xb5, 0xf2, 0xa6, 0xd5, 0xbc, 0xe1, 0xde, 0x33, 0xa0, + 0x6a, 0x7b, 0x76, 0xe5, 0xcd, 0xe7, 0x35, 0xbe, 0x5a, 0xe4, 0x6e, 0x6e, 0x6d, 0xe9, 0x73, 0x42, + 0x65, 0x27, 0x4b, 0x83, 0xee, 0x8b, 0xf1, 0x5f, 0x2e, 0x64, 0xa4, 0x5f, 0xb1, 0xe4, 0xde, 0x1f, + 0x9d, 0x6f, 0xd0, 0xfd, 0xdc, 0xad, 0xb7, 0x40, 0x41, 0xb7, 0xe6, 0x76, 0xa0, 0xa8, 0x77, 0x60, + 0x6a, 0x65, 0x7e, 0x0f, 0xdc, 0x87, 0xa7, 0x43, 0xbb, 0x70, 0x36, 0xb4, 0x0b, 0xbf, 0x86, 0x76, + 0xe1, 0xf3, 0xc8, 0xb6, 0x4e, 0x47, 0xb6, 0x75, 0x36, 0xb2, 0xad, 0xdf, 0x23, 0xdb, 0xfa, 0xf6, + 0xc7, 0x2e, 0x1c, 0x56, 0x26, 0x3b, 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0x02, 0xea, 0x1a, 0x59, + 0xfb, 0x05, 0x00, 0x00, } diff --git a/pkg/apis/apps/v1alpha1/generated.proto b/pkg/apis/apps/v1alpha1/generated.proto index 63a2d85c1ac..52e153fe2e7 100644 --- a/pkg/apis/apps/v1alpha1/generated.proto +++ b/pkg/apis/apps/v1alpha1/generated.proto @@ -30,37 +30,37 @@ import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1alpha1"; -// PetSet represents a set of pods with consistent identities. +// StatefulSet represents a set of pods with consistent identities. // Identities are defined as: // - Network: A single stable DNS and hostname. // - Storage: As many VolumeClaims as requested. -// The PetSet guarantees that a given network identity will always -// map to the same storage identity. PetSet is currently in alpha +// The StatefulSet guarantees that a given network identity will always +// map to the same storage identity. StatefulSet is currently in alpha // and subject to change without notice. -message PetSet { +message StatefulSet { // +optional optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - // Spec defines the desired identities of pets in this set. + // Spec defines the desired identities of pods in this set. // +optional - optional PetSetSpec spec = 2; + optional StatefulSetSpec spec = 2; - // Status is the current status of Pets in this PetSet. This data + // Status is the current status of Pods in this StatefulSet. This data // may be out of date by some window of time. // +optional - optional PetSetStatus status = 3; + optional StatefulSetStatus status = 3; } -// PetSetList is a collection of PetSets. -message PetSetList { +// StatefulSetList is a collection of StatefulSets. +message StatefulSetList { // +optional optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; - repeated PetSet items = 2; + repeated StatefulSet items = 2; } -// A PetSetSpec is the specification of a PetSet. -message PetSetSpec { +// A StatefulSetSpec is the specification of a StatefulSet. +message StatefulSetSpec { // Replicas is the desired number of replicas of the given Template. // These are replicas in the sense that they are instantiations of the // same Template, but individual replicas also have a consistent identity. @@ -76,14 +76,14 @@ message PetSetSpec { optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 2; // Template is the object that describes the pod that will be created if - // insufficient replicas are detected. Each pod stamped out by the PetSet + // insufficient replicas are detected. Each pod stamped out by the StatefulSet // will fulfill this Template, but have a unique identity from the rest - // of the PetSet. + // of the StatefulSet. optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3; - // VolumeClaimTemplates is a list of claims that pets are allowed to reference. - // The PetSet controller is responsible for mapping network identities to - // claims in a way that maintains the identity of a pet. Every claim in + // VolumeClaimTemplates is a list of claims that pods are allowed to reference. + // The StatefulSet controller is responsible for mapping network identities to + // claims in a way that maintains the identity of a pod. Every claim in // this list must have at least one matching (by name) volumeMount in one // container in the template. A claim in this list takes precedence over // any volumes in the template, with the same name. @@ -91,16 +91,16 @@ message PetSetSpec { // +optional repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4; - // ServiceName is the name of the service that governs this PetSet. - // This service must exist before the PetSet, and is responsible for - // the network identity of the set. Pets get DNS/hostnames that follow the - // pattern: pet-specific-string.serviceName.default.svc.cluster.local - // where "pet-specific-string" is managed by the PetSet controller. + // ServiceName is the name of the service that governs this StatefulSet. + // This service must exist before the StatefulSet, and is responsible for + // the network identity of the set. Pods get DNS/hostnames that follow the + // pattern: pod-specific-string.serviceName.default.svc.cluster.local + // where "pod-specific-string" is managed by the StatefulSet controller. optional string serviceName = 5; } -// PetSetStatus represents the current state of a PetSet. -message PetSetStatus { +// StatefulSetStatus represents the current state of a StatefulSet. +message StatefulSetStatus { // most recent generation observed by this autoscaler. // +optional optional int64 observedGeneration = 1; diff --git a/pkg/apis/apps/v1alpha1/types.generated.go b/pkg/apis/apps/v1alpha1/types.generated.go new file mode 100644 index 00000000000..e97b7f1d78e --- /dev/null +++ b/pkg/apis/apps/v1alpha1/types.generated.go @@ -0,0 +1,1658 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1alpha1 + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg4_resource "k8s.io/kubernetes/pkg/api/resource" + pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned" + pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg3_types "k8s.io/kubernetes/pkg/types" + pkg5_intstr "k8s.io/kubernetes/pkg/util/intstr" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg4_resource.Quantity + var v1 pkg1_unversioned.TypeMeta + var v2 pkg2_v1.ObjectMeta + var v3 pkg3_types.UID + var v4 pkg5_intstr.IntOrString + var v5 time.Time + _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 + } +} + +func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yy10.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy11 := &x.ObjectMeta + yy11.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy13 := &x.Spec + yy13.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy14 := &x.Spec + yy14.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy16 := &x.Status + yy16.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Status + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSet) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct19 := r.ContainerType() + if yyct19 == codecSelferValueTypeMap1234 { + yyl19 := r.ReadMapStart() + if yyl19 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl19, d) + } + } else if yyct19 == codecSelferValueTypeArray1234 { + yyl19 := r.ReadArrayStart() + if yyl19 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl19, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys20Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys20Slc + var yyhl20 bool = l >= 0 + for yyj20 := 0; ; yyj20++ { + if yyhl20 { + if yyj20 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys20Slc = r.DecodeBytes(yys20Slc, true, true) + yys20 := string(yys20Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys20 { + 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 { + yyv23 := &x.ObjectMeta + yyv23.CodecDecodeSelf(d) + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = StatefulSetSpec{} + } else { + yyv24 := &x.Spec + yyv24.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = StatefulSetStatus{} + } else { + yyv25 := &x.Status + yyv25.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys20) + } // end switch yys20 + } // end for yyj20 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj26 int + var yyb26 bool + var yyhl26 bool = l >= 0 + yyj26++ + if yyhl26 { + yyb26 = yyj26 > l + } else { + yyb26 = r.CheckBreak() + } + if yyb26 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj26++ + if yyhl26 { + yyb26 = yyj26 > l + } else { + yyb26 = r.CheckBreak() + } + if yyb26 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj26++ + if yyhl26 { + yyb26 = yyj26 > l + } else { + yyb26 = r.CheckBreak() + } + if yyb26 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_v1.ObjectMeta{} + } else { + yyv29 := &x.ObjectMeta + yyv29.CodecDecodeSelf(d) + } + yyj26++ + if yyhl26 { + yyb26 = yyj26 > l + } else { + yyb26 = r.CheckBreak() + } + if yyb26 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = StatefulSetSpec{} + } else { + yyv30 := &x.Spec + yyv30.CodecDecodeSelf(d) + } + yyj26++ + if yyhl26 { + yyb26 = yyj26 > l + } else { + yyb26 = r.CheckBreak() + } + if yyb26 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = StatefulSetStatus{} + } else { + yyv31 := &x.Status + yyv31.CodecDecodeSelf(d) + } + for { + yyj26++ + if yyhl26 { + yyb26 = yyj26 > l + } else { + yyb26 = r.CheckBreak() + } + if yyb26 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj26-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym32 := z.EncBinary() + _ = yym32 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep33 := !z.EncBinary() + yy2arr33 := z.EncBasicHandle().StructToArray + var yyq33 [5]bool + _, _, _ = yysep33, yyq33, yy2arr33 + const yyr33 bool = false + yyq33[0] = x.Replicas != nil + yyq33[1] = x.Selector != nil + yyq33[3] = len(x.VolumeClaimTemplates) != 0 + var yynn33 int + if yyr33 || yy2arr33 { + r.EncodeArrayStart(5) + } else { + yynn33 = 2 + for _, b := range yyq33 { + if b { + yynn33++ + } + } + r.EncodeMapStart(yynn33) + yynn33 = 0 + } + if yyr33 || yy2arr33 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq33[0] { + if x.Replicas == nil { + r.EncodeNil() + } else { + yy35 := *x.Replicas + yym36 := z.EncBinary() + _ = yym36 + if false { + } else { + r.EncodeInt(int64(yy35)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq33[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Replicas == nil { + r.EncodeNil() + } else { + yy37 := *x.Replicas + yym38 := z.EncBinary() + _ = yym38 + if false { + } else { + r.EncodeInt(int64(yy37)) + } + } + } + } + if yyr33 || yy2arr33 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq33[1] { + if x.Selector == nil { + r.EncodeNil() + } else { + yym40 := z.EncBinary() + _ = yym40 + if false { + } else if z.HasExtensions() && z.EncExt(x.Selector) { + } else { + z.EncFallback(x.Selector) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq33[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("selector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Selector == nil { + r.EncodeNil() + } else { + yym41 := z.EncBinary() + _ = yym41 + if false { + } else if z.HasExtensions() && z.EncExt(x.Selector) { + } else { + z.EncFallback(x.Selector) + } + } + } + } + if yyr33 || yy2arr33 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy43 := &x.Template + yy43.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("template")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy44 := &x.Template + yy44.CodecEncodeSelf(e) + } + if yyr33 || yy2arr33 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq33[3] { + if x.VolumeClaimTemplates == nil { + r.EncodeNil() + } else { + yym46 := z.EncBinary() + _ = yym46 + if false { + } else { + h.encSlicev1_PersistentVolumeClaim(([]pkg2_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq33[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("volumeClaimTemplates")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.VolumeClaimTemplates == nil { + r.EncodeNil() + } else { + yym47 := z.EncBinary() + _ = yym47 + if false { + } else { + h.encSlicev1_PersistentVolumeClaim(([]pkg2_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) + } + } + } + } + if yyr33 || yy2arr33 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym49 := z.EncBinary() + _ = yym49 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("serviceName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym50 := z.EncBinary() + _ = yym50 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) + } + } + if yyr33 || yy2arr33 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSetSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym51 := z.DecBinary() + _ = yym51 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct52 := r.ContainerType() + if yyct52 == codecSelferValueTypeMap1234 { + yyl52 := r.ReadMapStart() + if yyl52 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl52, d) + } + } else if yyct52 == codecSelferValueTypeArray1234 { + yyl52 := r.ReadArrayStart() + if yyl52 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl52, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys53Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys53Slc + var yyhl53 bool = l >= 0 + for yyj53 := 0; ; yyj53++ { + if yyhl53 { + if yyj53 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys53Slc = r.DecodeBytes(yys53Slc, true, true) + yys53 := string(yys53Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys53 { + case "replicas": + if r.TryDecodeAsNil() { + if x.Replicas != nil { + x.Replicas = nil + } + } else { + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym55 := z.DecBinary() + _ = yym55 + if false { + } else { + *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) + } + } + case "selector": + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(pkg1_unversioned.LabelSelector) + } + yym57 := z.DecBinary() + _ = yym57 + if false { + } else if z.HasExtensions() && z.DecExt(x.Selector) { + } else { + z.DecFallback(x.Selector, false) + } + } + case "template": + if r.TryDecodeAsNil() { + x.Template = pkg2_v1.PodTemplateSpec{} + } else { + yyv58 := &x.Template + yyv58.CodecDecodeSelf(d) + } + case "volumeClaimTemplates": + if r.TryDecodeAsNil() { + x.VolumeClaimTemplates = nil + } else { + yyv59 := &x.VolumeClaimTemplates + yym60 := z.DecBinary() + _ = yym60 + if false { + } else { + h.decSlicev1_PersistentVolumeClaim((*[]pkg2_v1.PersistentVolumeClaim)(yyv59), d) + } + } + case "serviceName": + if r.TryDecodeAsNil() { + x.ServiceName = "" + } else { + x.ServiceName = string(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys53) + } // end switch yys53 + } // end for yyj53 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj62 int + var yyb62 bool + var yyhl62 bool = l >= 0 + yyj62++ + if yyhl62 { + yyb62 = yyj62 > l + } else { + yyb62 = r.CheckBreak() + } + if yyb62 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Replicas != nil { + x.Replicas = nil + } + } else { + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym64 := z.DecBinary() + _ = yym64 + if false { + } else { + *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) + } + } + yyj62++ + if yyhl62 { + yyb62 = yyj62 > l + } else { + yyb62 = r.CheckBreak() + } + if yyb62 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(pkg1_unversioned.LabelSelector) + } + yym66 := z.DecBinary() + _ = yym66 + if false { + } else if z.HasExtensions() && z.DecExt(x.Selector) { + } else { + z.DecFallback(x.Selector, false) + } + } + yyj62++ + if yyhl62 { + yyb62 = yyj62 > l + } else { + yyb62 = r.CheckBreak() + } + if yyb62 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Template = pkg2_v1.PodTemplateSpec{} + } else { + yyv67 := &x.Template + yyv67.CodecDecodeSelf(d) + } + yyj62++ + if yyhl62 { + yyb62 = yyj62 > l + } else { + yyb62 = r.CheckBreak() + } + if yyb62 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.VolumeClaimTemplates = nil + } else { + yyv68 := &x.VolumeClaimTemplates + yym69 := z.DecBinary() + _ = yym69 + if false { + } else { + h.decSlicev1_PersistentVolumeClaim((*[]pkg2_v1.PersistentVolumeClaim)(yyv68), d) + } + } + yyj62++ + if yyhl62 { + yyb62 = yyj62 > l + } else { + yyb62 = r.CheckBreak() + } + if yyb62 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ServiceName = "" + } else { + x.ServiceName = string(r.DecodeString()) + } + for { + yyj62++ + if yyhl62 { + yyb62 = yyj62 > l + } else { + yyb62 = r.CheckBreak() + } + if yyb62 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj62-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *StatefulSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym71 := z.EncBinary() + _ = yym71 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep72 := !z.EncBinary() + yy2arr72 := z.EncBasicHandle().StructToArray + var yyq72 [2]bool + _, _, _ = yysep72, yyq72, yy2arr72 + const yyr72 bool = false + yyq72[0] = x.ObservedGeneration != nil + var yynn72 int + if yyr72 || yy2arr72 { + r.EncodeArrayStart(2) + } else { + yynn72 = 1 + for _, b := range yyq72 { + if b { + yynn72++ + } + } + r.EncodeMapStart(yynn72) + yynn72 = 0 + } + if yyr72 || yy2arr72 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq72[0] { + if x.ObservedGeneration == nil { + r.EncodeNil() + } else { + yy74 := *x.ObservedGeneration + yym75 := z.EncBinary() + _ = yym75 + if false { + } else { + r.EncodeInt(int64(yy74)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq72[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ObservedGeneration == nil { + r.EncodeNil() + } else { + yy76 := *x.ObservedGeneration + yym77 := z.EncBinary() + _ = yym77 + if false { + } else { + r.EncodeInt(int64(yy76)) + } + } + } + } + if yyr72 || yy2arr72 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym79 := z.EncBinary() + _ = yym79 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym80 := z.EncBinary() + _ = yym80 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + if yyr72 || yy2arr72 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSetStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym81 := z.DecBinary() + _ = yym81 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct82 := r.ContainerType() + if yyct82 == codecSelferValueTypeMap1234 { + yyl82 := r.ReadMapStart() + if yyl82 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl82, d) + } + } else if yyct82 == codecSelferValueTypeArray1234 { + yyl82 := r.ReadArrayStart() + if yyl82 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl82, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys83Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys83Slc + var yyhl83 bool = l >= 0 + for yyj83 := 0; ; yyj83++ { + if yyhl83 { + if yyj83 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys83Slc = r.DecodeBytes(yys83Slc, true, true) + yys83 := string(yys83Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys83 { + case "observedGeneration": + if r.TryDecodeAsNil() { + if x.ObservedGeneration != nil { + x.ObservedGeneration = nil + } + } else { + if x.ObservedGeneration == nil { + x.ObservedGeneration = new(int64) + } + yym85 := z.DecBinary() + _ = yym85 + if false { + } else { + *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) + } + } + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + x.Replicas = int32(r.DecodeInt(32)) + } + default: + z.DecStructFieldNotFound(-1, yys83) + } // end switch yys83 + } // end for yyj83 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj87 int + var yyb87 bool + var yyhl87 bool = l >= 0 + yyj87++ + if yyhl87 { + yyb87 = yyj87 > l + } else { + yyb87 = r.CheckBreak() + } + if yyb87 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ObservedGeneration != nil { + x.ObservedGeneration = nil + } + } else { + if x.ObservedGeneration == nil { + x.ObservedGeneration = new(int64) + } + yym89 := z.DecBinary() + _ = yym89 + if false { + } else { + *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) + } + } + yyj87++ + if yyhl87 { + yyb87 = yyj87 > l + } else { + yyb87 = r.CheckBreak() + } + if yyb87 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + x.Replicas = int32(r.DecodeInt(32)) + } + for { + yyj87++ + if yyhl87 { + yyb87 = yyj87 > l + } else { + yyb87 = r.CheckBreak() + } + if yyb87 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj87-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *StatefulSetList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym91 := z.EncBinary() + _ = yym91 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep92 := !z.EncBinary() + yy2arr92 := z.EncBasicHandle().StructToArray + var yyq92 [4]bool + _, _, _ = yysep92, yyq92, yy2arr92 + const yyr92 bool = false + yyq92[0] = x.Kind != "" + yyq92[1] = x.APIVersion != "" + yyq92[2] = true + var yynn92 int + if yyr92 || yy2arr92 { + r.EncodeArrayStart(4) + } else { + yynn92 = 1 + for _, b := range yyq92 { + if b { + yynn92++ + } + } + r.EncodeMapStart(yynn92) + yynn92 = 0 + } + if yyr92 || yy2arr92 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq92[0] { + yym94 := z.EncBinary() + _ = yym94 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq92[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym95 := z.EncBinary() + _ = yym95 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr92 || yy2arr92 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq92[1] { + yym97 := z.EncBinary() + _ = yym97 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq92[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym98 := z.EncBinary() + _ = yym98 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr92 || yy2arr92 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq92[2] { + yy100 := &x.ListMeta + yym101 := z.EncBinary() + _ = yym101 + if false { + } else if z.HasExtensions() && z.EncExt(yy100) { + } else { + z.EncFallback(yy100) + } + } else { + r.EncodeNil() + } + } else { + if yyq92[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy102 := &x.ListMeta + yym103 := z.EncBinary() + _ = yym103 + if false { + } else if z.HasExtensions() && z.EncExt(yy102) { + } else { + z.EncFallback(yy102) + } + } + } + if yyr92 || yy2arr92 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym105 := z.EncBinary() + _ = yym105 + if false { + } else { + h.encSliceStatefulSet(([]StatefulSet)(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 { + yym106 := z.EncBinary() + _ = yym106 + if false { + } else { + h.encSliceStatefulSet(([]StatefulSet)(x.Items), e) + } + } + } + if yyr92 || yy2arr92 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSetList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym107 := z.DecBinary() + _ = yym107 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct108 := r.ContainerType() + if yyct108 == codecSelferValueTypeMap1234 { + yyl108 := r.ReadMapStart() + if yyl108 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl108, d) + } + } else if yyct108 == codecSelferValueTypeArray1234 { + yyl108 := r.ReadArrayStart() + if yyl108 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl108, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys109Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys109Slc + var yyhl109 bool = l >= 0 + for yyj109 := 0; ; yyj109++ { + if yyhl109 { + if yyj109 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys109Slc = r.DecodeBytes(yys109Slc, true, true) + yys109 := string(yys109Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys109 { + 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 { + yyv112 := &x.ListMeta + yym113 := z.DecBinary() + _ = yym113 + if false { + } else if z.HasExtensions() && z.DecExt(yyv112) { + } else { + z.DecFallback(yyv112, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv114 := &x.Items + yym115 := z.DecBinary() + _ = yym115 + if false { + } else { + h.decSliceStatefulSet((*[]StatefulSet)(yyv114), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys109) + } // end switch yys109 + } // end for yyj109 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj116 int + var yyb116 bool + var yyhl116 bool = l >= 0 + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv119 := &x.ListMeta + yym120 := z.DecBinary() + _ = yym120 + if false { + } else if z.HasExtensions() && z.DecExt(yyv119) { + } else { + z.DecFallback(yyv119, false) + } + } + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv121 := &x.Items + yym122 := z.DecBinary() + _ = yym122 + if false { + } else { + h.decSliceStatefulSet((*[]StatefulSet)(yyv121), d) + } + } + for { + yyj116++ + if yyhl116 { + yyb116 = yyj116 > l + } else { + yyb116 = r.CheckBreak() + } + if yyb116 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj116-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg2_v1.PersistentVolumeClaim, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv123 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy124 := &yyv123 + yy124.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.PersistentVolumeClaim, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv125 := *v + yyh125, yyl125 := z.DecSliceHelperStart() + var yyc125 bool + if yyl125 == 0 { + if yyv125 == nil { + yyv125 = []pkg2_v1.PersistentVolumeClaim{} + yyc125 = true + } else if len(yyv125) != 0 { + yyv125 = yyv125[:0] + yyc125 = true + } + } else if yyl125 > 0 { + var yyrr125, yyrl125 int + var yyrt125 bool + if yyl125 > cap(yyv125) { + + yyrg125 := len(yyv125) > 0 + yyv2125 := yyv125 + yyrl125, yyrt125 = z.DecInferLen(yyl125, z.DecBasicHandle().MaxInitLen, 368) + if yyrt125 { + if yyrl125 <= cap(yyv125) { + yyv125 = yyv125[:yyrl125] + } else { + yyv125 = make([]pkg2_v1.PersistentVolumeClaim, yyrl125) + } + } else { + yyv125 = make([]pkg2_v1.PersistentVolumeClaim, yyrl125) + } + yyc125 = true + yyrr125 = len(yyv125) + if yyrg125 { + copy(yyv125, yyv2125) + } + } else if yyl125 != len(yyv125) { + yyv125 = yyv125[:yyl125] + yyc125 = true + } + yyj125 := 0 + for ; yyj125 < yyrr125; yyj125++ { + yyh125.ElemContainerState(yyj125) + if r.TryDecodeAsNil() { + yyv125[yyj125] = pkg2_v1.PersistentVolumeClaim{} + } else { + yyv126 := &yyv125[yyj125] + yyv126.CodecDecodeSelf(d) + } + + } + if yyrt125 { + for ; yyj125 < yyl125; yyj125++ { + yyv125 = append(yyv125, pkg2_v1.PersistentVolumeClaim{}) + yyh125.ElemContainerState(yyj125) + if r.TryDecodeAsNil() { + yyv125[yyj125] = pkg2_v1.PersistentVolumeClaim{} + } else { + yyv127 := &yyv125[yyj125] + yyv127.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj125 := 0 + for ; !r.CheckBreak(); yyj125++ { + + if yyj125 >= len(yyv125) { + yyv125 = append(yyv125, pkg2_v1.PersistentVolumeClaim{}) // var yyz125 pkg2_v1.PersistentVolumeClaim + yyc125 = true + } + yyh125.ElemContainerState(yyj125) + if yyj125 < len(yyv125) { + if r.TryDecodeAsNil() { + yyv125[yyj125] = pkg2_v1.PersistentVolumeClaim{} + } else { + yyv128 := &yyv125[yyj125] + yyv128.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj125 < len(yyv125) { + yyv125 = yyv125[:yyj125] + yyc125 = true + } else if yyj125 == 0 && yyv125 == nil { + yyv125 = []pkg2_v1.PersistentVolumeClaim{} + yyc125 = true + } + } + yyh125.End() + if yyc125 { + *v = yyv125 + } +} + +func (x codecSelfer1234) encSliceStatefulSet(v []StatefulSet, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv129 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy130 := &yyv129 + yy130.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv131 := *v + yyh131, yyl131 := z.DecSliceHelperStart() + var yyc131 bool + if yyl131 == 0 { + if yyv131 == nil { + yyv131 = []StatefulSet{} + yyc131 = true + } else if len(yyv131) != 0 { + yyv131 = yyv131[:0] + yyc131 = true + } + } else if yyl131 > 0 { + var yyrr131, yyrl131 int + var yyrt131 bool + if yyl131 > cap(yyv131) { + + yyrg131 := len(yyv131) > 0 + yyv2131 := yyv131 + yyrl131, yyrt131 = z.DecInferLen(yyl131, z.DecBasicHandle().MaxInitLen, 800) + if yyrt131 { + if yyrl131 <= cap(yyv131) { + yyv131 = yyv131[:yyrl131] + } else { + yyv131 = make([]StatefulSet, yyrl131) + } + } else { + yyv131 = make([]StatefulSet, yyrl131) + } + yyc131 = true + yyrr131 = len(yyv131) + if yyrg131 { + copy(yyv131, yyv2131) + } + } else if yyl131 != len(yyv131) { + yyv131 = yyv131[:yyl131] + yyc131 = true + } + yyj131 := 0 + for ; yyj131 < yyrr131; yyj131++ { + yyh131.ElemContainerState(yyj131) + if r.TryDecodeAsNil() { + yyv131[yyj131] = StatefulSet{} + } else { + yyv132 := &yyv131[yyj131] + yyv132.CodecDecodeSelf(d) + } + + } + if yyrt131 { + for ; yyj131 < yyl131; yyj131++ { + yyv131 = append(yyv131, StatefulSet{}) + yyh131.ElemContainerState(yyj131) + if r.TryDecodeAsNil() { + yyv131[yyj131] = StatefulSet{} + } else { + yyv133 := &yyv131[yyj131] + yyv133.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj131 := 0 + for ; !r.CheckBreak(); yyj131++ { + + if yyj131 >= len(yyv131) { + yyv131 = append(yyv131, StatefulSet{}) // var yyz131 StatefulSet + yyc131 = true + } + yyh131.ElemContainerState(yyj131) + if yyj131 < len(yyv131) { + if r.TryDecodeAsNil() { + yyv131[yyj131] = StatefulSet{} + } else { + yyv134 := &yyv131[yyj131] + yyv134.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj131 < len(yyv131) { + yyv131 = yyv131[:yyj131] + yyc131 = true + } else if yyj131 == 0 && yyv131 == nil { + yyv131 = []StatefulSet{} + yyc131 = true + } + } + yyh131.End() + if yyc131 { + *v = yyv131 + } +} diff --git a/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go b/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go new file mode 100644 index 00000000000..2be2e6bfafa --- /dev/null +++ b/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go @@ -0,0 +1,71 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_StatefulSet = map[string]string{ + "": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity. StatefulSet is currently in alpha and subject to change without notice.", + "spec": "Spec defines the desired identities of pods in this set.", + "status": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", +} + +func (StatefulSet) SwaggerDoc() map[string]string { + return map_StatefulSet +} + +var map_StatefulSetList = map[string]string{ + "": "StatefulSetList is a collection of StatefulSets.", +} + +func (StatefulSetList) SwaggerDoc() map[string]string { + return map_StatefulSetList +} + +var map_StatefulSetSpec = map[string]string{ + "": "A StatefulSetSpec is the specification of a StatefulSet.", + "replicas": "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", + "selector": "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + "volumeClaimTemplates": "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", + "serviceName": "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", +} + +func (StatefulSetSpec) SwaggerDoc() map[string]string { + return map_StatefulSetSpec +} + +var map_StatefulSetStatus = map[string]string{ + "": "StatefulSetStatus represents the current state of a StatefulSet.", + "observedGeneration": "most recent generation observed by this autoscaler.", + "replicas": "Replicas is the number of actual replicas.", +} + +func (StatefulSetStatus) SwaggerDoc() map[string]string { + return map_StatefulSetStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/pkg/apis/apps/v1alpha1/zz_generated.conversion.go b/pkg/apis/apps/v1alpha1/zz_generated.conversion.go index 1fecb731d64..9253642ccaa 100644 --- a/pkg/apis/apps/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/apps/v1alpha1/zz_generated.conversion.go @@ -36,60 +36,60 @@ func init() { // Public to allow building arbitrary schemes. func RegisterConversions(scheme *runtime.Scheme) error { return scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_PetSet_To_apps_PetSet, - Convert_apps_PetSet_To_v1alpha1_PetSet, - Convert_v1alpha1_PetSetList_To_apps_PetSetList, - Convert_apps_PetSetList_To_v1alpha1_PetSetList, - Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec, - Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec, - Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus, - Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus, + Convert_v1alpha1_StatefulSet_To_apps_StatefulSet, + Convert_apps_StatefulSet_To_v1alpha1_StatefulSet, + Convert_v1alpha1_StatefulSetList_To_apps_StatefulSetList, + Convert_apps_StatefulSetList_To_v1alpha1_StatefulSetList, + Convert_v1alpha1_StatefulSetSpec_To_apps_StatefulSetSpec, + Convert_apps_StatefulSetSpec_To_v1alpha1_StatefulSetSpec, + Convert_v1alpha1_StatefulSetStatus_To_apps_StatefulSetStatus, + Convert_apps_StatefulSetStatus_To_v1alpha1_StatefulSetStatus, ) } -func autoConvert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error { +func autoConvert_v1alpha1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error { // TODO: Inefficient conversion - can we improve it? if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { return err } - if err := Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha1_StatefulSetSpec_To_apps_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha1_StatefulSetStatus_To_apps_StatefulSetStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -func Convert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error { - return autoConvert_v1alpha1_PetSet_To_apps_PetSet(in, out, s) +func Convert_v1alpha1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error { + return autoConvert_v1alpha1_StatefulSet_To_apps_StatefulSet(in, out, s) } -func autoConvert_apps_PetSet_To_v1alpha1_PetSet(in *apps.PetSet, out *PetSet, s conversion.Scope) error { +func autoConvert_apps_StatefulSet_To_v1alpha1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error { // TODO: Inefficient conversion - can we improve it? if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { return err } - if err := Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_apps_StatefulSetSpec_To_v1alpha1_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_apps_StatefulSetStatus_To_v1alpha1_StatefulSetStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -func Convert_apps_PetSet_To_v1alpha1_PetSet(in *apps.PetSet, out *PetSet, s conversion.Scope) error { - return autoConvert_apps_PetSet_To_v1alpha1_PetSet(in, out, s) +func Convert_apps_StatefulSet_To_v1alpha1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error { + return autoConvert_apps_StatefulSet_To_v1alpha1_StatefulSet(in, out, s) } -func autoConvert_v1alpha1_PetSetList_To_apps_PetSetList(in *PetSetList, out *apps.PetSetList, s conversion.Scope) error { +func autoConvert_v1alpha1_StatefulSetList_To_apps_StatefulSetList(in *StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]apps.PetSet, len(*in)) + *out = make([]apps.StatefulSet, len(*in)) for i := range *in { - if err := Convert_v1alpha1_PetSet_To_apps_PetSet(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha1_StatefulSet_To_apps_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -99,17 +99,17 @@ func autoConvert_v1alpha1_PetSetList_To_apps_PetSetList(in *PetSetList, out *app return nil } -func Convert_v1alpha1_PetSetList_To_apps_PetSetList(in *PetSetList, out *apps.PetSetList, s conversion.Scope) error { - return autoConvert_v1alpha1_PetSetList_To_apps_PetSetList(in, out, s) +func Convert_v1alpha1_StatefulSetList_To_apps_StatefulSetList(in *StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error { + return autoConvert_v1alpha1_StatefulSetList_To_apps_StatefulSetList(in, out, s) } -func autoConvert_apps_PetSetList_To_v1alpha1_PetSetList(in *apps.PetSetList, out *PetSetList, s conversion.Scope) error { +func autoConvert_apps_StatefulSetList_To_v1alpha1_StatefulSetList(in *apps.StatefulSetList, out *StatefulSetList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]PetSet, len(*in)) + *out = make([]StatefulSet, len(*in)) for i := range *in { - if err := Convert_apps_PetSet_To_v1alpha1_PetSet(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_apps_StatefulSet_To_v1alpha1_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -119,11 +119,11 @@ func autoConvert_apps_PetSetList_To_v1alpha1_PetSetList(in *apps.PetSetList, out return nil } -func Convert_apps_PetSetList_To_v1alpha1_PetSetList(in *apps.PetSetList, out *PetSetList, s conversion.Scope) error { - return autoConvert_apps_PetSetList_To_v1alpha1_PetSetList(in, out, s) +func Convert_apps_StatefulSetList_To_v1alpha1_StatefulSetList(in *apps.StatefulSetList, out *StatefulSetList, s conversion.Scope) error { + return autoConvert_apps_StatefulSetList_To_v1alpha1_StatefulSetList(in, out, s) } -func autoConvert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(in *PetSetSpec, out *apps.PetSetSpec, s conversion.Scope) error { +func autoConvert_v1alpha1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec, out *apps.StatefulSetSpec, s conversion.Scope) error { if err := api.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { return err } @@ -147,7 +147,7 @@ func autoConvert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(in *PetSetSpec, out *app return nil } -func autoConvert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(in *apps.PetSetSpec, out *PetSetSpec, s conversion.Scope) error { +func autoConvert_apps_StatefulSetSpec_To_v1alpha1_StatefulSetSpec(in *apps.StatefulSetSpec, out *StatefulSetSpec, s conversion.Scope) error { if err := api.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { return err } @@ -171,22 +171,22 @@ func autoConvert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(in *apps.PetSetSpec, out return nil } -func autoConvert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in *PetSetStatus, out *apps.PetSetStatus, s conversion.Scope) error { +func autoConvert_v1alpha1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error { out.ObservedGeneration = in.ObservedGeneration out.Replicas = in.Replicas return nil } -func Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in *PetSetStatus, out *apps.PetSetStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in, out, s) +func Convert_v1alpha1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_StatefulSetStatus_To_apps_StatefulSetStatus(in, out, s) } -func autoConvert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in *apps.PetSetStatus, out *PetSetStatus, s conversion.Scope) error { +func autoConvert_apps_StatefulSetStatus_To_v1alpha1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error { out.ObservedGeneration = in.ObservedGeneration out.Replicas = in.Replicas return nil } -func Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in *apps.PetSetStatus, out *PetSetStatus, s conversion.Scope) error { - return autoConvert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in, out, s) +func Convert_apps_StatefulSetStatus_To_v1alpha1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error { + return autoConvert_apps_StatefulSetStatus_To_v1alpha1_StatefulSetStatus(in, out, s) } diff --git a/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go index 3d80b7065f7..62ddaaa140e 100644 --- a/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go @@ -36,42 +36,42 @@ func init() { // to allow building arbitrary schemes. func RegisterDeepCopies(scheme *runtime.Scheme) error { return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSet, InType: reflect.TypeOf(&PetSet{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetList, InType: reflect.TypeOf(&PetSetList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})}, ) } -func DeepCopy_v1alpha1_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1alpha1_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error { { - in := in.(*PetSet) - out := out.(*PetSet) + in := in.(*StatefulSet) + out := out.(*StatefulSet) out.TypeMeta = in.TypeMeta if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := DeepCopy_v1alpha1_PetSetSpec(&in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_v1alpha1_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil { return err } - if err := DeepCopy_v1alpha1_PetSetStatus(&in.Status, &out.Status, c); err != nil { + if err := DeepCopy_v1alpha1_StatefulSetStatus(&in.Status, &out.Status, c); err != nil { return err } return nil } } -func DeepCopy_v1alpha1_PetSetList(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1alpha1_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error { { - in := in.(*PetSetList) - out := out.(*PetSetList) + in := in.(*StatefulSetList) + out := out.(*StatefulSetList) out.TypeMeta = in.TypeMeta out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]PetSet, len(*in)) + *out = make([]StatefulSet, len(*in)) for i := range *in { - if err := DeepCopy_v1alpha1_PetSet(&(*in)[i], &(*out)[i], c); err != nil { + if err := DeepCopy_v1alpha1_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil { return err } } @@ -82,10 +82,10 @@ func DeepCopy_v1alpha1_PetSetList(in interface{}, out interface{}, c *conversion } } -func DeepCopy_v1alpha1_PetSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1alpha1_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { { - in := in.(*PetSetSpec) - out := out.(*PetSetSpec) + in := in.(*StatefulSetSpec) + out := out.(*StatefulSetSpec) if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas *out = new(int32) @@ -121,10 +121,10 @@ func DeepCopy_v1alpha1_PetSetSpec(in interface{}, out interface{}, c *conversion } } -func DeepCopy_v1alpha1_PetSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1alpha1_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error { { - in := in.(*PetSetStatus) - out := out.(*PetSetStatus) + in := in.(*StatefulSetStatus) + out := out.(*StatefulSetStatus) if in.ObservedGeneration != nil { in, out := &in.ObservedGeneration, &out.ObservedGeneration *out = new(int64) diff --git a/pkg/apis/apps/v1alpha1/zz_generated.defaults.go b/pkg/apis/apps/v1alpha1/zz_generated.defaults.go index be2792d979e..eac2cfe30f3 100644 --- a/pkg/apis/apps/v1alpha1/zz_generated.defaults.go +++ b/pkg/apis/apps/v1alpha1/zz_generated.defaults.go @@ -29,13 +29,13 @@ import ( // Public to allow building arbitrary schemes. // All generated defaulters are covering - they call all nested defaulters. func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&PetSet{}, func(obj interface{}) { SetObjectDefaults_PetSet(obj.(*PetSet)) }) - scheme.AddTypeDefaultingFunc(&PetSetList{}, func(obj interface{}) { SetObjectDefaults_PetSetList(obj.(*PetSetList)) }) + scheme.AddTypeDefaultingFunc(&StatefulSet{}, func(obj interface{}) { SetObjectDefaults_StatefulSet(obj.(*StatefulSet)) }) + scheme.AddTypeDefaultingFunc(&StatefulSetList{}, func(obj interface{}) { SetObjectDefaults_StatefulSetList(obj.(*StatefulSetList)) }) return nil } -func SetObjectDefaults_PetSet(in *PetSet) { - SetDefaults_PetSet(in) +func SetObjectDefaults_StatefulSet(in *StatefulSet) { + SetDefaults_StatefulSet(in) v1.SetDefaults_PodSpec(&in.Spec.Template.Spec) for i := range in.Spec.Template.Spec.Volumes { a := &in.Spec.Template.Spec.Volumes[i] @@ -158,9 +158,9 @@ func SetObjectDefaults_PetSet(in *PetSet) { } } -func SetObjectDefaults_PetSetList(in *PetSetList) { +func SetObjectDefaults_StatefulSetList(in *StatefulSetList) { for i := range in.Items { a := &in.Items[i] - SetObjectDefaults_PetSet(a) + SetObjectDefaults_StatefulSet(a) } } diff --git a/pkg/apis/apps/zz_generated.deepcopy.go b/pkg/apis/apps/zz_generated.deepcopy.go index ecd6db61e85..c9d148140b7 100644 --- a/pkg/apis/apps/zz_generated.deepcopy.go +++ b/pkg/apis/apps/zz_generated.deepcopy.go @@ -36,42 +36,42 @@ func init() { // to allow building arbitrary schemes. func RegisterDeepCopies(scheme *runtime.Scheme) error { return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSet, InType: reflect.TypeOf(&PetSet{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetList, InType: reflect.TypeOf(&PetSetList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})}, ) } -func DeepCopy_apps_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_apps_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error { { - in := in.(*PetSet) - out := out.(*PetSet) + in := in.(*StatefulSet) + out := out.(*StatefulSet) out.TypeMeta = in.TypeMeta if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := DeepCopy_apps_PetSetSpec(&in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_apps_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil { return err } - if err := DeepCopy_apps_PetSetStatus(&in.Status, &out.Status, c); err != nil { + if err := DeepCopy_apps_StatefulSetStatus(&in.Status, &out.Status, c); err != nil { return err } return nil } } -func DeepCopy_apps_PetSetList(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_apps_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error { { - in := in.(*PetSetList) - out := out.(*PetSetList) + in := in.(*StatefulSetList) + out := out.(*StatefulSetList) out.TypeMeta = in.TypeMeta out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]PetSet, len(*in)) + *out = make([]StatefulSet, len(*in)) for i := range *in { - if err := DeepCopy_apps_PetSet(&(*in)[i], &(*out)[i], c); err != nil { + if err := DeepCopy_apps_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil { return err } } @@ -82,10 +82,10 @@ func DeepCopy_apps_PetSetList(in interface{}, out interface{}, c *conversion.Clo } } -func DeepCopy_apps_PetSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_apps_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { { - in := in.(*PetSetSpec) - out := out.(*PetSetSpec) + in := in.(*StatefulSetSpec) + out := out.(*StatefulSetSpec) out.Replicas = in.Replicas if in.Selector != nil { in, out := &in.Selector, &out.Selector @@ -115,10 +115,10 @@ func DeepCopy_apps_PetSetSpec(in interface{}, out interface{}, c *conversion.Clo } } -func DeepCopy_apps_PetSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_apps_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error { { - in := in.(*PetSetStatus) - out := out.(*PetSetStatus) + in := in.(*StatefulSetStatus) + out := out.(*StatefulSetStatus) if in.ObservedGeneration != nil { in, out := &in.ObservedGeneration, &out.ObservedGeneration *out = new(int64) diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/BUILD b/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/BUILD index fcafa35388e..057a7c8412c 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/BUILD @@ -16,7 +16,7 @@ go_library( "apps_client.go", "doc.go", "generated_expansion.go", - "petset.go", + "statefulset.go", ], tags = ["automanaged"], deps = [ diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/fake/BUILD index 6800e1d6dc9..afa149b604a 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/fake/BUILD @@ -15,7 +15,7 @@ go_library( srcs = [ "doc.go", "fake_apps_client.go", - "fake_petset.go", + "fake_statefulset.go", ], tags = ["automanaged"], deps = [ diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/fake/fake_statefulset.go b/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/fake/fake_statefulset.go new file mode 100644 index 00000000000..be5392632a6 --- /dev/null +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/fake/fake_statefulset.go @@ -0,0 +1,127 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + api "k8s.io/kubernetes/pkg/api" + unversioned "k8s.io/kubernetes/pkg/api/unversioned" + apps "k8s.io/kubernetes/pkg/apis/apps" + core "k8s.io/kubernetes/pkg/client/testing/core" + labels "k8s.io/kubernetes/pkg/labels" + watch "k8s.io/kubernetes/pkg/watch" +) + +// FakeStatefulSets implements StatefulSetInterface +type FakeStatefulSets struct { + Fake *FakeApps + ns string +} + +var statefulsetsResource = unversioned.GroupVersionResource{Group: "apps", Version: "", Resource: "statefulsets"} + +func (c *FakeStatefulSets) Create(statefulSet *apps.StatefulSet) (result *apps.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(core.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &apps.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*apps.StatefulSet), err +} + +func (c *FakeStatefulSets) Update(statefulSet *apps.StatefulSet) (result *apps.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(core.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &apps.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*apps.StatefulSet), err +} + +func (c *FakeStatefulSets) UpdateStatus(statefulSet *apps.StatefulSet) (*apps.StatefulSet, error) { + obj, err := c.Fake. + Invokes(core.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &apps.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*apps.StatefulSet), err +} + +func (c *FakeStatefulSets) Delete(name string, options *api.DeleteOptions) error { + _, err := c.Fake. + Invokes(core.NewDeleteAction(statefulsetsResource, c.ns, name), &apps.StatefulSet{}) + + return err +} + +func (c *FakeStatefulSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { + action := core.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &apps.StatefulSetList{}) + return err +} + +func (c *FakeStatefulSets) Get(name string) (result *apps.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(core.NewGetAction(statefulsetsResource, c.ns, name), &apps.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*apps.StatefulSet), err +} + +func (c *FakeStatefulSets) List(opts api.ListOptions) (result *apps.StatefulSetList, err error) { + obj, err := c.Fake. + Invokes(core.NewListAction(statefulsetsResource, c.ns, opts), &apps.StatefulSetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := core.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &apps.StatefulSetList{} + for _, item := range obj.(*apps.StatefulSetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested statefulSets. +func (c *FakeStatefulSets) Watch(opts api.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(core.NewWatchAction(statefulsetsResource, c.ns, opts)) + +} + +// Patch applies the patch and returns the patched statefulSet. +func (c *FakeStatefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, data, subresources...), &apps.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*apps.StatefulSet), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/statefulset.go b/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/statefulset.go new file mode 100644 index 00000000000..67854249b02 --- /dev/null +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/unversioned/statefulset.go @@ -0,0 +1,166 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package unversioned + +import ( + api "k8s.io/kubernetes/pkg/api" + apps "k8s.io/kubernetes/pkg/apis/apps" + restclient "k8s.io/kubernetes/pkg/client/restclient" + watch "k8s.io/kubernetes/pkg/watch" +) + +// StatefulSetsGetter has a method to return a StatefulSetInterface. +// A group's client should implement this interface. +type StatefulSetsGetter interface { + StatefulSets(namespace string) StatefulSetInterface +} + +// StatefulSetInterface has methods to work with StatefulSet resources. +type StatefulSetInterface interface { + Create(*apps.StatefulSet) (*apps.StatefulSet, error) + Update(*apps.StatefulSet) (*apps.StatefulSet, error) + UpdateStatus(*apps.StatefulSet) (*apps.StatefulSet, error) + Delete(name string, options *api.DeleteOptions) error + DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Get(name string) (*apps.StatefulSet, error) + List(opts api.ListOptions) (*apps.StatefulSetList, error) + Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) + StatefulSetExpansion +} + +// statefulSets implements StatefulSetInterface +type statefulSets struct { + client restclient.Interface + ns string +} + +// newStatefulSets returns a StatefulSets +func newStatefulSets(c *AppsClient, namespace string) *statefulSets { + return &statefulSets{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. +func (c *statefulSets) Create(statefulSet *apps.StatefulSet) (result *apps.StatefulSet, err error) { + result = &apps.StatefulSet{} + err = c.client.Post(). + Namespace(c.ns). + Resource("statefulsets"). + Body(statefulSet). + Do(). + Into(result) + return +} + +// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. +func (c *statefulSets) Update(statefulSet *apps.StatefulSet) (result *apps.StatefulSet, err error) { + result = &apps.StatefulSet{} + err = c.client.Put(). + Namespace(c.ns). + Resource("statefulsets"). + Name(statefulSet.Name). + Body(statefulSet). + Do(). + Into(result) + return +} + +func (c *statefulSets) UpdateStatus(statefulSet *apps.StatefulSet) (result *apps.StatefulSet, err error) { + result = &apps.StatefulSet{} + err = c.client.Put(). + Namespace(c.ns). + Resource("statefulsets"). + Name(statefulSet.Name). + SubResource("status"). + Body(statefulSet). + Do(). + Into(result) + return +} + +// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. +func (c *statefulSets) Delete(name string, options *api.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("statefulsets"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *statefulSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("statefulsets"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. +func (c *statefulSets) Get(name string) (result *apps.StatefulSet, err error) { + result = &apps.StatefulSet{} + err = c.client.Get(). + Namespace(c.ns). + Resource("statefulsets"). + Name(name). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of StatefulSets that match those selectors. +func (c *statefulSets) List(opts api.ListOptions) (result *apps.StatefulSetList, err error) { + result = &apps.StatefulSetList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("statefulsets"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested statefulSets. +func (c *statefulSets) Watch(opts api.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Namespace(c.ns). + Resource("statefulsets"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched statefulSet. +func (c *statefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) { + result = &apps.StatefulSet{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("statefulsets"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/BUILD b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/BUILD index b3f27628059..a6a3d0b5fa0 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/BUILD +++ b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/BUILD @@ -16,7 +16,7 @@ go_library( "apps_client.go", "doc.go", "generated_expansion.go", - "petset.go", + "statefulset.go", ], tags = ["automanaged"], deps = [ diff --git a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/BUILD b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/BUILD index 68a2582d161..2e809f8c8f0 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/BUILD +++ b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/BUILD @@ -15,7 +15,7 @@ go_library( srcs = [ "doc.go", "fake_apps_client.go", - "fake_petset.go", + "fake_statefulset.go", ], tags = ["automanaged"], deps = [ diff --git a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/fake_statefulset.go b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/fake_statefulset.go new file mode 100644 index 00000000000..19d587557a6 --- /dev/null +++ b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/fake_statefulset.go @@ -0,0 +1,128 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + api "k8s.io/kubernetes/pkg/api" + unversioned "k8s.io/kubernetes/pkg/api/unversioned" + v1 "k8s.io/kubernetes/pkg/api/v1" + v1alpha1 "k8s.io/kubernetes/pkg/apis/apps/v1alpha1" + core "k8s.io/kubernetes/pkg/client/testing/core" + labels "k8s.io/kubernetes/pkg/labels" + watch "k8s.io/kubernetes/pkg/watch" +) + +// FakeStatefulSets implements StatefulSetInterface +type FakeStatefulSets struct { + Fake *FakeApps + ns string +} + +var statefulsetsResource = unversioned.GroupVersionResource{Group: "apps", Version: "v1alpha1", Resource: "statefulsets"} + +func (c *FakeStatefulSets) Create(statefulSet *v1alpha1.StatefulSet) (result *v1alpha1.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(core.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1alpha1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StatefulSet), err +} + +func (c *FakeStatefulSets) Update(statefulSet *v1alpha1.StatefulSet) (result *v1alpha1.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(core.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1alpha1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StatefulSet), err +} + +func (c *FakeStatefulSets) UpdateStatus(statefulSet *v1alpha1.StatefulSet) (*v1alpha1.StatefulSet, error) { + obj, err := c.Fake. + Invokes(core.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1alpha1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StatefulSet), err +} + +func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(core.NewDeleteAction(statefulsetsResource, c.ns, name), &v1alpha1.StatefulSet{}) + + return err +} + +func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := core.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &v1alpha1.StatefulSetList{}) + return err +} + +func (c *FakeStatefulSets) Get(name string) (result *v1alpha1.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(core.NewGetAction(statefulsetsResource, c.ns, name), &v1alpha1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StatefulSet), err +} + +func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1alpha1.StatefulSetList, err error) { + obj, err := c.Fake. + Invokes(core.NewListAction(statefulsetsResource, c.ns, opts), &v1alpha1.StatefulSetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := core.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.StatefulSetList{} + for _, item := range obj.(*v1alpha1.StatefulSetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested statefulSets. +func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(core.NewWatchAction(statefulsetsResource, c.ns, opts)) + +} + +// Patch applies the patch and returns the patched statefulSet. +func (c *FakeStatefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, data, subresources...), &v1alpha1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StatefulSet), err +} diff --git a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/statefulset.go b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/statefulset.go new file mode 100644 index 00000000000..2f73b6e27ed --- /dev/null +++ b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/statefulset.go @@ -0,0 +1,167 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + api "k8s.io/kubernetes/pkg/api" + v1 "k8s.io/kubernetes/pkg/api/v1" + v1alpha1 "k8s.io/kubernetes/pkg/apis/apps/v1alpha1" + restclient "k8s.io/kubernetes/pkg/client/restclient" + watch "k8s.io/kubernetes/pkg/watch" +) + +// StatefulSetsGetter has a method to return a StatefulSetInterface. +// A group's client should implement this interface. +type StatefulSetsGetter interface { + StatefulSets(namespace string) StatefulSetInterface +} + +// StatefulSetInterface has methods to work with StatefulSet resources. +type StatefulSetInterface interface { + Create(*v1alpha1.StatefulSet) (*v1alpha1.StatefulSet, error) + Update(*v1alpha1.StatefulSet) (*v1alpha1.StatefulSet, error) + UpdateStatus(*v1alpha1.StatefulSet) (*v1alpha1.StatefulSet, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string) (*v1alpha1.StatefulSet, error) + List(opts v1.ListOptions) (*v1alpha1.StatefulSetList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.StatefulSet, err error) + StatefulSetExpansion +} + +// statefulSets implements StatefulSetInterface +type statefulSets struct { + client restclient.Interface + ns string +} + +// newStatefulSets returns a StatefulSets +func newStatefulSets(c *AppsClient, namespace string) *statefulSets { + return &statefulSets{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. +func (c *statefulSets) Create(statefulSet *v1alpha1.StatefulSet) (result *v1alpha1.StatefulSet, err error) { + result = &v1alpha1.StatefulSet{} + err = c.client.Post(). + Namespace(c.ns). + Resource("statefulsets"). + Body(statefulSet). + Do(). + Into(result) + return +} + +// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. +func (c *statefulSets) Update(statefulSet *v1alpha1.StatefulSet) (result *v1alpha1.StatefulSet, err error) { + result = &v1alpha1.StatefulSet{} + err = c.client.Put(). + Namespace(c.ns). + Resource("statefulsets"). + Name(statefulSet.Name). + Body(statefulSet). + Do(). + Into(result) + return +} + +func (c *statefulSets) UpdateStatus(statefulSet *v1alpha1.StatefulSet) (result *v1alpha1.StatefulSet, err error) { + result = &v1alpha1.StatefulSet{} + err = c.client.Put(). + Namespace(c.ns). + Resource("statefulsets"). + Name(statefulSet.Name). + SubResource("status"). + Body(statefulSet). + Do(). + Into(result) + return +} + +// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. +func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("statefulsets"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("statefulsets"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. +func (c *statefulSets) Get(name string) (result *v1alpha1.StatefulSet, err error) { + result = &v1alpha1.StatefulSet{} + err = c.client.Get(). + Namespace(c.ns). + Resource("statefulsets"). + Name(name). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of StatefulSets that match those selectors. +func (c *statefulSets) List(opts v1.ListOptions) (result *v1alpha1.StatefulSetList, err error) { + result = &v1alpha1.StatefulSetList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("statefulsets"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested statefulSets. +func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Namespace(c.ns). + Resource("statefulsets"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched statefulSet. +func (c *statefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.StatefulSet, err error) { + result = &v1alpha1.StatefulSet{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("statefulsets"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/unversioned/testclient/BUILD b/pkg/client/unversioned/testclient/BUILD new file mode 100644 index 00000000000..694337d6585 --- /dev/null +++ b/pkg/client/unversioned/testclient/BUILD @@ -0,0 +1,34 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_binary", + "go_library", + "go_test", + "cgo_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "fake_petsets.go", + "testclient.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/api:go_default_library", + "//pkg/api/unversioned:go_default_library", + "//pkg/api/v1:go_default_library", + "//pkg/apimachinery/registered:go_default_library", + "//pkg/apis/apps:go_default_library", + "//pkg/client/restclient:go_default_library", + "//pkg/client/typed/discovery:go_default_library", + "//pkg/client/unversioned:go_default_library", + "//pkg/runtime:go_default_library", + "//pkg/version:go_default_library", + "//pkg/watch:go_default_library", + "//vendor:github.com/emicklei/go-restful/swagger", + ], +) diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 0e7adb37f38..a4fdd404cbc 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -29,10 +29,10 @@ import ( ) var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{ - "apps.PetSet": { + "apps.StatefulSet": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PetSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe PetSet guarantees that a given network identity will always map to the same storage identity. PetSet is currently in alpha and and subject to change without notice.", + Description: "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity. StatefulSet is currently in alpha and and subject to change without notice.", Properties: map[string]spec.Schema{ "metadata": { SchemaProps: spec.SchemaProps{ @@ -41,26 +41,26 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{ }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "Spec defines the desired identities of pets in this set.", - Ref: spec.MustCreateRef("#/definitions/apps.PetSetSpec"), + Description: "Spec defines the desired identities of pods in this set.", + Ref: spec.MustCreateRef("#/definitions/apps.StatefulSetSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Description: "Status is the current status of Pets in this PetSet. This data may be out of date by some window of time.", - Ref: spec.MustCreateRef("#/definitions/apps.PetSetStatus"), + Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", + Ref: spec.MustCreateRef("#/definitions/apps.StatefulSetStatus"), }, }, }, }, }, Dependencies: []string{ - "api.ObjectMeta", "apps.PetSetSpec", "apps.PetSetStatus"}, + "api.ObjectMeta", "apps.StatefulSetSpec", "apps.StatefulSetStatus"}, }, - "apps.PetSetList": { + "apps.StatefulSetList": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PetSetList is a collection of PetSets.", + Description: "StatefulSetList is a collection of StatefulSets.", Properties: map[string]spec.Schema{ "metadata": { SchemaProps: spec.SchemaProps{ @@ -73,7 +73,7 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{ Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: spec.MustCreateRef("#/definitions/apps.PetSet"), + Ref: spec.MustCreateRef("#/definitions/apps.StatefulSet"), }, }, }, @@ -84,12 +84,12 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{ }, }, Dependencies: []string{ - "apps.PetSet", "unversioned.ListMeta"}, + "apps.StatefulSet", "unversioned.ListMeta"}, }, - "apps.PetSetSpec": { + "apps.StatefulSetSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "A PetSetSpec is the specification of a PetSet.", + Description: "A StatefulSetSpec is the specification of a StatefulSet.", Properties: map[string]spec.Schema{ "replicas": { SchemaProps: spec.SchemaProps{ @@ -106,13 +106,13 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{ }, "template": { SchemaProps: spec.SchemaProps{ - Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the PetSet will fulfill this Template, but have a unique identity from the rest of the PetSet.", + Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", Ref: spec.MustCreateRef("#/definitions/api.PodTemplateSpec"), }, }, "volumeClaimTemplates": { SchemaProps: spec.SchemaProps{ - Description: "VolumeClaimTemplates is a list of claims that pets are allowed to reference. The PetSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pet. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", + Description: "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -125,7 +125,7 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{ }, "serviceName": { SchemaProps: spec.SchemaProps{ - Description: "ServiceName is the name of the service that governs this PetSet. This service must exist before the PetSet, and is responsible for the network identity of the set. Pets get DNS/hostnames that follow the pattern: pet-specific-string.serviceName.default.svc.cluster.local where \"pet-specific-string\" is managed by the PetSet controller.", + Description: "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", Type: []string{"string"}, Format: "", }, @@ -137,10 +137,10 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{ Dependencies: []string{ "api.PersistentVolumeClaim", "api.PodTemplateSpec", "unversioned.LabelSelector"}, }, - "apps.PetSetStatus": { + "apps.StatefulSetStatus": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PetSetStatus represents the current state of a PetSet.", + Description: "StatefulSetStatus represents the current state of a StatefulSet.", Properties: map[string]spec.Schema{ "observedGeneration": { SchemaProps: spec.SchemaProps{ @@ -14755,139 +14755,6 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{ Dependencies: []string{ "unversioned.Duration"}, }, - "v1alpha1.PetSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PetSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe PetSet guarantees that a given network identity will always map to the same storage identity. PetSet is currently in alpha and subject to change without notice.", - Properties: map[string]spec.Schema{ - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: spec.MustCreateRef("#/definitions/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the desired identities of pets in this set.", - Ref: spec.MustCreateRef("#/definitions/v1alpha1.PetSetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the current status of Pets in this PetSet. This data may be out of date by some window of time.", - Ref: spec.MustCreateRef("#/definitions/v1alpha1.PetSetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "v1.ObjectMeta", "v1alpha1.PetSetSpec", "v1alpha1.PetSetStatus"}, - }, - "v1alpha1.PetSetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PetSetList is a collection of PetSets.", - Properties: map[string]spec.Schema{ - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: spec.MustCreateRef("#/definitions/unversioned.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: spec.MustCreateRef("#/definitions/v1alpha1.PetSet"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "unversioned.ListMeta", "v1alpha1.PetSet"}, - }, - "v1alpha1.PetSetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A PetSetSpec is the specification of a PetSet.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", - Ref: spec.MustCreateRef("#/definitions/unversioned.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the PetSet will fulfill this Template, but have a unique identity from the rest of the PetSet.", - Ref: spec.MustCreateRef("#/definitions/v1.PodTemplateSpec"), - }, - }, - "volumeClaimTemplates": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeClaimTemplates is a list of claims that pets are allowed to reference. The PetSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pet. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: spec.MustCreateRef("#/definitions/v1.PersistentVolumeClaim"), - }, - }, - }, - }, - }, - "serviceName": { - SchemaProps: spec.SchemaProps{ - Description: "ServiceName is the name of the service that governs this PetSet. This service must exist before the PetSet, and is responsible for the network identity of the set. Pets get DNS/hostnames that follow the pattern: pet-specific-string.serviceName.default.svc.cluster.local where \"pet-specific-string\" is managed by the PetSet controller.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"template", "serviceName"}, - }, - }, - Dependencies: []string{ - "unversioned.LabelSelector", "v1.PersistentVolumeClaim", "v1.PodTemplateSpec"}, - }, - "v1alpha1.PetSetStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PetSetStatus represents the current state of a PetSet.", - Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "most recent generation observed by this autoscaler.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the number of actual replicas.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{}, - }, "v1alpha1.PodDisruptionBudget": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -15257,6 +15124,139 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{ }, Dependencies: []string{}, }, + "v1alpha1.StatefulSet": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity. StatefulSet is currently in alpha and subject to change without notice.", + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the desired identities of pods in this set.", + Ref: spec.MustCreateRef("#/definitions/v1alpha1.StatefulSetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", + Ref: spec.MustCreateRef("#/definitions/v1alpha1.StatefulSetStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "v1.ObjectMeta", "v1alpha1.StatefulSetSpec", "v1alpha1.StatefulSetStatus"}, + }, + "v1alpha1.StatefulSetList": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetList is a collection of StatefulSets.", + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/unversioned.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1alpha1.StatefulSet"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "unversioned.ListMeta", "v1alpha1.StatefulSet"}, + }, + "v1alpha1.StatefulSetSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A StatefulSetSpec is the specification of a StatefulSet.", + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + Ref: spec.MustCreateRef("#/definitions/unversioned.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + Ref: spec.MustCreateRef("#/definitions/v1.PodTemplateSpec"), + }, + }, + "volumeClaimTemplates": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1.PersistentVolumeClaim"), + }, + }, + }, + }, + }, + "serviceName": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"template", "serviceName"}, + }, + }, + Dependencies: []string{ + "unversioned.LabelSelector", "v1.PersistentVolumeClaim", "v1.PodTemplateSpec"}, + }, + "v1alpha1.StatefulSetStatus": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatefulSetStatus represents the current state of a StatefulSet.", + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "most recent generation observed by this autoscaler.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the number of actual replicas.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + Dependencies: []string{}, + }, "v1alpha1.Subject": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{