Skip to content

Commit 2f4a337

Browse files
author
Paulo Gomes
authored
Merge pull request #672 from EdwinWalela/dev
remove hostname hyphen split block
2 parents a0070ce + 9c4dfc0 commit 2f4a337

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

main.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"net/http"
2323
"os"
2424
"path/filepath"
25-
"strings"
2625
"time"
2726

2827
"github.com/go-logr/logr"
@@ -312,14 +311,6 @@ func mustInitStorage(path string, storageAdvAddr string, artifactRetentionTTL ti
312311
}
313312

314313
func determineAdvStorageAddr(storageAddr string, l logr.Logger) string {
315-
// TODO(hidde): remove next MINOR prerelease as it can be passed in using
316-
// Kubernetes' substitution.
317-
if os.Getenv("RUNTIME_NAMESPACE") != "" {
318-
svcParts := strings.Split(os.Getenv("HOSTNAME"), "-")
319-
return fmt.Sprintf("%s.%s",
320-
strings.Join(svcParts[:len(svcParts)-2], "-"), os.Getenv("RUNTIME_NAMESPACE"))
321-
}
322-
323314
host, port, err := net.SplitHostPort(storageAddr)
324315
if err != nil {
325316
l.Error(err, "unable to parse storage address")

0 commit comments

Comments
 (0)