diff --git a/cluster/addons/calico-policy-controller/calico-etcd-petset.yaml b/cluster/addons/calico-policy-controller/calico-etcd-petset.yaml index b4d49ed641b..e7981f442fc 100644 --- a/cluster/addons/calico-policy-controller/calico-etcd-petset.yaml +++ b/cluster/addons/calico-policy-controller/calico-etcd-petset.yaml @@ -1,4 +1,4 @@ -apiVersion: "apps/v1alpha1" +apiVersion: "apps/v1beta1" kind: StatefulSet metadata: name: calico-etcd diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index 8be587684ee..06733080abd 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -438,7 +438,7 @@ func StartControllers(s *options.CMServer, kubeconfig *restclient.Config, rootCl } } - groupVersion = "apps/v1alpha1" + groupVersion = "apps/v1beta1" resources, found = resourceMap[groupVersion] glog.Infof("Attempting to start statefulset, full resource map %+v", resourceMap) if containsVersion(versions, groupVersion) && found { diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go index aae64d2bdd8..4be1c8f2729 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go @@ -72,7 +72,7 @@ func New() *Generator { `k8s.io/kubernetes/pkg/apis/authorization/v1beta1`, `k8s.io/kubernetes/pkg/apis/batch/v1`, `k8s.io/kubernetes/pkg/apis/batch/v2alpha1`, - `k8s.io/kubernetes/pkg/apis/apps/v1alpha1`, + `k8s.io/kubernetes/pkg/apis/apps/v1beta1`, `k8s.io/kubernetes/pkg/apis/authentication/v1beta1`, `k8s.io/kubernetes/pkg/apis/rbac/v1alpha1`, `k8s.io/kubernetes/federation/apis/federation/v1beta1`, diff --git a/docs/api-reference/apps/v1alpha1/definitions.html b/docs/api-reference/apps/v1alpha1/definitions.html deleted file mode 100755 index 6b791be9c48..00000000000 --- a/docs/api-reference/apps/v1alpha1/definitions.html +++ /dev/null @@ -1,4403 +0,0 @@ - - - - - - -Top Level API Objects - - - - -
-
-

Top Level API Objects

- -
-
-

Definitions

-
-
-

versioned.Event

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

type

true

string

object

true

string

- -
-
-

v1.Preconditions

-
-

Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.

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

uid

Specifies the target UID.

false

types.UID

- -
-
-

v1.SELinuxOptions

-
-

SELinuxOptions are the labels to be applied to the container

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

user

User is a SELinux user label that applies to the container.

false

string

role

Role is a SELinux role label that applies to the container.

false

string

type

Type is a SELinux type label that applies to the container.

false

string

level

Level is SELinux level label that applies to the container.

false

string

- -
-
-

v1.ObjectFieldSelector

-
-

ObjectFieldSelector selects an APIVersioned field of an object.

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

apiVersion

Version of the schema the FieldPath is written in terms of, defaults to "v1".

false

string

fieldPath

Path of the field to select in the specified API version.

true

string

- -
-
-

v1.VolumeMount

-
-

VolumeMount describes a mounting of a Volume within a container.

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

name

This must match the Name of a Volume.

true

string

readOnly

Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.

false

boolean

false

mountPath

Path within the container at which the volume should be mounted. Must not contain :.

true

string

subPath

Path within the volume from which the container’s volume should be mounted. Defaults to "" (volume’s root).

false

string

- -
-
-

v1.NFSVolumeSource

-
-

Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.

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

server

Server is the hostname or IP address of the NFS server. More info: http://kubernetes.io/docs/user-guide/volumes#nfs

true

string

path

Path that is exported by the NFS server. More info: http://kubernetes.io/docs/user-guide/volumes#nfs

true

string

readOnly

ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: http://kubernetes.io/docs/user-guide/volumes#nfs

false

boolean

false

- -
-
-

v1.PersistentVolumeClaimSpec

-
-

PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes

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

accessModes

AccessModes contains the desired access modes the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1

false

v1.PersistentVolumeAccessMode array

selector

A label query over volumes to consider for binding.

false

unversioned.LabelSelector

resources

Resources represents the minimum resources the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources

false

v1.ResourceRequirements

volumeName

VolumeName is the binding reference to the PersistentVolume backing this claim.

false

string

- -
-
-

v1.CephFSVolumeSource

-
-

Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.

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

monitors

Required: Monitors is a collection of Ceph monitors More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it

true

string array

path

Optional: Used as the mounted root, rather than the full Ceph tree, default is /

false

string

user

Optional: User is the rados user name, default is admin More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it

false

string

secretFile

Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it

false

string

secretRef

Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it

false

v1.LocalObjectReference

readOnly

Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it

false

boolean

false

- -
-
-

v1.HTTPHeader

-
-

HTTPHeader describes a custom header to be used in HTTP probes

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

name

The header field name

true

string

value

The header field value

true

string

- -
-
-

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

-
-

Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.

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

targetWWNs

Required: FC target worldwide names (WWNs)

true

string array

lun

Required: FC target lun number

true

integer (int32)

fsType

Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.

false

string

readOnly

Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.

false

boolean

false

- -
-
-

v1.DownwardAPIVolumeSource

-
-

DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.

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

items

Items is a list of downward API volume file

false

v1.DownwardAPIVolumeFile array

defaultMode

Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

false

integer (int32)

- -
-
-

unversioned.StatusCause

-
-

StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.

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

reason

A machine-readable description of the cause of the error. If this value is empty there is no information available.

false

string

message

A human-readable description of the cause of the error. This field may be presented as-is to a reader.

false

string

field

The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
-
-Examples:
- "name" - the field "name" on the current resource
- "items[0].name" - the field "name" on the first array entry in "items"

false

string

- -
-
-

v1.GCEPersistentDiskVolumeSource

-
-

Represents a Persistent Disk resource in Google Compute Engine.

-
-
-

A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.

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

pdName

Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk

true

string

fsType

Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk

false

string

partition

The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk

false

integer (int32)

readOnly

ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk

false

boolean

false

- -
-
-

v1.TCPSocketAction

-
-

TCPSocketAction describes an action based on opening a socket

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

port

Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.

true

string

- -
-
-

v1.ConfigMapVolumeSource

-
-

Adapts a ConfigMap into a volume.

-
-
-

The contents of the target ConfigMap’s Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.

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

name

Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

false

string

items

If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the .. path or start with ...

false

v1.KeyToPath array

defaultMode

Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

false

integer (int32)

- -
-
-

unversioned.StatusDetails

-
-

StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.

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

name

The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).

false

string

group

The group attribute of the resource associated with the status StatusReason.

false

string

kind

The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

causes

The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.

false

unversioned.StatusCause array

retryAfterSeconds

If specified, the time in seconds before the operation should be retried.

false

integer (int32)

- -
-
-

v1.GitRepoVolumeSource

-
-

Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.

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

repository

Repository URL

true

string

revision

Commit hash for the specified revision.

false

string

directory

Target directory name. Must not contain or start with ... If . is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.

false

string

- -
-
-

v1.HTTPGetAction

-
-

HTTPGetAction describes an action based on HTTP Get requests.

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

path

Path to access on the HTTP server.

false

string

port

Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.

true

string

host

Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.

false

string

scheme

Scheme to use for connecting to the host. Defaults to HTTP.

false

string

httpHeaders

Custom headers to set in the request. HTTP allows repeated headers.

false

v1.HTTPHeader array

- -
-
-

v1.Capabilities

-
-

Adds and removes POSIX capabilities from running containers.

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

add

Added capabilities

false

v1.Capability array

drop

Removed capabilities

false

v1.Capability array

- -
-
-

v1.LocalObjectReference

-
-

LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.

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

name

Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

false

string

- -
-
-

v1.Container

-
-

A single application container that you want to run within a pod.

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

name

Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.

true

string

image

Docker image name. More info: http://kubernetes.io/docs/user-guide/images

false

string

command

Entrypoint array. Not executed within a shell. The docker image’s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands

false

string array

args

Arguments to the entrypoint. The docker image’s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands

false

string array

workingDir

Container’s working directory. If not specified, the container runtime’s default will be used, which might be configured in the container image. Cannot be updated.

false

string

ports

List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated.

false

v1.ContainerPort array

env

List of environment variables to set in the container. Cannot be updated.

false

v1.EnvVar array

resources

Compute Resources required by this container. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources

false

v1.ResourceRequirements

volumeMounts

Pod volumes to mount into the container’s filesystem. Cannot be updated.

false

v1.VolumeMount array

livenessProbe

Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes

false

v1.Probe

readinessProbe

Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes

false

v1.Probe

lifecycle

Actions that the management system should take in response to container lifecycle events. Cannot be updated.

false

v1.Lifecycle

terminationMessagePath

Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.

false

string

imagePullPolicy

Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/images#updating-images

false

string

securityContext

Security options the pod should run with. More info: http://releases.k8s.io/HEAD/docs/design/security_context.md

false

v1.SecurityContext

stdin

Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.

false

boolean

false

stdinOnce

Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false

false

boolean

false

tty

Whether this container should allocate a TTY for itself, also requires stdin to be true. Default is false.

false

boolean

false

- -
-
-

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

-
-

PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.

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

seLinuxOptions

The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.

false

v1.SELinuxOptions

runAsUser

The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.

false

integer (int64)

runAsNonRoot

Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.

false

boolean

false

supplementalGroups

A list of groups applied to the first process run in each container, in addition to the container’s primary GID. If unspecified, no groups will be added to any container.

false

integer (int32) array

fsGroup

A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:
-
-1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR’d with rw-rw

false

integer (int64)

- -
-
-

v1.ExecAction

-
-

ExecAction describes a "run in container" action.

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

command

Command is the command line to execute inside the container, the working directory for the command is root (/) in the container’s filesystem. The command is simply exec’d, it is not run inside a shell, so traditional shell instructions ('

', etc) won’t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.

false

string array

- -
-
-

v1.ObjectMeta

-
-

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

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

name

Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names

false

string

generateName

GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
-
-If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).
-
-Applied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency

false

string

namespace

Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
-
-Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces

false

string

selfLink

SelfLink is a URL representing this object. Populated by the system. Read-only.

false

string

uid

UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
-
-Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids

false

string

resourceVersion

An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
-
-Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency

false

string

generation

A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.

false

integer (int64)

creationTimestamp

CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
-
-Populated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata

false

string (date-time)

deletionTimestamp

DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource will be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet will send a hard termination signal to the container. If not set, graceful deletion of the object has not been requested.
-
-Populated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata

false

string (date-time)

deletionGracePeriodSeconds

Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.

false

integer (int64)

labels

Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels

false

object

annotations

Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations

false

object

ownerReferences

List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.

false

v1.OwnerReference array

finalizers

Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.

false

string array

clusterName

The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.

false

string

- -
-
-

v1.OwnerReference

-
-

OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.

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

apiVersion

API version of the referent.

true

string

kind

Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

true

string

name

Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

true

string

uid

UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids

true

string

controller

If true, this reference points to the managing controller.

false

boolean

false

- -
-
-

types.UID

- -
-
-

v1.HostPathVolumeSource

-
-

Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.

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

path

Path of the directory on the host. More info: http://kubernetes.io/docs/user-guide/volumes#hostpath

true

string

- -
-
-

v1.AzureFileVolumeSource

-
-

AzureFile represents an Azure File Service mount on the host and bind mount to the pod.

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

secretName

the name of secret that contains Azure Storage Account Name and Key

true

string

shareName

Share Name

true

string

readOnly

Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.

false

boolean

false

- -
-
-

v1.ISCSIVolumeSource

-
-

Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.

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

targetPortal

iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).

