Skip to content

Commit 26f79b8

Browse files
committed
added the GVK to the output
Signed-off-by: Christian Hernandez <[email protected]>
1 parent e8a60ca commit 26f79b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/cli/whoami/whoami.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ func (o *WhoAmIOptions) Run() error {
166166
return nil
167167
case o.Output == "yaml":
168168
u, err := o.UserInterface.Users().Get(context.TODO(), "~", metav1.GetOptions{})
169+
u.SetGroupVersionKind(userv1.GroupVersion.WithKind("User"))
169170
if err != nil {
170171
return err
171172
}
@@ -178,6 +179,7 @@ func (o *WhoAmIOptions) Run() error {
178179
return nil
179180
case o.Output == "json":
180181
u, err := o.UserInterface.Users().Get(context.TODO(), "~", metav1.GetOptions{})
182+
u.SetGroupVersionKind(userv1.GroupVersion.WithKind("User"))
181183
if err != nil {
182184
return err
183185
}

0 commit comments

Comments
 (0)