Add MizuAgentImageRepo constant and use it as default AgentImage value

This commit is contained in:
M. Mert Yildiran
2022-01-23 19:31:43 +03:00
parent d782380dc5
commit 4ddcb7cb92
3 changed files with 8 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
name: Publish a Docker image
name: Release
on:
push:
@@ -221,7 +221,7 @@ jobs:
done <<< "${{ steps.meta.outputs.tags }}"
cli:
name: Build the CLI and release
name: Build the CLI and publish
runs-on: ubuntu-latest
needs: [docker-manifest, gcp-registry]
steps:

View File

@@ -2,15 +2,16 @@ package config
import (
"fmt"
"os"
"path"
"path/filepath"
"github.com/op/go-logging"
"github.com/up9inc/mizu/cli/config/configStructs"
"github.com/up9inc/mizu/cli/mizu"
"github.com/up9inc/mizu/shared"
v1 "k8s.io/api/core/v1"
"k8s.io/client-go/util/homedir"
"os"
"path"
"path/filepath"
)
const (
@@ -52,7 +53,7 @@ func (config *ConfigStruct) validate() error {
func (config *ConfigStruct) SetDefaults() {
config.BasenineImage = fmt.Sprintf("%s:%s", shared.BasenineImageRepo, shared.BasenineImageTag)
config.KratosImage = shared.KratosImageDefault
config.AgentImage = fmt.Sprintf("gcr.io/up9-docker-hub/mizu/%s:%s", mizu.Branch, mizu.SemVer)
config.AgentImage = fmt.Sprintf("%s:%s", shared.MizuAgentImageRepo, mizu.SemVer)
config.ConfigFilePath = path.Join(mizu.GetMizuFolderPath(), "config.yaml")
}

View File

@@ -14,6 +14,7 @@ const (
GoGCEnvVar = "GOGC"
DefaultApiServerPort = 8899
LogLevelEnvVar = "LOG_LEVEL"
MizuAgentImageRepo = "docker.io/up9inc/mizu"
BasenineHost = "127.0.0.1"
BaseninePort = "9099"
BasenineImageRepo = "docker.io/up9inc/basenine"