Skip to content

Commit

Permalink
upgrade clusterStagedUpdateRun APIs to v1beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
jwtty committed Jan 4, 2025
1 parent 43acf41 commit b1e1c15
Show file tree
Hide file tree
Showing 20 changed files with 2,732 additions and 370 deletions.
28 changes: 0 additions & 28 deletions apis/placement/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,6 @@ const (
// ResourceOverrideSnapshotKind is the kind of the ResourceOverrideSnapshot.
ResourceOverrideSnapshotKind = "ResourceOverrideSnapshot"

// ClusterStagedUpdateRunKind is the kind of the ClusterStagedUpdateRun.
ClusterStagedUpdateRunKind = "ClusterStagedUpdateRun"

// ClusterStagedUpdateStrategyKind is the kind of the ClusterStagedUpdateStrategy.
ClusterStagedUpdateStrategyKind = "ClusterStagedUpdateStrategy"

// ClusterApprovalRequestKind is the kind of the ClusterApprovalRequest.
ClusterApprovalRequestKind = "ClusterApprovalRequest"

// ClusterStagedUpdateRunFinalizer is used by the ClusterStagedUpdateRun controller to make sure that the ClusterStagedUpdateRun
// object is not deleted until all its dependent resources are deleted.
ClusterStagedUpdateRunFinalizer = fleetPrefix + "stagedupdaterun-finalizer"

// TargetUpdateRunLabel indicates the target update run on a staged run related object.
TargetUpdateRunLabel = fleetPrefix + "targetupdaterun"

// UpdateRunDeleteStageName is the name of delete stage in the staged update run.
UpdateRunDeleteStageName = fleetPrefix + "deleteStage"

// IsLatestUpdateRunApprovalLabel indicates if the approval is the latest approval on a staged run.
IsLatestUpdateRunApprovalLabel = fleetPrefix + "isLatestUpdateRunApproval"

// TargetUpdatingStageNameLabel indicates the updating stage name on a staged run related object.
TargetUpdatingStageNameLabel = fleetPrefix + "targetUpdatingStage"

// ApprovalTaskNameFmt is the format of the approval task name.
ApprovalTaskNameFmt = "%s-%s"

// OverrideClusterNameVariable is the reserved variable in the override value that will be replaced by the actual cluster name.
OverrideClusterNameVariable = "${MEMBER-CLUSTER-NAME}"
)
25 changes: 25 additions & 0 deletions apis/placement/v1beta1/commons.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ const (
WorkKind = "Work"
// AppliedWorkKind represents the kind of AppliedWork.
AppliedWorkKind = "AppliedWork"
// ClusterStagedUpdateRunKind is the kind of the ClusterStagedUpdateRun.
ClusterStagedUpdateRunKind = "ClusterStagedUpdateRun"
// ClusterStagedUpdateStrategyKind is the kind of the ClusterStagedUpdateStrategy.
ClusterStagedUpdateStrategyKind = "ClusterStagedUpdateStrategy"
// ClusterApprovalRequestKind is the kind of the ClusterApprovalRequest.
ClusterApprovalRequestKind = "ClusterApprovalRequest"
)

const (
Expand Down Expand Up @@ -91,6 +97,25 @@ const (
// PreviousBindingStateAnnotation records the previous state of a binding.
// This is used to remember if an "unscheduled" binding was moved from a "bound" state or a "scheduled" state.
PreviousBindingStateAnnotation = fleetPrefix + "previous-binding-state"

// ClusterStagedUpdateRunFinalizer is used by the ClusterStagedUpdateRun controller to make sure that the ClusterStagedUpdateRun
// object is not deleted until all its dependent resources are deleted.
ClusterStagedUpdateRunFinalizer = fleetPrefix + "stagedupdaterun-finalizer"

// TargetUpdateRunLabel indicates the target update run on a staged run related object.
TargetUpdateRunLabel = fleetPrefix + "targetupdaterun"

// UpdateRunDeleteStageName is the name of delete stage in the staged update run.
UpdateRunDeleteStageName = fleetPrefix + "deleteStage"

// IsLatestUpdateRunApprovalLabel indicates if the approval is the latest approval on a staged run.
IsLatestUpdateRunApprovalLabel = fleetPrefix + "isLatestUpdateRunApproval"

// TargetUpdatingStageNameLabel indicates the updating stage name on a staged run related object.
TargetUpdatingStageNameLabel = fleetPrefix + "targetUpdatingStage"

// ApprovalTaskNameFmt is the format of the approval task name.
ApprovalTaskNameFmt = "%s-%s"
)

// NamespacedName comprises a resource name, with a mandatory namespace.
Expand Down
469 changes: 469 additions & 0 deletions apis/placement/v1beta1/stageupdate_types.go

Large diffs are not rendered by default.

Loading

0 comments on commit b1e1c15

Please sign in to comment.