Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename buildName flag to name #277

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 5 additions & 5 deletions pkg/cmd/create/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
var (
// Flags
recreateCluster bool
buildName string
name string
kubeVersion string
extraPortsMapping string
kindConfigPath string
Expand All @@ -45,14 +45,14 @@
func init() {
// cluster related flags
CreateCmd.PersistentFlags().BoolVar(&recreateCluster, "recreate", false, "Delete cluster first if it already exists.")
CreateCmd.PersistentFlags().StringVar(&buildName, "build-name", "localdev", "Name for build (Prefix for kind cluster name, pod names, etc).")
CreateCmd.PersistentFlags().StringVar(&name, "name", "localdev", "Name for build (Prefix for kind cluster name, pod names, etc).")
CreateCmd.PersistentFlags().StringVar(&kubeVersion, "kube-version", "v1.29.2", "Version of the kind kubernetes cluster to create.")
CreateCmd.PersistentFlags().StringVar(&extraPortsMapping, "extra-ports", "", "List of extra ports to expose on the docker container and kubernetes cluster as nodePort (e.g. \"22:32222,9090:39090,etc\").")
CreateCmd.PersistentFlags().StringVar(&kindConfigPath, "kind-config", "", "Path of the kind config file to be used instead of the default.")

// in-cluster resources related flags
CreateCmd.PersistentFlags().StringVar(&host, "host", "cnoe.localtest.me", "Host name to access resources in this cluster.")
CreateCmd.PersistentFlags().StringVar(&ingressHost, "ingress-host-name", "", "Host name used by ingresses. Useful when you have another proxy infront of idpbuilder.")

Check failure on line 55 in pkg/cmd/create/root.go

View workflow job for this annotation

GitHub Actions / Check for spelling errors

infront ==> in front
CreateCmd.PersistentFlags().StringVar(&protocol, "protocol", "https", "Protocol to use to access web UIs. http or https.")
CreateCmd.PersistentFlags().StringVar(&port, "port", "8443", "Port number under which idpBuilder tools are accessible.")
CreateCmd.PersistentFlags().BoolVar(&pathRouting, "use-path-routing", false, "When set to true, web UIs are exposed under single domain name.")
Expand Down Expand Up @@ -110,7 +110,7 @@
}

opts := build.NewBuildOptions{
Name: buildName,
Name: name,
KubeVersion: kubeVersion,
KubeConfigPath: kubeConfigPath,
KindConfigPath: kindConfigPath,
Expand Down Expand Up @@ -155,8 +155,8 @@
}

func validate() error {
if buildName == "" {
return fmt.Errorf("must specify build-name")
if name == "" {
return fmt.Errorf("must specify name")
}

_, err := url.Parse(fmt.Sprintf("%s://%s:%s", protocol, host, port))
Expand Down
Loading