Skip to content

Commit

Permalink
Deprecate packet endpoints
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.

Signed-off-by: Chris Doherty <[email protected]>
  • Loading branch information
chrisdoherty4 committed Jun 28, 2022
1 parent 592588c commit d6eb9dd
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 d6eb9dd

Please sign in to comment.