config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name      string            `json:"name,omitempty"`
	Resources []*ResourceConfig `json:"resources"`
	Webhook   *ServerConfig     `json:"webhook,omitempty"`
}

func LoadFile

func LoadFile(p string) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type DependentConfig added in v0.4.0

type DependentConfig struct {
	schema.GroupVersionKind
	Orphan bool `json:"orphan"`
}

func (*DependentConfig) Validate added in v0.4.0

func (c *DependentConfig) Validate() error

type ExecHandlerConfig

type ExecHandlerConfig struct {
	Command    string            `json:"command"`
	Args       []string          `json:"args"`
	WorkingDir string            `json:"workingDir"`
	Env        map[string]string `json:"env"`
	Timeout    string            `json:"timeout"`
	Debug      bool              `json:"debug"`
}

func (ExecHandlerConfig) Validate

func (c ExecHandlerConfig) Validate() error

type FuncHandlerConfig added in v0.6.0

type FuncHandlerConfig struct {
	Handler handler.Handler `json:"-"`
}

func (*FuncHandlerConfig) Validate added in v0.6.0

func (c *FuncHandlerConfig) Validate() error

type HTTPHandlerConfig

type HTTPHandlerConfig struct {
	URL     string     `json:"url"`
	TLS     *TLSConfig `json:"tls,omitempty"`
	Timeout string     `json:"timeout"`
	Debug   bool       `json:"debug"`
}

func (HTTPHandlerConfig) Validate

func (c HTTPHandlerConfig) Validate() error

type HandlerConfig

type HandlerConfig struct {
	Exec *ExecHandlerConfig `json:"exec"`
	HTTP *HTTPHandlerConfig `json:"http"`

	StateHandler            handler.StateHandler            `json:"-"`
	AdmissionRequestHandler handler.AdmissionRequestHandler `json:"-"`
	InjectionRequestHandler handler.InjectionRequestHandler `json:"-"`
}

func (*HandlerConfig) Validate

func (c *HandlerConfig) Validate() error

type InjectorConfig added in v0.3.0

type InjectorConfig struct {
	HandlerConfig
	VerifyKeyFile string `json:"verifyKeyFile"`
}

func (*InjectorConfig) Validate added in v0.3.0

func (c *InjectorConfig) Validate() error

type ReconcilerConfig added in v0.2.0

type ReconcilerConfig struct {
	HandlerConfig
	RequeueAfter string `json:"requeueAfter"`
	Observe      bool   `json:"observe"`
}

func (*ReconcilerConfig) Validate added in v0.2.0

func (c *ReconcilerConfig) Validate() error

type ReferenceConfig

type ReferenceConfig struct {
	schema.GroupVersionKind
	NameFieldPath string `json:"nameFieldPath"`
}

func (*ReferenceConfig) Validate

func (c *ReferenceConfig) Validate() error

type ResourceConfig added in v0.7.0

type ResourceConfig struct {
	schema.GroupVersionKind

	Dependents []DependentConfig `json:"dependents,omitempty"`
	References []ReferenceConfig `json:"references,omitempty"`

	Reconciler   *ReconcilerConfig `json:"reconciler,omitempty"`
	Finalizer    *HandlerConfig    `json:"finalizer,omitempty"`
	ResyncPeriod string            `json:"resyncPeriod,omitempty"`

	Validator *HandlerConfig  `json:"validator,omitempty"`
	Mutator   *HandlerConfig  `json:"mutator,omitempty"`
	Injector  *InjectorConfig `json:"injector,omitempty"`
}

func (*ResourceConfig) Validate added in v0.7.0

func (c *ResourceConfig) Validate() error

type ServerConfig added in v0.7.0

type ServerConfig struct {
	Host string     `json:"host"`
	Port int        `json:"port"`
	TLS  *TLSConfig `json:"tls"`
}

func (*ServerConfig) Validate added in v0.7.0

func (c *ServerConfig) Validate() error

type TLSConfig added in v0.7.0

type TLSConfig struct {
	CertFile   string `json:"certFile"`
	KeyFile    string `json:"keyFile"`
	CACertFile string `json:"caCertFile"`
}

func (*TLSConfig) Validate added in v0.7.0

func (c *TLSConfig) Validate() error

Jump to

Keyboard shortcuts

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