Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InitContainerResources ¶ added in v0.0.3
type InitContainerResources struct {
Requests InitContainerResourcesList `yaml:"requests"`
Limits InitContainerResourcesList `yaml:"limits"`
}
InitContainerResources resources for init container
type InitContainerResourcesList ¶ added in v0.0.3
InitContainerResourcesList resources for init container
type InjectionPolicy ¶
type InjectionPolicy string
InjectionPolicy determines the policy for injecting the config init container into the watched namespace(s).
const ( // InjectionPolicyDisabled specifies that the sidecar injector // will not inject the sidecar into resources by default for the // namespace(s) being watched. Resources can enable injection // using the "<annotation prefix>/inject" annotation with value of // true. InjectionPolicyDisabled InjectionPolicy = "disabled" // InjectionPolicyEnabled specifies that the sidecar injector will // inject the sidecar into resources by default for the // namespace(s) being watched. Resources can disable injection // using the "<annotation prefix>/inject" annotation with value of // false. InjectionPolicyEnabled InjectionPolicy = "enabled" )
type SidecarInjectionSpec ¶
type SidecarInjectionSpec struct {
InitContainers []v1.Container `yaml:"initContainers"`
VolumeMounts []v1.VolumeMount `yaml:"volumeMounts"`
Volumes []v1.Volume `yaml:"volumes"`
}
SidecarInjectionSpec collects all container types and volumes for sidecar mesh injection
type SidecarInjectionStatus ¶
type SidecarInjectionStatus struct {
InitContainers []string `json:"initContainers"`
VolumeMounts []string `json:"volumeMounts"`
Volumes []string `json:"volumes"`
}
SidecarInjectionStatus contains basic information about the injected sidecar. This includes the names of added containers and volumes.
type Webhook ¶
type Webhook struct {
// contains filtered or unexported fields
}
Webhook implements a mutating webhook for automatic config injection.
func NewWebhook ¶
func NewWebhook(p WebhookParameters) (*Webhook, error)
NewWebhook creates a new instance of a mutating webhook for automatic sidecar injection.
type WebhookConfig ¶
type WebhookConfig struct {
AnnotationPrefix string `yaml:"annotation-prefix,omitempty"`
Policy InjectionPolicy `yaml:"policy,omitempty"`
ContainerImage string `yaml:"container-image,omitempty"`
Default WebhookConfigDefaults `yaml:"default,omitempty"`
Resources InitContainerResources `yaml:"resources,omitempty"`
}
WebhookConfig struct representing webhook configuration values.
func (*WebhookConfig) UnmarshalYAML ¶
func (w *WebhookConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements Unmarshaler interface for WebhookConfig
type WebhookConfigDefaults ¶
type WebhookConfigDefaults struct {
ContainerName string `yaml:"container-name,omitempty"`
Label string `yaml:"label,omitempty"`
Profile string `yaml:"profile,omitempty"`
VolumeName string `yaml:"volume-name,omitempty"`
VolumeMount string `yaml:"volume-mount,omitempty"`
Source string `yaml:"source,omitempty"`
}
WebhookConfigDefaults configures default init container values.
type WebhookParameters ¶
type WebhookParameters struct {
// ConfigFile is the path to the injection configuration file.
ConfigFile string
// CertFile is the path to the x509 certificate for https.
CertFile string
// KeyFile is the path to the x509 private key matching `CertFile`.
KeyFile string
// Port is the webhook port, e.g. typically 443 for https.
Port int
}
WebhookParameters configures parameters for the config injection webhook.