Skip to content

Commit

Permalink
move zarf logging username to config
Browse files Browse the repository at this point in the history
  • Loading branch information
Racer159 committed Aug 15, 2023
1 parent 6a389c0 commit b614805
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
6 changes: 2 additions & 4 deletions src/pkg/message/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (

// Common constants for printing credentials
const (
loggingUsername = "zarf-admin"

RegistryKey = "registry"
RegistryReadKey = "registry-readonly"
GitKey = "git"
Expand Down Expand Up @@ -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" {
Expand All @@ -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)
Expand Down

0 comments on commit b614805

Please sign in to comment.