true

string

iqn

Target iSCSI Qualified Name.

true

string

lun

iSCSI target lun number.

true

integer (int32)

iscsiInterface

Optional: Defaults to default (tcp). iSCSI interface name that uses an iSCSI transport.

false

string

fsType

Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#iscsi

false

string

readOnly

ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.

false

boolean

false

- -
-
-

v1.EmptyDirVolumeSource

-
-

Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.

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

medium

What type of storage medium should back this directory. The default is "" which means to use the node’s default medium. Must be an empty string (default) or Memory. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir

false

string

- -
-
-

unversioned.Patch

-
-

Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.

-
-
-
-

v1.CinderVolumeSource

-
-

Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.

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

volumeID

volume id used to identify the volume in cinder More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md

true

string

fsType

Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md

false

string

readOnly

Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md

false

boolean

false

- -
-
-

v1.PersistentVolumeClaim

-
-

PersistentVolumeClaim is a user’s request for and claim to a persistent volume

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

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

Standard object’s metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata

false

v1.ObjectMeta

spec

Spec defines the desired characteristics of a volume requested by a pod author. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims

false

v1.PersistentVolumeClaimSpec

status

Status represents the current information/status of a persistent volume claim. Read-only. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims

false

v1.PersistentVolumeClaimStatus

- -
-
-

v1.SecurityContext

-
-

SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.

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

capabilities

The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.

false

v1.Capabilities

privileged

Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.

false

boolean

false

seLinuxOptions

The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.

false

v1.SELinuxOptions

runAsUser

The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.

false

integer (int64)

runAsNonRoot

Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.

false

boolean

false

readOnlyRootFilesystem

Whether this container has a read-only root filesystem. Default is false.

false

boolean

false

- -
-
-

v1.PersistentVolumeClaimVolumeSource

-
-

PersistentVolumeClaimVolumeSource references the user’s PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).

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

claimName

ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims

true

string

readOnly

Will force the ReadOnly setting in VolumeMounts. Default false.

false

boolean

false

- -
-
-

v1.AWSElasticBlockStoreVolumeSource

-
-

Represents a Persistent Disk resource in AWS.

-
-
-

An AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.

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

volumeID

Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore

true

string

fsType

Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore

false

string

partition

The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).

false

integer (int32)

readOnly

Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore

false

boolean

false

- -
-
-

v1.FlockerVolumeSource

-
-

Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.

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

datasetName

Name of the dataset stored as metadata → name on the dataset for Flocker should be considered as deprecated

false

string

datasetUUID

UUID of the dataset. This is unique identifier of a Flocker dataset

false

string

- -
-
-

unversioned.ListMeta

-
-

ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.

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

selfLink

SelfLink is a URL representing this object. Populated by the system. Read-only.

false

string

resourceVersion

String that identifies the server’s internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency

false

string

- -
-
-

v1.PersistentVolumeClaimStatus

-
-

PersistentVolumeClaimStatus is the current status of a persistent volume claim.

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

phase

Phase represents the current phase of PersistentVolumeClaim.

false

string

accessModes

AccessModes contains the actual access modes the volume backing the PVC has. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1

false

v1.PersistentVolumeAccessMode array

capacity

Represents the actual resources of the underlying volume.

false

object

- -
-
-

v1.QuobyteVolumeSource

-
-

Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.

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

registry

Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes

true

string

volume

Volume is a string that references an already created Quobyte volume by name.

true

string

readOnly

ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.

false

boolean

false

user

User to map volume access to Defaults to serivceaccount user

false

string

group

Group to map volume access to Default is no group

false

string

- -
-
-

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.

-
- ------- - - - - - - - - - - - - - - - - - - - - - - - - - -
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.

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

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

false

unversioned.ListMeta

items

true

v1alpha1.StatefulSet array

- -
-
-

v1.SecretVolumeSource

-
-

Adapts a Secret into a volume.

-
-
-

The contents of the target Secret’s Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.

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

secretName

Name of the secret in the pod’s namespace to use. More info: http://kubernetes.io/docs/user-guide/volumes#secrets

false

string

items

If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the .. path or start with ...

false

v1.KeyToPath array

defaultMode

Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

false

integer (int32)

- -
-
-

v1.EnvVar

-
-

EnvVar represents an environment variable present in a Container.

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

name

Name of the environment variable. Must be a C_IDENTIFIER.

true

string

value

Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".

false

string

valueFrom

Source for the environment variable’s value. Cannot be used if value is not empty.

false

v1.EnvVarSource

- -
-
-

v1.PersistentVolumeAccessMode

- -
-
-

v1.ResourceRequirements

-
-

ResourceRequirements describes the compute resource requirements.

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

limits

Limits describes the maximum amount of compute resources allowed. More info: http://kubernetes.io/docs/user-guide/compute-resources/

false

object

requests

Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: http://kubernetes.io/docs/user-guide/compute-resources/

false

object

- -
-
-

v1.FlexVolumeSource

-
-

FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.

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

driver

Driver is the name of the driver to use for this volume.

true

string

fsType

Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.

false

string

secretRef

Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.

false

v1.LocalObjectReference

readOnly

Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.

false

boolean

false

options

Optional: Extra command options if any.

false

object

- -
-
-

v1.EnvVarSource

-
-

EnvVarSource represents a source for the value of an EnvVar.

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

fieldRef

Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP.

false

v1.ObjectFieldSelector

resourceFieldRef

Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.

false

v1.ResourceFieldSelector

configMapKeyRef

Selects a key of a ConfigMap.

false

v1.ConfigMapKeySelector

secretKeyRef

Selects a key of a secret in the pod’s namespace

false

v1.SecretKeySelector

- -
-
-

v1.PodTemplateSpec

-
-

PodTemplateSpec describes the data a pod should have when created from a template

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

metadata

Standard object’s metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata

false

v1.ObjectMeta

spec

Specification of the desired behavior of the pod. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status

false

v1.PodSpec

- -
-
-

v1.KeyToPath

-
-

Maps a string key to a path within a volume.

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

key

