mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Merge pull request #35663 from janetkuo/statefulset
Automatic merge from submit-queue Rename PetSet to StatefulSet <!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md 2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md 3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes --> **What this PR does / why we need it**: #35534 **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: **Special notes for your reviewer**: cc @erictune @foxish @kubernetes/sig-apps @ymqytw **Release note**: <!-- Steps to write your release note: 1. Use the release-note-* labels to set the release note state (if you have access) 2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. --> ```release-note ```
This commit is contained in:
@@ -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{},
|
||||
)
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,30 +23,30 @@ import (
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// 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
|
||||
// The StatefulSet guarantees that a given network identity will always
|
||||
// map to the same storage identity. StatefulSet is currently in alpha and
|
||||
// and subject to change without notice.
|
||||
type PetSet struct {
|
||||
type StatefulSet struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
// Spec defines the desired identities of pets in this set.
|
||||
// Spec defines the desired identities of pods in this set.
|
||||
// +optional
|
||||
Spec PetSetSpec `json:"spec,omitempty"`
|
||||
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.
|
||||
// +optional
|
||||
Status PetSetStatus `json:"status,omitempty"`
|
||||
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.
|
||||
@@ -62,14 +62,14 @@ type PetSetSpec struct {
|
||||
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.
|
||||
@@ -77,16 +77,16 @@ type PetSetSpec struct {
|
||||
// +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"`
|
||||
@@ -95,10 +95,10 @@ type PetSetStatus struct {
|
||||
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"`
|
||||
}
|
||||
|
||||
@@ -33,14 +33,14 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
||||
// it, but a plain int32 is more convenient in the internal type. These
|
||||
// functions are the same as the autogenerated ones in every other way.
|
||||
err := scheme.AddConversionFuncs(
|
||||
Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec,
|
||||
Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec,
|
||||
Convert_v1alpha1_StatefulSetSpec_To_apps_StatefulSetSpec,
|
||||
Convert_apps_StatefulSetSpec_To_v1alpha1_StatefulSetSpec,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return api.Scheme.AddFieldLabelConversionFunc("apps/v1alpha1", "PetSet",
|
||||
return api.Scheme.AddFieldLabelConversionFunc("apps/v1alpha1", "StatefulSet",
|
||||
func(label, value string) (string, string, error) {
|
||||
switch label {
|
||||
case "metadata.name", "metadata.namespace", "status.successful":
|
||||
@@ -52,7 +52,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
|
||||
)
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(in *PetSetSpec, out *apps.PetSetSpec, s conversion.Scope) error {
|
||||
func Convert_v1alpha1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec, out *apps.StatefulSetSpec, s conversion.Scope) error {
|
||||
if in.Replicas != nil {
|
||||
out.Replicas = *in.Replicas
|
||||
}
|
||||
@@ -83,7 +83,7 @@ func Convert_v1alpha1_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_v1alpha1_StatefulSetSpec(in *apps.StatefulSetSpec, out *StatefulSetSpec, s conversion.Scope) error {
|
||||
out.Replicas = new(int32)
|
||||
*out.Replicas = in.Replicas
|
||||
if in.Selector != nil {
|
||||
|
||||
@@ -24,11 +24,11 @@ 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 {
|
||||
|
||||
@@ -25,10 +25,10 @@ limitations under the License.
|
||||
k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto
|
||||
|
||||
It has these top-level messages:
|
||||
PetSet
|
||||
PetSetList
|
||||
PetSetSpec
|
||||
PetSetStatus
|
||||
StatefulSet
|
||||
StatefulSetList
|
||||
StatefulSetSpec
|
||||
StatefulSetStatus
|
||||
*/
|
||||
package v1alpha1
|
||||
|
||||
@@ -53,29 +53,29 @@ var _ = math.Inf
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
const _ = proto.GoGoProtoPackageIsVersion1
|
||||
|
||||
func (m *PetSet) Reset() { *m = PetSet{} }
|
||||
func (*PetSet) ProtoMessage() {}
|
||||
func (*PetSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
|
||||
func (m *StatefulSet) Reset() { *m = StatefulSet{} }
|
||||
func (*StatefulSet) ProtoMessage() {}
|
||||
func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
|
||||
|
||||
func (m *PetSetList) Reset() { *m = PetSetList{} }
|
||||
func (*PetSetList) ProtoMessage() {}
|
||||
func (*PetSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
|
||||
func (m *StatefulSetList) Reset() { *m = StatefulSetList{} }
|
||||
func (*StatefulSetList) ProtoMessage() {}
|
||||
func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
|
||||
|
||||
func (m *PetSetSpec) Reset() { *m = PetSetSpec{} }
|
||||
func (*PetSetSpec) ProtoMessage() {}
|
||||
func (*PetSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
|
||||
func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} }
|
||||
func (*StatefulSetSpec) ProtoMessage() {}
|
||||
func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
|
||||
|
||||
func (m *PetSetStatus) Reset() { *m = PetSetStatus{} }
|
||||
func (*PetSetStatus) ProtoMessage() {}
|
||||
func (*PetSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
|
||||
func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} }
|
||||
func (*StatefulSetStatus) ProtoMessage() {}
|
||||
func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*PetSet)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSet")
|
||||
proto.RegisterType((*PetSetList)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetList")
|
||||
proto.RegisterType((*PetSetSpec)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetSpec")
|
||||
proto.RegisterType((*PetSetStatus)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSetStatus")
|
||||
proto.RegisterType((*StatefulSet)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.StatefulSet")
|
||||
proto.RegisterType((*StatefulSetList)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.StatefulSetList")
|
||||
proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.StatefulSetSpec")
|
||||
proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.StatefulSetStatus")
|
||||
}
|
||||
func (m *PetSet) Marshal() (data []byte, err error) {
|
||||
func (m *StatefulSet) Marshal() (data []byte, err error) {
|
||||
size := m.Size()
|
||||
data = make([]byte, size)
|
||||
n, err := m.MarshalTo(data)
|
||||
@@ -85,7 +85,7 @@ func (m *PetSet) Marshal() (data []byte, err error) {
|
||||
return data[:n], nil
|
||||
}
|
||||
|
||||
func (m *PetSet) MarshalTo(data []byte) (int, error) {
|
||||
func (m *StatefulSet) MarshalTo(data []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
@@ -117,7 +117,7 @@ func (m *PetSet) MarshalTo(data []byte) (int, error) {
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *PetSetList) Marshal() (data []byte, err error) {
|
||||
func (m *StatefulSetList) Marshal() (data []byte, err error) {
|
||||
size := m.Size()
|
||||
data = make([]byte, size)
|
||||
n, err := m.MarshalTo(data)
|
||||
@@ -127,7 +127,7 @@ func (m *PetSetList) Marshal() (data []byte, err error) {
|
||||
return data[:n], nil
|
||||
}
|
||||
|
||||
func (m *PetSetList) MarshalTo(data []byte) (int, error) {
|
||||
func (m *StatefulSetList) MarshalTo(data []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
@@ -155,7 +155,7 @@ func (m *PetSetList) MarshalTo(data []byte) (int, error) {
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *PetSetSpec) Marshal() (data []byte, err error) {
|
||||
func (m *StatefulSetSpec) Marshal() (data []byte, err error) {
|
||||
size := m.Size()
|
||||
data = make([]byte, size)
|
||||
n, err := m.MarshalTo(data)
|
||||
@@ -165,7 +165,7 @@ func (m *PetSetSpec) Marshal() (data []byte, err error) {
|
||||
return data[:n], nil
|
||||
}
|
||||
|
||||
func (m *PetSetSpec) MarshalTo(data []byte) (int, error) {
|
||||
func (m *StatefulSetSpec) MarshalTo(data []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
@@ -212,7 +212,7 @@ func (m *PetSetSpec) MarshalTo(data []byte) (int, error) {
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *PetSetStatus) Marshal() (data []byte, err error) {
|
||||
func (m *StatefulSetStatus) Marshal() (data []byte, err error) {
|
||||
size := m.Size()
|
||||
data = make([]byte, size)
|
||||
n, err := m.MarshalTo(data)
|
||||
@@ -222,7 +222,7 @@ func (m *PetSetStatus) Marshal() (data []byte, err error) {
|
||||
return data[:n], nil
|
||||
}
|
||||
|
||||
func (m *PetSetStatus) MarshalTo(data []byte) (int, error) {
|
||||
func (m *StatefulSetStatus) MarshalTo(data []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
@@ -265,7 +265,7 @@ func encodeVarintGenerated(data []byte, offset int, v uint64) int {
|
||||
data[offset] = uint8(v)
|
||||
return offset + 1
|
||||
}
|
||||
func (m *PetSet) Size() (n int) {
|
||||
func (m *StatefulSet) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = m.ObjectMeta.Size()
|
||||
@@ -277,7 +277,7 @@ func (m *PetSet) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *PetSetList) Size() (n int) {
|
||||
func (m *StatefulSetList) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = m.ListMeta.Size()
|
||||
@@ -291,7 +291,7 @@ func (m *PetSetList) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *PetSetSpec) Size() (n int) {
|
||||
func (m *StatefulSetSpec) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
if m.Replicas != nil {
|
||||
@@ -314,7 +314,7 @@ func (m *PetSetSpec) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *PetSetStatus) Size() (n int) {
|
||||
func (m *StatefulSetStatus) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
if m.ObservedGeneration != nil {
|
||||
@@ -337,34 +337,34 @@ func sovGenerated(x uint64) (n int) {
|
||||
func sozGenerated(x uint64) (n int) {
|
||||
return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (this *PetSet) String() string {
|
||||
func (this *StatefulSet) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&PetSet{`,
|
||||
s := strings.Join([]string{`&StatefulSet{`,
|
||||
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
|
||||
`Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PetSetSpec", "PetSetSpec", 1), `&`, ``, 1) + `,`,
|
||||
`Status:` + strings.Replace(strings.Replace(this.Status.String(), "PetSetStatus", "PetSetStatus", 1), `&`, ``, 1) + `,`,
|
||||
`Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`,
|
||||
`Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *PetSetList) String() string {
|
||||
func (this *StatefulSetList) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&PetSetList{`,
|
||||
s := strings.Join([]string{`&StatefulSetList{`,
|
||||
`ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`,
|
||||
`Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PetSet", "PetSet", 1), `&`, ``, 1) + `,`,
|
||||
`Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StatefulSet", "StatefulSet", 1), `&`, ``, 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *PetSetSpec) String() string {
|
||||
func (this *StatefulSetSpec) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&PetSetSpec{`,
|
||||
s := strings.Join([]string{`&StatefulSetSpec{`,
|
||||
`Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
|
||||
`Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_kubernetes_pkg_api_unversioned.LabelSelector", 1) + `,`,
|
||||
`Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
|
||||
@@ -374,11 +374,11 @@ func (this *PetSetSpec) String() string {
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *PetSetStatus) String() string {
|
||||
func (this *StatefulSetStatus) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&PetSetStatus{`,
|
||||
s := strings.Join([]string{`&StatefulSetStatus{`,
|
||||
`ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
|
||||
`Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
|
||||
`}`,
|
||||
@@ -393,7 +393,7 @@ func valueToStringGenerated(v interface{}) string {
|
||||
pv := reflect.Indirect(rv).Interface()
|
||||
return fmt.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *PetSet) Unmarshal(data []byte) error {
|
||||
func (m *StatefulSet) Unmarshal(data []byte) error {
|
||||
l := len(data)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -416,10 +416,10 @@ func (m *PetSet) Unmarshal(data []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: PetSet: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: StatefulSet: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: PetSet: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: StatefulSet: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
@@ -533,7 +533,7 @@ func (m *PetSet) Unmarshal(data []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *PetSetList) Unmarshal(data []byte) error {
|
||||
func (m *StatefulSetList) Unmarshal(data []byte) error {
|
||||
l := len(data)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -556,10 +556,10 @@ func (m *PetSetList) Unmarshal(data []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: PetSetList: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: StatefulSetList: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: PetSetList: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: StatefulSetList: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
@@ -618,7 +618,7 @@ func (m *PetSetList) Unmarshal(data []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Items = append(m.Items, PetSet{})
|
||||
m.Items = append(m.Items, StatefulSet{})
|
||||
if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -644,7 +644,7 @@ func (m *PetSetList) Unmarshal(data []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *PetSetSpec) Unmarshal(data []byte) error {
|
||||
func (m *StatefulSetSpec) Unmarshal(data []byte) error {
|
||||
l := len(data)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -667,10 +667,10 @@ func (m *PetSetSpec) Unmarshal(data []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: PetSetSpec: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: StatefulSetSpec: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: PetSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: StatefulSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
@@ -837,7 +837,7 @@ func (m *PetSetSpec) Unmarshal(data []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *PetSetStatus) Unmarshal(data []byte) error {
|
||||
func (m *StatefulSetStatus) Unmarshal(data []byte) error {
|
||||
l := len(data)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -860,10 +860,10 @@ func (m *PetSetStatus) Unmarshal(data []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: PetSetStatus: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: StatefulSetStatus: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: PetSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: StatefulSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
@@ -1032,44 +1032,45 @@ var (
|
||||
)
|
||||
|
||||
var fileDescriptorGenerated = []byte{
|
||||
// 619 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x93, 0xcf, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xc6, 0xe3, 0xa4, 0xa9, 0xc2, 0xa6, 0x20, 0xb4, 0x54, 0x28, 0x8a, 0x90, 0x5b, 0xe5, 0x14,
|
||||
0xa1, 0x76, 0x4d, 0x0a, 0x45, 0x3d, 0x1b, 0x09, 0x84, 0x04, 0xb4, 0x72, 0xa0, 0x42, 0x20, 0x2a,
|
||||
0xad, 0x9d, 0xc1, 0x5d, 0x62, 0x7b, 0x2d, 0xef, 0xda, 0x67, 0x0e, 0x70, 0xe7, 0xcc, 0x63, 0xf0,
|
||||
0x08, 0x9c, 0x7a, 0xec, 0x91, 0x53, 0x45, 0xcd, 0x8b, 0x20, 0xaf, 0xff, 0x24, 0xd4, 0x49, 0x4b,
|
||||
0x6f, 0x99, 0xf5, 0x7c, 0xbf, 0x99, 0xf9, 0x66, 0x82, 0xf6, 0xa6, 0x7b, 0x82, 0x30, 0x6e, 0x4c,
|
||||
0x63, 0x1b, 0xa2, 0x00, 0x24, 0x08, 0x23, 0x9c, 0xba, 0x06, 0x0d, 0x99, 0x30, 0x68, 0x18, 0x0a,
|
||||
0x23, 0x19, 0x51, 0x2f, 0x3c, 0xa6, 0x23, 0xc3, 0x85, 0x00, 0x22, 0x2a, 0x61, 0x42, 0xc2, 0x88,
|
||||
0x4b, 0x8e, 0x87, 0xb9, 0x92, 0xcc, 0x94, 0x24, 0x9c, 0xba, 0x24, 0x53, 0x92, 0x4c, 0x49, 0x4a,
|
||||
0x65, 0x7f, 0xdb, 0x65, 0xf2, 0x38, 0xb6, 0x89, 0xc3, 0x7d, 0xc3, 0xe5, 0x2e, 0x37, 0x14, 0xc0,
|
||||
0x8e, 0x3f, 0xaa, 0x48, 0x05, 0xea, 0x57, 0x0e, 0xee, 0xef, 0x2c, 0x6d, 0xc9, 0x88, 0x40, 0xf0,
|
||||
0x38, 0x72, 0xe0, 0x62, 0x33, 0xfd, 0xdd, 0xe5, 0x9a, 0x38, 0x48, 0x20, 0x12, 0x8c, 0x07, 0x30,
|
||||
0xa9, 0xc9, 0xb6, 0x96, 0xcb, 0x92, 0xda, 0xc4, 0xfd, 0xed, 0xc5, 0xd9, 0x51, 0x1c, 0x48, 0xe6,
|
||||
0xd7, 0x7b, 0x1a, 0x2d, 0x4e, 0x8f, 0x25, 0xf3, 0x0c, 0x16, 0x48, 0x21, 0xa3, 0x8b, 0x92, 0xc1,
|
||||
0xf7, 0x26, 0x5a, 0x3d, 0x00, 0x39, 0x06, 0x89, 0xdf, 0xa2, 0x8e, 0x0f, 0x92, 0x4e, 0xa8, 0xa4,
|
||||
0x3d, 0x6d, 0x53, 0x1b, 0x76, 0x77, 0x86, 0x64, 0xa9, 0xe3, 0x24, 0x19, 0x91, 0x7d, 0xfb, 0x13,
|
||||
0x38, 0xf2, 0x25, 0x48, 0x6a, 0xe2, 0x93, 0xb3, 0x8d, 0x46, 0x7a, 0xb6, 0x81, 0x66, 0x6f, 0x56,
|
||||
0x45, 0xc3, 0x87, 0x68, 0x45, 0x84, 0xe0, 0xf4, 0x9a, 0x8a, 0xfa, 0x88, 0xfc, 0xef, 0x1e, 0x49,
|
||||
0xde, 0xd9, 0x38, 0x04, 0xc7, 0x5c, 0x2b, 0x2a, 0xac, 0x64, 0x91, 0xa5, 0x78, 0xf8, 0x08, 0xad,
|
||||
0x0a, 0x49, 0x65, 0x2c, 0x7a, 0x2d, 0x45, 0x7e, 0x7c, 0x6d, 0xb2, 0x52, 0x9b, 0xb7, 0x0a, 0xf6,
|
||||
0x6a, 0x1e, 0x5b, 0x05, 0x75, 0xf0, 0x53, 0x43, 0x28, 0x4f, 0x7c, 0xc1, 0x84, 0xc4, 0x1f, 0x6a,
|
||||
0x06, 0x19, 0x97, 0x18, 0x34, 0x77, 0x05, 0x24, 0x93, 0x2b, 0x9f, 0x6e, 0x17, 0x95, 0x3a, 0xe5,
|
||||
0xcb, 0x9c, 0x4b, 0x6f, 0x50, 0x9b, 0x49, 0xf0, 0x45, 0xaf, 0xb9, 0xd9, 0x1a, 0x76, 0x77, 0x1e,
|
||||
0x5c, 0x77, 0x18, 0xf3, 0x66, 0x01, 0x6f, 0x3f, 0xcf, 0x30, 0x56, 0x4e, 0x1b, 0xfc, 0x68, 0x95,
|
||||
0x43, 0x64, 0xce, 0xe1, 0x21, 0xea, 0x44, 0x10, 0x7a, 0xcc, 0xa1, 0x42, 0x0d, 0xd1, 0x36, 0xd7,
|
||||
0xb2, 0x7e, 0xac, 0xe2, 0xcd, 0xaa, 0xbe, 0xe2, 0x23, 0xd4, 0x11, 0xe0, 0x81, 0x23, 0x79, 0x74,
|
||||
0xf5, 0xe6, 0xfe, 0x1d, 0x97, 0xda, 0xe0, 0x8d, 0x0b, 0x6d, 0xce, 0x2f, 0x23, 0xab, 0x62, 0xe2,
|
||||
0xf7, 0xa8, 0x23, 0xc1, 0x0f, 0x3d, 0x2a, 0xa1, 0xd8, 0xdf, 0xf6, 0xe5, 0xf7, 0x76, 0xc0, 0x27,
|
||||
0xaf, 0x0b, 0x81, 0x3a, 0x89, 0xca, 0xcc, 0xf2, 0xd5, 0xaa, 0x80, 0xf8, 0xab, 0x86, 0xd6, 0x13,
|
||||
0xee, 0xc5, 0x3e, 0x3c, 0xf1, 0x28, 0xf3, 0xcb, 0x0c, 0xd1, 0x5b, 0x51, 0xe6, 0x3e, 0xbc, 0xa2,
|
||||
0x52, 0x36, 0x8a, 0x90, 0x10, 0xc8, 0xc3, 0x19, 0xc3, 0xbc, 0x57, 0xd4, 0x5b, 0x3f, 0x5c, 0x00,
|
||||
0xb6, 0x16, 0x96, 0xc3, 0xbb, 0xa8, 0x2b, 0x20, 0x4a, 0x98, 0x03, 0xaf, 0xa8, 0x0f, 0xbd, 0xf6,
|
||||
0xa6, 0x36, 0xbc, 0x61, 0xde, 0x29, 0x40, 0xdd, 0xf1, 0xec, 0x93, 0x35, 0x9f, 0x37, 0xf8, 0xa2,
|
||||
0xa1, 0xb5, 0xf9, 0x13, 0xc5, 0x4f, 0x11, 0xe6, 0x76, 0x96, 0x01, 0x93, 0x67, 0xf9, 0x5f, 0x98,
|
||||
0xf1, 0x40, 0x2d, 0xb0, 0x65, 0xde, 0x4d, 0xcf, 0x36, 0xf0, 0x7e, 0xed, 0xab, 0xb5, 0x40, 0x81,
|
||||
0xb7, 0xe6, 0xd6, 0xdf, 0x54, 0xeb, 0xaf, 0x5c, 0xac, 0x9f, 0x80, 0x79, 0xff, 0xe4, 0x5c, 0x6f,
|
||||
0x9c, 0x9e, 0xeb, 0x8d, 0x5f, 0xe7, 0x7a, 0xe3, 0x73, 0xaa, 0x6b, 0x27, 0xa9, 0xae, 0x9d, 0xa6,
|
||||
0xba, 0xf6, 0x3b, 0xd5, 0xb5, 0x6f, 0x7f, 0xf4, 0xc6, 0xbb, 0x4e, 0x79, 0x84, 0x7f, 0x03, 0x00,
|
||||
0x00, 0xff, 0xff, 0x14, 0xcf, 0x45, 0x01, 0xd8, 0x05, 0x00, 0x00,
|
||||
// 628 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x93, 0xcd, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xc7, 0xe3, 0xa4, 0xa9, 0xc2, 0xa6, 0x7c, 0x2d, 0x15, 0x8a, 0x22, 0xe4, 0x56, 0x39, 0x45,
|
||||
0xa8, 0x5d, 0x2b, 0x85, 0x4a, 0x45, 0xdc, 0x8c, 0x04, 0x42, 0x02, 0x8a, 0x1c, 0x54, 0xa1, 0x56,
|
||||
0x20, 0x6d, 0x9c, 0x69, 0xba, 0xc4, 0xf6, 0x5a, 0xde, 0x71, 0xce, 0x5c, 0x38, 0x70, 0xe3, 0x35,
|
||||
0x78, 0x02, 0x5e, 0xa1, 0x07, 0x0e, 0x3d, 0x72, 0xaa, 0x48, 0x78, 0x11, 0xe4, 0xcd, 0xe6, 0x83,
|
||||
0x3a, 0x29, 0x55, 0x6f, 0x9e, 0xdd, 0xf9, 0xff, 0x66, 0xe6, 0xbf, 0x63, 0xb2, 0xd7, 0xdf, 0x53,
|
||||
0x4c, 0x48, 0xa7, 0x9f, 0x76, 0x20, 0x89, 0x00, 0x41, 0x39, 0x71, 0xbf, 0xe7, 0xf0, 0x58, 0x28,
|
||||
0x87, 0xc7, 0xb1, 0x72, 0x06, 0x2d, 0x1e, 0xc4, 0x27, 0xbc, 0xe5, 0xf4, 0x20, 0x82, 0x84, 0x23,
|
||||
0x74, 0x59, 0x9c, 0x48, 0x94, 0xb4, 0x39, 0x56, 0xb2, 0x99, 0x92, 0xc5, 0xfd, 0x1e, 0xcb, 0x94,
|
||||
0x2c, 0x53, 0xb2, 0x89, 0xb2, 0xbe, 0xdd, 0x13, 0x78, 0x92, 0x76, 0x98, 0x2f, 0x43, 0xa7, 0x27,
|
||||
0x7b, 0xd2, 0xd1, 0x80, 0x4e, 0x7a, 0xac, 0x23, 0x1d, 0xe8, 0xaf, 0x31, 0xb8, 0xbe, 0xb3, 0xb4,
|
||||
0x25, 0x27, 0x01, 0x25, 0xd3, 0xc4, 0x87, 0x8b, 0xcd, 0xd4, 0x77, 0x97, 0x6b, 0xd2, 0x68, 0x00,
|
||||
0x89, 0x12, 0x32, 0x82, 0x6e, 0x4e, 0xb6, 0xb5, 0x5c, 0x36, 0xc8, 0x4d, 0x5c, 0xdf, 0x5e, 0x9c,
|
||||
0x9d, 0xa4, 0x11, 0x8a, 0x30, 0xdf, 0x53, 0x6b, 0x71, 0x7a, 0x8a, 0x22, 0x70, 0x44, 0x84, 0x0a,
|
||||
0x93, 0x8b, 0x92, 0xc6, 0xf7, 0x22, 0xa9, 0xb6, 0x91, 0x23, 0x1c, 0xa7, 0x41, 0x1b, 0x90, 0xbe,
|
||||
0x27, 0x95, 0x10, 0x90, 0x77, 0x39, 0xf2, 0x9a, 0xb5, 0x69, 0x35, 0xab, 0x3b, 0x4d, 0xb6, 0xd4,
|
||||
0x76, 0x36, 0x68, 0xb1, 0xfd, 0xce, 0x27, 0xf0, 0xf1, 0x35, 0x20, 0x77, 0xe9, 0xe9, 0xf9, 0x46,
|
||||
0x61, 0x74, 0xbe, 0x41, 0x66, 0x67, 0xde, 0x94, 0x46, 0x8f, 0xc8, 0x8a, 0x8a, 0xc1, 0xaf, 0x15,
|
||||
0x35, 0xf5, 0x09, 0xbb, 0xea, 0x63, 0xb2, 0xb9, 0xf6, 0xda, 0x31, 0xf8, 0xee, 0x9a, 0x29, 0xb3,
|
||||
0x92, 0x45, 0x9e, 0x86, 0x52, 0x9f, 0xac, 0x2a, 0xe4, 0x98, 0xaa, 0x5a, 0x49, 0xe3, 0x9f, 0x5e,
|
||||
0x0f, 0xaf, 0x11, 0xee, 0x2d, 0x53, 0x60, 0x75, 0x1c, 0x7b, 0x06, 0xdd, 0xf8, 0x69, 0x91, 0xdb,
|
||||
0x73, 0xd9, 0xaf, 0x84, 0x42, 0xfa, 0x21, 0xe7, 0x97, 0x73, 0x89, 0x5f, 0x73, 0x9b, 0xc1, 0x32,
|
||||
0xb9, 0xb6, 0xed, 0x8e, 0x29, 0x57, 0x99, 0x9c, 0xcc, 0x99, 0x76, 0x48, 0xca, 0x02, 0x21, 0x54,
|
||||
0xb5, 0xe2, 0x66, 0xa9, 0x59, 0xdd, 0xd9, 0xbd, 0xd6, 0x58, 0xee, 0x4d, 0x53, 0xa1, 0xfc, 0x32,
|
||||
0x63, 0x79, 0x63, 0x64, 0xe3, 0x47, 0xe9, 0x9f, 0x71, 0x32, 0x37, 0x69, 0x93, 0x54, 0x12, 0x88,
|
||||
0x03, 0xe1, 0x73, 0xa5, 0xc7, 0x29, 0xbb, 0x6b, 0x59, 0x67, 0x9e, 0x39, 0xf3, 0xa6, 0xb7, 0xf4,
|
||||
0x23, 0xa9, 0x28, 0x08, 0xc0, 0x47, 0x99, 0x98, 0x27, 0x7d, 0x7c, 0xd5, 0xc1, 0x79, 0x07, 0x82,
|
||||
0xb6, 0xd1, 0x8e, 0xf9, 0x93, 0xc8, 0x9b, 0x32, 0xe9, 0x11, 0xa9, 0x20, 0x84, 0x71, 0xc0, 0x11,
|
||||
0xcc, 0x9b, 0x6e, 0x5f, 0xbe, 0x88, 0x6f, 0x65, 0xf7, 0x9d, 0x11, 0xe8, 0x35, 0x99, 0xda, 0x3a,
|
||||
0x39, 0xf5, 0xa6, 0x40, 0xfa, 0xc5, 0x22, 0xeb, 0x03, 0x19, 0xa4, 0x21, 0x3c, 0x0b, 0xb8, 0x08,
|
||||
0x27, 0x19, 0xaa, 0xb6, 0xa2, 0x6d, 0x7e, 0xf4, 0x9f, 0x4a, 0xd9, 0x28, 0x0a, 0x21, 0xc2, 0x83,
|
||||
0x19, 0xc3, 0x7d, 0x60, 0xea, 0xad, 0x1f, 0x2c, 0x00, 0x7b, 0x0b, 0xcb, 0xd1, 0x5d, 0x52, 0x55,
|
||||
0x90, 0x0c, 0x84, 0x0f, 0x6f, 0x78, 0x08, 0xb5, 0xf2, 0xa6, 0xd5, 0xbc, 0xe1, 0xde, 0x33, 0xa0,
|
||||
0x6a, 0x7b, 0x76, 0xe5, 0xcd, 0xe7, 0x35, 0xbe, 0x5a, 0xe4, 0x6e, 0x6e, 0x6d, 0xe9, 0x73, 0x42,
|
||||
0x65, 0x27, 0x4b, 0x83, 0xee, 0x8b, 0xf1, 0x5f, 0x2e, 0x64, 0xa4, 0x5f, 0xb1, 0xe4, 0xde, 0x1f,
|
||||
0x9d, 0x6f, 0xd0, 0xfd, 0xdc, 0xad, 0xb7, 0x40, 0x41, 0xb7, 0xe6, 0x76, 0xa0, 0xa8, 0x77, 0x60,
|
||||
0x6a, 0x65, 0x7e, 0x0f, 0xdc, 0x87, 0xa7, 0x43, 0xbb, 0x70, 0x36, 0xb4, 0x0b, 0xbf, 0x86, 0x76,
|
||||
0xe1, 0xf3, 0xc8, 0xb6, 0x4e, 0x47, 0xb6, 0x75, 0x36, 0xb2, 0xad, 0xdf, 0x23, 0xdb, 0xfa, 0xf6,
|
||||
0xc7, 0x2e, 0x1c, 0x56, 0x26, 0x3b, 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0x02, 0xea, 0x1a, 0x59,
|
||||
0xfb, 0x05, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@@ -30,37 +30,37 @@ import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1alpha1";
|
||||
|
||||
// PetSet represents a set of pods with consistent identities.
|
||||
// StatefulSet represents a set of pods with consistent identities.
|
||||
// Identities are defined as:
|
||||
// - Network: A single stable DNS and hostname.
|
||||
// - Storage: As many VolumeClaims as requested.
|
||||
// The PetSet guarantees that a given network identity will always
|
||||
// map to the same storage identity. PetSet is currently in alpha
|
||||
// The StatefulSet guarantees that a given network identity will always
|
||||
// map to the same storage identity. StatefulSet is currently in alpha
|
||||
// and subject to change without notice.
|
||||
message PetSet {
|
||||
message StatefulSet {
|
||||
// +optional
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec defines the desired identities of pets in this set.
|
||||
// Spec defines the desired identities of pods in this set.
|
||||
// +optional
|
||||
optional PetSetSpec spec = 2;
|
||||
optional StatefulSetSpec spec = 2;
|
||||
|
||||
// Status is the current status of Pets in this PetSet. This data
|
||||
// Status is the current status of Pods in this StatefulSet. This data
|
||||
// may be out of date by some window of time.
|
||||
// +optional
|
||||
optional PetSetStatus status = 3;
|
||||
optional StatefulSetStatus status = 3;
|
||||
}
|
||||
|
||||
// PetSetList is a collection of PetSets.
|
||||
message PetSetList {
|
||||
// StatefulSetList is a collection of StatefulSets.
|
||||
message StatefulSetList {
|
||||
// +optional
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
|
||||
|
||||
repeated PetSet items = 2;
|
||||
repeated StatefulSet items = 2;
|
||||
}
|
||||
|
||||
// A PetSetSpec is the specification of a PetSet.
|
||||
message PetSetSpec {
|
||||
// A StatefulSetSpec is the specification of a StatefulSet.
|
||||
message StatefulSetSpec {
|
||||
// Replicas is the desired number of replicas of the given Template.
|
||||
// These are replicas in the sense that they are instantiations of the
|
||||
// same Template, but individual replicas also have a consistent identity.
|
||||
@@ -76,14 +76,14 @@ message PetSetSpec {
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 2;
|
||||
|
||||
// Template is the object that describes the pod that will be created if
|
||||
// insufficient replicas are detected. Each pod stamped out by the PetSet
|
||||
// insufficient replicas are detected. Each pod stamped out by the StatefulSet
|
||||
// will fulfill this Template, but have a unique identity from the rest
|
||||
// of the PetSet.
|
||||
// of the StatefulSet.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3;
|
||||
|
||||
// VolumeClaimTemplates is a list of claims that pets are allowed to reference.
|
||||
// The PetSet controller is responsible for mapping network identities to
|
||||
// claims in a way that maintains the identity of a pet. Every claim in
|
||||
// VolumeClaimTemplates is a list of claims that pods are allowed to reference.
|
||||
// The StatefulSet controller is responsible for mapping network identities to
|
||||
// claims in a way that maintains the identity of a pod. Every claim in
|
||||
// this list must have at least one matching (by name) volumeMount in one
|
||||
// container in the template. A claim in this list takes precedence over
|
||||
// any volumes in the template, with the same name.
|
||||
@@ -91,16 +91,16 @@ message PetSetSpec {
|
||||
// +optional
|
||||
repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
|
||||
|
||||
// ServiceName is the name of the service that governs this PetSet.
|
||||
// This service must exist before the PetSet, and is responsible for
|
||||
// the network identity of the set. Pets get DNS/hostnames that follow the
|
||||
// pattern: pet-specific-string.serviceName.default.svc.cluster.local
|
||||
// where "pet-specific-string" is managed by the PetSet controller.
|
||||
// ServiceName is the name of the service that governs this StatefulSet.
|
||||
// This service must exist before the StatefulSet, and is responsible for
|
||||
// the network identity of the set. Pods get DNS/hostnames that follow the
|
||||
// pattern: pod-specific-string.serviceName.default.svc.cluster.local
|
||||
// where "pod-specific-string" is managed by the StatefulSet controller.
|
||||
optional string serviceName = 5;
|
||||
}
|
||||
|
||||
// PetSetStatus represents the current state of a PetSet.
|
||||
message PetSetStatus {
|
||||
// StatefulSetStatus represents the current state of a StatefulSet.
|
||||
message StatefulSetStatus {
|
||||
// most recent generation observed by this autoscaler.
|
||||
// +optional
|
||||
optional int64 observedGeneration = 1;
|
||||
|
||||
@@ -37,8 +37,8 @@ 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{},
|
||||
)
|
||||
@@ -46,5 +46,5 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
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 }
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,30 +23,30 @@ import (
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// PetSet represents a set of pods with consistent identities.
|
||||
// StatefulSet represents a set of pods with consistent identities.
|
||||
// Identities are defined as:
|
||||
// - Network: A single stable DNS and hostname.
|
||||
// - Storage: As many VolumeClaims as requested.
|
||||
// The PetSet guarantees that a given network identity will always
|
||||
// map to the same storage identity. PetSet is currently in alpha
|
||||
// The StatefulSet guarantees that a given network identity will always
|
||||
// map to the same storage identity. StatefulSet is currently in alpha
|
||||
// and subject to change without notice.
|
||||
type PetSet struct {
|
||||
type StatefulSet struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec defines the desired identities of pets in this set.
|
||||
// Spec defines the desired identities of pods in this set.
|
||||
// +optional
|
||||
Spec PetSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||
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.
|
||||
// +optional
|
||||
Status PetSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
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.
|
||||
@@ -62,14 +62,14 @@ type PetSetSpec struct {
|
||||
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.
|
||||
@@ -77,16 +77,16 @@ type PetSetSpec struct {
|
||||
// +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"`
|
||||
@@ -95,10 +95,10 @@ type PetSetStatus struct {
|
||||
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"`
|
||||
}
|
||||
|
||||
@@ -27,45 +27,45 @@ package v1alpha1
|
||||
// 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.",
|
||||
var map_StatefulSet = map[string]string{
|
||||
"": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity. StatefulSet is currently in alpha and subject to change without notice.",
|
||||
"spec": "Spec defines the desired identities of pods in this set.",
|
||||
"status": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.",
|
||||
}
|
||||
|
||||
func (PetSet) SwaggerDoc() map[string]string {
|
||||
return map_PetSet
|
||||
func (StatefulSet) SwaggerDoc() map[string]string {
|
||||
return map_StatefulSet
|
||||
}
|
||||
|
||||
var map_PetSetList = map[string]string{
|
||||
"": "PetSetList is a collection of PetSets.",
|
||||
var map_StatefulSetList = map[string]string{
|
||||
"": "StatefulSetList is a collection of StatefulSets.",
|
||||
}
|
||||
|
||||
func (PetSetList) SwaggerDoc() map[string]string {
|
||||
return map_PetSetList
|
||||
func (StatefulSetList) SwaggerDoc() map[string]string {
|
||||
return map_StatefulSetList
|
||||
}
|
||||
|
||||
var map_PetSetSpec = map[string]string{
|
||||
"": "A PetSetSpec is the specification of a PetSet.",
|
||||
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 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.",
|
||||
"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 (PetSetSpec) SwaggerDoc() map[string]string {
|
||||
return map_PetSetSpec
|
||||
func (StatefulSetSpec) SwaggerDoc() map[string]string {
|
||||
return map_StatefulSetSpec
|
||||
}
|
||||
|
||||
var map_PetSetStatus = map[string]string{
|
||||
"": "PetSetStatus represents the current state of a PetSet.",
|
||||
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 (PetSetStatus) SwaggerDoc() map[string]string {
|
||||
return map_PetSetStatus
|
||||
func (StatefulSetStatus) SwaggerDoc() map[string]string {
|
||||
return map_StatefulSetStatus
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
||||
|
||||
@@ -36,60 +36,60 @@ func init() {
|
||||
// Public to allow building arbitrary schemes.
|
||||
func RegisterConversions(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedConversionFuncs(
|
||||
Convert_v1alpha1_PetSet_To_apps_PetSet,
|
||||
Convert_apps_PetSet_To_v1alpha1_PetSet,
|
||||
Convert_v1alpha1_PetSetList_To_apps_PetSetList,
|
||||
Convert_apps_PetSetList_To_v1alpha1_PetSetList,
|
||||
Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec,
|
||||
Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec,
|
||||
Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus,
|
||||
Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus,
|
||||
Convert_v1alpha1_StatefulSet_To_apps_StatefulSet,
|
||||
Convert_apps_StatefulSet_To_v1alpha1_StatefulSet,
|
||||
Convert_v1alpha1_StatefulSetList_To_apps_StatefulSetList,
|
||||
Convert_apps_StatefulSetList_To_v1alpha1_StatefulSetList,
|
||||
Convert_v1alpha1_StatefulSetSpec_To_apps_StatefulSetSpec,
|
||||
Convert_apps_StatefulSetSpec_To_v1alpha1_StatefulSetSpec,
|
||||
Convert_v1alpha1_StatefulSetStatus_To_apps_StatefulSetStatus,
|
||||
Convert_apps_StatefulSetStatus_To_v1alpha1_StatefulSetStatus,
|
||||
)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error {
|
||||
func autoConvert_v1alpha1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error {
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
if err := Convert_v1alpha1_StatefulSetSpec_To_apps_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(&in.Status, &out.Status, s); err != nil {
|
||||
if err := Convert_v1alpha1_StatefulSetStatus_To_apps_StatefulSetStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_PetSet_To_apps_PetSet(in, out, s)
|
||||
func Convert_v1alpha1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_StatefulSet_To_apps_StatefulSet(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_apps_PetSet_To_v1alpha1_PetSet(in *apps.PetSet, out *PetSet, s conversion.Scope) error {
|
||||
func autoConvert_apps_StatefulSet_To_v1alpha1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error {
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
if err := Convert_apps_StatefulSetSpec_To_v1alpha1_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(&in.Status, &out.Status, s); err != nil {
|
||||
if err := Convert_apps_StatefulSetStatus_To_v1alpha1_StatefulSetStatus(&in.Status, &out.Status, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_apps_PetSet_To_v1alpha1_PetSet(in *apps.PetSet, out *PetSet, s conversion.Scope) error {
|
||||
return autoConvert_apps_PetSet_To_v1alpha1_PetSet(in, out, s)
|
||||
func Convert_apps_StatefulSet_To_v1alpha1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error {
|
||||
return autoConvert_apps_StatefulSet_To_v1alpha1_StatefulSet(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_PetSetList_To_apps_PetSetList(in *PetSetList, out *apps.PetSetList, s conversion.Scope) error {
|
||||
func autoConvert_v1alpha1_StatefulSetList_To_apps_StatefulSetList(in *StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]apps.PetSet, len(*in))
|
||||
*out = make([]apps.StatefulSet, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v1alpha1_PetSet_To_apps_PetSet(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
if err := Convert_v1alpha1_StatefulSet_To_apps_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -99,17 +99,17 @@ func autoConvert_v1alpha1_PetSetList_To_apps_PetSetList(in *PetSetList, out *app
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_PetSetList_To_apps_PetSetList(in *PetSetList, out *apps.PetSetList, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_PetSetList_To_apps_PetSetList(in, out, s)
|
||||
func Convert_v1alpha1_StatefulSetList_To_apps_StatefulSetList(in *StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_StatefulSetList_To_apps_StatefulSetList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_apps_PetSetList_To_v1alpha1_PetSetList(in *apps.PetSetList, out *PetSetList, s conversion.Scope) error {
|
||||
func autoConvert_apps_StatefulSetList_To_v1alpha1_StatefulSetList(in *apps.StatefulSetList, out *StatefulSetList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]PetSet, len(*in))
|
||||
*out = make([]StatefulSet, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_apps_PetSet_To_v1alpha1_PetSet(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
if err := Convert_apps_StatefulSet_To_v1alpha1_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -119,11 +119,11 @@ func autoConvert_apps_PetSetList_To_v1alpha1_PetSetList(in *apps.PetSetList, out
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_apps_PetSetList_To_v1alpha1_PetSetList(in *apps.PetSetList, out *PetSetList, s conversion.Scope) error {
|
||||
return autoConvert_apps_PetSetList_To_v1alpha1_PetSetList(in, out, s)
|
||||
func Convert_apps_StatefulSetList_To_v1alpha1_StatefulSetList(in *apps.StatefulSetList, out *StatefulSetList, s conversion.Scope) error {
|
||||
return autoConvert_apps_StatefulSetList_To_v1alpha1_StatefulSetList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(in *PetSetSpec, out *apps.PetSetSpec, s conversion.Scope) error {
|
||||
func autoConvert_v1alpha1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec, out *apps.StatefulSetSpec, s conversion.Scope) error {
|
||||
if err := api.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -147,7 +147,7 @@ func autoConvert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(in *PetSetSpec, out *app
|
||||
return nil
|
||||
}
|
||||
|
||||
func autoConvert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(in *apps.PetSetSpec, out *PetSetSpec, s conversion.Scope) error {
|
||||
func autoConvert_apps_StatefulSetSpec_To_v1alpha1_StatefulSetSpec(in *apps.StatefulSetSpec, out *StatefulSetSpec, s conversion.Scope) error {
|
||||
if err := api.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -171,22 +171,22 @@ func autoConvert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(in *apps.PetSetSpec, out
|
||||
return nil
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in *PetSetStatus, out *apps.PetSetStatus, s conversion.Scope) error {
|
||||
func autoConvert_v1alpha1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error {
|
||||
out.ObservedGeneration = in.ObservedGeneration
|
||||
out.Replicas = in.Replicas
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in *PetSetStatus, out *apps.PetSetStatus, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in, out, s)
|
||||
func Convert_v1alpha1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_StatefulSetStatus_To_apps_StatefulSetStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in *apps.PetSetStatus, out *PetSetStatus, s conversion.Scope) error {
|
||||
func autoConvert_apps_StatefulSetStatus_To_v1alpha1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error {
|
||||
out.ObservedGeneration = in.ObservedGeneration
|
||||
out.Replicas = in.Replicas
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in *apps.PetSetStatus, out *PetSetStatus, s conversion.Scope) error {
|
||||
return autoConvert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in, out, s)
|
||||
func Convert_apps_StatefulSetStatus_To_v1alpha1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error {
|
||||
return autoConvert_apps_StatefulSetStatus_To_v1alpha1_StatefulSetStatus(in, out, s)
|
||||
}
|
||||
|
||||
@@ -36,42 +36,42 @@ func init() {
|
||||
// to allow building arbitrary schemes.
|
||||
func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedDeepCopyFuncs(
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSet, InType: reflect.TypeOf(&PetSet{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetList, InType: reflect.TypeOf(&PetSetList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})},
|
||||
)
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
func DeepCopy_v1alpha1_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*PetSet)
|
||||
out := out.(*PetSet)
|
||||
in := in.(*StatefulSet)
|
||||
out := out.(*StatefulSet)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v1alpha1_PetSetSpec(&in.Spec, &out.Spec, c); err != nil {
|
||||
if err := DeepCopy_v1alpha1_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v1alpha1_PetSetStatus(&in.Status, &out.Status, c); err != nil {
|
||||
if err := DeepCopy_v1alpha1_StatefulSetStatus(&in.Status, &out.Status, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_PetSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
func DeepCopy_v1alpha1_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*PetSetList)
|
||||
out := out.(*PetSetList)
|
||||
in := in.(*StatefulSetList)
|
||||
out := out.(*StatefulSetList)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]PetSet, len(*in))
|
||||
*out = make([]StatefulSet, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_v1alpha1_PetSet(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
if err := DeepCopy_v1alpha1_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -82,10 +82,10 @@ func DeepCopy_v1alpha1_PetSetList(in interface{}, out interface{}, c *conversion
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_PetSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
func DeepCopy_v1alpha1_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*PetSetSpec)
|
||||
out := out.(*PetSetSpec)
|
||||
in := in.(*StatefulSetSpec)
|
||||
out := out.(*StatefulSetSpec)
|
||||
if in.Replicas != nil {
|
||||
in, out := &in.Replicas, &out.Replicas
|
||||
*out = new(int32)
|
||||
@@ -121,10 +121,10 @@ func DeepCopy_v1alpha1_PetSetSpec(in interface{}, out interface{}, c *conversion
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1alpha1_PetSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
func DeepCopy_v1alpha1_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*PetSetStatus)
|
||||
out := out.(*PetSetStatus)
|
||||
in := in.(*StatefulSetStatus)
|
||||
out := out.(*StatefulSetStatus)
|
||||
if in.ObservedGeneration != nil {
|
||||
in, out := &in.ObservedGeneration, &out.ObservedGeneration
|
||||
*out = new(int64)
|
||||
|
||||
@@ -29,13 +29,13 @@ import (
|
||||
// Public to allow building arbitrary schemes.
|
||||
// All generated defaulters are covering - they call all nested defaulters.
|
||||
func RegisterDefaults(scheme *runtime.Scheme) error {
|
||||
scheme.AddTypeDefaultingFunc(&PetSet{}, func(obj interface{}) { SetObjectDefaults_PetSet(obj.(*PetSet)) })
|
||||
scheme.AddTypeDefaultingFunc(&PetSetList{}, func(obj interface{}) { SetObjectDefaults_PetSetList(obj.(*PetSetList)) })
|
||||
scheme.AddTypeDefaultingFunc(&StatefulSet{}, func(obj interface{}) { SetObjectDefaults_StatefulSet(obj.(*StatefulSet)) })
|
||||
scheme.AddTypeDefaultingFunc(&StatefulSetList{}, func(obj interface{}) { SetObjectDefaults_StatefulSetList(obj.(*StatefulSetList)) })
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetObjectDefaults_PetSet(in *PetSet) {
|
||||
SetDefaults_PetSet(in)
|
||||
func SetObjectDefaults_StatefulSet(in *StatefulSet) {
|
||||
SetDefaults_StatefulSet(in)
|
||||
v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
|
||||
for i := range in.Spec.Template.Spec.Volumes {
|
||||
a := &in.Spec.Template.Spec.Volumes[i]
|
||||
@@ -158,9 +158,9 @@ func SetObjectDefaults_PetSet(in *PetSet) {
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_PetSetList(in *PetSetList) {
|
||||
func SetObjectDefaults_StatefulSetList(in *StatefulSetList) {
|
||||
for i := range in.Items {
|
||||
a := &in.Items[i]
|
||||
SetObjectDefaults_PetSet(a)
|
||||
SetObjectDefaults_StatefulSet(a)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,24 +28,24 @@ import (
|
||||
"k8s.io/kubernetes/pkg/util/validation/field"
|
||||
)
|
||||
|
||||
// ValidatePetSetName can be used to check whether the given PetSet name is valid.
|
||||
// ValidateStatefulSetName can be used to check whether the given StatefulSet name is valid.
|
||||
// Prefix indicates this name will be used as part of generation, in which case
|
||||
// trailing dashes are allowed.
|
||||
func ValidatePetSetName(name string, prefix bool) []string {
|
||||
// TODO: Validate that there's name for the suffix inserted by the pets.
|
||||
func ValidateStatefulSetName(name string, prefix bool) []string {
|
||||
// TODO: Validate that there's name for the suffix inserted by the pods.
|
||||
// Currently this is just "-index". In the future we may allow a user
|
||||
// specified list of suffixes and we need to validate the longest one.
|
||||
return apivalidation.NameIsDNSSubdomain(name, prefix)
|
||||
}
|
||||
|
||||
// Validates the given template and ensures that it is in accordance with the desired selector.
|
||||
func ValidatePodTemplateSpecForPetSet(template *api.PodTemplateSpec, selector labels.Selector, fldPath *field.Path) field.ErrorList {
|
||||
func ValidatePodTemplateSpecForStatefulSet(template *api.PodTemplateSpec, selector labels.Selector, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
if template == nil {
|
||||
allErrs = append(allErrs, field.Required(fldPath, ""))
|
||||
} else {
|
||||
if !selector.Empty() {
|
||||
// Verify that the PetSet selector matches the labels in template.
|
||||
// Verify that the StatefulSet selector matches the labels in template.
|
||||
labels := labels.Set(template.Labels)
|
||||
if !selector.Matches(labels) {
|
||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("metadata", "labels"), template.Labels, "`selector` does not match template `labels`"))
|
||||
@@ -62,8 +62,8 @@ func ValidatePodTemplateSpecForPetSet(template *api.PodTemplateSpec, selector la
|
||||
return allErrs
|
||||
}
|
||||
|
||||
// ValidatePetSetSpec tests if required fields in the PetSet spec are set.
|
||||
func ValidatePetSetSpec(spec *apps.PetSetSpec, fldPath *field.Path) field.ErrorList {
|
||||
// ValidateStatefulSetSpec tests if required fields in the StatefulSet spec are set.
|
||||
func ValidateStatefulSetSpec(spec *apps.StatefulSetSpec, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
|
||||
allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(spec.Replicas), fldPath.Child("replicas"))...)
|
||||
@@ -72,7 +72,7 @@ func ValidatePetSetSpec(spec *apps.PetSetSpec, fldPath *field.Path) field.ErrorL
|
||||
} else {
|
||||
allErrs = append(allErrs, unversionedvalidation.ValidateLabelSelector(spec.Selector, fldPath.Child("selector"))...)
|
||||
if len(spec.Selector.MatchLabels)+len(spec.Selector.MatchExpressions) == 0 {
|
||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("selector"), spec.Selector, "empty selector is not valid for petset."))
|
||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("selector"), spec.Selector, "empty selector is not valid for statefulset."))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ func ValidatePetSetSpec(spec *apps.PetSetSpec, fldPath *field.Path) field.ErrorL
|
||||
if err != nil {
|
||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("selector"), spec.Selector, ""))
|
||||
} else {
|
||||
allErrs = append(allErrs, ValidatePodTemplateSpecForPetSet(&spec.Template, selector, fldPath.Child("template"))...)
|
||||
allErrs = append(allErrs, ValidatePodTemplateSpecForStatefulSet(&spec.Template, selector, fldPath.Child("template"))...)
|
||||
}
|
||||
|
||||
if spec.Template.Spec.RestartPolicy != api.RestartPolicyAlways {
|
||||
@@ -90,42 +90,42 @@ func ValidatePetSetSpec(spec *apps.PetSetSpec, fldPath *field.Path) field.ErrorL
|
||||
return allErrs
|
||||
}
|
||||
|
||||
// ValidatePetSet validates a PetSet.
|
||||
func ValidatePetSet(petSet *apps.PetSet) field.ErrorList {
|
||||
allErrs := apivalidation.ValidateObjectMeta(&petSet.ObjectMeta, true, ValidatePetSetName, field.NewPath("metadata"))
|
||||
allErrs = append(allErrs, ValidatePetSetSpec(&petSet.Spec, field.NewPath("spec"))...)
|
||||
// ValidateStatefulSet validates a StatefulSet.
|
||||
func ValidateStatefulSet(statefulSet *apps.StatefulSet) field.ErrorList {
|
||||
allErrs := apivalidation.ValidateObjectMeta(&statefulSet.ObjectMeta, true, ValidateStatefulSetName, field.NewPath("metadata"))
|
||||
allErrs = append(allErrs, ValidateStatefulSetSpec(&statefulSet.Spec, field.NewPath("spec"))...)
|
||||
return allErrs
|
||||
}
|
||||
|
||||
// ValidatePetSetUpdate tests if required fields in the PetSet are set.
|
||||
func ValidatePetSetUpdate(petSet, oldPetSet *apps.PetSet) field.ErrorList {
|
||||
allErrs := apivalidation.ValidateObjectMetaUpdate(&petSet.ObjectMeta, &oldPetSet.ObjectMeta, field.NewPath("metadata"))
|
||||
// ValidateStatefulSetUpdate tests if required fields in the StatefulSet are set.
|
||||
func ValidateStatefulSetUpdate(statefulSet, oldStatefulSet *apps.StatefulSet) field.ErrorList {
|
||||
allErrs := apivalidation.ValidateObjectMetaUpdate(&statefulSet.ObjectMeta, &oldStatefulSet.ObjectMeta, field.NewPath("metadata"))
|
||||
|
||||
// TODO: For now we're taking the safe route and disallowing all updates to
|
||||
// spec except for Replicas, for scaling, and Template.Spec.containers.image
|
||||
// for rolling-update. Enable others on a case by case basis.
|
||||
restoreReplicas := petSet.Spec.Replicas
|
||||
petSet.Spec.Replicas = oldPetSet.Spec.Replicas
|
||||
restoreReplicas := statefulSet.Spec.Replicas
|
||||
statefulSet.Spec.Replicas = oldStatefulSet.Spec.Replicas
|
||||
|
||||
restoreContainers := petSet.Spec.Template.Spec.Containers
|
||||
petSet.Spec.Template.Spec.Containers = oldPetSet.Spec.Template.Spec.Containers
|
||||
restoreContainers := statefulSet.Spec.Template.Spec.Containers
|
||||
statefulSet.Spec.Template.Spec.Containers = oldStatefulSet.Spec.Template.Spec.Containers
|
||||
|
||||
if !reflect.DeepEqual(petSet.Spec, oldPetSet.Spec) {
|
||||
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "updates to petset spec for fields other than 'replicas' are forbidden."))
|
||||
if !reflect.DeepEqual(statefulSet.Spec, oldStatefulSet.Spec) {
|
||||
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "updates to statefulset spec for fields other than 'replicas' are forbidden."))
|
||||
}
|
||||
petSet.Spec.Replicas = restoreReplicas
|
||||
petSet.Spec.Template.Spec.Containers = restoreContainers
|
||||
statefulSet.Spec.Replicas = restoreReplicas
|
||||
statefulSet.Spec.Template.Spec.Containers = restoreContainers
|
||||
|
||||
allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(petSet.Spec.Replicas), field.NewPath("spec", "replicas"))...)
|
||||
containerErrs, _ := apivalidation.ValidateContainerUpdates(petSet.Spec.Template.Spec.Containers, oldPetSet.Spec.Template.Spec.Containers, field.NewPath("spec").Child("template").Child("containers"))
|
||||
allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(statefulSet.Spec.Replicas), field.NewPath("spec", "replicas"))...)
|
||||
containerErrs, _ := apivalidation.ValidateContainerUpdates(statefulSet.Spec.Template.Spec.Containers, oldStatefulSet.Spec.Template.Spec.Containers, field.NewPath("spec").Child("template").Child("containers"))
|
||||
allErrs = append(allErrs, containerErrs...)
|
||||
return allErrs
|
||||
}
|
||||
|
||||
// ValidatePetSetStatusUpdate tests if required fields in the PetSet are set.
|
||||
func ValidatePetSetStatusUpdate(petSet, oldPetSet *apps.PetSet) field.ErrorList {
|
||||
// ValidateStatefulSetStatusUpdate tests if required fields in the StatefulSet are set.
|
||||
func ValidateStatefulSetStatusUpdate(statefulSet, oldStatefulSet *apps.StatefulSet) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
allErrs = append(allErrs, apivalidation.ValidateObjectMetaUpdate(&petSet.ObjectMeta, &oldPetSet.ObjectMeta, field.NewPath("metadata"))...)
|
||||
allErrs = append(allErrs, apivalidation.ValidateObjectMetaUpdate(&statefulSet.ObjectMeta, &oldStatefulSet.ObjectMeta, field.NewPath("metadata"))...)
|
||||
// TODO: Validate status.
|
||||
return allErrs
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/apis/apps"
|
||||
)
|
||||
|
||||
func TestValidatePetSet(t *testing.T) {
|
||||
func TestValidateStatefulSet(t *testing.T) {
|
||||
validLabels := map[string]string{"a": "b"}
|
||||
validPodTemplate := api.PodTemplate{
|
||||
Template: api.PodTemplateSpec{
|
||||
@@ -51,65 +51,65 @@ func TestValidatePetSet(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
successCases := []apps.PetSet{
|
||||
successCases := []apps.StatefulSet{
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, successCase := range successCases {
|
||||
if errs := ValidatePetSet(&successCase); len(errs) != 0 {
|
||||
if errs := ValidateStatefulSet(&successCase); len(errs) != 0 {
|
||||
t.Errorf("expected success: %v", errs)
|
||||
}
|
||||
}
|
||||
|
||||
errorCases := map[string]apps.PetSet{
|
||||
errorCases := map[string]apps.StatefulSet{
|
||||
"zero-length ID": {
|
||||
ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
"missing-namespace": {
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc-123"},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
"empty selector": {
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
"selector_doesnt_match": {
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
"invalid manifest": {
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
},
|
||||
},
|
||||
"negative_replicas": {
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Replicas: -1,
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
},
|
||||
@@ -122,7 +122,7 @@ func TestValidatePetSet(t *testing.T) {
|
||||
"NoUppercaseOrSpecialCharsLike=Equals": "bar",
|
||||
},
|
||||
},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
@@ -135,7 +135,7 @@ func TestValidatePetSet(t *testing.T) {
|
||||
"NoUppercaseOrSpecialCharsLike=Equals": "bar",
|
||||
},
|
||||
},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Template: invalidPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
@@ -147,7 +147,7 @@ func TestValidatePetSet(t *testing.T) {
|
||||
"NoUppercaseOrSpecialCharsLike=Equals": "bar",
|
||||
},
|
||||
},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
@@ -157,7 +157,7 @@ func TestValidatePetSet(t *testing.T) {
|
||||
Name: "abc-123",
|
||||
Namespace: api.NamespaceDefault,
|
||||
},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: api.PodTemplateSpec{
|
||||
Spec: api.PodSpec{
|
||||
@@ -176,7 +176,7 @@ func TestValidatePetSet(t *testing.T) {
|
||||
Name: "abc-123",
|
||||
Namespace: api.NamespaceDefault,
|
||||
},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: api.PodTemplateSpec{
|
||||
Spec: api.PodSpec{
|
||||
@@ -192,7 +192,7 @@ func TestValidatePetSet(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for k, v := range errorCases {
|
||||
errs := ValidatePetSet(&v)
|
||||
errs := ValidateStatefulSet(&v)
|
||||
if len(errs) == 0 {
|
||||
t.Errorf("expected failure for %s", k)
|
||||
}
|
||||
@@ -215,7 +215,7 @@ func TestValidatePetSet(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidatePetSetUpdate(t *testing.T) {
|
||||
func TestValidateStatefulSetUpdate(t *testing.T) {
|
||||
validLabels := map[string]string{"a": "b"}
|
||||
validPodTemplate := api.PodTemplate{
|
||||
Template: api.PodTemplateSpec{
|
||||
@@ -255,21 +255,21 @@ func TestValidatePetSetUpdate(t *testing.T) {
|
||||
},
|
||||
}
|
||||
type psUpdateTest struct {
|
||||
old apps.PetSet
|
||||
update apps.PetSet
|
||||
old apps.StatefulSet
|
||||
update apps.StatefulSet
|
||||
}
|
||||
successCases := []psUpdateTest{
|
||||
{
|
||||
old: apps.PetSet{
|
||||
old: apps.StatefulSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
update: apps.PetSet{
|
||||
update: apps.StatefulSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Replicas: 3,
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
@@ -280,22 +280,22 @@ func TestValidatePetSetUpdate(t *testing.T) {
|
||||
for _, successCase := range successCases {
|
||||
successCase.old.ObjectMeta.ResourceVersion = "1"
|
||||
successCase.update.ObjectMeta.ResourceVersion = "1"
|
||||
if errs := ValidatePetSetUpdate(&successCase.update, &successCase.old); len(errs) != 0 {
|
||||
if errs := ValidateStatefulSetUpdate(&successCase.update, &successCase.old); len(errs) != 0 {
|
||||
t.Errorf("expected success: %v", errs)
|
||||
}
|
||||
}
|
||||
errorCases := map[string]psUpdateTest{
|
||||
"more than one read/write": {
|
||||
old: apps.PetSet{
|
||||
old: apps.StatefulSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
update: apps.PetSet{
|
||||
update: apps.StatefulSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Replicas: 2,
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: readWriteVolumePodTemplate.Template,
|
||||
@@ -303,16 +303,16 @@ func TestValidatePetSetUpdate(t *testing.T) {
|
||||
},
|
||||
},
|
||||
"updates to a field other than spec.Replicas": {
|
||||
old: apps.PetSet{
|
||||
old: apps.StatefulSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
update: apps.PetSet{
|
||||
update: apps.StatefulSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Replicas: 1,
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: readWriteVolumePodTemplate.Template,
|
||||
@@ -320,16 +320,16 @@ func TestValidatePetSetUpdate(t *testing.T) {
|
||||
},
|
||||
},
|
||||
"invalid selector": {
|
||||
old: apps.PetSet{
|
||||
old: apps.StatefulSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
update: apps.PetSet{
|
||||
update: apps.StatefulSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Replicas: 2,
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: invalidLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
@@ -337,16 +337,16 @@ func TestValidatePetSetUpdate(t *testing.T) {
|
||||
},
|
||||
},
|
||||
"invalid pod": {
|
||||
old: apps.PetSet{
|
||||
old: apps.StatefulSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
update: apps.PetSet{
|
||||
update: apps.StatefulSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Replicas: 2,
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: invalidPodTemplate.Template,
|
||||
@@ -354,16 +354,16 @@ func TestValidatePetSetUpdate(t *testing.T) {
|
||||
},
|
||||
},
|
||||
"negative replicas": {
|
||||
old: apps.PetSet{
|
||||
old: apps.StatefulSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
},
|
||||
},
|
||||
update: apps.PetSet{
|
||||
update: apps.StatefulSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault},
|
||||
Spec: apps.PetSetSpec{
|
||||
Spec: apps.StatefulSetSpec{
|
||||
Replicas: -1,
|
||||
Selector: &unversioned.LabelSelector{MatchLabels: validLabels},
|
||||
Template: validPodTemplate.Template,
|
||||
@@ -372,7 +372,7 @@ func TestValidatePetSetUpdate(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for testName, errorCase := range errorCases {
|
||||
if errs := ValidatePetSetUpdate(&errorCase.update, &errorCase.old); len(errs) == 0 {
|
||||
if errs := ValidateStatefulSetUpdate(&errorCase.update, &errorCase.old); len(errs) == 0 {
|
||||
t.Errorf("expected failure: %s", testName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user