Skip to content

Commit 7ae9f8b

Browse files
committed
KEP-4192: API changes
- move to metav1.Conditions - remove the unused ContinueToken field - rename LastMigratedResourceNameHash to LastMigratedResource Signed-off-by: Stanislav Láznička <[email protected]>
1 parent 3d45e7b commit 7ae9f8b

File tree

1 file changed

+4
-32
lines changed
  • keps/sig-api-machinery/4192-svm-in-tree

1 file changed

+4
-32
lines changed

keps/sig-api-machinery/4192-svm-in-tree/README.md

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,6 @@ type StorageVersionMigrationSpec struct {
147147
// the endpoint serving the resource.
148148
// Immutable.
149149
Resource GroupVersionResource `json:"resource" protobuf:"bytes,1,opt,name=resource"`
150-
// The token used in the list options to get the next chunk of objects
151-
// to migrate. When the .status.conditions indicates the migration is
152-
// "Running", users can use this token to check the progress of the
153-
// migration.
154-
// +optional
155-
ContinueToken string `json:"continueToken,omitempty" protobuf:"bytes,2,opt,name=continueToken"`
156-
// TODO: consider recording the storage version hash when the migration
157-
// is created. It can avoid races.
158150
}
159151

160152
// The names of the group, the version, and the resource.
@@ -178,23 +170,6 @@ const (
178170
MigrationFailed MigrationConditionType = "Failed"
179171
)
180172

181-
// Describes the state of a migration at a certain point.
182-
type MigrationCondition struct {
183-
// Type of the condition.
184-
Type MigrationConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=MigrationConditionType"`
185-
// Status of the condition, one of True, False, Unknown.
186-
Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
187-
// The last time this condition was updated.
188-
// +optional
189-
LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,3,opt,name=lastUpdateTime"`
190-
// The reason for the condition's last transition.
191-
// +optional
192-
Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
193-
// A human readable message indicating details about the transition.
194-
// +optional
195-
Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
196-
}
197-
198173
// Status of the storage version migration.
199174
type StorageVersionMigrationStatus struct {
200175
// The latest available observations of the migration's current state.
@@ -203,13 +178,11 @@ type StorageVersionMigrationStatus struct {
203178
// +listType=map
204179
// +listMapKey=type
205180
// +optional
206-
Conditions []MigrationCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
181+
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
207182
// ResourceVersion to compare with the GC cache for performing the migration.
208183
// This is the current resource version of given group, version and resource when
209-
// kube-controller-manager first observes this StorageVersionMigration resource.
184+
// kube-controller-manager first observes this StorageVersionMigration resource.
210185
ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"`
211-
// LastMigratedResourceNameHash is use to pick up migration from where it left off in case of failure.
212-
LastMigratedResourceNameHash string `json:"lastMigratedResourceNameHash,omitempty" protobuf:"bytes,3,opt,name=lastMigratedResourceNameHash"`
213186
}
214187

215188
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -385,9 +358,8 @@ total:
385358
386359
#### Beta
387360
388-
- Feature is enabled by default
389-
- All of the above documented tests are complete
390-
- Leader election to make sure new controller can work with both CRD and in-tree APIs.
361+
- Feature is enabled by default.
362+
- All of the above documented tests are complete.
391363
- Using Garbage Collection Cache means using RV as an integer to validate the freshness of the cache. Approval from SigArch is required on this RV semantics.
392364
393365
### Upgrade / Downgrade Strategy

0 commit comments

Comments
 (0)