Update godeps

This commit is contained in:
Manuel de Brito Fontes 2016-11-10 19:57:28 -03:00
parent 1c8773fc98
commit 1bc383f9c5
1723 changed files with 287976 additions and 411028 deletions

33
vendor/k8s.io/kubernetes/pkg/apis/apps/BUILD generated vendored Normal file
View file

@ -0,0 +1,33 @@
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",
"register.go",
"types.generated.go",
"types.go",
"zz_generated.deepcopy.go",
],
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//pkg/api/resource:go_default_library",
"//pkg/api/unversioned:go_default_library",
"//pkg/conversion:go_default_library",
"//pkg/runtime:go_default_library",
"//pkg/types:go_default_library",
"//pkg/util/intstr:go_default_library",
"//vendor:github.com/ugorji/go/codec",
],
)

View file

@ -15,5 +15,7 @@ limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true
// +groupName=apps.k8s.io
package apps

22
vendor/k8s.io/kubernetes/pkg/apis/apps/install/BUILD generated vendored Normal file
View file

@ -0,0 +1,22 @@
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 = ["install.go"],
tags = ["automanaged"],
deps = [
"//pkg/apimachinery/announced:go_default_library",
"//pkg/apis/apps:go_default_library",
"//pkg/apis/apps/v1beta1:go_default_library",
],
)

View file

@ -19,113 +19,23 @@ limitations under the License.
package install
import (
"fmt"
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apimachinery"
"k8s.io/kubernetes/pkg/apimachinery/registered"
"k8s.io/kubernetes/pkg/apimachinery/announced"
"k8s.io/kubernetes/pkg/apis/apps"
"k8s.io/kubernetes/pkg/apis/apps/v1alpha1"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/util/sets"
"k8s.io/kubernetes/pkg/apis/apps/v1beta1"
)
const importPrefix = "k8s.io/kubernetes/pkg/apis/apps"
var accessor = meta.NewAccessor()
// availableVersions lists all known external versions for this group from most preferred to least preferred
var availableVersions = []unversioned.GroupVersion{v1alpha1.SchemeGroupVersion}
func init() {
registered.RegisterVersions(availableVersions)
externalVersions := []unversioned.GroupVersion{}
for _, v := range availableVersions {
if registered.IsAllowedVersion(v) {
externalVersions = append(externalVersions, v)
}
}
if len(externalVersions) == 0 {
glog.V(4).Infof("No version is registered for group %v", apps.GroupName)
return
}
if err := registered.EnableVersions(externalVersions...); err != nil {
glog.V(4).Infof("%v", err)
return
}
if err := enableVersions(externalVersions); err != nil {
glog.V(4).Infof("%v", err)
return
}
}
func enableVersions(externalVersions []unversioned.GroupVersion) error {
addVersionsToScheme(externalVersions...)
preferredExternalVersion := externalVersions[0]
groupMeta := apimachinery.GroupMeta{
GroupVersion: preferredExternalVersion,
GroupVersions: externalVersions,
RESTMapper: newRESTMapper(externalVersions),
SelfLinker: runtime.SelfLinker(accessor),
InterfacesFor: interfacesFor,
}
if err := registered.RegisterGroup(groupMeta); err != nil {
return err
}
api.RegisterRESTMapper(groupMeta.RESTMapper)
return nil
}
func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper {
// the list of kinds that are scoped at the root of the api hierarchy
// if a kind is not enumerated here, it is assumed to have a namespace scope
rootScoped := sets.NewString()
ignoredKinds := sets.NewString()
return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
}
// interfacesFor returns the default Codec and ResourceVersioner for a given version
// string, or an error if the version is not known.
func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
switch version {
case v1alpha1.SchemeGroupVersion:
return &meta.VersionInterfaces{
ObjectConvertor: api.Scheme,
MetadataAccessor: accessor,
}, nil
default:
g, _ := registered.Group(apps.GroupName)
return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
}
}
func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
// add the internal version to Scheme
if err := apps.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
if err := announced.NewGroupMetaFactory(
&announced.GroupMetaFactoryArgs{
GroupName: apps.GroupName,
VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version},
ImportPrefix: "k8s.io/kubernetes/pkg/apis/apps",
AddInternalObjectsToScheme: apps.AddToScheme,
},
announced.VersionToSchemeFunc{
v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme,
},
).Announce().RegisterAndEnable(); err != nil {
panic(err)
}
// add the enabled external versions to Scheme
for _, v := range externalVersions {
if !registered.IsEnabledVersion(v) {
glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
continue
}
switch v {
case v1alpha1.SchemeGroupVersion:
if err := v1alpha1.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
}
}
}

View file

