Documentation ¶
Index ¶
- Variables
- func GetFuncs() template.FuncMap
- func GetMapping(clusterLoaderConfig *ClusterLoaderConfig) (map[string]interface{}, *errors.ErrorList)
- func LoadCL2Envs() (map[string]interface{}, error)
- func LoadTestOverrides(paths []string) (map[string]interface{}, error)
- func LoadTestSuite(path string) (api.TestSuite, error)
- func MergeMappings(a, b map[string]interface{}) error
- type ClusterConfig
- type ClusterLoaderConfig
- type PrometheusConfig
- type TemplateProvider
- func (tp *TemplateProvider) RawToObject(path string) (*unstructured.Unstructured, error)
- func (tp *TemplateProvider) TemplateInto(path string, mapping map[string]interface{}, obj interface{}) error
- func (tp *TemplateProvider) TemplateToConfig(path string, mapping map[string]interface{}) (*api.Config, error)
- func (tp *TemplateProvider) TemplateToObject(path string, mapping map[string]interface{}) (*unstructured.Unstructured, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrorEmptyFile indicates that manifest file was empty. // Useful to distinguish where the manifast was empty or malformed. ErrorEmptyFile = errors.New("emptyfile") )
Functions ¶
func GetFuncs ¶
GetFuncs returns map of names to functions, that are supported by template provider.
func GetMapping ¶
func GetMapping(clusterLoaderConfig *ClusterLoaderConfig) (map[string]interface{}, *errors.ErrorList)
GetMapping returns template variable mapping for the given ClusterLoaderConfig.
func LoadCL2Envs ¶
LoadCL2Envs returns mapping from the envs starting with CL2_ prefix.
func LoadTestOverrides ¶
LoadTestOverrides returns mapping from file specified by the given paths.
func LoadTestSuite ¶
LoadTestSuite creates test suite config from file specified by the given path.
func MergeMappings ¶
MergeMappings modifies map b to contain all new key=value pairs from b. It will return error in case of conflict, i.e. if exists key k for which a[k] != b[k]
Types ¶
type ClusterConfig ¶
type ClusterConfig struct { KubeConfigPath string Nodes int Provider string EtcdCertificatePath string EtcdKeyPath string EtcdInsecurePort int MasterIPs []string MasterInternalIPs []string MasterName string KubemarkRootKubeConfigPath string DeleteStaleNamespaces bool DeleteAutomanagedNamespaces bool // SSHToMasterSupported determines whether SSH access to master machines is possible. // If false (impossible for many providers), ClusterLoader will skip operations requiring it. SSHToMasterSupported bool // APIServerPprofByClientEnabled determines whether kube-apiserver pprof endpoint can be accessed // using kubernetes client. If false, clusterloader will avoid collecting kube-apiserver profiles. APIServerPprofByClientEnabled bool }
ClusterConfig is a structure that represents cluster description.
func (*ClusterConfig) GetMasterInternalIp ¶
func (c *ClusterConfig) GetMasterInternalIp() string
GetMasterInternalIp returns the first internal master ip, added for backward compatibility. TODO(mmatt): Remove this method once all the codebase is migrated to support multiple masters.
func (*ClusterConfig) GetMasterIp ¶
func (c *ClusterConfig) GetMasterIp() string
GetMasterIp returns the first master ip, added for backward compatibility. TODO(mmatt): Remove this method once all the codebase is migrated to support multiple masters.
type ClusterLoaderConfig ¶
type ClusterLoaderConfig struct { ClusterConfig ClusterConfig ReportDir string EnableExecService bool TestScenario api.TestScenario PrometheusConfig PrometheusConfig }
ClusterLoaderConfig represents all single test run parameters used by CLusterLoader.
type PrometheusConfig ¶
type PrometheusConfig struct { EnableServer bool TearDownServer bool ScrapeEtcd bool ScrapeNodeExporter bool ScrapeKubelets bool ScrapeKubeProxy bool }
PrometheusConfig represents all flags used by prometheus.
type TemplateProvider ¶
type TemplateProvider struct {
// contains filtered or unexported fields
}
TemplateProvider provides object templates. Templates in unstructured form are served by reading file from given path or by using cache if available.
func NewTemplateProvider ¶
func NewTemplateProvider(basepath string) *TemplateProvider
NewTemplateProvider creates new template provider.
func (*TemplateProvider) RawToObject ¶
func (tp *TemplateProvider) RawToObject(path string) (*unstructured.Unstructured, error)
RawToObject creates object from file specified by the given path or uses cached object if available.
func (*TemplateProvider) TemplateInto ¶
func (tp *TemplateProvider) TemplateInto(path string, mapping map[string]interface{}, obj interface{}) error
TemplateInto decodes template specified by the given path into given structure.
func (*TemplateProvider) TemplateToConfig ¶
func (tp *TemplateProvider) TemplateToConfig(path string, mapping map[string]interface{}) (*api.Config, error)
TemplateToConfig creates test config from file specified by the given path. Template's placeholders are replaced based on provided mapping.
func (*TemplateProvider) TemplateToObject ¶
func (tp *TemplateProvider) TemplateToObject(path string, mapping map[string]interface{}) (*unstructured.Unstructured, error)
TemplateToObject creates object from file specified by the given path or uses cached object if available. Template's placeholders are replaced based on provided mapping.