Skip to content

Commit 96621fc

Browse files
author
Arvind Thirumurugan
committed
fix states
Signed-off-by: Arvind Thirumurugan <arvindth@microsoft.com>
1 parent c25aaa7 commit 96621fc

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

apis/placement/v1beta1/stageupdate_types.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ const (
157157
// This is the default state after initialization completes.
158158
StateNotStarted State = "NotStarted"
159159

160-
// StateStart indicates the update run should execute (or resume execution if paused).
161-
StateStart State = "Start"
160+
// StateStarted indicates the update run should execute (or resume execution if paused).
161+
StateStarted State = "Started"
162162

163-
// StateStop indicates the update run should pause execution.
164-
StateStop State = "Stop"
163+
// StateStopped indicates the update run should pause execution.
164+
StateStopped State = "Stopped"
165165

166-
// StateAbandon indicates the update run should be abandoned and terminated.
167-
StateAbandon State = "Abandon"
166+
// StateAbandoned indicates the update run should be abandoned and terminated.
167+
StateAbandoned State = "Abandoned"
168168
)
169169

170170
// UpdateRunSpec defines the desired rollout strategy and the snapshot indices of the resources to be updated.
@@ -191,9 +191,9 @@ type UpdateRunSpec struct {
191191

192192
// State indicates the desired state of the update run.
193193
// NotStarted: The update run is initialized but execution has not started (default).
194-
// Start: The update run should execute or resume execution.
195-
// Stop: The update run should pause execution.
196-
// Abandon: The update run should be abandoned and terminated.
194+
// Started: The update run should execute or resume execution.
195+
// Stopped: The update run should pause execution.
196+
// Abandoned: The update run should be abandoned and terminated.
197197
// +kubebuilder:validation:Optional
198198
// +kubebuilder:validation:Enum=NotStarted;Start;Stop;Abandon
199199
// +kubebuilder:default=NotStarted

config/crd/bases/placement.kubernetes-fleet.io_clusterstagedupdateruns.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,9 +1181,9 @@ spec:
11811181
description: |-
11821182
State indicates the desired state of the update run.
11831183
NotStarted: The update run is initialized but execution has not started (default).
1184-
Start: The update run should execute or resume execution.
1185-
Stop: The update run should pause execution.
1186-
Abandon: The update run should be abandoned and terminated.
1184+
Started: The update run should execute or resume execution.
1185+
Stopped: The update run should pause execution.
1186+
Abandoned: The update run should be abandoned and terminated.
11871187
enum:
11881188
- NotStarted
11891189
- Start

config/crd/bases/placement.kubernetes-fleet.io_stagedupdateruns.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ spec:
100100
description: |-
101101
State indicates the desired state of the update run.
102102
NotStarted: The update run is initialized but execution has not started (default).
103-
Start: The update run should execute or resume execution.
104-
Stop: The update run should pause execution.
105-
Abandon: The update run should be abandoned and terminated.
103+
Started: The update run should execute or resume execution.
104+
Stopped: The update run should pause execution.
105+
Abandoned: The update run should be abandoned and terminated.
106106
enum:
107107
- NotStarted
108108
- Start

pkg/controllers/updaterun/controller_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ func generateTestClusterStagedUpdateRun() *placementv1beta1.ClusterStagedUpdateR
341341
PlacementName: testCRPName,
342342
ResourceSnapshotIndex: testResourceSnapshotIndex,
343343
StagedUpdateStrategyName: testUpdateStrategyName,
344-
State: placementv1beta1.StateStart,
344+
State: placementv1beta1.StateStarted,
345345
},
346346
}
347347
}

test/apis/placement/v1beta1/api_validation_integration_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ var _ = Describe("Test placement v1beta1 API validation", func() {
11231123
Name: fmt.Sprintf(validupdateRunNameTemplate, GinkgoParallelProcess()),
11241124
},
11251125
Spec: placementv1beta1.UpdateRunSpec{
1126-
State: placementv1beta1.StateStart,
1126+
State: placementv1beta1.StateStarted,
11271127
},
11281128
}
11291129
Expect(hubClient.Create(ctx, &updateRun)).Should(Succeed())
@@ -1138,7 +1138,7 @@ var _ = Describe("Test placement v1beta1 API validation", func() {
11381138
Name: fmt.Sprintf(invalidupdateRunNameTemplate, GinkgoParallelProcess()),
11391139
},
11401140
Spec: placementv1beta1.UpdateRunSpec{
1141-
State: placementv1beta1.StateStart,
1141+
State: placementv1beta1.StateStarted,
11421142
},
11431143
}
11441144
err := hubClient.Create(ctx, &updateRun)
@@ -1154,7 +1154,7 @@ var _ = Describe("Test placement v1beta1 API validation", func() {
11541154
},
11551155
Spec: placementv1beta1.UpdateRunSpec{
11561156
PlacementName: "test-placement",
1157-
State: placementv1beta1.StateStart,
1157+
State: placementv1beta1.StateStarted,
11581158
},
11591159
}
11601160
Expect(hubClient.Create(ctx, &updateRun)).Should(Succeed())

test/e2e/cluster_staged_updaterun_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ func createClusterStagedUpdateRunSucceed(updateRunName, crpName, resourceSnapsho
16681668
PlacementName: crpName,
16691669
ResourceSnapshotIndex: resourceSnapshotIndex,
16701670
StagedUpdateStrategyName: strategyName,
1671-
State: placementv1beta1.StateStart,
1671+
State: placementv1beta1.StateStarted,
16721672
},
16731673
}
16741674
Expect(hubClient.Create(ctx, updateRun)).To(Succeed(), "Failed to create ClusterStagedUpdateRun %s", updateRunName)

test/e2e/staged_updaterun_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ func createStagedUpdateRunSucceed(updateRunName, namespace, rpName, resourceSnap
12011201
PlacementName: rpName,
12021202
ResourceSnapshotIndex: resourceSnapshotIndex,
12031203
StagedUpdateStrategyName: strategyName,
1204-
State: placementv1beta1.StateStart,
1204+
State: placementv1beta1.StateStarted,
12051205
},
12061206
}
12071207
Expect(hubClient.Create(ctx, updateRun)).To(Succeed(), "Failed to create StagedUpdateRun %s", updateRunName)

0 commit comments

Comments
 (0)