Skip to content

Commit

Permalink
feat: drop backward compatible flag
Browse files Browse the repository at this point in the history
align with beats
  • Loading branch information
kruskall committed Jan 28, 2025
1 parent ef0060d commit aa89be4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions internal/beatcmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,5 @@ func initRand() {
}

func initFlags() {
// For backwards compatibility, initialize and convert known -flags to --flags.
cfgfile.Initialize()
cfgfile.AddAllowedBackwardsCompatibleFlag("v")
cfgfile.AddAllowedBackwardsCompatibleFlag("e")
cfgfile.AddAllowedBackwardsCompatibleFlag("d")
cfgfile.AddAllowedBackwardsCompatibleFlag("environment")
cfgfile.ConvertFlagsForBackwardsCompatibility()
}
2 changes: 1 addition & 1 deletion packaging/ironbank/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ USER ${ELASTIC_PRODUCT}
EXPOSE 8200
# TODO: eventually /tinit will be replaced by /usr/bin/tini
ENTRYPOINT ["/tinit", "--", "/usr/share/apm-server/apm-server"]
CMD ["-environment", "container"]
CMD ["--environment", "container"]

HEALTHCHECK --interval=10s --timeout=5s --start-period=1m --retries=5 CMD (curl -I -f --max-time 5 https://127.0.0.1:8200 || curl -I -f --max-time 5 http://127.0.0.1:8200 || exit 1)
4 changes: 2 additions & 2 deletions systemtest/cmdflags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

func TestAPMServerEnvironment(t *testing.T) {
// Check that apm-server starts up cleanly with the "-environment" flag.
// Check that apm-server starts up cleanly with the "--environment" flag.
for _, env := range []string{
"container",
"systemd",
Expand All @@ -35,7 +35,7 @@ func TestAPMServerEnvironment(t *testing.T) {
t.Run(env, func(t *testing.T) {
t.Parallel()
// NewServer adds a cleanup to close the server.
apmservertest.NewServerTB(t, "-environment", env)
apmservertest.NewServerTB(t, "--environment", env)
})
}
}

0 comments on commit aa89be4

Please sign in to comment.