The key to project.

true

string

path

The relative path of the file to map the key to. May not be an absolute path. May not contain the path element ... May not start with the string ...

true

string

mode

Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

false

integer (int32)

- -
-
-

v1.AzureDiskVolumeSource

-
-

AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.

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

diskName

The Name of the data disk in the blob storage

true

string

diskURI

The URI the data disk in the blob storage

true

string

cachingMode

Host Caching mode: None, Read Only, Read Write.

false

v1.AzureDataDiskCachingMode

fsType

Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.

false

string

readOnly

Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.

false

boolean

false

- -
-
-

v1.VsphereVirtualDiskVolumeSource

-
-

Represents a vSphere volume resource.

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

volumePath

Path that identifies vSphere volume vmdk

true

string

fsType

Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.

false

string

- -
-
-

v1.DeleteOptions

-
-

DeleteOptions may be provided when deleting an API object

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

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

false

integer (int64)

preconditions

Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.

false

v1.Preconditions

orphanDependents

Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list.

false

boolean

false

- -
-
-

v1.Volume

-
-

Volume represents a named volume in a pod that may be accessed by any container in the pod.

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

name

Volume’s name. Must be a DNS_LABEL and unique within the pod. More info: http://kubernetes.io/docs/user-guide/identifiers#names

true

string

hostPath

HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: http://kubernetes.io/docs/user-guide/volumes#hostpath

false

v1.HostPathVolumeSource

emptyDir

EmptyDir represents a temporary directory that shares a pod’s lifetime. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir

false

v1.EmptyDirVolumeSource

gcePersistentDisk

GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk

false

v1.GCEPersistentDiskVolumeSource

awsElasticBlockStore

AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore

false

v1.AWSElasticBlockStoreVolumeSource

gitRepo

GitRepo represents a git repository at a particular revision.

false

v1.GitRepoVolumeSource

secret

Secret represents a secret that should populate this volume. More info: http://kubernetes.io/docs/user-guide/volumes#secrets

false

v1.SecretVolumeSource

nfs

NFS represents an NFS mount on the host that shares a pod’s lifetime More info: http://kubernetes.io/docs/user-guide/volumes#nfs

false

v1.NFSVolumeSource

iscsi

ISCSI represents an ISCSI Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. More info: http://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md

false

v1.ISCSIVolumeSource

glusterfs

Glusterfs represents a Glusterfs mount on the host that shares a pod’s lifetime. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md

false

v1.GlusterfsVolumeSource

persistentVolumeClaim

PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims

false

v1.PersistentVolumeClaimVolumeSource

rbd

RBD represents a Rados Block Device mount on the host that shares a pod’s lifetime. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md

false

v1.RBDVolumeSource

flexVolume

FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.

false

v1.FlexVolumeSource

cinder

Cinder represents a cinder volume attached and mounted on kubelets host machine More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md

false

v1.CinderVolumeSource

cephfs

CephFS represents a Ceph FS mount on the host that shares a pod’s lifetime

false

v1.CephFSVolumeSource

flocker

Flocker represents a Flocker volume attached to a kubelet’s host machine. This depends on the Flocker control service being running

false

v1.FlockerVolumeSource

downwardAPI

DownwardAPI represents downward API about the pod that should populate this volume

false

v1.DownwardAPIVolumeSource

fc

FC represents a Fibre Channel resource that is attached to a kubelet’s host machine and then exposed to the pod.

false

v1.FCVolumeSource

azureFile

AzureFile represents an Azure File Service mount on the host and bind mount to the pod.

false

v1.AzureFileVolumeSource

configMap

ConfigMap represents a configMap that should populate this volume

false

v1.ConfigMapVolumeSource

vsphereVolume

VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine

false

v1.VsphereVirtualDiskVolumeSource

quobyte

Quobyte represents a Quobyte mount on the host that shares a pod’s lifetime

false

v1.QuobyteVolumeSource

azureDisk

AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.

false

v1.AzureDiskVolumeSource

- -
-
-

v1.ResourceFieldSelector

-
-

ResourceFieldSelector represents container resources (cpu, memory) and their output format

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

containerName

Container name: required for volumes, optional for env vars

false

string

resource

Required: resource to select

true

string

divisor

Specifies the output format of the exposed resources, defaults to "1"

false

string

- -
-
-

v1.Probe

-
-

Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.

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

exec

One and only one of the following should be specified. Exec specifies the action to take.

false

v1.ExecAction

httpGet

HTTPGet specifies the http request to perform.

false

v1.HTTPGetAction

tcpSocket

TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported

false

v1.TCPSocketAction

initialDelaySeconds

Number of seconds after the container has started before liveness probes are initiated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes

false

integer (int32)

timeoutSeconds

Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes

false

integer (int32)

periodSeconds

How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.

false

integer (int32)

successThreshold

Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.

false

integer (int32)

failureThreshold

Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.

false

integer (int32)

- -
-
-

unversioned.LabelSelectorRequirement

-
-

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

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

key

key is the label key that the selector applies to.

true

string

operator

operator represents a key’s relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.

true

string

values

values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

false

string array

- -
-
-

unversioned.APIResourceList

-
-

APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.

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

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

groupVersion

groupVersion is the group and version this APIResourceList is for.

true

string

resources

resources contains the name of the resources and if they are namespaced.

true

unversioned.APIResource array

- -
-
-

v1.SecretKeySelector

-
-

SecretKeySelector selects a key of a Secret.

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

name

Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

false

string

key

The key of the secret to select from. Must be a valid secret key.

true

string

- -
-
-

unversioned.Status

-
-

Status is a return value for calls that don’t return other objects.

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

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

unversioned.ListMeta

status

Status of the operation. One of: "Success" or "Failure". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status

false

string

message

A human-readable description of the status of this operation.

false

string

reason

A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.

false

string

details

Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.

false

unversioned.StatusDetails

code

Suggested HTTP return code for this status, 0 if not set.

false

integer (int32)

- -
-
-

v1.Capability

- -
-
-

unversioned.APIResource

-
-

APIResource specifies the name of a resource and whether it is namespaced.

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

name

name is the name of the resource.

true

string

namespaced

namespaced indicates if a resource is namespaced or not.

true

boolean

false

kind

kind is the kind for the resource (e.g. Foo is the kind for a resource foo)

true

string

- -
-
-

v1.DownwardAPIVolumeFile

-
-

DownwardAPIVolumeFile represents information to create the file containing the pod field

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

path

Required: Path is the relative path name of the file to be created. Must not be absolute or contain the .. path. Must be utf-8 encoded. The first item of the relative path must not start with ..

true

string

fieldRef

Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.

false

v1.ObjectFieldSelector

resourceFieldRef

Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.

false

v1.ResourceFieldSelector

mode

Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

false

integer (int32)

- -
-
-

v1.PodSpec

-
-

PodSpec is a description of a pod.

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

volumes

List of volumes that can be mounted by containers belonging to the pod. More info: http://kubernetes.io/docs/user-guide/volumes

false

v1.Volume array

containers

List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers

true

v1.Container array

restartPolicy

Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: http://kubernetes.io/docs/user-guide/pod-states#restartpolicy

false

string

terminationGracePeriodSeconds

Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.

false

integer (int64)

activeDeadlineSeconds

Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.

false

integer (int64)

dnsPolicy

Set DNS policy for containers within the pod. One of ClusterFirst or Default. Defaults to "ClusterFirst".

false

string

nodeSelector

NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node’s labels for the pod to be scheduled on that node. More info: http://kubernetes.io/docs/user-guide/node-selection/README

false

object

serviceAccountName

ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md

false

string

serviceAccount

DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.

false

string

nodeName

NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.

false

string

hostNetwork

Host networking requested for this pod. Use the host’s network namespace. If this option is set, the ports that will be used must be specified. Default to false.

false

boolean

false

hostPID

Use the host’s pid namespace. Optional: Default to false.

false

boolean

false

hostIPC

Use the host’s ipc namespace. Optional: Default to false.

false

boolean

false

securityContext

SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.

false

v1.PodSecurityContext

imagePullSecrets

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod

false

v1.LocalObjectReference array

hostname

Specifies the hostname of the Pod If not specified, the pod’s hostname will be set to a system-defined value.

false

string

subdomain

If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>". If not specified, the pod will not have a domainname at all.

false

string

- -
-
-

v1.ContainerPort

-
-

ContainerPort represents a network port in a single container.

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

name

If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.

false

string

hostPort

Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.

false

integer (int32)

containerPort

Number of port to expose on the pod’s IP address. This must be a valid port number, 0 < x < 65536.

true

integer (int32)

protocol

Protocol for port. Must be UDP or TCP. Defaults to "TCP".

false

string

hostIP

What host IP to bind the external port to.

false

string

- -
-
-

v1.Lifecycle

-
-

Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.

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

postStart

PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: http://kubernetes.io/docs/user-guide/container-environment#hook-details

false

v1.Handler

preStop

PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: http://kubernetes.io/docs/user-guide/container-environment#hook-details

false

v1.Handler

- -
-
-

v1.ConfigMapKeySelector

-
-

Selects a key from a ConfigMap.

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

name

Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

false

string

key

The key to select.

true

string

- -
-
-

v1.Handler

-
-

Handler defines a specific action that should be taken

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

exec

One and only one of the following should be specified. Exec specifies the action to take.

false

v1.ExecAction

httpGet

HTTPGet specifies the http request to perform.

false

v1.HTTPGetAction

tcpSocket

TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported

false

v1.TCPSocketAction

- -
-
-

v1.GlusterfsVolumeSource

-
-

Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.

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

endpoints

EndpointsName is the endpoint name that details Glusterfs topology. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod

true

string

path

Path is the Glusterfs volume path. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod

true

string

readOnly

ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod

false

boolean

false

- -
-
-

v1alpha1.StatefulSet

-
-

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.

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

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

false

v1.ObjectMeta

spec

Spec defines the desired identities of pods in this set.

false

v1alpha1.StatefulSetSpec

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

- -
-
-

v1.AzureDataDiskCachingMode

- -
-
-

v1.RBDVolumeSource

-
-

Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.

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

monitors

A collection of Ceph monitors. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it

true

string array

image

The rados image name. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it

true

string

fsType

Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#rbd

false

string

pool

The rados pool name. Default is rbd. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it.

false

string

user

The rados user name. Default is admin. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it

false

string

keyring

Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it

false

string

secretRef

SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it

false

v1.LocalObjectReference

readOnly

ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it

false

boolean

false

- -
-
-

any

-
-

Represents an untyped JSON map - see the description of the field for more info about the structure of this object.

-
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/api-reference/apps/v1alpha1/operations.html b/docs/api-reference/apps/v1alpha1/operations.html deleted file mode 100755 index dcd1903cc45..00000000000 --- a/docs/api-reference/apps/v1alpha1/operations.html +++ /dev/null @@ -1,2402 +0,0 @@ - - - - - - -Operations - - - - -
-
-

Operations

-
-
-

get available resources

-
-
-
GET /apis/apps/v1alpha1
-
-
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

default

success

unversioned.APIResourceList

- -
-
-

Consumes

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

list or watch objects of kind StatefulSet

-
-
-
GET /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

v1alpha1.StatefulSetList

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
  • -

    application/json;stream=watch

    -
  • -
  • -

    application/vnd.kubernetes.protobuf;stream=watch

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

delete collection of StatefulSet

-
-
-
DELETE /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

unversioned.Status

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

create a StatefulSet

-
-
-
POST /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1alpha1.StatefulSet

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

v1alpha1.StatefulSet

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

read the specified StatefulSet

-
-
-
GET /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

export

Should this value be exported. Export strips fields that a user can not specify.

false

boolean

QueryParameter

exact

Should the export be exact. Exact export maintains cluster-specific fields like Namespace

false

boolean

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the StatefulSet

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

v1alpha1.StatefulSet

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

replace the specified StatefulSet

-
-
-
PUT /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1alpha1.StatefulSet

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the StatefulSet

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

v1alpha1.StatefulSet

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

delete a StatefulSet

-
-
-
DELETE /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.DeleteOptions

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the StatefulSet

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

unversioned.Status

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

partially update the specified StatefulSet

-
-
-
PATCH /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

unversioned.Patch

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the StatefulSet

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

v1alpha1.StatefulSet

- -
-
-

Consumes

-
-
    -
  • -

    application/json-patch+json

    -
  • -
  • -

    application/merge-patch+json

    -
  • -
  • -

    application/strategic-merge-patch+json

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

read status of the specified StatefulSet

-
-
-
GET /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}/status
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the StatefulSet

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

v1alpha1.StatefulSet

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

replace status of the specified StatefulSet

-
-
-
PUT /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}/status
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1alpha1.StatefulSet

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the StatefulSet

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

v1alpha1.StatefulSet

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

partially update status of the specified StatefulSet

-
-
-
PATCH /apis/apps/v1alpha1/namespaces/{namespace}/statefulsets/{name}/status
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

unversioned.Patch

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the StatefulSet

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

v1alpha1.StatefulSet

- -
-
-

Consumes

-
-
    -
  • -

    application/json-patch+json

    -
  • -
  • -

    application/merge-patch+json

    -
  • -
  • -

    application/strategic-merge-patch+json

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

list or watch objects of kind StatefulSet

-
-
-
GET /apis/apps/v1alpha1/statefulsets
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

v1alpha1.StatefulSetList

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
  • -

    application/json;stream=watch

    -
  • -
  • -

    application/vnd.kubernetes.protobuf;stream=watch

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

watch individual changes to a list of StatefulSet

-
-
-
GET /apis/apps/v1alpha1/watch/namespaces/{namespace}/statefulsets
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

versioned.Event

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
  • -

    application/json;stream=watch

    -
  • -
  • -

    application/vnd.kubernetes.protobuf;stream=watch

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

watch changes to an object of kind StatefulSet

-
-
-
GET /apis/apps/v1alpha1/watch/namespaces/{namespace}/statefulsets/{name}
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the StatefulSet

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

versioned.Event

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
  • -

    application/json;stream=watch

    -
  • -
  • -

    application/vnd.kubernetes.protobuf;stream=watch

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-

watch individual changes to a list of StatefulSet

-
-
-
GET /apis/apps/v1alpha1/watch/statefulsets
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

versioned.Event

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
  • -

    application/json;stream=watch

    -
  • -
  • -

    application/vnd.kubernetes.protobuf;stream=watch

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1alpha1

    -
  • -
