config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogLevel               int
	ProbeAddr, MetricsAddr string
)

Functions

func AddFlags

func AddFlags()

func UpdateConfigFilePath

func UpdateConfigFilePath(configFile string)

Types

type CoeConfig

type CoeConfig struct {
	Cluster          string `ini:"cluster"`
	EnableVPCNetwork bool   `ini:"enable_vpc_network"`
}

type DefaultConfig

type DefaultConfig struct {
	Debug bool `ini:"debug"`
}

type HAConfig

type HAConfig struct {
	EnableHA *bool `ini:"enable"`
}

type K8sConfig

type K8sConfig struct {
	BaseLinePolicyType string `ini:"baseline_policy_type"`
	EnableNCPEvent     bool   `ini:"enable_ncp_event"`
	EnableVNetCRD      bool   `ini:"enable_vnet_crd"`
	EnableRestore      bool   `ini:"enable_restore"`
	EnablePromMetrics  bool   `ini:"enable_prometheus_metrics"`
	KubeConfigFile     string `ini:"kubeconfig"`
	// Controlled by FSS
	EnableAntreaNSXInterworking bool `ini:"enable_antrea_nsx_interworking"`
}

type NSXOperatorConfig

type NSXOperatorConfig struct {
	*DefaultConfig
	*CoeConfig
	*NsxConfig
	*K8sConfig
	*VCConfig
	*HAConfig
	// contains filtered or unexported fields
}

TODO delete unnecessary config

func LoadConfigFromFile

func LoadConfigFromFile() (*NSXOperatorConfig, error)

func NewNSXOperatorConfigFromFile

func NewNSXOperatorConfigFromFile() (*NSXOperatorConfig, error)

func NewNSXOpertorConfig

func NewNSXOpertorConfig() *NSXOperatorConfig

func (*NSXOperatorConfig) GetCACert added in v0.0.3

func (operatorConfig *NSXOperatorConfig) GetCACert() []byte

func (*NSXOperatorConfig) GetTokenProvider

func (operatorConfig *NSXOperatorConfig) GetTokenProvider() auth.TokenProvider

it's not thread safe

func (*NSXOperatorConfig) HAEnabled

func (operatorConfig *NSXOperatorConfig) HAEnabled() bool

type NsxConfig

type NsxConfig struct {
	NsxApiUser           string   `ini:"nsx_api_user"`
	NsxApiPassword       string   `ini:"nsx_api_password"`
	NsxApiCertFile       string   `ini:"nsx_api_cert_file"`
	NsxApiPrivateKeyFile string   `ini:"nsx_api_private_key_file"`
	NsxApiManagers       []string `ini:"nsx_api_managers"`
	CaFile               []string `ini:"ca_file"`
	Thumbprint           []string `ini:"thumbprint"`
	Insecure             bool     `ini:"insecure"`
	SingleTierSrTopology bool     `ini:"single_tier_sr_topology"`
	EnforcementPoint     string   `ini:"enforcement_point"`
	DefaultProject       string   `ini:"default_project"`
	ExternalIPv4Blocks   []string `ini:"external_ipv4_blocks"`
	DefaultSubnetSize    int      `ini:"default_subnet_size"`
	DefaultTimeout       int      `ini:"default_timeout"`
}

func (*NsxConfig) ValidateConfigFromCmd

func (nsxConfig *NsxConfig) ValidateConfigFromCmd() error

type NsxVersion

type NsxVersion struct {
	NodeVersion string `json:"node_version"`
}

type VCConfig

type VCConfig struct {
	VCEndPoint string `ini:"vc_endpoint"`
	SsoDomain  string `ini:"sso_domain"`
	HttpsPort  int    `ini:"https_port"`
	VCUser     string `ini:"user"`
	VCPassword string `ini:"password"`
	VCCAFile   string `ini:"ca_file"`
}

type Validate

type Validate interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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