@ -47,8 +47,8 @@ func Resource(resource string) unversioned.GroupResource {
func addKnownTypes(scheme *runtime.Scheme) error {
// TODO this will get cleaned up with the scheme types are fixed
scheme.AddKnownTypes(SchemeGroupVersion,
&PetSet{},
&PetSetList{},
&StatefulSet{},
&StatefulSetList{},
&api.ListOptions{},
&api.DeleteOptions{},
)

View file

@ -75,7 +75,7 @@ func init() {
}
}
func (x *PetSet) CodecEncodeSelf(e *codec1978.Encoder) {
func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
@ -220,7 +220,7 @@ func (x *PetSet) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
func (x *PetSet) CodecDecodeSelf(d *codec1978.Decoder) {
func (x *StatefulSet) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -250,7 +250,7 @@ func (x *PetSet) CodecDecodeSelf(d *codec1978.Decoder) {
}
}
func (x *PetSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
func (x *StatefulSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -293,14 +293,14 @@ func (x *PetSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "spec":
if r.TryDecodeAsNil() {
x.Spec = PetSetSpec{}
x.Spec = StatefulSetSpec{}
} else {
yyv24 := &x.Spec
yyv24.CodecDecodeSelf(d)
}
case "status":
if r.TryDecodeAsNil() {
x.Status = PetSetStatus{}
x.Status = StatefulSetStatus{}
} else {
yyv25 := &x.Status
yyv25.CodecDecodeSelf(d)
@ -312,7 +312,7 @@ func (x *PetSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PetSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -380,7 +380,7 @@ func (x *PetSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Spec = PetSetSpec{}
x.Spec = StatefulSetSpec{}
} else {
yyv30 := &x.Spec
yyv30.CodecDecodeSelf(d)
@ -397,7 +397,7 @@ func (x *PetSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Status = PetSetStatus{}
x.Status = StatefulSetStatus{}
} else {
yyv31 := &x.Status
yyv31.CodecDecodeSelf(d)
@ -418,7 +418,7 @@ func (x *PetSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *PetSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
@ -583,7 +583,7 @@ func (x *PetSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
func (x *PetSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
func (x *StatefulSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -613,7 +613,7 @@ func (x *PetSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
}
}
func (x *PetSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -639,7 +639,7 @@ func (x *PetSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Replicas = 0
} else {
x.Replicas = int(r.DecodeInt(codecSelferBitsize1234))
x.Replicas = int32(r.DecodeInt(32))
}
case "selector":
if r.TryDecodeAsNil() {
@ -690,7 +690,7 @@ func (x *PetSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PetSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -711,7 +711,7 @@ func (x *PetSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Replicas = 0
} else {
x.Replicas = int(r.DecodeInt(codecSelferBitsize1234))
x.Replicas = int32(r.DecodeInt(32))
}
yyj59++
if yyhl59 {
@ -811,7 +811,7 @@ func (x *PetSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *PetSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
func (x *StatefulSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
@ -905,7 +905,7 @@ func (x *PetSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
func (x *PetSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
func (x *StatefulSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -935,7 +935,7 @@ func (x *PetSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
}
}
func (x *PetSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
func (x *StatefulSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -977,7 +977,7 @@ func (x *PetSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Replicas = 0
} else {
x.Replicas = int(r.DecodeInt(codecSelferBitsize1234))
x.Replicas = int32(r.DecodeInt(32))
}
default:
z.DecStructFieldNotFound(-1, yys79)
@ -986,7 +986,7 @@ func (x *PetSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PetSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
func (x *StatefulSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -1033,7 +1033,7 @@ func (x *PetSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Replicas = 0
} else {
x.Replicas = int(r.DecodeInt(codecSelferBitsize1234))
x.Replicas = int32(r.DecodeInt(32))
}
for {
yyj83++
@ -1051,7 +1051,7 @@ func (x *PetSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *PetSetList) CodecEncodeSelf(e *codec1978.Encoder) {
func (x *StatefulSetList) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
@ -1172,7 +1172,7 @@ func (x *PetSetList) CodecEncodeSelf(e *codec1978.Encoder) {
_ = yym101
if false {
} else {
h.encSlicePetSet(([]PetSet)(x.Items), e)
h.encSliceStatefulSet(([]StatefulSet)(x.Items), e)
}
}
} else {
@ -1186,7 +1186,7 @@ func (x *PetSetList) CodecEncodeSelf(e *codec1978.Encoder) {
_ = yym102
if false {
} else {
h.encSlicePetSet(([]PetSet)(x.Items), e)
h.encSliceStatefulSet(([]StatefulSet)(x.Items), e)
}
}
}
@ -1199,7 +1199,7 @@ func (x *PetSetList) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
func (x *PetSetList) CodecDecodeSelf(d *codec1978.Decoder) {
func (x *StatefulSetList) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -1229,7 +1229,7 @@ func (x *PetSetList) CodecDecodeSelf(d *codec1978.Decoder) {
}
}
func (x *PetSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
func (x *StatefulSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -1285,7 +1285,7 @@ func (x *PetSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
_ = yym111
if false {
} else {
h.decSlicePetSet((*[]PetSet)(yyv110), d)
h.decSliceStatefulSet((*[]StatefulSet)(yyv110), d)
}
}
default:
@ -1295,7 +1295,7 @@ func (x *PetSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PetSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
func (x *StatefulSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -1376,7 +1376,7 @@ func (x *PetSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
_ = yym118
if false {
} else {
h.decSlicePetSet((*[]PetSet)(yyv117), d)
h.decSliceStatefulSet((*[]StatefulSet)(yyv117), d)
}
}
for {
@ -1511,7 +1511,7 @@ func (x codecSelfer1234) decSliceapi_PersistentVolumeClaim(v *[]pkg2_api.Persist
}
}
func (x codecSelfer1234) encSlicePetSet(v []PetSet, e *codec1978.Encoder) {
func (x codecSelfer1234) encSliceStatefulSet(v []StatefulSet, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
@ -1524,7 +1524,7 @@ func (x codecSelfer1234) encSlicePetSet(v []PetSet, e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -1534,7 +1534,7 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
var yyc127 bool
if yyl127 == 0 {
if yyv127 == nil {
yyv127 = []PetSet{}
yyv127 = []StatefulSet{}
yyc127 = true
} else if len(yyv127) != 0 {
yyv127 = yyv127[:0]
@ -1552,10 +1552,10 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
if yyrl127 <= cap(yyv127) {
yyv127 = yyv127[:yyrl127]
} else {
yyv127 = make([]PetSet, yyrl127)
yyv127 = make([]StatefulSet, yyrl127)
}
} else {
yyv127 = make([]PetSet, yyrl127)
yyv127 = make([]StatefulSet, yyrl127)
}
yyc127 = true
yyrr127 = len(yyv127)
@ -1570,7 +1570,7 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
for ; yyj127 < yyrr127; yyj127++ {
yyh127.ElemContainerState(yyj127)
if r.TryDecodeAsNil() {
yyv127[yyj127] = PetSet{}
yyv127[yyj127] = StatefulSet{}
} else {
yyv128 := &yyv127[yyj127]
yyv128.CodecDecodeSelf(d)
@ -1579,10 +1579,10 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
}
if yyrt127 {
for ; yyj127 < yyl127; yyj127++ {
yyv127 = append(yyv127, PetSet{})
yyv127 = append(yyv127, StatefulSet{})
yyh127.ElemContainerState(yyj127)
if r.TryDecodeAsNil() {
yyv127[yyj127] = PetSet{}
yyv127[yyj127] = StatefulSet{}
} else {
yyv129 := &yyv127[yyj127]
yyv129.CodecDecodeSelf(d)
@ -1596,13 +1596,13 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
for ; !r.CheckBreak(); yyj127++ {
if yyj127 >= len(yyv127) {
yyv127 = append(yyv127, PetSet{}) // var yyz127 PetSet
yyv127 = append(yyv127, StatefulSet{}) // var yyz127 StatefulSet
yyc127 = true
}
yyh127.ElemContainerState(yyj127)
if yyj127 < len(yyv127) {
if r.TryDecodeAsNil() {
yyv127[yyj127] = PetSet{}
yyv127[yyj127] = StatefulSet{}
} else {
yyv130 := &yyv127[yyj127]
yyv130.CodecDecodeSelf(d)
@ -1617,7 +1617,7 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
yyv127 = yyv127[:yyj127]
yyc127 = true
} else if yyj127 == 0 && yyv127 == nil {
yyv127 = []PetSet{}
yyv127 = []StatefulSet{}
yyc127 = true
}
}

View file

@ -21,74 +21,83 @@ import (
"k8s.io/kubernetes/pkg/api/unversioned"
)
// PetSet represents a set of pods with consistent identities.
// +genclient=true
// StatefulSet represents a set of pods with consistent identities.
// Identities are defined as:
// - Network: A single stable DNS and hostname.
// - Storage: As many VolumeClaims as requested.
// The PetSet guarantees that a given network identity will always
// map to the same storage identity. PetSet is currently in alpha and
// and subject to change without notice.
type PetSet struct {
// The StatefulSet guarantees that a given network identity will always
// map to the same storage identity.
type StatefulSet struct {
unversioned.TypeMeta `json:",inline"`
api.ObjectMeta `json:"metadata,omitempty"`
// +optional
api.ObjectMeta `json:"metadata,omitempty"`
// Spec defines the desired identities of pets in this set.
Spec PetSetSpec `json:"spec,omitempty"`
// Spec defines the desired identities of pods in this set.
// +optional
Spec StatefulSetSpec `json:"spec,omitempty"`
// Status is the current status of Pets in this PetSet. This data
// Status is the current status of Pods in this StatefulSet. This data
// may be out of date by some window of time.
Status PetSetStatus `json:"status,omitempty"`
// +optional
Status StatefulSetStatus `json:"status,omitempty"`
}
// A PetSetSpec is the specification of a PetSet.
type PetSetSpec struct {
// A StatefulSetSpec is the specification of a StatefulSet.
type StatefulSetSpec struct {
// 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.
Replicas int `json:"replicas,omitempty"`
// +optional
Replicas int32 `json:"replicas,omitempty"`
// 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://releases.k8s.io/release-1.4/docs/user-guide/labels.md#label-selectors
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
// +optional
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
// Template is the object that describes the pod that will be created if
// insufficient replicas are detected. Each pod stamped out by the PetSet
// insufficient replicas are detected. Each pod stamped out by the StatefulSet
// will fulfill this Template, but have a unique identity from the rest
// of the PetSet.
// of the StatefulSet.
Template api.PodTemplateSpec `json:"template"`
// VolumeClaimTemplates is a list of claims that pets are allowed to reference.
// The PetSet controller is responsible for mapping network identities to
// claims in a way that maintains the identity of a pet. Every claim in
// VolumeClaimTemplates is a list of claims that pods are allowed to reference.
// The StatefulSet controller is responsible for mapping network identities to
// claims in a way that maintains the identity of a pod. Every claim in
// this list must have at least one matching (by name) volumeMount in one
// container in the template. A claim in this list takes precedence over
// any volumes in the template, with the same name.
// TODO: Define the behavior if a claim already exists with the same name.
// +optional
VolumeClaimTemplates []api.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
// ServiceName is the name of the service that governs this PetSet.
// This service must exist before the PetSet, and is responsible for
// the network identity of the set. Pets get DNS/hostnames that follow the
// pattern: pet-specific-string.serviceName.default.svc.cluster.local
// where "pet-specific-string" is managed by the PetSet controller.
// ServiceName is the name of the service that governs this StatefulSet.
// This service must exist before the StatefulSet, and is responsible for
// the network identity of the set. Pods get DNS/hostnames that follow the
// pattern: pod-specific-string.serviceName.default.svc.cluster.local
// where "pod-specific-string" is managed by the StatefulSet controller.
ServiceName string `json:"serviceName"`
}
// PetSetStatus represents the current state of a PetSet.
type PetSetStatus struct {
// StatefulSetStatus represents the current state of a StatefulSet.
type StatefulSetStatus struct {
// most recent generation observed by this autoscaler.
// +optional
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// Replicas is the number of actual replicas.
Replicas int `json:"replicas"`
Replicas int32 `json:"replicas"`
}
// PetSetList is a collection of PetSets.
type PetSetList struct {
// StatefulSetList is a collection of StatefulSets.
type StatefulSetList struct {
unversioned.TypeMeta `json:",inline"`
// +optional
unversioned.ListMeta `json:"metadata,omitempty"`
Items []PetSet `json:"items"`
Items []StatefulSet `json:"items"`
}

View file

@ -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_PetSet = map[string]string{
"": "PetSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe PetSet guarantees that a given network identity will always map to the same storage identity. PetSet is currently in alpha and subject to change without notice.",
"spec": "Spec defines the desired identities of pets in this set.",
"status": "Status is the current status of Pets in this PetSet. This data may be out of date by some window of time.",
}
func (PetSet) SwaggerDoc() map[string]string {
return map_PetSet
}
var map_PetSetList = map[string]string{
"": "PetSetList is a collection of PetSets.",
}
func (PetSetList) SwaggerDoc() map[string]string {
return map_PetSetList
}
var map_PetSetSpec = map[string]string{
"": "A PetSetSpec is the specification of a PetSet.",
"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://releases.k8s.io/release-1.4/docs/user-guide/labels.md#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 PetSet will fulfill this Template, but have a unique identity from the rest of the PetSet.",
"volumeClaimTemplates": "VolumeClaimTemplates is a list of claims that pets are allowed to reference. The PetSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pet. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
"serviceName": "ServiceName is the name of the service that governs this PetSet. This service must exist before the PetSet, and is responsible for the network identity of the set. Pets get DNS/hostnames that follow the pattern: pet-specific-string.serviceName.default.svc.cluster.local where \"pet-specific-string\" is managed by the PetSet controller.",
}
func (PetSetSpec) SwaggerDoc() map[string]string {
return map_PetSetSpec
}
var map_PetSetStatus = map[string]string{
"": "PetSetStatus represents the current state of a PetSet.",
"observedGeneration": "most recent generation observed by this autoscaler.",
"replicas": "Replicas is the number of actual replicas.",
}
func (PetSetStatus) SwaggerDoc() map[string]string {
return map_PetSetStatus
}
// AUTO-GENERATED FUNCTIONS END HERE

View file

@ -1,160 +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"
apps "k8s.io/kubernetes/pkg/apis/apps"
conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
)
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_PetSet_To_apps_PetSet,
Convert_apps_PetSet_To_v1alpha1_PetSet,
Convert_v1alpha1_PetSetList_To_apps_PetSetList,
Convert_apps_PetSetList_To_v1alpha1_PetSetList,
Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec,
Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec,
Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus,
Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus,
)
}
func autoConvert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error {
SetDefaults_PetSet(in)
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
// TODO: Inefficient conversion - can we improve it?
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
return err
}
if err := Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
func Convert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error {
return autoConvert_v1alpha1_PetSet_To_apps_PetSet(in, out, s)
}
func autoConvert_apps_PetSet_To_v1alpha1_PetSet(in *apps.PetSet, out *PetSet, s conversion.Scope) error {
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
// TODO: Inefficient conversion - can we improve it?
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
return err
}
if err := Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
func Convert_apps_PetSet_To_v1alpha1_PetSet(in *apps.PetSet, out *PetSet, s conversion.Scope) error {
return autoConvert_apps_PetSet_To_v1alpha1_PetSet(in, out, s)
}
func autoConvert_v1alpha1_PetSetList_To_apps_PetSetList(in *PetSetList, out *apps.PetSetList, s conversion.Scope) error {
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
return err
}
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]apps.PetSet, len(*in))
for i := range *in {
if err := Convert_v1alpha1_PetSet_To_apps_PetSet(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func Convert_v1alpha1_PetSetList_To_apps_PetSetList(in *PetSetList, out *apps.PetSetList, s conversion.Scope) error {
return autoConvert_v1alpha1_PetSetList_To_apps_PetSetList(in, out, s)
}
func autoConvert_apps_PetSetList_To_v1alpha1_PetSetList(in *apps.PetSetList, out *PetSetList, s conversion.Scope) error {
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
return err
}
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]PetSet, len(*in))
for i := range *in {
if err := Convert_apps_PetSet_To_v1alpha1_PetSet(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func Convert_apps_PetSetList_To_v1alpha1_PetSetList(in *apps.PetSetList, out *PetSetList, s conversion.Scope) error {
return autoConvert_apps_PetSetList_To_v1alpha1_PetSetList(in, out, s)
}
func autoConvert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in *PetSetStatus, out *apps.PetSetStatus, s conversion.Scope) error {
out.ObservedGeneration = in.ObservedGeneration
out.Replicas = int(in.Replicas)
return nil
}
func Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in *PetSetStatus, out *apps.PetSetStatus, s conversion.Scope) error {
return autoConvert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in, out, s)
}
func autoConvert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in *apps.PetSetStatus, out *PetSetStatus, s conversion.Scope) error {
out.ObservedGeneration = in.ObservedGeneration
out.Replicas = int32(in.Replicas)
return nil
}
func Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in *apps.PetSetStatus, out *PetSetStatus, s conversion.Scope) error {
return autoConvert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in, out, s)
}

43
vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/BUILD generated vendored Normal file
View file

@ -0,0 +1,43 @@
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 = [
"conversion.go",
"defaults.go",
"doc.go",
"generated.pb.go",
"register.go",
"types.generated.go",
"types.go",
"types_swagger_doc_generated.go",
"zz_generated.conversion.go",
"zz_generated.deepcopy.go",
"zz_generated.defaults.go",
],
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//pkg/api/resource:go_default_library",
"//pkg/api/unversioned:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/apis/apps:go_default_library",
"//pkg/conversion:go_default_library",
"//pkg/runtime:go_default_library",
"//pkg/types:go_default_library",
"//pkg/util/intstr:go_default_library",
"//pkg/watch/versioned:go_default_library",
"//vendor:github.com/gogo/protobuf/proto",
"//vendor:github.com/ugorji/go/codec",
],
)

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
package v1beta1
import (
"fmt"
@ -28,19 +28,19 @@ import (
)
func addConversionFuncs(scheme *runtime.Scheme) error {
// Add non-generated conversion functions to handle the *int32 -> int
// Add non-generated conversion functions to handle the *int32 -> int32
// conversion. A pointer is useful in the versioned type so we can default
// 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_PetSetSpec_To_apps_PetSetSpec,
Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec,
Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec,
Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec,
)
if err != nil {
return err
}
return api.Scheme.AddFieldLabelConversionFunc("apps/v1alpha1", "PetSet",
return api.Scheme.AddFieldLabelConversionFunc("apps/v1beta1", "StatefulSet",
func(label, value string) (string, string, error) {
switch label {
case "metadata.name", "metadata.namespace", "status.successful":
@ -52,9 +52,9 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
)
}
func Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(in *PetSetSpec, out *apps.PetSetSpec, 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 = int(*in.Replicas)
out.Replicas = *in.Replicas
}
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
@ -83,9 +83,9 @@ func Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(in *PetSetSpec, out *apps.Pe
return nil
}
func Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(in *apps.PetSetSpec, out *PetSetSpec, 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 = int32(in.Replicas)
*out.Replicas = in.Replicas
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(unversioned.LabelSelector)

View file

@ -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"
@ -22,12 +22,13 @@ import (
)
func addDefaultingFuncs(scheme *runtime.Scheme) error {
RegisterDefaults(scheme)
return scheme.AddDefaultingFuncs(
SetDefaults_PetSet,
SetDefaults_StatefulSet,
)
}
func SetDefaults_PetSet(obj *PetSet) {
func SetDefaults_StatefulSet(obj *StatefulSet) {
labels := obj.Spec.Template.Labels
if labels != nil {
if obj.Spec.Selector == nil {

View file

@ -16,5 +16,8 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
// +groupName=apps.k8s.io
package v1alpha1
package v1beta1

View file

@ -15,22 +15,22 @@ limitations under the License.
*/
// Code generated by protoc-gen-gogo.
// source: k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto
// source: k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto
// DO NOT EDIT!
/*
Package v1alpha1 is a generated protocol buffer package.
Package v1beta1 is a generated protocol buffer package.
It is generated from these files:
k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto
k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto
It has these top-level messages:
PetSet
PetSetList
PetSetSpec
PetSetStatus
StatefulSet
StatefulSetList
StatefulSetSpec
StatefulSetStatus
*/
package v1alpha1
package v1beta1
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
@ -53,29 +53,29 @@ var _ = math.Inf
// is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *PetSet) Reset() { *m = PetSet{} }
func (*PetSet) ProtoMessage() {}
func (*PetSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *StatefulSet) Reset() { *m = StatefulSet{} }
func (*StatefulSet) ProtoMessage() {}
func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *PetSetList) Reset() { *m = PetSetList{} }
func (*PetSetList) ProtoMessage() {}
func (*PetSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *StatefulSetList) Reset() { *m = StatefulSetList{} }
func (*StatefulSetList) ProtoMessage() {}
func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *PetSetSpec) Reset() { *m = PetSetSpec{} }
func (*PetSetSpec) ProtoMessage() {}
func (*PetSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} }
func (*StatefulSetSpec) ProtoMessage() {}
func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *PetSetStatus) Reset() { *m = PetSetStatus{} }
func (*PetSetStatus) ProtoMessage() {}
func (*PetSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} }
func (*StatefulSetStatus) ProtoMessage() {}
func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
func init() {
proto.RegisterType((*PetSet)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSet")
proto.RegisterType((*PetSetList)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetList")
proto.RegisterType((*PetSetSpec)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetSpec")
proto.RegisterType((*PetSetStatus)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetStatus")
proto.RegisterType((*StatefulSet)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.StatefulSet")
proto.RegisterType((*StatefulSetList)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.StatefulSetList")
proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.StatefulSetSpec")
proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.StatefulSetStatus")
}
func (m *PetSet) Marshal() (data []byte, err error) {
func (m *StatefulSet) Marshal() (data []byte, err error) {
size := m.Size()
data = make([]byte, size)
n, err := m.MarshalTo(data)
@ -85,7 +85,7 @@ func (m *PetSet) Marshal() (data []byte, err error) {
return data[:n], nil
}
func (m *PetSet) MarshalTo(data []byte) (int, error) {
func (m *StatefulSet) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
@ -117,7 +117,7 @@ func (m *PetSet) MarshalTo(data []byte) (int, error) {
return i, nil
}
func (m *PetSetList) Marshal() (data []byte, err error) {
func (m *StatefulSetList) Marshal() (data []byte, err error) {
size := m.Size()
data = make([]byte, size)
n, err := m.MarshalTo(data)
@ -127,7 +127,7 @@ func (m *PetSetList) Marshal() (data []byte, err error) {
return data[:n], nil
}
func (m *PetSetList) MarshalTo(data []byte) (int, error) {
func (m *StatefulSetList) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
@ -155,7 +155,7 @@ func (m *PetSetList) MarshalTo(data []byte) (int, error) {
return i, nil
}
func (m *PetSetSpec) Marshal() (data []byte, err error) {
func (m *StatefulSetSpec) Marshal() (data []byte, err error) {
size := m.Size()
data = make([]byte, size)
n, err := m.MarshalTo(data)
@ -165,7 +165,7 @@ func (m *PetSetSpec) Marshal() (data []byte, err error) {
return data[:n], nil
}
func (m *PetSetSpec) MarshalTo(data []byte) (int, error) {
func (m *StatefulSetSpec) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
@ -212,7 +212,7 @@ func (m *PetSetSpec) MarshalTo(data []byte) (int, error) {
return i, nil
}
func (m *PetSetStatus) Marshal() (data []byte, err error) {
func (m *StatefulSetStatus) Marshal() (data []byte, err error) {
size := m.Size()
data = make([]byte, size)
n, err := m.MarshalTo(data)
@ -222,7 +222,7 @@ func (m *PetSetStatus) Marshal() (data []byte, err error) {
return data[:n], nil
}
func (m *PetSetStatus) MarshalTo(data []byte) (int, error) {
func (m *StatefulSetStatus) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
@ -265,7 +265,7 @@ func encodeVarintGenerated(data []byte, offset int, v uint64) int {
data[offset] = uint8(v)
return offset + 1
}
func (m *PetSet) Size() (n int) {
func (m *StatefulSet) Size() (n int) {
var l int
_ = l
l = m.ObjectMeta.Size()
@ -277,7 +277,7 @@ func (m *PetSet) Size() (n int) {
return n
}
func (m *PetSetList) Size() (n int) {
func (m *StatefulSetList) Size() (n int) {
var l int
_ = l
l = m.ListMeta.Size()
@ -291,7 +291,7 @@ func (m *PetSetList) Size() (n int) {
return n
}
func (m *PetSetSpec) Size() (n int) {
func (m *StatefulSetSpec) Size() (n int) {
var l int
_ = l
if m.Replicas != nil {
@ -314,7 +314,7 @@ func (m *PetSetSpec) Size() (n int) {
return n
}
func (m *PetSetStatus) Size() (n int) {
func (m *StatefulSetStatus) Size() (n int) {
var l int
_ = l
if m.ObservedGeneration != nil {
@ -337,34 +337,34 @@ func sovGenerated(x uint64) (n int) {
func sozGenerated(x uint64) (n int) {
return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *PetSet) String() string {
func (this *StatefulSet) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PetSet{`,
s := strings.Join([]string{`&StatefulSet{`,
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
`Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PetSetSpec", "PetSetSpec", 1), `&`, ``, 1) + `,`,
`Status:` + strings.Replace(strings.Replace(this.Status.String(), "PetSetStatus", "PetSetStatus", 1), `&`, ``, 1) + `,`,
`Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`,
`Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *PetSetList) String() string {
func (this *StatefulSetList) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PetSetList{`,
s := strings.Join([]string{`&StatefulSetList{`,
`ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`,
`Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PetSet", "PetSet", 1), `&`, ``, 1) + `,`,
`Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StatefulSet", "StatefulSet", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *PetSetSpec) String() string {
func (this *StatefulSetSpec) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PetSetSpec{`,
s := strings.Join([]string{`&StatefulSetSpec{`,
`Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
`Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_kubernetes_pkg_api_unversioned.LabelSelector", 1) + `,`,
`Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
@ -374,11 +374,11 @@ func (this *PetSetSpec) String() string {
}, "")
return s
}
func (this *PetSetStatus) String() string {
func (this *StatefulSetStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PetSetStatus{`,
s := strings.Join([]string{`&StatefulSetStatus{`,
`ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
`Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
`}`,
@ -393,7 +393,7 @@ func valueToStringGenerated(v interface{}) string {
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *PetSet) Unmarshal(data []byte) error {
func (m *StatefulSet) Unmarshal(data []byte) error {
l := len(data)
iNdEx := 0
for iNdEx < l {
@ -416,10 +416,10 @@ func (m *PetSet) Unmarshal(data []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PetSet: wiretype end group for non-group")
return fmt.Errorf("proto: StatefulSet: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PetSet: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: StatefulSet: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@ -533,7 +533,7 @@ func (m *PetSet) Unmarshal(data []byte) error {
}
return nil
}
func (m *PetSetList) Unmarshal(data []byte) error {
func (m *StatefulSetList) Unmarshal(data []byte) error {
l := len(data)
iNdEx := 0
for iNdEx < l {
@ -556,10 +556,10 @@ func (m *PetSetList) Unmarshal(data []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PetSetList: wiretype end group for non-group")
return fmt.Errorf("proto: StatefulSetList: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PetSetList: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: StatefulSetList: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@ -618,7 +618,7 @@ func (m *PetSetList) Unmarshal(data []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Items = append(m.Items, PetSet{})
m.Items = append(m.Items, StatefulSet{})
if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
return err
}
@ -644,7 +644,7 @@ func (m *PetSetList) Unmarshal(data []byte) error {
}
return nil
}
func (m *PetSetSpec) Unmarshal(data []byte) error {
func (m *StatefulSetSpec) Unmarshal(data []byte) error {
l := len(data)
iNdEx := 0
for iNdEx < l {
@ -667,10 +667,10 @@ func (m *PetSetSpec) Unmarshal(data []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PetSetSpec: wiretype end group for non-group")
return fmt.Errorf("proto: StatefulSetSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PetSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: StatefulSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@ -837,7 +837,7 @@ func (m *PetSetSpec) Unmarshal(data []byte) error {
}
return nil
}
func (m *PetSetStatus) Unmarshal(data []byte) error {
func (m *StatefulSetStatus) Unmarshal(data []byte) error {
l := len(data)
iNdEx := 0
for iNdEx < l {
@ -860,10 +860,10 @@ func (m *PetSetStatus) Unmarshal(data []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PetSetStatus: wiretype end group for non-group")
return fmt.Errorf("proto: StatefulSetStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PetSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: StatefulSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@ -1032,44 +1032,45 @@ var (
)
var fileDescriptorGenerated = []byte{
// 611 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6f, 0xd3, 0x4c,
0x10, 0xc6, 0xeb, 0xa6, 0xa9, 0xfc, 0x6e, 0xf3, 0x22, 0xb4, 0x54, 0x28, 0x8a, 0x50, 0x8a, 0x72,
0x8a, 0x50, 0xb3, 0x26, 0x85, 0xa2, 0x9e, 0x8d, 0x04, 0x42, 0x02, 0x5a, 0x39, 0x10, 0x21, 0x10,
0x48, 0x6b, 0x67, 0x48, 0x97, 0xd8, 0x5e, 0xcb, 0xbb, 0xce, 0x99, 0x03, 0xdc, 0x39, 0xf3, 0x31,
0xf8, 0x08, 0x9c, 0x72, 0xec, 0x91, 0x53, 0x05, 0xe5, 0x8b, 0xb0, 0x5e, 0xff, 0x49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, 0x6c, 0xe5,
0xec, 0x1e, 0xb8, 0xf7, 0x8f, 0x4e, 0xed, 0xc2, 0xf1, 0xa9, 0x5d, 0xf8, 0x75, 0x6a, 0x17, 0x3e,
0x0f, 0x6c, 0xeb, 0x68, 0x60, 0x5b, 0xc7, 0x03, 0xdb, 0xfa, 0x3d, 0xb0, 0xad, 0x6f, 0x7f, 0xec,
0xc2, 0xc1, 0x15, 0xb3, 0x92, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x28, 0x58, 0x61, 0xec, 0xf5,
0x05, 0x00, 0x00,
}

View file

@ -19,7 +19,7 @@ limitations under the License.
syntax = 'proto2';
package k8s.io.kubernetes.pkg.apis.apps.v1alpha1;
package k8s.io.kubernetes.pkg.apis.apps.v1beta1;
import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
@ -28,73 +28,80 @@ 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";
option go_package = "v1beta1";
// PetSet represents a set of pods with consistent identities.
// StatefulSet represents a set of pods with consistent identities.
// Identities are defined as:
// - Network: A single stable DNS and hostname.
// - Storage: As many VolumeClaims as requested.
// The PetSet guarantees that a given network identity will always
// map to the same storage identity. PetSet is currently in alpha
// and subject to change without notice.
message PetSet {
// The StatefulSet guarantees that a given network identity will always
// map to the same storage identity.
message StatefulSet {
// +optional
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
// Spec defines the desired identities of pets in this set.
optional PetSetSpec spec = 2;
// Spec defines the desired identities of pods in this set.
// +optional
optional StatefulSetSpec spec = 2;
// Status is the current status of Pets in this PetSet. This data
// Status is the current status of Pods in this StatefulSet. This data
// may be out of date by some window of time.
optional PetSetStatus status = 3;
// +optional
optional StatefulSetStatus status = 3;
}
// PetSetList is a collection of PetSets.
message PetSetList {
// StatefulSetList is a collection of StatefulSets.
message StatefulSetList {
// +optional
optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
repeated PetSet items = 2;
repeated StatefulSet items = 2;
}
// A PetSetSpec is the specification of a PetSet.
message PetSetSpec {
// A StatefulSetSpec is the specification of a StatefulSet.
message StatefulSetSpec {
// Replicas is the desired number of replicas of the given Template.
// These are replicas in the sense that they are instantiations of the
// same Template, but individual replicas also have a consistent identity.
// 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://releases.k8s.io/release-1.4/docs/user-guide/labels.md#label-selectors
// 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 PetSet
// insufficient replicas are detected. Each pod stamped out by the StatefulSet
// will fulfill this Template, but have a unique identity from the rest
// of the PetSet.
// of the StatefulSet.
optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3;
// VolumeClaimTemplates is a list of claims that pets are allowed to reference.
// The PetSet controller is responsible for mapping network identities to
// claims in a way that maintains the identity of a pet. Every claim in
// VolumeClaimTemplates is a list of claims that pods are allowed to reference.
// The StatefulSet controller is responsible for mapping network identities to
// claims in a way that maintains the identity of a pod. Every claim in
// this list must have at least one matching (by name) volumeMount in one
// container in the template. A claim in this list takes precedence over
// any volumes in the template, with the same name.
// 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 PetSet.
// This service must exist before the PetSet, and is responsible for
// the network identity of the set. Pets get DNS/hostnames that follow the
// pattern: pet-specific-string.serviceName.default.svc.cluster.local
// where "pet-specific-string" is managed by the PetSet controller.
// ServiceName is the name of the service that governs this StatefulSet.
// This service must exist before the StatefulSet, and is responsible for
// the network identity of the set. Pods get DNS/hostnames that follow the
// pattern: pod-specific-string.serviceName.default.svc.cluster.local
// where "pod-specific-string" is managed by the StatefulSet controller.
optional string serviceName = 5;
}
// PetSetStatus represents the current state of a PetSet.
message PetSetStatus {
// StatefulSetStatus represents the current state of a StatefulSet.
message StatefulSetStatus {
// most recent generation observed by this autoscaler.
// +optional
optional int64 observedGeneration = 1;
// Replicas is the number of actual replicas.

View file

@ -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)
@ -37,14 +37,15 @@ var (
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&PetSet{},
&PetSetList{},
&StatefulSet{},
&StatefulSetList{},
&v1.ListOptions{},
&v1.DeleteOptions{},
&v1.ExportOptions{},
)
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
func (obj *PetSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *PetSetList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *StatefulSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
func (obj *StatefulSetList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }

View file

@ -19,7 +19,7 @@ limitations under the License.
// THIS FILE IS AUTO-GENERATED BY codecgen.
// ************************************************************
package v1alpha1
package v1beta1
import (
"errors"
@ -75,7 +75,7 @@ func init() {
}
}
func (x *PetSet) CodecEncodeSelf(e *codec1978.Encoder) {
func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
@ -220,7 +220,7 @@ func (x *PetSet) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
func (x *PetSet) CodecDecodeSelf(d *codec1978.Decoder) {
func (x *StatefulSet) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -250,7 +250,7 @@ func (x *PetSet) CodecDecodeSelf(d *codec1978.Decoder) {
}
}
func (x *PetSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
func (x *StatefulSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -293,14 +293,14 @@ func (x *PetSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "spec":
if r.TryDecodeAsNil() {
x.Spec = PetSetSpec{}
x.Spec = StatefulSetSpec{}
} else {
yyv24 := &x.Spec
yyv24.CodecDecodeSelf(d)
}
case "status":
if r.TryDecodeAsNil() {
x.Status = PetSetStatus{}
x.Status = StatefulSetStatus{}
} else {
yyv25 := &x.Status
yyv25.CodecDecodeSelf(d)
@ -312,7 +312,7 @@ func (x *PetSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PetSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -380,7 +380,7 @@ func (x *PetSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Spec = PetSetSpec{}
x.Spec = StatefulSetSpec{}
} else {
yyv30 := &x.Spec
yyv30.CodecDecodeSelf(d)
@ -397,7 +397,7 @@ func (x *PetSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Status = PetSetStatus{}
x.Status = StatefulSetStatus{}
} else {
yyv31 := &x.Status
yyv31.CodecDecodeSelf(d)
@ -418,7 +418,7 @@ func (x *PetSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *PetSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
@ -593,7 +593,7 @@ func (x *PetSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
func (x *PetSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
func (x *StatefulSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -623,7 +623,7 @@ func (x *PetSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
}
}
func (x *PetSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -710,7 +710,7 @@ func (x *PetSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PetSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -841,7 +841,7 @@ func (x *PetSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *PetSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
func (x *StatefulSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
@ -935,7 +935,7 @@ func (x *PetSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
func (x *PetSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
func (x *StatefulSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -965,7 +965,7 @@ func (x *PetSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
}
}
func (x *PetSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
func (x *StatefulSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -1016,7 +1016,7 @@ func (x *PetSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PetSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
func (x *StatefulSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -1081,7 +1081,7 @@ func (x *PetSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *PetSetList) CodecEncodeSelf(e *codec1978.Encoder) {
func (x *StatefulSetList) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
@ -1202,7 +1202,7 @@ func (x *PetSetList) CodecEncodeSelf(e *codec1978.Encoder) {
_ = yym105
if false {
} else {
h.encSlicePetSet(([]PetSet)(x.Items), e)
h.encSliceStatefulSet(([]StatefulSet)(x.Items), e)
}
}
} else {
@ -1216,7 +1216,7 @@ func (x *PetSetList) CodecEncodeSelf(e *codec1978.Encoder) {
_ = yym106
if false {
} else {
h.encSlicePetSet(([]PetSet)(x.Items), e)
h.encSliceStatefulSet(([]StatefulSet)(x.Items), e)
}
}
}
@ -1229,7 +1229,7 @@ func (x *PetSetList) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
func (x *PetSetList) CodecDecodeSelf(d *codec1978.Decoder) {
func (x *StatefulSetList) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -1259,7 +1259,7 @@ func (x *PetSetList) CodecDecodeSelf(d *codec1978.Decoder) {
}
}
func (x *PetSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
func (x *StatefulSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -1315,7 +1315,7 @@ func (x *PetSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
_ = yym115
if false {
} else {
h.decSlicePetSet((*[]PetSet)(yyv114), d)
h.decSliceStatefulSet((*[]StatefulSet)(yyv114), d)
}
}
default:
@ -1325,7 +1325,7 @@ func (x *PetSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *PetSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
func (x *StatefulSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -1406,7 +1406,7 @@ func (x *PetSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
_ = yym122
if false {
} else {
h.decSlicePetSet((*[]PetSet)(yyv121), d)
h.decSliceStatefulSet((*[]StatefulSet)(yyv121), d)
}
}
for {
@ -1541,7 +1541,7 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten
}
}
func (x codecSelfer1234) encSlicePetSet(v []PetSet, e *codec1978.Encoder) {
func (x codecSelfer1234) encSliceStatefulSet(v []StatefulSet, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
@ -1554,7 +1554,7 @@ func (x codecSelfer1234) encSlicePetSet(v []PetSet, e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
@ -1564,7 +1564,7 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
var yyc131 bool
if yyl131 == 0 {
if yyv131 == nil {
yyv131 = []PetSet{}
yyv131 = []StatefulSet{}
yyc131 = true
} else if len(yyv131) != 0 {
yyv131 = yyv131[:0]
@ -1582,10 +1582,10 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
if yyrl131 <= cap(yyv131) {
yyv131 = yyv131[:yyrl131]
} else {
yyv131 = make([]PetSet, yyrl131)
yyv131 = make([]StatefulSet, yyrl131)
}
} else {
yyv131 = make([]PetSet, yyrl131)
yyv131 = make([]StatefulSet, yyrl131)
}
yyc131 = true
yyrr131 = len(yyv131)
@ -1600,7 +1600,7 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
for ; yyj131 < yyrr131; yyj131++ {
yyh131.ElemContainerState(yyj131)
if r.TryDecodeAsNil() {
yyv131[yyj131] = PetSet{}
yyv131[yyj131] = StatefulSet{}
} else {
yyv132 := &yyv131[yyj131]
yyv132.CodecDecodeSelf(d)
@ -1609,10 +1609,10 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
}
if yyrt131 {
for ; yyj131 < yyl131; yyj131++ {
yyv131 = append(yyv131, PetSet{})
yyv131 = append(yyv131, StatefulSet{})
yyh131.ElemContainerState(yyj131)
if r.TryDecodeAsNil() {
yyv131[yyj131] = PetSet{}
yyv131[yyj131] = StatefulSet{}
} else {
yyv133 := &yyv131[yyj131]
yyv133.CodecDecodeSelf(d)
@ -1626,13 +1626,13 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
for ; !r.CheckBreak(); yyj131++ {
if yyj131 >= len(yyv131) {
yyv131 = append(yyv131, PetSet{}) // var yyz131 PetSet
yyv131 = append(yyv131, StatefulSet{}) // var yyz131 StatefulSet
yyc131 = true
}
yyh131.ElemContainerState(yyj131)
if yyj131 < len(yyv131) {
if r.TryDecodeAsNil() {
yyv131[yyj131] = PetSet{}
yyv131[yyj131] = StatefulSet{}
} else {
yyv134 := &yyv131[yyj131]
yyv134.CodecDecodeSelf(d)
@ -1647,7 +1647,7 @@ func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) {
yyv131 = yyv131[:yyj131]
yyc131 = true
} else if yyj131 == 0 && yyv131 == nil {
yyv131 = []PetSet{}
yyv131 = []StatefulSet{}
yyc131 = true
}
}

View file

@ -14,81 +14,90 @@ 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"
"k8s.io/kubernetes/pkg/api/v1"
)
// PetSet represents a set of pods with consistent identities.
// +genclient=true
// StatefulSet represents a set of pods with consistent identities.
// Identities are defined as:
// - Network: A single stable DNS and hostname.
// - Storage: As many VolumeClaims as requested.
// The PetSet guarantees that a given network identity will always
// map to the same storage identity. PetSet is currently in alpha
// and subject to change without notice.
type PetSet struct {
// The StatefulSet guarantees that a given network identity will always
// map to the same storage identity.
type StatefulSet struct {
unversioned.TypeMeta `json:",inline"`
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the desired identities of pets in this set.
Spec PetSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
// Spec defines the desired identities of pods in this set.
// +optional
Spec StatefulSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
// Status is the current status of Pets in this PetSet. This data
// Status is the current status of Pods in this StatefulSet. This data
// may be out of date by some window of time.
Status PetSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
// +optional
Status StatefulSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}
// A PetSetSpec is the specification of a PetSet.
type PetSetSpec struct {
// A StatefulSetSpec is the specification of a StatefulSet.
type StatefulSetSpec struct {
// 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
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
// 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://releases.k8s.io/release-1.4/docs/user-guide/labels.md#label-selectors
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
// +optional
Selector *unversioned.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
// Template is the object that describes the pod that will be created if
// insufficient replicas are detected. Each pod stamped out by the PetSet
// insufficient replicas are detected. Each pod stamped out by the StatefulSet
// will fulfill this Template, but have a unique identity from the rest
// of the PetSet.
// of the StatefulSet.
Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
// VolumeClaimTemplates is a list of claims that pets are allowed to reference.
// The PetSet controller is responsible for mapping network identities to
// claims in a way that maintains the identity of a pet. Every claim in
// VolumeClaimTemplates is a list of claims that pods are allowed to reference.
// The StatefulSet controller is responsible for mapping network identities to
// claims in a way that maintains the identity of a pod. Every claim in
// this list must have at least one matching (by name) volumeMount in one
// container in the template. A claim in this list takes precedence over
// any volumes in the template, with the same name.
// TODO: Define the behavior if a claim already exists with the same name.
// +optional
VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"`
// ServiceName is the name of the service that governs this PetSet.
// This service must exist before the PetSet, and is responsible for
// the network identity of the set. Pets get DNS/hostnames that follow the
// pattern: pet-specific-string.serviceName.default.svc.cluster.local
// where "pet-specific-string" is managed by the PetSet controller.
// ServiceName is the name of the service that governs this StatefulSet.
// This service must exist before the StatefulSet, and is responsible for
// the network identity of the set. Pods get DNS/hostnames that follow the
// pattern: pod-specific-string.serviceName.default.svc.cluster.local
// where "pod-specific-string" is managed by the StatefulSet controller.
ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"`
}
// PetSetStatus represents the current state of a PetSet.
type PetSetStatus struct {
// StatefulSetStatus represents the current state of a StatefulSet.
type StatefulSetStatus struct {
// most recent generation observed by this autoscaler.
// +optional
ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
// Replicas is the number of actual replicas.
Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"`
}
// PetSetList is a collection of PetSets.
type PetSetList struct {
// StatefulSetList is a collection of StatefulSets.
type StatefulSetList struct {
unversioned.TypeMeta `json:",inline"`
// +optional
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []PetSet `json:"items" protobuf:"bytes,2,rep,name=items"`
Items []StatefulSet `json:"items" protobuf:"bytes,2,rep,name=items"`
}

View file

@ -0,0 +1,71 @@
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1beta1
// 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.",
"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

View file

@ -0,0 +1,172 @@
// +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 v1beta1
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_v1beta1_StatefulSet_To_apps_StatefulSet,
Convert_apps_StatefulSet_To_v1beta1_StatefulSet,
Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList,
Convert_apps_StatefulSetList_To_v1beta1_StatefulSetList,
Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec,
Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec,
Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus,
Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus,
)
}
func autoConvert_v1beta1_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_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
func Convert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error {
return autoConvert_v1beta1_StatefulSet_To_apps_StatefulSet(in, out, s)
}
func autoConvert_apps_StatefulSet_To_v1beta1_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_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
func Convert_apps_StatefulSet_To_v1beta1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error {
return autoConvert_apps_StatefulSet_To_v1beta1_StatefulSet(in, out, s)
}
func autoConvert_v1beta1_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_v1beta1_StatefulSet_To_apps_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in *StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error {
return autoConvert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in, out, s)
}
func autoConvert_apps_StatefulSetList_To_v1beta1_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_v1beta1_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
func Convert_apps_StatefulSetList_To_v1beta1_StatefulSetList(in *apps.StatefulSetList, out *StatefulSetList, s conversion.Scope) error {
return autoConvert_apps_StatefulSetList_To_v1beta1_StatefulSetList(in, out, s)
}
func autoConvert_v1beta1_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_v1beta1_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_v1beta1_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_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error {
return autoConvert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in, out, s)
}
func autoConvert_apps_StatefulSetStatus_To_v1beta1_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_v1beta1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error {
return autoConvert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in, out, s)
}

View file

@ -18,7 +18,7 @@ limitations under the License.
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package v1alpha1
package v1beta1
import (
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
@ -36,42 +36,42 @@ func init() {
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSet, InType: reflect.TypeOf(&PetSet{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetList, InType: reflect.TypeOf(&PetSetList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})},
)
}
func DeepCopy_v1alpha1_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error {
func DeepCopy_v1beta1_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*PetSet)
out := out.(*PetSet)
in := in.(*StatefulSet)
out := out.(*StatefulSet)
out.TypeMeta = in.TypeMeta
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_v1alpha1_PetSetSpec(&in.Spec, &out.Spec, c); err != nil {
if err := DeepCopy_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
if err := DeepCopy_v1alpha1_PetSetStatus(&in.Status, &out.Status, c); err != nil {
if err := DeepCopy_v1beta1_StatefulSetStatus(&in.Status, &out.Status, c); err != nil {
return err
}
return nil
}
}
func DeepCopy_v1alpha1_PetSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
func DeepCopy_v1beta1_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*PetSetList)
out := out.(*PetSetList)
in := in.(*StatefulSetList)
out := out.(*StatefulSetList)
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]PetSet, len(*in))
*out = make([]StatefulSet, len(*in))
for i := range *in {
if err := DeepCopy_v1alpha1_PetSet(&(*in)[i], &(*out)[i], c); err != nil {
if err := DeepCopy_v1beta1_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
@ -82,10 +82,10 @@ func DeepCopy_v1alpha1_PetSetList(in interface{}, out interface{}, c *conversion
}
}
func DeepCopy_v1alpha1_PetSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
func DeepCopy_v1beta1_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*PetSetSpec)
out := out.(*PetSetSpec)
in := in.(*StatefulSetSpec)
out := out.(*StatefulSetSpec)
if in.Replicas != nil {
in, out := &in.Replicas, &out.Replicas
*out = new(int32)
@ -121,10 +121,10 @@ func DeepCopy_v1alpha1_PetSetSpec(in interface{}, out interface{}, c *conversion
}
}
func DeepCopy_v1alpha1_PetSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
func DeepCopy_v1beta1_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*PetSetStatus)
out := out.(*PetSetStatus)
in := in.(*StatefulSetStatus)
out := out.(*StatefulSetStatus)
if in.ObservedGeneration != nil {
in, out := &in.ObservedGeneration, &out.ObservedGeneration
*out = new(int64)

View file

@ -0,0 +1,166 @@
// +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 v1beta1
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)
}
}

View file

@ -36,42 +36,42 @@ func init() {
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSet, InType: reflect.TypeOf(&PetSet{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetList, InType: reflect.TypeOf(&PetSetList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})},
)
}
func DeepCopy_apps_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error {
func DeepCopy_apps_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*PetSet)
out := out.(*PetSet)
in := in.(*StatefulSet)
out := out.(*StatefulSet)
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_apps_PetSetSpec(&in.Spec, &out.Spec, c); err != nil {
if err := DeepCopy_apps_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
if err := DeepCopy_apps_PetSetStatus(&in.Status, &out.Status, c); err != nil {
if err := DeepCopy_apps_StatefulSetStatus(&in.Status, &out.Status, c); err != nil {
return err
}
return nil
}
}
func DeepCopy_apps_PetSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
func DeepCopy_apps_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*PetSetList)
out := out.(*PetSetList)
in := in.(*StatefulSetList)
out := out.(*StatefulSetList)
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]PetSet, len(*in))
*out = make([]StatefulSet, len(*in))
for i := range *in {
if err := DeepCopy_apps_PetSet(&(*in)[i], &(*out)[i], c); err != nil {
if err := DeepCopy_apps_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
@ -82,10 +82,10 @@ func DeepCopy_apps_PetSetList(in interface{}, out interface{}, c *conversion.Clo
}
}
func DeepCopy_apps_PetSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
func DeepCopy_apps_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*PetSetSpec)
out := out.(*PetSetSpec)
in := in.(*StatefulSetSpec)
out := out.(*StatefulSetSpec)
out.Replicas = in.Replicas
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
@ -115,10 +115,10 @@ func DeepCopy_apps_PetSetSpec(in interface{}, out interface{}, c *conversion.Clo
}
}
func DeepCopy_apps_PetSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
func DeepCopy_apps_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*PetSetStatus)
out := out.(*PetSetStatus)
in := in.(*StatefulSetStatus)
out := out.(*StatefulSetStatus)
if in.ObservedGeneration != nil {
in, out := &in.ObservedGeneration, &out.ObservedGeneration
*out = new(int64)