config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 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 {
	Controllers []*ControllerConfig `json:"controllers"`
	Webhook     *WebhookConfig      `json:"webhook,omitempty"`
}

func LoadFile

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

func (*Config) Validate

func (c *Config) Validate() error

type ControllerConfig

type ControllerConfig struct {
	Name       string
	Resource   schema.GroupVersionKind   `json:"resource"`
	Dependents []schema.GroupVersionKind `json:"dependents"`
	References []ReferenceConfig         `json:"references"`
	Reconciler *ReconcilerConfig         `json:"reconciler,omitempty"`
	Finalizer  *HandlerConfig            `json:"finalizer,omitempty"`
	Syncer     *SyncerConfig             `json:"syncer,omitempty"`
}

func (*ControllerConfig) Validate

func (c *ControllerConfig) 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 HTTPHandlerConfig

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

func (HTTPHandlerConfig) Validate

func (c HTTPHandlerConfig) Validate() error

type HTTPHanlderTLSConfig

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

func (*HTTPHanlderTLSConfig) Validate

func (c *HTTPHanlderTLSConfig) Validate() error

type HandlerConfig

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

func (*HandlerConfig) Validate

func (c *HandlerConfig) Validate() error

type HandlerType

type HandlerType string
const (
	HandlerTypeExec HandlerType = "exec"
)

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
	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 SyncerConfig

type SyncerConfig struct {
	Interval string `json:"interval"`
}

func (SyncerConfig) Validate

func (c SyncerConfig) Validate() error

type WebhookConfig

type WebhookConfig struct {
	Host     string                  `json:"host"`
	Port     int                     `json:"port"`
	TLS      *WebhookTLSConfig       `json:"tls"`
	Handlers []*WebhookHandlerConfig `json:"handlers"`
}

func (*WebhookConfig) Validate

func (c *WebhookConfig) Validate() error

type WebhookHandlerConfig

type WebhookHandlerConfig struct {
	Resource  schema.GroupVersionKind `json:"resource"`
	Validator *HandlerConfig          `json:"validator"`
	Mutator   *HandlerConfig          `json:"mutator"`
	Injector  *InjectorConfig         `json:"injector"`
}

func (*WebhookHandlerConfig) Validate

func (c *WebhookHandlerConfig) Validate() error

type WebhookTLSConfig

type WebhookTLSConfig struct {
	CertFile string `json:"certFile"`
	KeyFile  string `json:"keyFile"`
}

func (*WebhookTLSConfig) Validate

func (c *WebhookTLSConfig) Validate() error

Jump to

Keyboard shortcuts

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