Skip to content

Commit

Permalink
Addressed the reviews(Code refactoring)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayanth Reddy committed Dec 20, 2022
1 parent 5e443b8 commit 74ac6ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/gen2_Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ arlon cluster create --cluster-name <clusterName> --repo-alias prod --repo-path

We call the concept of constructing various clusters with patches from the same base manifest as cluster overrides.
The cluster overrides feature is built on top of the existing base cluster design. So, A user can create a cluster from the base manifest using the same command as in the above step(gen2 cluster creation).
Now, to create a cluster with overrides in the base manifest, a user should have the corresponding patch files in a single yaml file in local. Example of a patch file where we want to override replicas count to 2 is and change the sshkeyname:
Now, to create a cluster with overrides in the base manifest, a user should have the corresponding patch files in a single yaml file in local. Here is an example of a patch file where we want to override replicas count to 2 and change the sshkeyname:

```shell
---
Expand Down Expand Up @@ -403,7 +403,7 @@ Refer to this [document](https://blog.scottlowe.org/2019/11/12/using-kustomize-w
Command to create a gen2 workload cluster form the base cluster manifest with overrides to the manifest is:

```shell
arlon cluster create <cluster-name> --repo-url <repo url where base manifest is present> --repo-path <repo path to the base manifest> --overrides-path <path to the patch files folder> --patch-repo-url <repo url where patch files should be stored> --patch-repo-path <repo path to store the patch files>
arlon cluster create <cluster-name> --repo-url <repo url where base manifest is present> --repo-path <repo path to the base manifest> --overrides-path <path to the patch file> --patch-repo-url <repo url where patch file should be stored> --patch-repo-path <repo path to store the patch file>
````
Runnning the above command will create a cluster named folder in patch repo path of patch repo url which contains the patch files, kustomization.yaml and configurations.yaml which are used to create the cluster app.
Expand Down
2 changes: 1 addition & 1 deletion pkg/gitutils/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func CopyPatchManifests(wt *gogit.Worktree, filePath string, clusterPath string,
}
err = tmpl.Execute(file, yamlData)
if err != nil {
return fmt.Errorf("failed to execute kustomization.yaml manifest: %s", err)
return fmt.Errorf("failed to execute kustomization.yaml manifest")
}
_ = file.Close()
if err != nil {
Expand Down

0 comments on commit 74ac6ee

Please sign in to comment.