Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCABundle ¶
func AddCABundle(p WebHookParameters) error
AddCABundle is used to add/update CABundle in MutatingWebhookConfiguration
Types ¶
type Config ¶
type Config struct { Containers []corev1.Container `yaml:"containers"` Volumes []corev1.Volume `yaml:"volumes"` ImagePullSecret []corev1.LocalObjectReference `yaml:"imagePullSecrets"` }
Config has container, volume and image information
type WebHookParameters ¶
type WebHookParameters struct { Port int KubeConfig string CertFile string KeyFile string CAFile string WebhookConfigName string WebhookName string SidecarConfigFile string HealthCheckInterval time.Duration HealthCheckFile string }
WebHookParameters contains Server parameters
type WebHookServer ¶
type WebHookServer struct { SidecarConfig *Config Server *http.Server Watch *fsnotify.Watcher Lock sync.RWMutex }
WebHookServer which has config contents
func NewWebhook ¶
func NewWebhook(p WebHookParameters) (*WebHookServer, error)
NewWebhook will load the configuration and create a server
func (*WebHookServer) Run ¶
func (wh *WebHookServer) Run(stop <-chan struct{}, p WebHookParameters)
Run will run the server
Click to show internal directories.
Click to hide internal directories.