config

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TLSConfig        TLSConfig        `envconfig:"TLS"`
	MLPConfig        MLPConfig        `envconfig:"MLP"`
	WebhookConfig    WebhookConfig    `envconfig:"WEBHOOK"`
	PrometheusConfig PrometheusConfig `envconfig:"PROMETHEUS"`
}

func InitConfigEnv

func InitConfigEnv() (*Config, error)

type MLPConfig

type MLPConfig struct {
	APIHost string `split_words:"true" required:"true"`
}

type PrometheusConfig added in v0.0.2

type PrometheusConfig struct {
	Enabled bool  `split_words:"true" default:"true"`
	Port    int32 `split_words:"true" default:"10254"`
}

type TLSConfig

type TLSConfig struct {
	ServerCertFile string `split_words:"true" required:"true"`
	ServerKeyFile  string `split_words:"true" required:"true"`
	CaCertFile     string `split_words:"true" required:"true"`
}

TLSConfig holds the file path of the required certs to create the Webhook Config and Server

type WebhookConfig

type WebhookConfig struct {
	// Name of the MutatingWebhookConfiguration resource
	Name string `split_words:"true" default:"dap-secret-webhook"`
	// Namespace to be deployed, only one config is required per cluster
	Namespace string `split_words:"true" default:"flyte"`
	// WebhookName is the name of the webhook to call. Needs to be qualified name
	WebhookName string `split_words:"true" default:"dap-secret-webhook.flyte.svc.cluster.local"`
	// ServiceName is the name of the service for the webhook to call when a request fulfill the rules
	ServiceName string `split_words:"true" default:"dap-secret-webhook"`
	// ServiceNamespace is the namespace of the service deployed in cluster
	ServiceNamespace string `split_words:"true" default:"flyte"`
	// ServicePort is the port of the service
	ServicePort int32 `split_words:"true" default:"443"`
	// MutatePath is the endpoint of the service to call for mutate function
	MutatePath string `split_words:"true" default:"/mutate"`
}

WebhookConfig holds the config for the MutatingWebhookConfiguration to be created The default assume dap-secret-webhook name and flyte namespace for the service, webhook server and config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL