Skip to content

Commit

Permalink
fix(cluster): rollback does not match the expected API version
Browse files Browse the repository at this point in the history
  • Loading branch information
choujimmy authored and QianChenglong committed Apr 29, 2020
1 parent 55e4e98 commit 2312152
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/platform/proxy/apps/deployment/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,17 @@ var _ = rest.GroupVersionKindProvider(&RollbackREST{})

// GroupVersionKind is used to specify a particular GroupVersionKind to discovery.
func (r *RollbackREST) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind {
return extensionsv1beta1.SchemeGroupVersion.WithKind("DeploymentRollback")
switch containingGV {
case extensionsv1beta1.SchemeGroupVersion:
return extensionsv1beta1.SchemeGroupVersion.WithKind("DeploymentRollback")
default:
return appsv1beta1.SchemeGroupVersion.WithKind("DeploymentRollback")
}
}

// New creates a new Rollback object
func (r *RollbackREST) New() runtime.Object {
return &extensionsv1beta1.DeploymentRollback{}
return &appsv1beta1.DeploymentRollback{}
}

// Create inserts a new item according to the unique key from the object.
Expand Down

0 comments on commit 2312152

Please sign in to comment.