Skip to content

Commit

Permalink
Update document with newer flags
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsbhat committed Apr 15, 2023
1 parent adf370d commit 2d7986a
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 25 deletions.
14 changes: 7 additions & 7 deletions cmd/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
func getRootCommand() *cobra.Command {
rootCommand := &cobra.Command{
Use: "drift [command]",
Short: "Utility that helps in identifying drifts in infrastructure",
Long: `Identifies drifts (mostly due to in place edits) in the kubernetes workloads provisioned via helm charts.`,
Short: "A utility that helps in identifying drifts in infrastructure",
Long: `Identifies configuration drifts (mostly due to in-place edits) in the Kubernetes workloads provisioned via Helm charts.`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
if err := cmd.Usage(); err != nil {
Expand All @@ -36,16 +36,16 @@ func getVersionCommand() *cobra.Command {
return &cobra.Command{
Use: "version [flags]",
Short: "Command to fetch the version of helm-drift installed",
Long: `This will help user to find what version of helm-drift plugin he/she installed in her machine.`,
Long: `This will help the user find what version of the helm-drift plugin he or she installed in her machine.`,
RunE: versionConfig,
}
}

func getRunCommand() *cobra.Command {
driftCommand := &cobra.Command{
Use: "run [RELEASE] [CHART] [flags]",
Short: "Identifies drifts from a selected chart/release",
Long: "Lists all configuration drifts that are part of specified chart/release if exists.",
Short: "Identifies drifts from a selected chart or release.",
Long: "It lists all configuration drifts that are part of the specified chart or release, if one exists.",
Example: ` helm drift run prometheus-standalone path/to/chart/prometheus-standalone -f ~/path/to/override-config.yaml
helm drift run prometheus-standalone --from-release`,
Args: minimumArgError,
Expand Down Expand Up @@ -78,8 +78,8 @@ func getRunCommand() *cobra.Command {
func getAllCommand() *cobra.Command {
driftCommand := &cobra.Command{
Use: "all",
Short: "Identifies drifts from all release from the cluster",
Long: "Lists all configuration drifts that are part of various releases present in the cluster.",
Short: "Identifies drifts from all releases from the cluster.",
Long: "It lists all configuration drifts that are part of various releases present in the cluster.",
Example: ` helm drift all --kube-context k3d-sample
helm drift all --kube-context k3d-sample -n sample`,
Args: cobra.NoArgs,
Expand Down
4 changes: 4 additions & 0 deletions completion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ commands:
- disable-error-on-drift
- from-release
- json
- kind
- name
- regex
- report
- skip-cleaning
Expand All @@ -27,6 +29,8 @@ commands:
- disable-error-on-drift
- is-default-namespace
- json
- kind
- name
- regex
- report
- skip-cleaning
Expand Down
10 changes: 5 additions & 5 deletions docs/doc/drift.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## drift

Utility that helps in identifying drifts in infrastructure
A utility that helps in identifying drifts in infrastructure

### Synopsis

Identifies drifts (mostly due to in place edits) in the kubernetes workloads provisioned via helm charts.
Identifies configuration drifts (mostly due to in-place edits) in the Kubernetes workloads provisioned via Helm charts.

```
drift [command] [flags]
Expand All @@ -25,8 +25,8 @@ drift [command] [flags]

### SEE ALSO

* [drift all](drift_all.md) - Identifies drifts from all release from the cluster
* [drift run](drift_run.md) - Identifies drifts from a selected chart/release
* [drift all](drift_all.md) - Identifies drifts from all releases from the cluster.
* [drift run](drift_run.md) - Identifies drifts from a selected chart or release.
* [drift version](drift_version.md) - Command to fetch the version of helm-drift installed

###### Auto generated by spf13/cobra on 3-Apr-2023
###### Auto generated by spf13/cobra on 15-Apr-2023
12 changes: 7 additions & 5 deletions docs/doc/drift_all.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## drift all

Identifies drifts from all release from the cluster
Identifies drifts from all releases from the cluster.

### Synopsis

Lists all configuration drifts that are part of various releases present in the cluster.
It lists all configuration drifts that are part of various releases present in the cluster.

```
drift all [flags]
Expand All @@ -25,12 +25,14 @@ drift all [flags]
-h, --help help for all
--is-default-namespace set this flag if drifts have to be checked specifically in 'default' namespace
-j, --json enable the flag to render drifts in json format (disabled by default)
--kind strings kubernetes resource names to limit the drift identification (--kind takes higher precedence over --name)
--name string name of the kubernetes resource to limit the drift identification
--regex string regex used to split helm template rendered (default "---\\n# Source:\\s.*.")
--report when enabled the summary report would be rendered on to a file (this works only if --yaml or --json is enabled along with summary)
--skip-cleaning enable the flag to skip cleaning the manifests rendered on to disk
--skip-validation enable the flag if prerequisite validation needs to be skipped
--summary if enabled, prints a quick summary in table format without printing actual drifts
--temp-path string path on disk where the helm templates would be rendered on to (the same would be used be used by 'kubectl diff') (default "$(HOME)/.helm-drift/templates")
--temp-path string path on disk where the helm templates would be rendered on to (the same would be used be used by 'kubectl diff') (default "/Users/nikhil.bhat/.helm-drift/templates")
-y, --yaml enable the flag to render drifts in yaml format (disabled by default)
```

Expand All @@ -48,6 +50,6 @@ drift all [flags]

### SEE ALSO

* [drift](drift.md) - Utility that helps in identifying drifts in infrastructure
* [drift](drift.md) - A utility that helps in identifying drifts in infrastructure

###### Auto generated by spf13/cobra on 3-Apr-2023
###### Auto generated by spf13/cobra on 15-Apr-2023
12 changes: 7 additions & 5 deletions docs/doc/drift_run.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## drift run

Identifies drifts from a selected chart/release
Identifies drifts from a selected chart or release.

### Synopsis

Lists all configuration drifts that are part of specified chart/release if exists.
It lists all configuration drifts that are part of the specified chart or release, if one exists.

```
drift run [RELEASE] [CHART] [flags]
Expand All @@ -25,12 +25,14 @@ drift run [RELEASE] [CHART] [flags]
--from-release enable the flag to identify drifts from a release instead (disabled by default, works with command 'run' not with 'all')
-h, --help help for run
-j, --json enable the flag to render drifts in json format (disabled by default)
--kind strings kubernetes resource names to limit the drift identification (--kind takes higher precedence over --name)
--name string name of the kubernetes resource to limit the drift identification
--regex string regex used to split helm template rendered (default "---\\n# Source:\\s.*.")
--report when enabled the summary report would be rendered on to a file (this works only if --yaml or --json is enabled along with summary)
--skip-cleaning enable the flag to skip cleaning the manifests rendered on to disk
--skip-validation enable the flag if prerequisite validation needs to be skipped
--summary if enabled, prints a quick summary in table format without printing actual drifts
--temp-path string path on disk where the helm templates would be rendered on to (the same would be used be used by 'kubectl diff') (default "$(HOME)/.helm-drift/templates")
--temp-path string path on disk where the helm templates would be rendered on to (the same would be used be used by 'kubectl diff') (default "/Users/nikhil.bhat/.helm-drift/templates")
-y, --yaml enable the flag to render drifts in yaml format (disabled by default)
```

Expand All @@ -48,6 +50,6 @@ drift run [RELEASE] [CHART] [flags]

### SEE ALSO

* [drift](drift.md) - Utility that helps in identifying drifts in infrastructure
* [drift](drift.md) - A utility that helps in identifying drifts in infrastructure

###### Auto generated by spf13/cobra on 3-Apr-2023
###### Auto generated by spf13/cobra on 15-Apr-2023
6 changes: 3 additions & 3 deletions docs/doc/drift_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Command to fetch the version of helm-drift installed

### Synopsis

This will help user to find what version of helm-drift plugin he/she installed in her machine.
This will help the user find what version of the helm-drift plugin he or she installed in her machine.

```
drift version [flags]
Expand All @@ -30,6 +30,6 @@ drift version [flags]

### SEE ALSO

* [drift](drift.md) - Utility that helps in identifying drifts in infrastructure
* [drift](drift.md) - A utility that helps in identifying drifts in infrastructure

###### Auto generated by spf13/cobra on 3-Apr-2023
###### Auto generated by spf13/cobra on 15-Apr-2023

0 comments on commit 2d7986a

Please sign in to comment.