Skip to content

Commit

Permalink
Merge pull request #196 from itdove/v1.0.8
Browse files Browse the repository at this point in the history
update doc and code smells
  • Loading branch information
itdove committed Mar 25, 2022
2 parents 059f688 + ef81c36 commit dcdeabb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/help/cm_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ create a resource
* [cm create clusterpool](cm_create_clusterpool.md) - Create a clusterpool
* [cm create clusterpoolhost](cm_create_clusterpoolhost.md) - Initialize a clusterpool management cluster
* [cm create clusterset](cm_create_clusterset.md) - create a clusterset
* [cm create work](cm_create_work.md) - create a work
* [cm create work](cm_create_work.md) - create a work using resource-to-apply yaml file

4 changes: 2 additions & 2 deletions docs/help/cm_create_work.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## cm create work

create a work
create a work using resource-to-apply yaml file

### Synopsis

create manifestwork on a specified managedcluster
create a work using a file containing common kubernetes resource manifests, or a director containing a set of manifest files.

```
cm create work [flags]
Expand Down
3 changes: 2 additions & 1 deletion docs/help/cm_delete_work.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ cm delete work work-example --cluster cluster1
### Options

```
-h, --help help for work
--force set force flag to enable force delete
-h, --help help for work
```

### Options inherited from parent commands
Expand Down
5 changes: 4 additions & 1 deletion pkg/clusterpoolhost/clusterpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ func (cph *ClusterPoolHost) CreateClusterPool(clusterPoolName, cloud string, val
applierBuilder := &clusteradmapply.ApplierBuilder{}
applier := applierBuilder.WithClient(kubeClient, apiExtensionsClient, dynamicClient).Build()

installConfig, err := applier.MustTemplateAsset(reader, values, "", filepath.Join("create", "clusterpool", cloud, "install_config.yaml"))
installConfig, err := applier.MustTemplateAsset(reader,
values,
"",
filepath.Join("create", "clusterpool", cloud, "install_config.yaml"))
if err != nil {
return err
}
Expand Down
5 changes: 4 additions & 1 deletion pkg/cmd/create/cluster/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ func (o *Options) runWithClient(kubeClient kubernetes.Interface,
applierBuilder := &clusteradmapply.ApplierBuilder{}
applier := applierBuilder.WithClient(kubeClient, apiextensionsClient, dynamicClient).Build()

installConfig, err := applier.MustTemplateAsset(reader, o.values, "", filepath.Join(scenarioDirectory, "hub", o.cloud, "install_config.yaml"))
installConfig, err := applier.MustTemplateAsset(reader,
o.values,
"",
filepath.Join(scenarioDirectory, "hub", o.cloud, "install_config.yaml"))
if err != nil {
return err
}
Expand Down

0 comments on commit dcdeabb

Please sign in to comment.