Documentation
¶
Index ¶
- Variables
- func AddKubeConfigFlagSet(fs *pflag.FlagSet, kubeConf *KubeConfig)
- func FileNumsInDir(path string) (int, error)
- func InitConfigFromYaml(conf interface{}, configPath string) error
- func InitDefaultPV(path string) error
- func InitDefaultPVC(path string) error
- func InitKubeConfig(kubeConf KubeConfig) *rest.Config
- func InitKubeConfigFromBytes(configBytes []byte) (*rest.Config, error)
- func PathExists(path string) (bool, error)
- func PrettyFormat(data interface{}) []byte
- type ApiServerConfig
- type DatabaseConfig
- type FsServerConf
- type ImageConfig
- type JobConfig
- type KubeConfig
- type ReclaimConfig
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GlobalServerConfig *ServerConfig // the global ServerConfig DefaultPV *apiv1.PersistentVolume // the global default pv instance DefaultPVC *apiv1.PersistentVolumeClaim // the global default pvc instance DefaultRunYamlPath = "./run.yaml" )
Functions ¶
func AddKubeConfigFlagSet ¶
func AddKubeConfigFlagSet(fs *pflag.FlagSet, kubeConf *KubeConfig)
func FileNumsInDir ¶
FileNumsInDir caculate files number in path, include dir type
func InitConfigFromYaml ¶
func InitDefaultPV ¶
InitDefaultPV initialize the default pv instance
func InitDefaultPVC ¶
InitDefaultPVC initialize the default pvc instance
func InitKubeConfig ¶
func InitKubeConfig(kubeConf KubeConfig) *rest.Config
func InitKubeConfigFromBytes ¶
func PathExists ¶
PathExists indicate path exist or not 1. path exist: return true, nil 2. path not exist: return false, nil 3. unknown error: return false, err
func PrettyFormat ¶
func PrettyFormat(data interface{}) []byte
Types ¶
type ApiServerConfig ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
Driver string `yaml:"driver"`
Host string `yaml:"host"`
Port string `yaml:"port"`
User string `yaml:"user"`
Password string `yaml:"password"`
Database string `yaml:"database"`
ConnectTimeoutInSeconds int `yaml:"connectTimeoutInSeconds,omitempty"`
LockTimeoutInMilliseconds int `yaml:"lockTimeoutInMilliseconds,omitempty"`
IdleTransactionTimeoutInMilliseconds int `yaml:"idleTransactionTimeoutInMilliseconds,omitempty"`
MaxIdleConns *int `yaml:"maxIdleConns,omitempty"`
MaxOpenConns *int `yaml:"maxOpenConns,omitempty"`
ConnMaxLifetimeInHours *int `yaml:"connMaxLifetimeInHours,omitempty"`
}
type FsServerConf ¶
type FsServerConf struct {
DefaultPVPath string `yaml:"defaultPVPath"`
DefaultPVCPath string `yaml:"defaultPVCPath"`
LinkMetaDirPrefix string `yaml:"linkMetaDirPrefix"`
// K8sServiceName K8sServicePort used to create pv/pvc with volumeAttributes point pfs-server pod
K8sServiceName string `yaml:"k8sServiceName"`
K8sServicePort int `yaml:"k8sServicePort"`
}
type ImageConfig ¶
type JobConfig ¶
type JobConfig struct {
Reclaim ReclaimConfig `yaml:"reclaim"`
SchedulerName string `yaml:"schedulerName"`
ScalarResourceArray []string `yaml:"scalarResourceArray"`
// period second for job manager
ClusterSyncPeriod int `yaml:"clusterSyncPeriod"`
QueueExpireTime int `yaml:"queueExpireTime"`
QueueCacheSize int `yaml:"queueCacheSize"`
JobLoopPeriod int `yaml:"jobLoopPeriod"`
// DefaultJobYamlDir is directory that stores default template yaml files for job
DefaultJobYamlDir string `yaml:"defaultJobYamlDir"`
}
type KubeConfig ¶
type ReclaimConfig ¶
type ReclaimConfig struct {
CleanJob bool `yaml:"isCleanJob"`
SkipCleanFailedJob bool `yaml:"isSkipCleanFailedJob"`
FailedJobTTLSeconds int `yaml:"failedJobTTLSeconds,omitempty"`
SucceededJobTTLSeconds int `yaml:"succeededJobTTLSeconds,omitempty"`
PendingJobTTLSeconds int `yaml:"pendingJobTTLSeconds,omitempty"`
}
type ServerConfig ¶
type ServerConfig struct {
Database DatabaseConfig `yaml:"database"`
Log logger.LogConfig `yaml:"log"`
ApiServer ApiServerConfig `yaml:"apiServer"`
Job JobConfig `yaml:"job"`
Fs FsServerConf `yaml:"fs"`
NamespaceList []string `yaml:"namespaceList"`
Flavour []schema.Flavour `yaml:"flavour"`
FlavourMap map[string]schema.Flavour `yaml:"-"`
ImageConf ImageConfig `yaml:"imageRepository"`
}
Click to show internal directories.
Click to hide internal directories.