config

package
v0.0.0-...-e52ba1f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Separator      = "="
	SetCommandName = "set"
	FieldNameTag   = "yaml"
	ReadonlyTag    = "readonly"
)
View Source
const (
	MizuResourcesNamespaceConfigName = "mizu-resources-namespace"
	ConfigFilePathCommandName        = "config-path"
	KubeConfigPathConfigName         = "kube-config-path"
)
View Source
const (
	ApiServerRetries    = "API_SERVER_RETRIES"
	ApiServerTimeoutSec = "API_SERVER_TIMEOUT_SEC"
)

Variables

View Source
var (
	Config = ConfigStruct{}
)

Functions

func GetIntEnvConfig

func GetIntEnvConfig(key string, defaultValue int) int

func InitConfig

func InitConfig(cmd *cobra.Command) error

func WriteConfig

func WriteConfig(config *ConfigStruct) error

Types

type ConfigStruct

type ConfigStruct struct {
	Tap                    configStructs.TapConfig     `yaml:"tap"`
	Check                  configStructs.CheckConfig   `yaml:"check"`
	Install                configStructs.InstallConfig `yaml:"install"`
	Version                configStructs.VersionConfig `yaml:"version"`
	View                   configStructs.ViewConfig    `yaml:"view"`
	Logs                   configStructs.LogsConfig    `yaml:"logs"`
	Config                 configStructs.ConfigConfig  `yaml:"config,omitempty"`
	AgentImage             string                      `yaml:"agent-image,omitempty" readonly:""`
	ImagePullPolicyStr     string                      `yaml:"image-pull-policy" default:"Always"`
	MizuResourcesNamespace string                      `yaml:"mizu-resources-namespace" default:"mizu"`
	DumpLogs               bool                        `yaml:"dump-logs" default:"false"`
	KubeConfigPathStr      string                      `yaml:"kube-config-path"`
	KubeContext            string                      `yaml:"kube-context"`
	ConfigFilePath         string                      `yaml:"config-path,omitempty" readonly:""`
	HeadlessMode           bool                        `yaml:"headless" default:"false"`
	LogLevelStr            string                      `yaml:"log-level,omitempty" default:"INFO" readonly:""`
	ServiceMap             bool                        `yaml:"service-map" default:"true"`
	OAS                    shared.OASConfig            `yaml:"oas"`
}

func GetConfigWithDefaults

func GetConfigWithDefaults() (*ConfigStruct, error)

func (*ConfigStruct) ImagePullPolicy

func (config *ConfigStruct) ImagePullPolicy() v1.PullPolicy

func (*ConfigStruct) IsNsRestrictedMode

func (config *ConfigStruct) IsNsRestrictedMode() bool

func (*ConfigStruct) KubeConfigPath

func (config *ConfigStruct) KubeConfigPath() string

func (*ConfigStruct) LogLevel

func (config *ConfigStruct) LogLevel() logging.Level

func (*ConfigStruct) SetDefaults

func (config *ConfigStruct) SetDefaults()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL