From b61480545374bdf99372dd9a1aedd376380b90cd Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Tue, 15 Aug 2023 16:15:41 -0500 Subject: [PATCH] move zarf logging username to config --- src/config/config.go | 2 ++ src/pkg/message/credentials.go | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config/config.go b/src/config/config.go index 593dbcbd8c..8f1b65595f 100644 --- a/src/config/config.go +++ b/src/config/config.go @@ -70,6 +70,8 @@ const ( ZarfGitPushUser = "zarf-git-user" ZarfGitReadUser = "zarf-git-read-user" + ZarfLoggingUser = "zarf-admin" + ZarfInClusterGitServiceURL = "http://zarf-gitea-http.zarf.svc.cluster.local:3000" ZarfInClusterArtifactServiceURL = ZarfInClusterGitServiceURL + "/api/packages/" + ZarfGitPushUser ) diff --git a/src/pkg/message/credentials.go b/src/pkg/message/credentials.go index 6f82ff6012..b1f8ccbe8d 100644 --- a/src/pkg/message/credentials.go +++ b/src/pkg/message/credentials.go @@ -16,8 +16,6 @@ import ( // Common constants for printing credentials const ( - loggingUsername = "zarf-admin" - RegistryKey = "registry" RegistryReadKey = "registry-readonly" GitKey = "git" @@ -51,7 +49,7 @@ func PrintCredentialTable(state *types.ZarfState, componentsToDeploy []types.Dep for _, component := range componentsToDeploy { // Show message if including logging stack if component.Name == "logging" { - loginTable = append(loginTable, pterm.TableData{{" Logging", loggingUsername, state.LoggingSecret, "zarf connect logging", LoggingKey}}...) + loginTable = append(loginTable, pterm.TableData{{" Logging", config.ZarfLoggingUser, state.LoggingSecret, "zarf connect logging", LoggingKey}}...) } // Show message if including git-server if component.Name == "git-server" { @@ -78,7 +76,7 @@ func PrintCredentialTable(state *types.ZarfState, componentsToDeploy []types.Dep func PrintComponentCredential(state *types.ZarfState, componentName string) { switch strings.ToLower(componentName) { case LoggingKey: - Notef("Logging credentials (username: %s):", loggingUsername) + Notef("Logging credentials (username: %s):", config.ZarfLoggingUser) fmt.Println(state.LoggingSecret) case GitKey: Notef("Git Server push password (username: %s):", state.GitServer.PushUsername)