Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions apps/v1alpha1/collaset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,17 @@ type PodUpdateStrategyType string

const (
// CollaSetRecreatePodUpdateStrategyType indicates that CollaSet will always update Pod by deleting and recreate it.
CollaSetRecreatePodUpdateStrategyType PodUpdateStrategyType = "ReCreate"
CollaSetRecreatePodUpdateStrategyType PodUpdateStrategyType = "Recreate"
// CollaSetInPlaceIfPossiblePodUpdateStrategyType indicates thath CollaSet will try to update Pod by in-place update
// when it is possible. Recently, only Pod image can be updated in-place. Any other Pod spec change will make the
// policy fall back to CollaSetRecreatePodUpdateStrategyType.
CollaSetInPlaceIfPossiblePodUpdateStrategyType PodUpdateStrategyType = "InPlaceIfPossible"
// CollaSetInPlaceOnlyPodUpdateStrategyType indicates that CollaSet will always update Pod in-place, instead of
// recreating pod. It will encounter an error on original Kubernetes cluster.
CollaSetInPlaceOnlyPodUpdateStrategyType PodUpdateStrategyType = "InPlaceOnly"
// CollaSetReplacePodUpdateStrategyType indicates that CollaSet will always update Pod by replace, it will
// create a new Pod and delete the old pod when the new one service available.
CollaSetReplacePodUpdateStrategyType PodUpdateStrategyType = "Replace"
)

// CollaSetSpec defines the desired state of CollaSet
Expand Down Expand Up @@ -125,6 +128,10 @@ type ScaleStrategy struct {
// +optional
PodToInclude []string `json:"podToInclude,omitempty"`

// PodToDelete indicates the pods which will be deleted by CollaSet.
// +optional
PodToDelete []string `json:"podToDelete,omitempty"`

// PersistentVolumeClaimRetentionPolicy describes the lifecycle of PersistentVolumeClaim
// created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and
// deleted after no pod is using them. This policy allows the lifecycle to be altered, for example
Expand Down Expand Up @@ -155,7 +162,7 @@ type PersistentVolumeClaimRetentionPolicy struct {
}

type ByPartition struct {
// Partition controls the update progress by indicating how many pods should be updated.
// Partition controls the number of pods in old revisions.
// Defaults to nil (all pods will be updated)
// +optional
Partition *int32 `json:"partition,omitempty"`
Expand Down
Loading