Skip to content

Commit

Permalink
[Elastic Agent] Remove deprecated --kibana-url. (#25529)
Browse files Browse the repository at this point in the history
* Remove deprecated --kibana-url.

* Add changelog.

(cherry picked from commit 48d7ba1)
  • Loading branch information
blakerouse authored and mergify-bot committed May 10, 2021
1 parent 1535303 commit f5b7980
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
1 change: 1 addition & 0 deletions x-pack/elastic-agent/CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
7 changes: 0 additions & 7 deletions x-pack/elastic-agent/pkg/agent/cmd/enroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
}
Expand Down Expand Up @@ -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")
Expand Down
3 changes: 0 additions & 3 deletions x-pack/elastic-agent/pkg/agent/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f5b7980

Please sign in to comment.