Documentation
¶
Index ¶
- Constants
- func CreateConfigmaps(oc *exutil.CLI, c kclientset.Interface, nsName string, ...) error
- func CreatePods(c kclientset.Interface, appName string, ns string, labels map[string]string, ...) error
- func CreateSecrets(oc *exutil.CLI, c kclientset.Interface, nsName string, ...) error
- func CreateTemplates(oc *exutil.CLI, c kclientset.Interface, nsName string, ...) error
- func DeleteProject(oc *exutil.CLI, name string, interval, timeout time.Duration) error
- func InjectConfigMap(c kclientset.Interface, ns string, vars map[string]interface{}, ...) string
- func ParseConfig(config string, isFixture bool) error
- func ParsePods(jsonFile string) (configStruct kapiv1.Pod)
- func ProjectExists(oc *exutil.CLI, name string) (bool, error)
- func Server(c *PodCount, port int, awaitShutdown bool) error
- func SetNamespaceLabels(c kclientset.Interface, name string, labels map[string]string) (*kapiv1.Namespace, error)
- func SyncPods(c kclientset.Interface, ns string, selectors map[string]string, ...) (err error)
- func SyncRunningPods(c kclientset.Interface, ns string, selectors map[string]string, ...) (err error)
- func SyncSucceededPods(c kclientset.Interface, ns string, selectors map[string]string, ...) (err error)
- type ClusterLoaderObjectType
- type ClusterLoaderType
- type ContextType
- type PodCount
- type ServiceInfo
- type SyncObjectType
- type TuningSetObjectType
- type TuningSetType
Constants ¶
const ( IF_EXISTS_DELETE = "delete" IF_EXISTS_REUSE = "reuse" )
Variables ¶
This section is empty.
Functions ¶
func CreateConfigmaps ¶
func CreateConfigmaps(oc *exutil.CLI, c kclientset.Interface, nsName string, configmaps map[string]interface{}) error
CreateConfigmaps creates config maps from files in user defined namespaces.
func CreatePods ¶
func CreatePods(c kclientset.Interface, appName string, ns string, labels map[string]string, spec kapiv1.PodSpec, maxCount int, tuning *TuningSetType, sync *SyncObjectType) error
CreatePods creates pods in user defined namespaces with user configurable tuning sets
func CreateSecrets ¶
func CreateSecrets(oc *exutil.CLI, c kclientset.Interface, nsName string, secrets map[string]interface{}) error
CreateSecrets creates secrets from files in user defined namespaces.
func CreateTemplates ¶
func CreateTemplates(oc *exutil.CLI, c kclientset.Interface, nsName string, template ClusterLoaderObjectType, tuning *TuningSetType) error
CreateTemplates creates templates in user defined namespaces with user configurable tuning sets.
func DeleteProject ¶
func InjectConfigMap ¶
func InjectConfigMap(c kclientset.Interface, ns string, vars map[string]interface{}, config kapiv1.Pod) string
InjectConfigMap modifies the pod struct and replaces the environment variables.
func ParseConfig ¶
ParseConfig will complete flag parsing as well as viper tasks
func ParsePods ¶
ParsePods unmarshalls the json file defined in the CL config into a struct
func Server ¶
Server is the webservice that will synchronize the start and stop of Pods
func SetNamespaceLabels ¶
func SyncPods ¶
func SyncPods(c kclientset.Interface, ns string, selectors map[string]string, timeout time.Duration, state kapiv1.PodPhase) (err error)
SyncPods waits for pods to enter a state
Types ¶
type ClusterLoaderObjectType ¶
type ClusterLoaderObjectType struct {
Total int `yaml:",omitempty"`
Number int `mapstructure:"num" yaml:"num"`
Image string `yaml:",omitempty"`
Basename string `yaml:",omitempty"`
File string `yaml:",omitempty"`
Sync SyncObjectType `yaml:",omitempty"`
Parameters map[string]interface{} `yaml:",omitempty"`
}
ClusterLoaderObjectType is nested object type for cluster loader struct
type ClusterLoaderType ¶
type ClusterLoaderType struct {
Number int `mapstructure:"num" yaml:"num"`
Basename string
IfExists string `json:"ifexists"`
Labels map[string]string `yaml:",omitempty"`
NodeSelector string `yaml:",omitempty"`
Tuning string `yaml:",omitempty"`
Configmaps map[string]interface{} `yaml:",omitempty"`
Secrets map[string]interface{} `yaml:",omitempty"`
Pods []ClusterLoaderObjectType `yaml:",omitempty"`
Templates []ClusterLoaderObjectType `yaml:",omitempty"`
}
ClusterLoaderType struct only used for Cluster Loader test config
type ContextType ¶
type ContextType struct {
ClusterLoader struct {
Cleanup bool
Projects []ClusterLoaderType
Sync SyncObjectType `yaml:",omitempty"`
TuningSets []TuningSetType `yaml:",omitempty"`
}
}
ContextType is the root config struct
var ConfigContext ContextType
ConfigContext variable of type ContextType
type PodCount ¶
PodCount struct keeps HTTP requst counts and state
type ServiceInfo ¶
ServiceInfo struct to bundle env data
type SyncObjectType ¶
type SyncObjectType struct {
Server struct {
Enabled bool
Port int
}
Running bool
Succeeded bool
Selectors map[string]string
Timeout string
}
SyncObjectType is nested object type for cluster loader synchronisation functionality
type TuningSetObjectType ¶
type TuningSetObjectType struct {
Stepping struct {
StepSize int
Pause time.Duration
Timeout time.Duration
}
RateLimit struct {
Delay time.Duration
}
}
TuningSetObjectType is shared struct for Pods & Templates
type TuningSetType ¶
type TuningSetType struct {
Name string
Pods TuningSetObjectType
Templates TuningSetObjectType
}
TuningSetType is nested type for controlling Cluster Loader deployment pattern
func GetTuningSet ¶
func GetTuningSet(tuningSets []TuningSetType, podTuning string) (tuning *TuningSetType)
GetTuningSet matches the name of the tuning set defined in the project and returns a pointer to the set
Source Files
¶
- audit.go
- cl.go
- cm.go
- context.go
- utils.go