-
-
-
-
-
-
- - - \ No newline at end of file diff --git a/examples/cockroachdb/cockroachdb-petset.yaml b/examples/cockroachdb/cockroachdb-petset.yaml index c7d5bf4fc53..177d24197f0 100644 --- a/examples/cockroachdb/cockroachdb-petset.yaml +++ b/examples/cockroachdb/cockroachdb-petset.yaml @@ -54,7 +54,7 @@ spec: selector: app: cockroachdb --- -apiVersion: apps/v1alpha1 +apiVersion: apps/v1beta1 kind: PetSet metadata: name: cockroachdb diff --git a/examples/storage/cassandra/cassandra-petset.yaml b/examples/storage/cassandra/cassandra-petset.yaml index 6c1e5b1b75a..678926773b4 100644 --- a/examples/storage/cassandra/cassandra-petset.yaml +++ b/examples/storage/cassandra/cassandra-petset.yaml @@ -1,4 +1,4 @@ -apiVersion: "apps/v1alpha1" +apiVersion: "apps/v1beta1" kind: StatefulSet metadata: name: cassandra diff --git a/hack/lib/init.sh b/hack/lib/init.sh index aa01fc10c22..04814326c37 100644 --- a/hack/lib/init.sh +++ b/hack/lib/init.sh @@ -49,7 +49,7 @@ KUBE_OUTPUT_HOSTBIN="${KUBE_OUTPUT_BINPATH}/$(kube::util::host_platform)" # most preferred version for a group should appear first KUBE_AVAILABLE_GROUP_VERSIONS="${KUBE_AVAILABLE_GROUP_VERSIONS:-\ v1 \ -apps/v1alpha1 \ +apps/v1beta1 \ authentication.k8s.io/v1beta1 \ authorization.k8s.io/v1beta1 \ autoscaling/v1 \ diff --git a/hack/make-rules/test-cmd.sh b/hack/make-rules/test-cmd.sh index 70e3c9a4da2..9253ef4b7a7 100755 --- a/hack/make-rules/test-cmd.sh +++ b/hack/make-rules/test-cmd.sh @@ -1204,7 +1204,7 @@ __EOF__ kube::test::if_has_string "${output_message}" "/api/v1/namespaces/default/pods 200 OK" kube::test::if_has_string "${output_message}" "/api/v1/namespaces/default/replicationcontrollers 200 OK" kube::test::if_has_string "${output_message}" "/api/v1/namespaces/default/services 200 OK" - kube::test::if_has_string "${output_message}" "/apis/apps/v1alpha1/namespaces/default/statefulsets 200 OK" + kube::test::if_has_string "${output_message}" "/apis/apps/v1beta1/namespaces/default/statefulsets 200 OK" kube::test::if_has_string "${output_message}" "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers 200" kube::test::if_has_string "${output_message}" "/apis/batch/v1/namespaces/default/jobs 200 OK" kube::test::if_has_string "${output_message}" "/apis/extensions/v1beta1/namespaces/default/deployments 200 OK" diff --git a/hack/testdata/nginx-petset.yaml b/hack/testdata/nginx-petset.yaml index 776f1d423cf..b7e948a5b2c 100644 --- a/hack/testdata/nginx-petset.yaml +++ b/hack/testdata/nginx-petset.yaml @@ -16,7 +16,7 @@ spec: selector: app: nginx-petset --- -apiVersion: apps/v1alpha1 +apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: nginx diff --git a/pkg/api/defaulting_test.go b/pkg/api/defaulting_test.go index ab81d00b5bd..9da63c3059e 100644 --- a/pkg/api/defaulting_test.go +++ b/pkg/api/defaulting_test.go @@ -77,8 +77,8 @@ func TestDefaulting(t *testing.T) { {Group: "", Version: "v1", Kind: "SecretList"}: {}, {Group: "", Version: "v1", Kind: "Service"}: {}, {Group: "", Version: "v1", Kind: "ServiceList"}: {}, - {Group: "apps", Version: "v1alpha1", Kind: "StatefulSet"}: {}, - {Group: "apps", Version: "v1alpha1", Kind: "StatefulSetList"}: {}, + {Group: "apps", Version: "v1beta1", Kind: "StatefulSet"}: {}, + {Group: "apps", Version: "v1beta1", Kind: "StatefulSetList"}: {}, {Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscaler"}: {}, {Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscalerList"}: {}, {Group: "batch", Version: "v1", Kind: "Job"}: {}, diff --git a/pkg/apis/apps/doc.go b/pkg/apis/apps/doc.go index caac3a7e6b4..cee5cfbfbf9 100644 --- a/pkg/apis/apps/doc.go +++ b/pkg/apis/apps/doc.go @@ -16,5 +16,6 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true +// +groupName=apps.k8s.io package apps // import "k8s.io/kubernetes/pkg/apis/apps" diff --git a/pkg/apis/apps/install/install.go b/pkg/apis/apps/install/install.go index fe6d2a0ad09..9b89e3bbd03 100644 --- a/pkg/apis/apps/install/install.go +++ b/pkg/apis/apps/install/install.go @@ -21,19 +21,19 @@ package install import ( "k8s.io/kubernetes/pkg/apimachinery/announced" "k8s.io/kubernetes/pkg/apis/apps" - "k8s.io/kubernetes/pkg/apis/apps/v1alpha1" + "k8s.io/kubernetes/pkg/apis/apps/v1beta1" ) func init() { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: apps.GroupName, - VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version}, + VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version}, ImportPrefix: "k8s.io/kubernetes/pkg/apis/apps", AddInternalObjectsToScheme: apps.AddToScheme, }, announced.VersionToSchemeFunc{ - v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, + v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, ).Announce().RegisterAndEnable(); err != nil { panic(err) diff --git a/pkg/apis/apps/v1alpha1/generated.pb.go b/pkg/apis/apps/v1alpha1/generated.pb.go deleted file mode 100644 index 1bad5e7f4f5..00000000000 --- a/pkg/apis/apps/v1alpha1/generated.pb.go +++ /dev/null @@ -1,1076 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto -// DO NOT EDIT! - -/* - Package v1alpha1 is a generated protocol buffer package. - - It is generated from these files: - k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto - - It has these top-level messages: - StatefulSet - StatefulSetList - StatefulSetSpec - StatefulSetStatus -*/ -package v1alpha1 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/kubernetes/pkg/api/unversioned" -import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1" - -import strings "strings" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -const _ = proto.GoGoProtoPackageIsVersion1 - -func (m *StatefulSet) Reset() { *m = StatefulSet{} } -func (*StatefulSet) ProtoMessage() {} -func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } - -func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } -func (*StatefulSetList) ProtoMessage() {} -func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } - -func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } -func (*StatefulSetSpec) ProtoMessage() {} -func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } - -func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } -func (*StatefulSetStatus) ProtoMessage() {} -func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } - -func init() { - 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 *StatefulSet) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *StatefulSet) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n1, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n2, err := m.Spec.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n3, err := m.Status.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - return i, nil -} - -func (m *StatefulSetList) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *StatefulSetList) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n4, err := m.ListMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - if len(m.Items) > 0 { - for _, msg := range m.Items { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *StatefulSetSpec) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *StatefulSetSpec) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Replicas != nil { - data[i] = 0x8 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.Replicas)) - } - if m.Selector != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) - n5, err := m.Selector.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n6, err := m.Template.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - if len(m.VolumeClaimTemplates) > 0 { - for _, msg := range m.VolumeClaimTemplates { - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - data[i] = 0x2a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.ServiceName))) - i += copy(data[i:], m.ServiceName) - return i, nil -} - -func (m *StatefulSetStatus) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *StatefulSetStatus) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ObservedGeneration != nil { - data[i] = 0x8 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.ObservedGeneration)) - } - data[i] = 0x10 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Replicas)) - return i, nil -} - -func encodeFixed64Generated(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Generated(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintGenerated(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *StatefulSet) Size() (n int) { - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *StatefulSetList) Size() (n int) { - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *StatefulSetSpec) Size() (n int) { - var l int - _ = l - if m.Replicas != nil { - n += 1 + sovGenerated(uint64(*m.Replicas)) - } - if m.Selector != nil { - l = m.Selector.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = m.Template.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.VolumeClaimTemplates) > 0 { - for _, e := range m.VolumeClaimTemplates { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.ServiceName) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *StatefulSetStatus) Size() (n int) { - var l int - _ = l - if m.ObservedGeneration != nil { - n += 1 + sovGenerated(uint64(*m.ObservedGeneration)) - } - n += 1 + sovGenerated(uint64(m.Replicas)) - return n -} - -func sovGenerated(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *StatefulSet) String() string { - if this == nil { - return "nil" - } - 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(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *StatefulSetList) String() string { - if this == nil { - return "nil" - } - 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), "StatefulSet", "StatefulSet", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *StatefulSetSpec) String() string { - if this == nil { - return "nil" - } - 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) + `,`, - `VolumeClaimTemplates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeClaimTemplates), "PersistentVolumeClaim", "k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim", 1), `&`, ``, 1) + `,`, - `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`, - `}`, - }, "") - return s -} -func (this *StatefulSetStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&StatefulSetStatus{`, - `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`, - `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *StatefulSet) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatefulSet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatefulSet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatefulSetList) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatefulSetList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatefulSetList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, StatefulSet{}) - if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatefulSetSpec) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatefulSetSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatefulSetSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Replicas = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Selector == nil { - m.Selector = &k8s_io_kubernetes_pkg_api_unversioned.LabelSelector{} - } - if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Template.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VolumeClaimTemplates", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VolumeClaimTemplates = append(m.VolumeClaimTemplates, k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim{}) - if err := m.VolumeClaimTemplates[len(m.VolumeClaimTemplates)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceName = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatefulSetStatus) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatefulSetStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatefulSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ObservedGeneration = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) - } - m.Replicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Replicas |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") -) - -var fileDescriptorGenerated = []byte{ - // 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 deleted file mode 100644 index 52e153fe2e7..00000000000 --- a/pkg/apis/apps/v1alpha1/generated.proto +++ /dev/null @@ -1,111 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = 'proto2'; - -package k8s.io.kubernetes.pkg.apis.apps.v1alpha1; - -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; -import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "v1alpha1"; - -// 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. -message StatefulSet { - // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - - // Spec defines the desired identities of pods in this set. - // +optional - optional StatefulSetSpec spec = 2; - - // Status is the current status of Pods in this StatefulSet. This data - // may be out of date by some window of time. - // +optional - optional StatefulSetStatus status = 3; -} - -// StatefulSetList is a collection of StatefulSets. -message StatefulSetList { - // +optional - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; - - repeated StatefulSet items = 2; -} - -// 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. - // If unspecified, defaults to 1. - // TODO: Consider a rename of this field. - // +optional - optional int32 replicas = 1; - - // 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 - // +optional - 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 StatefulSet - // will fulfill this Template, but have a unique identity from the rest - // of the StatefulSet. - optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3; - - // 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. - // TODO: Define the behavior if a claim already exists with the same name. - // +optional - repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4; - - // 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; -} - -// StatefulSetStatus represents the current state of a StatefulSet. -message StatefulSetStatus { - // most recent generation observed by this autoscaler. - // +optional - optional int64 observedGeneration = 1; - - // Replicas is the number of actual replicas. - optional int32 replicas = 2; -} - diff --git a/pkg/apis/apps/v1alpha1/types.generated.go b/pkg/apis/apps/v1alpha1/types.generated.go deleted file mode 100644 index e97b7f1d78e..00000000000 --- a/pkg/apis/apps/v1alpha1/types.generated.go +++ /dev/null @@ -1,1658 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// ************************************************************ -// 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 deleted file mode 100644 index 2be2e6bfafa..00000000000 --- a/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package 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 deleted file mode 100644 index 86ce457b8b1..00000000000 --- a/pkg/apis/apps/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,172 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by conversion-gen. Do not edit it manually! - -package v1alpha1 - -import ( - api "k8s.io/kubernetes/pkg/api" - unversioned "k8s.io/kubernetes/pkg/api/unversioned" - v1 "k8s.io/kubernetes/pkg/api/v1" - apps "k8s.io/kubernetes/pkg/apis/apps" - conversion "k8s.io/kubernetes/pkg/conversion" - runtime "k8s.io/kubernetes/pkg/runtime" - unsafe "unsafe" -) - -func init() { - SchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_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_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_StatefulSetSpec_To_apps_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_StatefulSetStatus_To_apps_StatefulSetStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -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_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_StatefulSetSpec_To_v1alpha1_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_apps_StatefulSetStatus_To_v1alpha1_StatefulSetStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -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_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.StatefulSet, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_StatefulSet_To_apps_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -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_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([]StatefulSet, len(*in)) - for i := range *in { - if err := Convert_apps_StatefulSet_To_v1alpha1_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -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_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 - } - out.Selector = (*unversioned.LabelSelector)(unsafe.Pointer(in.Selector)) - if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - out.VolumeClaimTemplates = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates)) - out.ServiceName = in.ServiceName - return nil -} - -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 - } - out.Selector = (*unversioned.LabelSelector)(unsafe.Pointer(in.Selector)) - if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - out.VolumeClaimTemplates = *(*[]v1.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates)) - out.ServiceName = in.ServiceName - return nil -} - -func autoConvert_v1alpha1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error { - out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) - out.Replicas = in.Replicas - return nil -} - -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_StatefulSetStatus_To_v1alpha1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error { - out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) - out.Replicas = in.Replicas - return nil -} - -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 deleted file mode 100644 index 62ddaaa140e..00000000000 --- a/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,138 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by deepcopy-gen. Do not edit it manually! - -package v1alpha1 - -import ( - unversioned "k8s.io/kubernetes/pkg/api/unversioned" - v1 "k8s.io/kubernetes/pkg/api/v1" - conversion "k8s.io/kubernetes/pkg/conversion" - runtime "k8s.io/kubernetes/pkg/runtime" - reflect "reflect" -) - -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_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_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error { - { - 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_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_v1alpha1_StatefulSetStatus(&in.Status, &out.Status, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v1alpha1_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - 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([]StatefulSet, len(*in)) - for i := range *in { - if err := DeepCopy_v1alpha1_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil - } -} - -func DeepCopy_v1alpha1_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*StatefulSetSpec) - out := out.(*StatefulSetSpec) - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } else { - out.Replicas = nil - } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil { - return err - } - } else { - out.Selector = nil - } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { - return err - } - if in.VolumeClaimTemplates != nil { - in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]v1.PersistentVolumeClaim, len(*in)) - for i := range *in { - if err := v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.VolumeClaimTemplates = nil - } - out.ServiceName = in.ServiceName - return nil - } -} - -func DeepCopy_v1alpha1_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*StatefulSetStatus) - out := out.(*StatefulSetStatus) - if in.ObservedGeneration != nil { - in, out := &in.ObservedGeneration, &out.ObservedGeneration - *out = new(int64) - **out = **in - } else { - out.ObservedGeneration = nil - } - out.Replicas = in.Replicas - return nil - } -} diff --git a/pkg/apis/apps/v1alpha1/zz_generated.defaults.go b/pkg/apis/apps/v1alpha1/zz_generated.defaults.go deleted file mode 100644 index eac2cfe30f3..00000000000 --- a/pkg/apis/apps/v1alpha1/zz_generated.defaults.go +++ /dev/null @@ -1,166 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by defaulter-gen. Do not edit it manually! - -package v1alpha1 - -import ( - v1 "k8s.io/kubernetes/pkg/api/v1" - runtime "k8s.io/kubernetes/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&StatefulSet{}, func(obj interface{}) { SetObjectDefaults_StatefulSet(obj.(*StatefulSet)) }) - scheme.AddTypeDefaultingFunc(&StatefulSetList{}, func(obj interface{}) { SetObjectDefaults_StatefulSetList(obj.(*StatefulSetList)) }) - return nil -} - -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] - v1.SetDefaults_Volume(a) - if a.VolumeSource.Secret != nil { - v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) - } - if a.VolumeSource.ISCSI != nil { - v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) - } - if a.VolumeSource.RBD != nil { - v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) - } - if a.VolumeSource.DownwardAPI != nil { - v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) - for j := range a.VolumeSource.DownwardAPI.Items { - b := &a.VolumeSource.DownwardAPI.Items[j] - if b.FieldRef != nil { - v1.SetDefaults_ObjectFieldSelector(b.FieldRef) - } - } - } - if a.VolumeSource.ConfigMap != nil { - v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) - } - if a.VolumeSource.AzureDisk != nil { - v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) - } - } - for i := range in.Spec.Template.Spec.InitContainers { - a := &in.Spec.Template.Spec.InitContainers[i] - v1.SetDefaults_Container(a) - for j := range a.Ports { - b := &a.Ports[j] - v1.SetDefaults_ContainerPort(b) - } - for j := range a.Env { - b := &a.Env[j] - if b.ValueFrom != nil { - if b.ValueFrom.FieldRef != nil { - v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) - } - } - } - v1.SetDefaults_ResourceList(&a.Resources.Limits) - v1.SetDefaults_ResourceList(&a.Resources.Requests) - if a.LivenessProbe != nil { - v1.SetDefaults_Probe(a.LivenessProbe) - if a.LivenessProbe.Handler.HTTPGet != nil { - v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) - } - } - if a.ReadinessProbe != nil { - v1.SetDefaults_Probe(a.ReadinessProbe) - if a.ReadinessProbe.Handler.HTTPGet != nil { - v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) - } - } - if a.Lifecycle != nil { - if a.Lifecycle.PostStart != nil { - if a.Lifecycle.PostStart.HTTPGet != nil { - v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) - } - } - if a.Lifecycle.PreStop != nil { - if a.Lifecycle.PreStop.HTTPGet != nil { - v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) - } - } - } - } - for i := range in.Spec.Template.Spec.Containers { - a := &in.Spec.Template.Spec.Containers[i] - v1.SetDefaults_Container(a) - for j := range a.Ports { - b := &a.Ports[j] - v1.SetDefaults_ContainerPort(b) - } - for j := range a.Env { - b := &a.Env[j] - if b.ValueFrom != nil { - if b.ValueFrom.FieldRef != nil { - v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) - } - } - } - v1.SetDefaults_ResourceList(&a.Resources.Limits) - v1.SetDefaults_ResourceList(&a.Resources.Requests) - if a.LivenessProbe != nil { - v1.SetDefaults_Probe(a.LivenessProbe) - if a.LivenessProbe.Handler.HTTPGet != nil { - v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) - } - } - if a.ReadinessProbe != nil { - v1.SetDefaults_Probe(a.ReadinessProbe) - if a.ReadinessProbe.Handler.HTTPGet != nil { - v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) - } - } - if a.Lifecycle != nil { - if a.Lifecycle.PostStart != nil { - if a.Lifecycle.PostStart.HTTPGet != nil { - v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) - } - } - if a.Lifecycle.PreStop != nil { - if a.Lifecycle.PreStop.HTTPGet != nil { - v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) - } - } - } - } - for i := range in.Spec.VolumeClaimTemplates { - a := &in.Spec.VolumeClaimTemplates[i] - v1.SetDefaults_PersistentVolumeClaim(a) - v1.SetDefaults_ResourceList(&a.Spec.Resources.Limits) - v1.SetDefaults_ResourceList(&a.Spec.Resources.Requests) - v1.SetDefaults_ResourceList(&a.Status.Capacity) - } -} - -func SetObjectDefaults_StatefulSetList(in *StatefulSetList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_StatefulSet(a) - } -} diff --git a/pkg/apis/apps/v1alpha1/BUILD b/pkg/apis/apps/v1beta1/BUILD similarity index 100% rename from pkg/apis/apps/v1alpha1/BUILD rename to pkg/apis/apps/v1beta1/BUILD diff --git a/pkg/apis/apps/v1alpha1/conversion.go b/pkg/apis/apps/v1beta1/conversion.go similarity index 85% rename from pkg/apis/apps/v1alpha1/conversion.go rename to pkg/apis/apps/v1beta1/conversion.go index b8248147a6d..1ab94d8bd5e 100644 --- a/pkg/apis/apps/v1alpha1/conversion.go +++ b/pkg/apis/apps/v1beta1/conversion.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "fmt" @@ -33,14 +33,14 @@ func addConversionFuncs(scheme *runtime.Scheme) error { // it, but a plain int32 is more convenient in the internal type. These // functions are the same as the autogenerated ones in every other way. err := scheme.AddConversionFuncs( - Convert_v1alpha1_StatefulSetSpec_To_apps_StatefulSetSpec, - Convert_apps_StatefulSetSpec_To_v1alpha1_StatefulSetSpec, + Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec, + Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec, ) if err != nil { return err } - return api.Scheme.AddFieldLabelConversionFunc("apps/v1alpha1", "StatefulSet", + return api.Scheme.AddFieldLabelConversionFunc("apps/v1beta1", "StatefulSet", func(label, value string) (string, string, error) { switch label { case "metadata.name", "metadata.namespace", "status.successful": @@ -52,7 +52,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error { ) } -func Convert_v1alpha1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec, out *apps.StatefulSetSpec, s conversion.Scope) error { +func Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec, out *apps.StatefulSetSpec, s conversion.Scope) error { if in.Replicas != nil { out.Replicas = *in.Replicas } @@ -83,7 +83,7 @@ func Convert_v1alpha1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpe return nil } -func Convert_apps_StatefulSetSpec_To_v1alpha1_StatefulSetSpec(in *apps.StatefulSetSpec, out *StatefulSetSpec, s conversion.Scope) error { +func Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSetSpec, out *StatefulSetSpec, s conversion.Scope) error { out.Replicas = new(int32) *out.Replicas = in.Replicas if in.Selector != nil { diff --git a/pkg/apis/apps/v1alpha1/defaults.go b/pkg/apis/apps/v1beta1/defaults.go similarity index 98% rename from pkg/apis/apps/v1alpha1/defaults.go rename to pkg/apis/apps/v1beta1/defaults.go index ec956f6ee9d..f9cbe701d61 100644 --- a/pkg/apis/apps/v1alpha1/defaults.go +++ b/pkg/apis/apps/v1beta1/defaults.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "k8s.io/kubernetes/pkg/api/unversioned" diff --git a/pkg/apis/apps/v1alpha1/doc.go b/pkg/apis/apps/v1beta1/doc.go similarity index 88% rename from pkg/apis/apps/v1alpha1/doc.go rename to pkg/apis/apps/v1beta1/doc.go index 71203b782f4..e2da2b7cfba 100644 --- a/pkg/apis/apps/v1alpha1/doc.go +++ b/pkg/apis/apps/v1beta1/doc.go @@ -18,5 +18,6 @@ limitations under the License. // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps // +k8s:openapi-gen=true // +k8s:defaulter-gen=TypeMeta +// +groupName=apps.k8s.io -package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/apps/v1alpha1" +package v1beta1 // import "k8s.io/kubernetes/pkg/apis/apps/v1beta1" diff --git a/pkg/apis/apps/v1alpha1/register.go b/pkg/apis/apps/v1beta1/register.go similarity index 97% rename from pkg/apis/apps/v1alpha1/register.go rename to pkg/apis/apps/v1beta1/register.go index 3d88f2970f0..07659fd7cae 100644 --- a/pkg/apis/apps/v1alpha1/register.go +++ b/pkg/apis/apps/v1beta1/register.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "k8s.io/kubernetes/pkg/api/unversioned" @@ -27,7 +27,7 @@ import ( const GroupName = "apps" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) diff --git a/pkg/apis/apps/v1beta1/types.generated.go b/pkg/apis/apps/v1beta1/types.generated.go new file mode 100644 index 00000000000..d540e8940a5 --- /dev/null +++ b/pkg/apis/apps/v1beta1/types.generated.go @@ -0,0 +1 @@ +package v1beta1 diff --git a/pkg/apis/apps/v1alpha1/types.go b/pkg/apis/apps/v1beta1/types.go similarity index 99% rename from pkg/apis/apps/v1alpha1/types.go rename to pkg/apis/apps/v1beta1/types.go index 7e8a56be2fe..59345173050 100644 --- a/pkg/apis/apps/v1alpha1/types.go +++ b/pkg/apis/apps/v1beta1/types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "k8s.io/kubernetes/pkg/api/unversioned" 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 deleted file mode 100644 index de22ef4a3d3..00000000000 --- a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -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 = [ - "apps_client.go", - "doc.go", - "generated_expansion.go", - "statefulset.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/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/runtime/serializer:go_default_library", - "//pkg/watch:go_default_library", - ], -) diff --git a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/apps_client.go b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/apps_client.go deleted file mode 100644 index a1ddf9f487a..00000000000 --- a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/apps_client.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - fmt "fmt" - api "k8s.io/kubernetes/pkg/api" - unversioned "k8s.io/kubernetes/pkg/api/unversioned" - registered "k8s.io/kubernetes/pkg/apimachinery/registered" - restclient "k8s.io/kubernetes/pkg/client/restclient" - serializer "k8s.io/kubernetes/pkg/runtime/serializer" -) - -type AppsV1alpha1Interface interface { - RESTClient() restclient.Interface - StatefulSetsGetter -} - -// AppsV1alpha1Client is used to interact with features provided by the k8s.io/kubernetes/pkg/apimachinery/registered.Group group. -type AppsV1alpha1Client struct { - restClient restclient.Interface -} - -func (c *AppsV1alpha1Client) StatefulSets(namespace string) StatefulSetInterface { - return newStatefulSets(c, namespace) -} - -// NewForConfig creates a new AppsV1alpha1Client for the given config. -func NewForConfig(c *restclient.Config) (*AppsV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := restclient.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &AppsV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new AppsV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AppsV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new AppsV1alpha1Client for the given RESTClient. -func New(c restclient.Interface) *AppsV1alpha1Client { - return &AppsV1alpha1Client{c} -} - -func setConfigDefaults(config *restclient.Config) error { - gv, err := unversioned.ParseGroupVersion("apps/v1alpha1") - if err != nil { - return err - } - // if apps/v1alpha1 is not enabled, return an error - if !registered.IsEnabledVersion(gv) { - return fmt.Errorf("apps/v1alpha1 is not enabled") - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() - } - copyGroupVersion := gv - config.GroupVersion = ©GroupVersion - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *AppsV1alpha1Client) RESTClient() restclient.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/doc.go b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/doc.go deleted file mode 100644 index 0eb10bf4809..00000000000 --- a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1alpha1 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 deleted file mode 100644 index 2e809f8c8f0..00000000000 --- a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -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 = [ - "doc.go", - "fake_apps_client.go", - "fake_statefulset.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//pkg/api/unversioned:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/apis/apps/v1alpha1:go_default_library", - "//pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/testing/core:go_default_library", - "//pkg/labels:go_default_library", - "//pkg/watch:go_default_library", - ], -) diff --git a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/doc.go b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/doc.go deleted file mode 100644 index 3a0baba43e3..00000000000 --- a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/fake_apps_client.go b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/fake_apps_client.go deleted file mode 100644 index 136763fedcf..00000000000 --- a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/fake_apps_client.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fake - -import ( - v1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" - core "k8s.io/kubernetes/pkg/client/testing/core" -) - -type FakeAppsV1alpha1 struct { - *core.Fake -} - -func (c *FakeAppsV1alpha1) StatefulSets(namespace string) v1alpha1.StatefulSetInterface { - return &FakeStatefulSets{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeAppsV1alpha1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient - return ret -} 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 deleted file mode 100644 index bff7ac63f04..00000000000 --- a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/fake/fake_statefulset.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fake - -import ( - api "k8s.io/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 *FakeAppsV1alpha1 - 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/generated_expansion.go b/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/generated_expansion.go deleted file mode 100644 index bbf6c914a0e..00000000000 --- a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -type StatefulSetExpansion interface{} 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 deleted file mode 100644 index 225ab938290..00000000000 --- a/pkg/client/clientset_generated/release_1_5/typed/apps/v1alpha1/statefulset.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package 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 *AppsV1alpha1Client, 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/listers/apps/v1alpha1/BUILD b/pkg/client/listers/apps/v1alpha1/BUILD deleted file mode 100644 index 19a1e4fd632..00000000000 --- a/pkg/client/listers/apps/v1alpha1/BUILD +++ /dev/null @@ -1,24 +0,0 @@ -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 = ["zz_generated.statefulset.go"], - tags = ["automanaged"], - deps = [ - "//pkg/api/errors:go_default_library", - "//pkg/apis/apps:go_default_library", - "//pkg/apis/apps/v1alpha1:go_default_library", - "//pkg/client/cache:go_default_library", - "//pkg/labels:go_default_library", - ], -) diff --git a/pkg/client/listers/apps/v1alpha1/zz_generated.statefulset.go b/pkg/client/listers/apps/v1alpha1/zz_generated.statefulset.go deleted file mode 100644 index c5aad354829..00000000000 --- a/pkg/client/listers/apps/v1alpha1/zz_generated.statefulset.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1alpha1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] - -package v1alpha1 - -import ( - "k8s.io/kubernetes/pkg/api/errors" - apps "k8s.io/kubernetes/pkg/apis/apps" - v1alpha1 "k8s.io/kubernetes/pkg/apis/apps/v1alpha1" - "k8s.io/kubernetes/pkg/client/cache" - "k8s.io/kubernetes/pkg/labels" -) - -// StatefulSetLister helps list StatefulSets. -type StatefulSetLister interface { - // List lists all StatefulSets in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.StatefulSet, err error) - // StatefulSets returns an object that can list and get StatefulSets. - StatefulSets(namespace string) StatefulSetNamespaceLister -} - -// statefulSetLister implements the StatefulSetLister interface. -type statefulSetLister struct { - indexer cache.Indexer -} - -// NewStatefulSetLister returns a new StatefulSetLister. -func NewStatefulSetLister(indexer cache.Indexer) StatefulSetLister { - return &statefulSetLister{indexer: indexer} -} - -// List lists all StatefulSets in the indexer. -func (s *statefulSetLister) List(selector labels.Selector) (ret []*v1alpha1.StatefulSet, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.StatefulSet)) - }) - return ret, err -} - -// StatefulSets returns an object that can list and get StatefulSets. -func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceLister { - return statefulSetNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// StatefulSetNamespaceLister helps list and get StatefulSets. -type StatefulSetNamespaceLister interface { - // List lists all StatefulSets in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1alpha1.StatefulSet, err error) - // Get retrieves the StatefulSet from the indexer for a given namespace and name. - Get(name string) (*v1alpha1.StatefulSet, error) -} - -// statefulSetNamespaceLister implements the StatefulSetNamespaceLister -// interface. -type statefulSetNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all StatefulSets in the indexer for a given namespace. -func (s statefulSetNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.StatefulSet, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.StatefulSet)) - }) - return ret, err -} - -// Get retrieves the StatefulSet from the indexer for a given namespace and name. -func (s statefulSetNamespaceLister) Get(name string) (*v1alpha1.StatefulSet, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(apps.Resource("statefulset"), name) - } - return obj.(*v1alpha1.StatefulSet), nil -} diff --git a/pkg/master/master.go b/pkg/master/master.go index 429f9409836..efa03973463 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -25,7 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" apiv1 "k8s.io/kubernetes/pkg/api/v1" - appsapi "k8s.io/kubernetes/pkg/apis/apps/v1alpha1" + appsapi "k8s.io/kubernetes/pkg/apis/apps/v1beta1" authenticationv1beta1 "k8s.io/kubernetes/pkg/apis/authentication/v1beta1" authorizationapiv1beta1 "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" autoscalingapiv1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" diff --git a/pkg/master/master_test.go b/pkg/master/master_test.go index a33ee3024e1..4780fb4129b 100644 --- a/pkg/master/master_test.go +++ b/pkg/master/master_test.go @@ -32,7 +32,7 @@ import ( apiv1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apimachinery/registered" "k8s.io/kubernetes/pkg/apis/apps" - appsapiv1alpha1 "k8s.io/kubernetes/pkg/apis/apps/v1alpha1" + appsapiv1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1" "k8s.io/kubernetes/pkg/apis/autoscaling" autoscalingapiv1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" "k8s.io/kubernetes/pkg/apis/batch" @@ -124,7 +124,7 @@ func limitedAPIResourceConfigSource() *genericapiserver.ResourceConfig { extensionsapiv1beta1.SchemeGroupVersion, batchapiv1.SchemeGroupVersion, batchapiv2alpha1.SchemeGroupVersion, - appsapiv1alpha1.SchemeGroupVersion, + appsapiv1beta1.SchemeGroupVersion, autoscalingapiv1.SchemeGroupVersion, ) return ret diff --git a/pkg/registry/apps/rest/storage_apps.go b/pkg/registry/apps/rest/storage_apps.go index 286b1bed4cd..dd6d345d923 100644 --- a/pkg/registry/apps/rest/storage_apps.go +++ b/pkg/registry/apps/rest/storage_apps.go @@ -19,7 +19,7 @@ package rest import ( "k8s.io/kubernetes/pkg/api/rest" "k8s.io/kubernetes/pkg/apis/apps" - appsapiv1alpha1 "k8s.io/kubernetes/pkg/apis/apps/v1alpha1" + appsapiv1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1" "k8s.io/kubernetes/pkg/genericapiserver" statefulsetetcd "k8s.io/kubernetes/pkg/registry/apps/petset/etcd" ) @@ -31,16 +31,16 @@ var _ genericapiserver.RESTStorageProvider = &RESTStorageProvider{} func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource genericapiserver.APIResourceConfigSource, restOptionsGetter genericapiserver.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool) { apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(apps.GroupName) - if apiResourceConfigSource.AnyResourcesForVersionEnabled(appsapiv1alpha1.SchemeGroupVersion) { - apiGroupInfo.VersionedResourcesStorageMap[appsapiv1alpha1.SchemeGroupVersion.Version] = p.v1alpha1Storage(apiResourceConfigSource, restOptionsGetter) - apiGroupInfo.GroupMeta.GroupVersion = appsapiv1alpha1.SchemeGroupVersion + if apiResourceConfigSource.AnyResourcesForVersionEnabled(appsapiv1beta1.SchemeGroupVersion) { + apiGroupInfo.VersionedResourcesStorageMap[appsapiv1beta1.SchemeGroupVersion.Version] = p.v1beta1Storage(apiResourceConfigSource, restOptionsGetter) + apiGroupInfo.GroupMeta.GroupVersion = appsapiv1beta1.SchemeGroupVersion } return apiGroupInfo, true } -func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource genericapiserver.APIResourceConfigSource, restOptionsGetter genericapiserver.RESTOptionsGetter) map[string]rest.Storage { - version := appsapiv1alpha1.SchemeGroupVersion +func (p RESTStorageProvider) v1beta1Storage(apiResourceConfigSource genericapiserver.APIResourceConfigSource, restOptionsGetter genericapiserver.RESTOptionsGetter) map[string]rest.Storage { + version := appsapiv1beta1.SchemeGroupVersion storage := map[string]rest.Storage{} if apiResourceConfigSource.ResourceEnabled(version.WithResource("statefulsets")) { diff --git a/test/e2e/petset.go b/test/e2e/petset.go index 4062ec893f5..0df2f901216 100644 --- a/test/e2e/petset.go +++ b/test/e2e/petset.go @@ -67,7 +67,7 @@ const ( // GCE Api requirements: nodes and master need storage r/w permissions. var _ = framework.KubeDescribe("StatefulSet [Slow] [Feature:PetSet]", func() { options := framework.FrameworkOptions{ - GroupVersion: &unversioned.GroupVersion{Group: apps.GroupName, Version: "v1alpha1"}, + GroupVersion: &unversioned.GroupVersion{Group: apps.GroupName, Version: "v1beta1"}, } f := framework.NewFramework("petset", options, nil) var ns string @@ -79,7 +79,7 @@ var _ = framework.KubeDescribe("StatefulSet [Slow] [Feature:PetSet]", func() { // In theory, tests that restart pets should pass on any platform with a // dynamic volume provisioner. if !framework.ProviderIs("gce") { - framework.SkipIfMissingResource(f.ClientPool, unversioned.GroupVersionResource{Group: apps.GroupName, Version: "v1alpha1", Resource: "statefulsets"}, f.Namespace.Name) + framework.SkipIfMissingResource(f.ClientPool, unversioned.GroupVersionResource{Group: apps.GroupName, Version: "v1beta1", Resource: "statefulsets"}, f.Namespace.Name) } c = f.ClientSet diff --git a/test/e2e/testing-manifests/petset/mysql-galera/petset.yaml b/test/e2e/testing-manifests/petset/mysql-galera/petset.yaml index 378fcd60b45..91673bcd5e8 100644 --- a/test/e2e/testing-manifests/petset/mysql-galera/petset.yaml +++ b/test/e2e/testing-manifests/petset/mysql-galera/petset.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1alpha1 +apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: mysql diff --git a/test/e2e/testing-manifests/petset/redis/petset.yaml b/test/e2e/testing-manifests/petset/redis/petset.yaml index 27a6b845b2a..f67d54e3141 100644 --- a/test/e2e/testing-manifests/petset/redis/petset.yaml +++ b/test/e2e/testing-manifests/petset/redis/petset.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1alpha1 +apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: rd diff --git a/test/e2e/testing-manifests/petset/zookeeper/petset.yaml b/test/e2e/testing-manifests/petset/zookeeper/petset.yaml index c3f47435a8f..9f2afc42013 100644 --- a/test/e2e/testing-manifests/petset/zookeeper/petset.yaml +++ b/test/e2e/testing-manifests/petset/zookeeper/petset.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1alpha1 +apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: zoo