Skip to content

Commit

Permalink
Format statefulset table output (#192)
Browse files Browse the repository at this point in the history
Signed-off-by: Evans Mungai <[email protected]>
  • Loading branch information
banjoh authored Oct 31, 2024
1 parent 54c2b1a commit 2ea6989
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,20 @@ func toTable(object runtime.Object, r *http.Request) (runtime.Object, error) {
return nil, errors.Wrap(err, "failed to convert deployment")
}
object = converted
case *appsv1.StatefulSet:
converted := &apisapps.StatefulSet{}
err := apisappsv1.Convert_v1_StatefulSet_To_apps_StatefulSet(o, converted, nil)
if err != nil {
return nil, errors.Wrap(err, "failed to convert statefulset")
}
object = converted
case *appsv1.StatefulSetList:
converted := &apisapps.StatefulSetList{}
err := apisappsv1.Convert_v1_StatefulSetList_To_apps_StatefulSetList(o, converted, nil)
if err != nil {
return nil, errors.Wrap(err, "failed to convert statefulset list")
}
object = converted
case *corev1.NamespaceList:
converted := &apicore.NamespaceList{}
err := apicorev1.Convert_v1_NamespaceList_To_core_NamespaceList(o, converted, nil)
Expand Down

0 comments on commit 2ea6989

Please sign in to comment.