diff --git a/x-pack/elastic-agent/CHANGELOG.next.asciidoc b/x-pack/elastic-agent/CHANGELOG.next.asciidoc index 9ad338b99fa0..85604633e3a4 100644 --- a/x-pack/elastic-agent/CHANGELOG.next.asciidoc +++ b/x-pack/elastic-agent/CHANGELOG.next.asciidoc @@ -10,6 +10,7 @@ - Docker container is not run as root by default. {pull}21213[21213] - Read Fleet connection information from `fleet.*` instead of `fleet.kibana.*`. {pull}24713[24713] - Beats build for 32Bit Windows or Linux system will refuse to run on a 64bit system. {pull}25186[25186] +- Remove the `--kibana-url` from `install` and `enroll` command. {pull}25529[25529] ==== Bugfixes - Fix rename *ConfigChange to *PolicyChange to align on changes in the UI. {pull}20779[20779] diff --git a/x-pack/elastic-agent/pkg/agent/cmd/enroll.go b/x-pack/elastic-agent/pkg/agent/cmd/enroll.go index fc62d8deff86..55baf76f56a5 100644 --- a/x-pack/elastic-agent/pkg/agent/cmd/enroll.go +++ b/x-pack/elastic-agent/pkg/agent/cmd/enroll.go @@ -50,7 +50,6 @@ func newEnrollCommandWithArgs(_ []string, streams *cli.IOStreams) *cobra.Command func addEnrollFlags(cmd *cobra.Command) { cmd.Flags().StringP("url", "", "", "URL to enroll Agent into Fleet") - cmd.Flags().StringP("kibana-url", "k", "", "URL of Fleet-Server to enroll Agent into Fleet-Server (deprecated)") cmd.Flags().StringP("enrollment-token", "t", "", "Enrollment token to use to enroll Agent into Fleet") cmd.Flags().StringP("fleet-server-es", "", "", "Start and run a Fleet Server along side this Elastic Agent connecting to the provided elasticsearch") cmd.Flags().StringP("fleet-server-es-ca", "", "", "Path to certificate authority to use with communicate with elasticsearch") @@ -71,9 +70,6 @@ func buildEnrollmentFlags(cmd *cobra.Command, url string, token string) []string if url == "" { url, _ = cmd.Flags().GetString("url") } - if url == "" { - url, _ = cmd.Flags().GetString("kibana-url") - } if token == "" { token, _ = cmd.Flags().GetString("enrollment-token") } @@ -212,9 +208,6 @@ func enroll(streams *cli.IOStreams, cmd *cobra.Command, args []string) error { insecure, _ := cmd.Flags().GetBool("insecure") url, _ := cmd.Flags().GetString("url") - if url == "" { - url, _ = cmd.Flags().GetString("kibana-url") - } enrollmentToken, _ := cmd.Flags().GetString("enrollment-token") fServer, _ := cmd.Flags().GetString("fleet-server-es") fElasticSearchCA, _ := cmd.Flags().GetString("fleet-server-es-ca") diff --git a/x-pack/elastic-agent/pkg/agent/cmd/install.go b/x-pack/elastic-agent/pkg/agent/cmd/install.go index 3cffe1bb8df1..4a8893b9c878 100644 --- a/x-pack/elastic-agent/pkg/agent/cmd/install.go +++ b/x-pack/elastic-agent/pkg/agent/cmd/install.go @@ -94,9 +94,6 @@ func installCmd(streams *cli.IOStreams, cmd *cobra.Command, args []string) error enroll := true askEnroll := true url, _ := cmd.Flags().GetString("url") - if url == "" { - url, _ = cmd.Flags().GetString("kibana-url") - } token, _ := cmd.Flags().GetString("enrollment-token") if url != "" && token != "" { askEnroll = false