1
0
mirror of synced 2026-02-13 13:06:56 +00:00

Rename asRuntime* -> asClient*

For the avoidance of misdirection.

Signed-off-by: Michael Bridgen <michael@weave.works>
This commit is contained in:
Michael Bridgen
2021-01-13 11:38:02 +00:00
parent d03280a12f
commit cafce536bb
10 changed files with 24 additions and 24 deletions

View File

@@ -65,14 +65,14 @@ func (suspend suspendCommand) run(cmd *cobra.Command, args []string) error {
Namespace: namespace,
Name: name,
}
err = kubeClient.Get(ctx, namespacedName, suspend.object.asRuntimeObject())
err = kubeClient.Get(ctx, namespacedName, suspend.object.asClientObject())
if err != nil {
return err
}
logger.Actionf("suspending %s %s in %s namespace", suspend.humanKind, name, namespace)
suspend.object.setSuspended()
if err := kubeClient.Update(ctx, suspend.object.asRuntimeObject()); err != nil {
if err := kubeClient.Update(ctx, suspend.object.asClientObject()); err != nil {
return err
}
logger.Successf("%s suspended", suspend.humanKind)