Skip to content

Commit

Permalink
Removal of Packet references
Browse files Browse the repository at this point in the history
This removes the `_packet` from the health end point and renames it to the standard `healthz`. It also renames environment variables to TINKERBELL inline with the project
  • Loading branch information
thebsdbox committed Aug 18, 2020
1 parent 74ef27e commit 49b12ce
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ services:
restart: unless-stopped
environment:
FACILITY: ${FACILITY:-onprem}
PACKET_ENV: ${PACKET_ENV:-testing}
PACKET_VERSION: ${PACKET_VERSION:-ignored}
TINKERBELL_ENV: ${TINKERBELL_ENV:-testing}
TINKERBELL_VERSION: ${TINKERBELL_VERSION:-ignored}
ROLLBAR_TOKEN: ${ROLLBAR_TOKEN:-ignored}
ROLLBAR_DISABLE: ${ROLLBAR_DISABLE:-1}
PGDATABASE: tinkerbell
Expand Down
4 changes: 2 additions & 2 deletions grpc-server/tinkerbell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ var (
)

func TestMain(m *testing.M) {
os.Setenv("PACKET_ENV", "test")
os.Setenv("PACKET_VERSION", "ignored")
os.Setenv("TINKERBELL_ENV", "test")
os.Setenv("TINKERBELL_VERSION", "ignored")
os.Setenv("ROLLBAR_TOKEN", "ignored")

l, _, _ := log.Init("github.com/tinkerbell/tink")
Expand Down
4 changes: 2 additions & 2 deletions http-server/http_handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ func (s *server) Push(ctx context.Context, in *hardware.PushRequest) (*hardware.
}

func TestMain(m *testing.M) {
os.Setenv("PACKET_ENV", "test")
os.Setenv("PACKET_VERSION", "ignored")
os.Setenv("TINKERBELL_ENV", "test")
os.Setenv("TINKERBELL_VERSION", "ignored")
os.Setenv("ROLLBAR_TOKEN", "ignored")

logger, _, _ = log.Init("github.com/tinkerbell/tink")
Expand Down
2 changes: 1 addition & 1 deletion http-server/http_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func SetupHTTP(ctx context.Context, lg log.Logger, certPEM []byte, modTime time.
http.Handle("/metrics", promhttp.Handler())
setupGitRevJSON()
http.HandleFunc("/version", versionHandler)
http.HandleFunc("/_packet/healthcheck", healthCheckHandler)
http.HandleFunc("/healthz", healthCheckHandler)
http.Handle("/", BasicAuth(mux))

if httpListenAddr == "" {
Expand Down
4 changes: 2 additions & 2 deletions test-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ services:
build: .
environment:
FACILITY: ${FACILITY:-lab1}
PACKET_ENV: ${PACKET_ENV:-testing}
PACKET_VERSION: ${PACKET_VERSION:-5efab5ef3a42cb88f2d54f4ed3201c2dd6797b7d}
TINKERBELL_ENV: ${TINKERBELL_ENV:-testing}
TINKERBELL_VERSION: ${TINKERBELL_VERSION:-5efab5ef3a42cb88f2d54f4ed3201c2dd6797b7d}
ROLLBAR_TOKEN: ${ROLLBAR_TOKEN:-9b78d0ad01d1467aa92c49c3a349b79d}
ROLLBAR_DISABLE: ${ROLLBAR_DISABLE:-0}
PGDATABASE: tinkerbell
Expand Down
2 changes: 1 addition & 1 deletion test/_vagrant/vagrant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func TestVagrantSetupGuide(t *testing.T) {
}

for ii := 0; ii < 5; ii++ {
resp, err := http.Get("http://localhost:42114/_packet/healthcheck")
resp, err := http.Get("http://localhost:42114/healthz")
if err != nil || resp.StatusCode != http.StatusOK {
if err != nil {
t.Logf("err tinkerbell healthcheck... retrying: %s", err)
Expand Down

0 comments on commit 49b12ce

Please sign in to comment.