-
Notifications
You must be signed in to change notification settings - Fork 538
/
config.go
37 lines (29 loc) · 1.52 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package single
import "github.com/flyteorg/flyte/flytestdlib/config"
//go:generate pflags Config --default-var=DefaultConfig
var (
DefaultConfig = &Config{}
configSection = config.MustRegisterSection("flyte", DefaultConfig)
)
type Config struct {
Propeller Propeller `json:"propeller" pflag:",Configuration to disable propeller or any of its components."`
Admin Admin `json:"admin" pflag:",Configuration to disable FlyteAdmin or any of its components"`
DataCatalog DataCatalog `json:"dataCatalog" pflag:",Configuration to disable DataCatalog or any of its components"`
}
type Propeller struct {
Disabled bool `json:"disabled" pflag:",Disables flytepropeller in the single binary mode"`
DisableWebhook bool `json:"disableWebhook" pflag:",Disables webhook only"`
}
type Admin struct {
Disabled bool `json:"disabled" pflag:",Disables flyteadmin in the single binary mode"`
DisableScheduler bool `json:"disableScheduler" pflag:",Disables Native scheduler in the single binary mode"`
DisableClusterResourceManager bool `json:"disableClusterResourceManager" pflag:",Disables Cluster resource manager"`
SeedProjects []string `json:"seedProjects" pflag:",flyte projects to create by default."`
}
type DataCatalog struct {
Disabled bool `json:"disabled" pflag:",Disables datacatalog in the single binary mode"`
}
// GetConfig returns a handle to the configuration for Flyte Single Binary
func GetConfig() *Config {
return configSection.GetConfig().(*Config)
}