Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { LogLevel string `mapstructure:"log-level" yaml:"log-level"` CheckExisting bool `mapstructure:"check-existing" yaml:"check-existing,omitempty"` HealthChecker healthcheck.HealthChecker `mapstructure:"health-checker" yaml:"health-checker,omitempty"` Server Server `mapstructure:"server" yaml:"server"` Rules []Rule `mapstructure:"rules" yaml:"rules"` // contains filtered or unexported fields }
Configuration models the structre of our configuration values loaded through viper.
func (Configuration) ValidateConfig ¶
func (c Configuration) ValidateConfig() error
ValidateConfig is responsible for throwing errors when the configuration is bad.
type Rule ¶
type Rule struct { Registration webhook.Registration `mapstructure:"registration" yaml:"registration"` Matchers graffiti.Matchers `mapstructure:"matchers" yaml:"matchers,omitempty"` Payload graffiti.Payload `mapstructure:"payload" yaml:"payload"` }
Rule models a single graffiti rule with three sections for managing registration, matching and the payload to graffiti on the object.
type Server ¶
type Server struct { WebhookPort int `mapstructure:"port" yaml:"port"` CompanyDomain string `mapstructure:"company-domain" yaml:"company-domain"` Namespace string `mapstructure:"namespace" yaml:"namespace"` Service string `mapstructure:"service" yaml:"service"` CACertPath string `mapstructure:"ca-cert-path" yaml:"ca-cert-path"` ServerCertPath string `mapstructure:"cert-path" yaml:"cert-path"` ServerKeyPath string `mapstructure:"key-path" yaml:"key-path"` }
Server contains all the settings for the webhook https server and access from the kubernetes api.
Click to show internal directories.
Click to hide internal directories.