Documentation ¶
Index ¶
- type Adapter
- type AdvancedStatefulSetAdapter
- func (a *AdvancedStatefulSetAdapter) ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, ...) error
- func (a *AdvancedStatefulSetAdapter) ConvertToResourceList(obj runtime.Object) []metav1.Object
- func (a *AdvancedStatefulSetAdapter) GetObjectMeta(obj metav1.Object) *metav1.ObjectMeta
- func (a *AdvancedStatefulSetAdapter) GetReplicaDetails(obj metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, ...)
- func (a *AdvancedStatefulSetAdapter) GetStatusObservedGeneration(obj metav1.Object) int64
- func (a *AdvancedStatefulSetAdapter) GetSubsetFailure() *string
- func (a *AdvancedStatefulSetAdapter) IsExpected(obj metav1.Object, revision string) bool
- func (a *AdvancedStatefulSetAdapter) NewResourceListObject() runtime.Object
- func (a *AdvancedStatefulSetAdapter) NewResourceObject() runtime.Object
- func (a *AdvancedStatefulSetAdapter) PostUpdate(ud *alpha1.UnitedDeployment, obj runtime.Object, revision string, ...) error
- type CloneSetAdapter
- func (a *CloneSetAdapter) ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, ...) error
- func (a *CloneSetAdapter) GetObjectMeta(obj metav1.Object) *metav1.ObjectMeta
- func (a *CloneSetAdapter) GetReplicaDetails(obj metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, ...)
- func (a *CloneSetAdapter) GetStatusObservedGeneration(obj metav1.Object) int64
- func (a *CloneSetAdapter) GetSubsetFailure() *string
- func (a *CloneSetAdapter) IsExpected(obj metav1.Object, revision string) bool
- func (a *CloneSetAdapter) NewResourceListObject() runtime.Object
- func (a *CloneSetAdapter) NewResourceObject() runtime.Object
- func (a *CloneSetAdapter) PostUpdate(ud *alpha1.UnitedDeployment, obj runtime.Object, revision string, ...) error
- type DeploymentAdapter
- func (a *DeploymentAdapter) ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, ...) error
- func (a *DeploymentAdapter) GetReplicaDetails(obj metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, ...)
- func (a *DeploymentAdapter) GetStatusObservedGeneration(obj metav1.Object) int64
- func (a *DeploymentAdapter) GetSubsetFailure() *string
- func (a *DeploymentAdapter) IsExpected(obj metav1.Object, revision string) bool
- func (a *DeploymentAdapter) NewResourceListObject() runtime.Object
- func (a *DeploymentAdapter) NewResourceObject() runtime.Object
- func (a *DeploymentAdapter) PostUpdate(ud *alpha1.UnitedDeployment, obj runtime.Object, revision string, ...) error
- type StatefulSetAdapter
- func (a *StatefulSetAdapter) ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, ...) error
- func (a *StatefulSetAdapter) GetReplicaDetails(obj metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, ...)
- func (a *StatefulSetAdapter) GetStatusObservedGeneration(obj metav1.Object) int64
- func (a *StatefulSetAdapter) GetSubsetFailure() *string
- func (a *StatefulSetAdapter) IsExpected(obj metav1.Object, revision string) bool
- func (a *StatefulSetAdapter) NewResourceListObject() runtime.Object
- func (a *StatefulSetAdapter) NewResourceObject() runtime.Object
- func (a *StatefulSetAdapter) PostUpdate(ud *alpha1.UnitedDeployment, obj runtime.Object, revision string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { // NewResourceObject creates a empty subset object. NewResourceObject() runtime.Object // NewResourceListObject creates a empty subset list object. NewResourceListObject() runtime.Object // GetStatusObservedGeneration returns the observed generation of the subset. GetStatusObservedGeneration(subset metav1.Object) int64 // GetReplicaDetails returns the replicas information of the subset status. GetReplicaDetails(subset metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, statusReplicas, statusReadyReplicas, statusUpdatedReplicas, statusUpdatedReadyReplicas int32, err error) // GetSubsetFailure returns failure information of the subset. GetSubsetFailure() *string // ApplySubsetTemplate updates the subset to the latest revision. ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, replicas, partition int32, subset runtime.Object) error // IsExpected checks the subset is the expected revision or not. // If not, UnitedDeployment will call ApplySubsetTemplate to update it. IsExpected(subset metav1.Object, revision string) bool // PostUpdate does some works after subset updated PostUpdate(ud *alpha1.UnitedDeployment, subset runtime.Object, revision string, partition int32) error }
type AdvancedStatefulSetAdapter ¶
func (*AdvancedStatefulSetAdapter) ApplySubsetTemplate ¶
func (a *AdvancedStatefulSetAdapter) ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, replicas, partition int32, obj runtime.Object) error
ApplySubsetTemplate updates the subset to the latest revision, depending on the AdvancedStatefulSetTemplate.
func (*AdvancedStatefulSetAdapter) ConvertToResourceList ¶
func (a *AdvancedStatefulSetAdapter) ConvertToResourceList(obj runtime.Object) []metav1.Object
ConvertToResourceList converts AdvancedStatefulSetList object to AdvancedStatefulSet array.
func (*AdvancedStatefulSetAdapter) GetObjectMeta ¶
func (a *AdvancedStatefulSetAdapter) GetObjectMeta(obj metav1.Object) *metav1.ObjectMeta
GetObjectMeta returns the ObjectMeta of the subset of AdvancedStatefulSet.
func (*AdvancedStatefulSetAdapter) GetReplicaDetails ¶
func (a *AdvancedStatefulSetAdapter) GetReplicaDetails(obj metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, statusReplicas, statusReadyReplicas, statusUpdatedReplicas, statusUpdatedReadyReplicas int32, err error)
GetReplicaDetails returns the replicas detail the subset needs.
func (*AdvancedStatefulSetAdapter) GetStatusObservedGeneration ¶
func (a *AdvancedStatefulSetAdapter) GetStatusObservedGeneration(obj metav1.Object) int64
GetStatusObservedGeneration returns the observed generation of the subset.
func (*AdvancedStatefulSetAdapter) GetSubsetFailure ¶
func (a *AdvancedStatefulSetAdapter) GetSubsetFailure() *string
GetSubsetFailure returns the failure information of the subset. AdvancedStatefulSet has no condition.
func (*AdvancedStatefulSetAdapter) IsExpected ¶
func (a *AdvancedStatefulSetAdapter) IsExpected(obj metav1.Object, revision string) bool
IsExpected checks the subset is the expected revision or not. The revision label can tell the current subset revision.
func (*AdvancedStatefulSetAdapter) NewResourceListObject ¶
func (a *AdvancedStatefulSetAdapter) NewResourceListObject() runtime.Object
NewResourceListObject creates a empty AdvancedStatefulSet object.
func (*AdvancedStatefulSetAdapter) NewResourceObject ¶
func (a *AdvancedStatefulSetAdapter) NewResourceObject() runtime.Object
NewResourceObject creates a empty AdvancedStatefulSet object.
func (*AdvancedStatefulSetAdapter) PostUpdate ¶
func (a *AdvancedStatefulSetAdapter) PostUpdate(ud *alpha1.UnitedDeployment, obj runtime.Object, revision string, partition int32) error
PostUpdate does some works after subset updated.
type CloneSetAdapter ¶ added in v0.6.1
func (*CloneSetAdapter) ApplySubsetTemplate ¶ added in v0.6.1
func (a *CloneSetAdapter) ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, replicas, partition int32, obj runtime.Object) error
func (*CloneSetAdapter) GetObjectMeta ¶ added in v0.6.1
func (a *CloneSetAdapter) GetObjectMeta(obj metav1.Object) *metav1.ObjectMeta
func (*CloneSetAdapter) GetReplicaDetails ¶ added in v0.6.1
func (*CloneSetAdapter) GetStatusObservedGeneration ¶ added in v0.6.1
func (a *CloneSetAdapter) GetStatusObservedGeneration(obj metav1.Object) int64
func (*CloneSetAdapter) GetSubsetFailure ¶ added in v0.6.1
func (a *CloneSetAdapter) GetSubsetFailure() *string
func (*CloneSetAdapter) IsExpected ¶ added in v0.6.1
func (a *CloneSetAdapter) IsExpected(obj metav1.Object, revision string) bool
func (*CloneSetAdapter) NewResourceListObject ¶ added in v0.6.1
func (a *CloneSetAdapter) NewResourceListObject() runtime.Object
func (*CloneSetAdapter) NewResourceObject ¶ added in v0.6.1
func (a *CloneSetAdapter) NewResourceObject() runtime.Object
func (*CloneSetAdapter) PostUpdate ¶ added in v0.6.1
func (a *CloneSetAdapter) PostUpdate(ud *alpha1.UnitedDeployment, obj runtime.Object, revision string, partition int32) error
type DeploymentAdapter ¶ added in v0.8.0
DeploymentAdapter implements the Adapter interface for Deployment objects
func (*DeploymentAdapter) ApplySubsetTemplate ¶ added in v0.8.0
func (a *DeploymentAdapter) ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, replicas, partition int32, obj runtime.Object) error
ApplySubsetTemplate updates the subset to the latest revision, depending on the DeploymentTemplate.
func (*DeploymentAdapter) GetReplicaDetails ¶ added in v0.8.0
func (a *DeploymentAdapter) GetReplicaDetails(obj metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, statusReplicas, statusReadyReplicas, statusUpdatedReplicas, statusUpdatedReadyReplicas int32, err error)
GetReplicaDetails returns the replicas detail the subset needs.
func (*DeploymentAdapter) GetStatusObservedGeneration ¶ added in v0.8.0
func (a *DeploymentAdapter) GetStatusObservedGeneration(obj metav1.Object) int64
GetStatusObservedGeneration returns the observed generation of the subset.
func (*DeploymentAdapter) GetSubsetFailure ¶ added in v0.8.0
func (a *DeploymentAdapter) GetSubsetFailure() *string
GetSubsetFailure returns the failure information of the subset. Deployment has no condition.
func (*DeploymentAdapter) IsExpected ¶ added in v0.8.0
func (a *DeploymentAdapter) IsExpected(obj metav1.Object, revision string) bool
IsExpected checks the subset is the expected revision or not. The revision label can tell the current subset revision.
func (*DeploymentAdapter) NewResourceListObject ¶ added in v0.8.0
func (a *DeploymentAdapter) NewResourceListObject() runtime.Object
NewResourceListObject creates a empty DeploymentList object.
func (*DeploymentAdapter) NewResourceObject ¶ added in v0.8.0
func (a *DeploymentAdapter) NewResourceObject() runtime.Object
NewResourceObject creates a empty Deployment object.
func (*DeploymentAdapter) PostUpdate ¶ added in v0.8.0
func (a *DeploymentAdapter) PostUpdate(ud *alpha1.UnitedDeployment, obj runtime.Object, revision string, partition int32) error
PostUpdate does some works after subset updated. Deployments typically don't have post update operations.
type StatefulSetAdapter ¶
func (*StatefulSetAdapter) ApplySubsetTemplate ¶
func (a *StatefulSetAdapter) ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, replicas, partition int32, obj runtime.Object) error
ApplySubsetTemplate updates the subset to the latest revision, depending on the StatefulSetTemplate.
func (*StatefulSetAdapter) GetReplicaDetails ¶
func (a *StatefulSetAdapter) GetReplicaDetails(obj metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, statusReplicas, statusReadyReplicas, statusUpdatedReplicas, statusUpdatedReadyReplicas int32, err error)
GetReplicaDetails returns the replicas detail the subset needs.
func (*StatefulSetAdapter) GetStatusObservedGeneration ¶
func (a *StatefulSetAdapter) GetStatusObservedGeneration(obj metav1.Object) int64
GetStatusObservedGeneration returns the observed generation of the subset.
func (*StatefulSetAdapter) GetSubsetFailure ¶
func (a *StatefulSetAdapter) GetSubsetFailure() *string
GetSubsetFailure returns the failure information of the subset. StatefulSet has no condition.
func (*StatefulSetAdapter) IsExpected ¶
func (a *StatefulSetAdapter) IsExpected(obj metav1.Object, revision string) bool
IsExpected checks the subset is the expected revision or not. The revision label can tell the current subset revision.
func (*StatefulSetAdapter) NewResourceListObject ¶
func (a *StatefulSetAdapter) NewResourceListObject() runtime.Object
NewResourceListObject creates a empty StatefulSetList object.
func (*StatefulSetAdapter) NewResourceObject ¶
func (a *StatefulSetAdapter) NewResourceObject() runtime.Object
NewResourceObject creates a empty StatefulSet object.
func (*StatefulSetAdapter) PostUpdate ¶
func (a *StatefulSetAdapter) PostUpdate(ud *alpha1.UnitedDeployment, obj runtime.Object, revision string, partition int32) error
PostUpdate does some works after subset updated. StatefulSet will implement this method to clean stuck pods.