Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/remote/longhornctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func newCmdLonghornctl() *cobra.Command {
cmd.CompletionOptions.HiddenDefaultCmd = true

cmd.PersistentFlags().StringVarP(&globalOpts.LogLevel, consts.CmdOptLogLevel, "l", "info", "log level (trace, debug, info, warn, error, fatal, panic)")
cmd.PersistentFlags().StringVar(&globalOpts.KubeConfigPath, consts.CmdOptKubeConfigPath, os.Getenv(consts.EnvKubeConfigPath), "Kubernetes config (kubeconfig) path")
cmd.PersistentFlags().StringVar(&globalOpts.KubeConfigPath, consts.CmdOptKubeConfigPath, "", "Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used")
cmd.PersistentFlags().StringVar(&globalOpts.Image, consts.CmdOptImage, consts.ImageLonghornCli, "Image containing longhornctl-local")
cmd.PersistentFlags().StringVar(&globalOpts.ImageRegistry, consts.CmdOptImageRegistry, "", "Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.")
cmd.PersistentFlags().StringVar(&globalOpts.ImagePullSecret, consts.CmdOptImagePullSecret, "", "Secret with registry credentials for pulling images")
Expand Down
2 changes: 1 addition & 1 deletion cmd/remote/subcmd/diagnose.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ $ longhornctl diagnose -o json 2>/dev/null | jq '.[] | select(.status == "fail")
}

cmd.PersistentFlags().StringVarP(&globalOpts.LogLevel, consts.CmdOptLogLevel, "l", globalOpts.LogLevel, "Log level")
cmd.PersistentFlags().StringVar(&globalOpts.KubeConfigPath, consts.CmdOptKubeConfigPath, globalOpts.KubeConfigPath, "Kubernetes config (kubeconfig) path")
cmd.PersistentFlags().StringVar(&globalOpts.KubeConfigPath, consts.CmdOptKubeConfigPath, globalOpts.KubeConfigPath, "Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used")
cmd.PersistentFlags().StringVar(&globalOpts.Namespace, consts.CmdOptNamespace, globalOpts.Namespace, "The namespace where Longhorn is installed.")
cmd.Flags().StringVarP(&outputFormat, consts.CmdOptOutput, "o", diagnose.OutputFormatYAML, fmt.Sprintf("Output format of the results. One of: %v.", strings.Join(diagnose.OutputFormats, ", ")))

Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A CLI tool for troubleshooting and managing Longhorn operations.
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string log level (trace, debug, info, warn, error, fatal, panic) (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Longhorn checking operations
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_check_preflight.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ INFO[2024-07-16T17:17:42+08:00] Completed preflight checker
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_checksum.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Snapshot checksum operations
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_checksum_volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $ longhornctl checksum volume --name=v1 --namespace=longhorn-system
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--name string Name of the Longhorn volume
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_diagnose.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $ longhornctl diagnose -o json 2>/dev/null | jq '.[] | select(.status == "fail")

```
-h, --help help for diagnose
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--namespace string The namespace where Longhorn is installed. (default "longhorn-system")
-o, --output string Output format of the results. One of: yaml, json. (default "yaml")
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ longhornctl doc [output directory] [flags]
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string log level (trace, debug, info, warn, error, fatal, panic) (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_export.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Export Longhorn resources
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_export_replica.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ lost+found
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--name string Specify the replica directory name to export. The replica data directory name is not the same as the Kubernetes Replica custom resource (CR) object name. To retrieve the replica directory name, use 'longhornctl get replica'.
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_export_replica_stop.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ INFO[2024-07-16T17:29:14+08:00] Successfully stopped exporting replica
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Longhorn information gathering operations
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_get_replica.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ INFO[2024-07-16T17:23:51+08:00] Completed replica getter
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--name string Specify the name of the replica to retrieve information.
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_global-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ longhornctl global-options [flags]
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string log level (trace, debug, info, warn, error, fatal, panic) (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Longhorn installation operations
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_install_preflight.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ If a reboot is required, the following message will be displayed:
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_install_preflight_stop.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ INFO[2024-07-16T17:21:32+08:00] Successfully stopped preflight installer
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_trim.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Longhorn trimming operations
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_trim_volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ INFO[2024-07-16T17:32:01+08:00] Completed volume trimmer vo
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string Log level (default "info")
--name string Name of the Longhorn volum to be trimmed.
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
Expand Down
2 changes: 1 addition & 1 deletion docs/longhornctl_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ longhornctl version [flags]
--image string Image containing longhornctl-local (default "longhornio/longhorn-cli:v1.13.0-dev")
--image-pull-secret string Secret with registry credentials for pulling images
--image-registry string Registry to apply to all images (CLI, engine, pause, BCI, etc.), replacing any registry already specified in those images.
--kubeconfig string Kubernetes config (kubeconfig) path
--kubeconfig string Kubernetes config (kubeconfig) path. If not set, $KUBECONFIG or ~/.kube/config is used
-l, --log-level string log level (trace, debug, info, warn, error, fatal, panic) (default "info")
--namespace string The namespace to run DaemonSet pods. (default "longhorn-system")
--node-selector string Comma-separated list of key=value pairs to match against node labels, selecting the nodes the DaemonSet will run on (e.g. env=prod,zone=us-west).
Expand Down
1 change: 0 additions & 1 deletion pkg/consts/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const (

const (
EnvCurrentNodeID = "CURRENT_NODE_ID"
EnvKubeConfigPath = "KUBECONFIG"
EnvLogLevel = "LOG_LEVEL"
EnvOutputFilePath = "OUTPUT_FILE_PATH"

Expand Down
Loading
Loading