config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyConfig = errors.New("config is required, but empty")

ErrEmptyConfig represents the required config variable don't exist.

Functions

func GetKubeClientConfig

func GetKubeClientConfig() (*rest.Config, error)

func LoadYamlConfig

func LoadYamlConfig(configFile string) error

LoadYamlConfig read the yaml file and set configYaml.

Types

type Config

type Config struct {
	Port                  int
	KubeAPIServerURL      string
	EtcdURL               string
	CorsAllowedOriginList []string
	// ExternalImportEnabled indicates whether the simulator will import resources from an target cluster or not.
	ExternalImportEnabled bool
	// ExternalKubeClientCfg is KubeConfig to get resources from external cluster.
	// This field is non-empty only when ExternalImportEnabled == true.
	ExternalKubeClientCfg *rest.Config
	InitialSchedulerCfg   *configv1.KubeSchedulerConfiguration
	// ExternalSchedulerEnabled indicates whether an external scheduler is enabled.
	ExternalSchedulerEnabled bool
}

Config is configuration for simulator.

func NewConfig

func NewConfig() (*Config, error)

NewConfig gets some settings from config file or environment variables.

Directories

Path Synopsis
Package v1alpha1 is the v1alpha1 version of the kube-scheduler-simulator's config API +groupName=kube-scheduler-simulator-config
Package v1alpha1 is the v1alpha1 version of the kube-scheduler-simulator's config API +groupName=kube-scheduler-simulator-config

Jump to

Keyboard shortcuts

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