Documentation

Index

Constants

View Source
const SectionKey = "server"

Variables

This section is empty.

Functions

func SetConfig

func SetConfig(s *ServerConfig)

Types

type FlyteClientConfig

type FlyteClientConfig struct {
	ClientID    string `json:"clientId" pflag:",public identifier for the app which handles authorization for a Flyte deployment"`
	RedirectURI string `` /* 127-byte string literal not displayed */
}

type ServerConfig

type ServerConfig struct {
	HTTPPort             int                     `json:"httpPort" pflag:",On which http port to serve admin"`
	GrpcPort             int                     `json:"grpcPort" pflag:",On which grpc port to serve admin"`
	GrpcServerReflection bool                    `json:"grpcServerReflection" pflag:",Enable GRPC Server Reflection"`
	KubeConfig           string                  `json:"kube-config" pflag:",Path to kubernetes client config file."`
	Master               string                  `json:"master" pflag:",The address of the Kubernetes API server."`
	Security             ServerSecurityOptions   `json:"security"`
	ThirdPartyConfig     ThirdPartyConfigOptions `json:"thirdPartyConfig"`
}

func GetConfig

func GetConfig() *ServerConfig

func (ServerConfig) GetGrpcHostAddress

func (s ServerConfig) GetGrpcHostAddress() string

func (ServerConfig) GetHostAddress

func (s ServerConfig) GetHostAddress() string

func (ServerConfig) GetPFlagSet

func (cfg ServerConfig) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in ServerConfig and its nested types. The format of the flags is json-name.json-sub-name... etc.

type ServerSecurityOptions

type ServerSecurityOptions struct {
	Secure      bool                 `json:"secure"`
	Ssl         SslOptions           `json:"ssl"`
	UseAuth     bool                 `json:"useAuth"`
	Oauth       config2.OAuthOptions `json:"oauth"`
	AuditAccess bool                 `json:"auditAccess"`

	// These options are here to allow deployments where the Flyte UI (Console) is served from a different domain/port.
	// Note that CORS only applies to Admin's API endpoints. The health check endpoint for instance is unaffected.
	// Please obviously evaluate security concerns before turning this on.
	AllowCors bool `json:"allowCors"`
	// Defines origins which are allowed to make CORS requests. This list should _not_ contain "*", as that
	// will make CORS header responses incompatible with the `withCredentials=true` setting.
	AllowedOrigins []string `json:"allowedOrigins"`
	// These are the Access-Control-Request-Headers that the server will respond to.
	// By default, the server will allow Accept, Accept-Language, Content-Language, and Content-Type.
	// User this setting to add any additional headers which are needed
	AllowedHeaders []string `json:"allowedHeaders"`
}

type SslOptions

type SslOptions struct {
	CertificateFile string `json:"certificateFile"`
	KeyFile         string `json:"keyFile"`
}

type ThirdPartyConfigOptions

type ThirdPartyConfigOptions struct {
	FlyteClientConfig FlyteClientConfig `json:"flyteClient"`
}

This struct encapsulates config options for bootstrapping various Flyte applications with config values For example, FlyteClientConfig contains application-specific values to initialize the config required by flyte client