Skip to content

Commit

Permalink
Deprecate packet endpoints (#111)
Browse files Browse the repository at this point in the history
`/_packet/version` and `/_packet/health` are deprecated in favor of
`/versionz` and `/heathz` respectively. This is in an effort to remove vendor specific endpoints that don't need to be vendor specific.

The deprecated APIs will continue working until the 0.8 release.

Fixes #96
  • Loading branch information
mergify[bot] authored Jun 28, 2022
2 parents 592588c + d6eb9dd commit 34573a1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ func Serve(
logger.Info("in the http serve func")
var mux http.ServeMux
mux.Handle("/metrics", promhttp.Handler())
mux.Handle("/_packet/healthcheck", HealthCheckHandler(logger, client, start))
mux.Handle("/_packet/version", VersionHandler(logger))

healthCheckHandler := HealthCheckHandler(logger, client, start)
mux.Handle("/_packet/healthcheck", healthCheckHandler) // deprecated
mux.Handle("/healthz", healthCheckHandler)

versionHandler := VersionHandler(logger)
mux.Handle("/_packet/version", versionHandler) // deprecated
mux.Handle("/versionz", versionHandler)

ec2MetadataHandler := otelhttp.WithRouteTag("/2009-04-04", EC2MetadataHandler(logger, client))
mux.Handle("/2009-04-04/", ec2MetadataHandler)
Expand Down

0 comments on commit 34573a1

Please sign in to comment.