diff --git a/osmclient/cli_commands/cluster.py b/osmclient/cli_commands/cluster.py index e486eee2dd0e6c28dd24ca5157202f87a0d5f720..147ce70c08c14a6ce719e0802f30d809e838b2bb 100755 --- a/osmclient/cli_commands/cluster.py +++ b/osmclient/cli_commands/cluster.py @@ -43,6 +43,12 @@ logger = logging.getLogger("osmclient") default=None, help="resource group in VIM account where the cluster will be created", ) +@click.option( + "--bootstrap/--no-bootstrap", + required=False, + default=True, + help="bootstrap the cluster with Flux (prepare for GitOps) (default=True)", +) @click.pass_context def cluster_create( ctx, @@ -54,6 +60,7 @@ def cluster_create( description, region_name, resource_group, + bootstrap, **kwargs ): """creates a K8s cluster @@ -74,6 +81,7 @@ def cluster_create( cluster["region_name"] = region_name if resource_group: cluster["resource_group"] = resource_group + cluster["bootstrap"] = bootstrap ctx.obj.cluster.create(name, content_dict=cluster) @@ -200,6 +208,12 @@ def cluster_get_kubeconfig(ctx, name, **kwargs): "--creds", prompt=True, help="credentials file, i.e. a valid `.kube/config` file" ) @click.option("--description", default="", help="human readable description") +@click.option( + "--bootstrap/--no-bootstrap", + required=False, + default=True, + help="bootstrap the cluster with Flux (prepare for GitOps) (default=True)", +) @click.pass_context def cluster_register( ctx, @@ -207,6 +221,7 @@ def cluster_register( vim_account, creds, description, + bootstrap, ): """registers a K8s cluster to OSM @@ -232,4 +247,5 @@ def cluster_register( # cluster["namespace"] = namespace # if cni: # cluster["cni"] = yaml.safe_load(cni) + cluster["bootstrap"] = bootstrap ctx.obj.cluster.register(name, cluster)