Skip to content

Commit

Permalink
[kubectl-plugin] silence warnings when creating worker groups (ray-pr…
Browse files Browse the repository at this point in the history
…oject#2792)

Signed-off-by: Andrew Sy Kim <[email protected]>
  • Loading branch information
andrewsykim authored Jan 21, 2025
1 parent 8dd2496 commit 522718e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kubectl-plugin/pkg/cmd/create/create_workergroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/client-go/rest"

"github.com/ray-project/kuberay/kubectl-plugin/pkg/util/client"

Expand Down Expand Up @@ -54,6 +55,9 @@ func NewCreateWorkerGroupOptions(streams genericclioptions.IOStreams) *CreateWor
func NewCreateWorkerGroupCommand(streams genericclioptions.IOStreams) *cobra.Command {
options := NewCreateWorkerGroupOptions(streams)
cmdFactory := cmdutil.NewFactory(options.configFlags)
// Silence warnings to avoid messages like 'unknown field "spec.headGroupSpec.template.metadata.creationTimestamp"'
// See https://github.com/kubernetes/kubernetes/issues/67610 for more details.
rest.SetDefaultWarningHandler(rest.NoWarnings{})

cmd := &cobra.Command{
Use: "workergroup [WORKERGROUP]",
Expand Down

0 comments on commit 522718e

Please sign in to comment.