Documentation ¶
Index ¶
Constants ¶
View Source
const ( GlobalDefaultDenyKey = "global-default-deny" UseNetworkPoliciesInAccessGraphStatesKey = "use-network-policies-in-access-graph-states" )
Variables ¶
View Source
var UpdateClusterCmd = &cobra.Command{ Use: "update <cluster-id>", Short: "Update a cluster", Args: cobra.ExactArgs(1), SilenceUsage: true, RunE: func(_ *cobra.Command, args []string) error { ctxTimeout, cancel := context.WithTimeout(context.Background(), config.DefaultTimeout) defer cancel() c, err := cloudclient.NewClient(ctxTimeout) if err != nil { return err } id := args[0] var configuration cloudapi.ClusterConfigurationInput if viper.IsSet(GlobalDefaultDenyKey) { configuration.GlobalDefaultDeny = viper.GetBool(GlobalDefaultDenyKey) } if viper.IsSet(UseNetworkPoliciesInAccessGraphStatesKey) { configuration.UseNetworkPoliciesInAccessGraphStates = viper.GetBool(UseNetworkPoliciesInAccessGraphStatesKey) } r, err := c.UpdateClusterMutationWithResponse(ctxTimeout, id, cloudapi.UpdateClusterMutationJSONRequestBody{ Configuration: &configuration, }, ) if err != nil { return err } prints.PrintCliStderr("Cluster updated") output.FormatClusters([]cloudapi.Cluster{lo.FromPtr(r.JSON200)}) return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.