Documentation ¶
Index ¶
- Constants
- func EnsureConfigMapChecksumAnnotation(ctx context.Context, template *corev1.PodTemplateSpec, c client.Client, ...) error
- func EnsureSecretChecksumAnnotation(ctx context.Context, template *corev1.PodTemplateSpec, c client.Client, ...) error
- func New(mgr manager.Manager, args Args) (*extensionswebhook.Webhook, error)
- type Args
- type FileContentInlineCodec
- type KubeletConfigCodec
- type UnitSerializer
Constants ¶
const ( // WebhookName is the webhook name. WebhookName = "controlplane" // ExposureWebhookName is the exposure webhook name. ExposureWebhookName = "controlplaneexposure" // BackupWebhookName is the backup webhook name. BackupWebhookName = "controlplanebackup" // KindSeed - A controlplane seed webhook is applied only to those shoot namespaces that have the correct Seed provider label. KindSeed = "seed" // KindShoot - A controlplane shoot webhook is applied only to those shoot namespaces that have the correct Shoot provider label. KindShoot = "shoot" // KindBackup - A controlplane backup webhook is applied only to those shoot namespaces that have the correct Backup provider label. KindBackup = "backup" )
Variables ¶
This section is empty.
Functions ¶
func EnsureConfigMapChecksumAnnotation ¶
func EnsureConfigMapChecksumAnnotation(ctx context.Context, template *corev1.PodTemplateSpec, c client.Client, namespace, name string) error
EnsureConfigMapChecksumAnnotation ensures that the given pod template has an annotation containing the checksum of the configmap with the given name and namespace.
func EnsureSecretChecksumAnnotation ¶
func EnsureSecretChecksumAnnotation(ctx context.Context, template *corev1.PodTemplateSpec, c client.Client, namespace, name string) error
EnsureSecretChecksumAnnotation ensures that the given pod template has an annotation containing the checksum of the secret with the given name and namespace.
Types ¶
type Args ¶ added in v1.4.0
type Args struct { // Kind is the kind of this webhook Kind string // Provider is the provider of this webhook. Provider string // Types is a list of resource types. Types []runtime.Object // Mutator is a mutator to be used by the admission handler. Mutator extensionswebhook.Mutator }
Args are arguments for creating a controlplane webhook.
type FileContentInlineCodec ¶
type FileContentInlineCodec interface { // Encode encodes the given byte slice into a *extensionsv1alpha1.FileContentInline. Encode([]byte, string) (*extensionsv1alpha1.FileContentInline, error) // Decode decodes a byte slice from the given *extensionsv1alpha1.FileContentInline. Decode(*extensionsv1alpha1.FileContentInline) ([]byte, error) }
FileContentInlineCodec contains methods for encoding and decoding byte slices to and from *extensionsv1alpha1.FileContentInline.
func NewFileContentInlineCodec ¶
func NewFileContentInlineCodec() FileContentInlineCodec
NewFileContentInlineCodec creates an returns a new FileContentInlineCodec.
type KubeletConfigCodec ¶
type KubeletConfigCodec interface { // Encode encodes the given *kubeletconfigv1beta1.KubeletConfiguration into a *extensionsv1alpha1.FileContentInline. Encode(*kubeletconfigv1beta1.KubeletConfiguration, string) (*extensionsv1alpha1.FileContentInline, error) // Decode decodes a *kubeletconfigv1beta1.KubeletConfiguration from the given *extensionsv1alpha1.FileContentInline. Decode(*extensionsv1alpha1.FileContentInline) (*kubeletconfigv1beta1.KubeletConfiguration, error) }
KubeletConfigCodec contains methods for encoding and decoding *kubeletconfigv1beta1.KubeletConfiguration objects to and from *extensionsv1alpha1.FileContentInline.
func NewKubeletConfigCodec ¶
func NewKubeletConfigCodec(fciCodec FileContentInlineCodec) KubeletConfigCodec
NewKubeletConfigCodec creates an returns a new KubeletConfigCodec.
type UnitSerializer ¶
type UnitSerializer interface { // Serialize serializes the given slice of systemd unit options to a string. Serialize([]*unit.UnitOption) (string, error) // Deserialize deserializes a slice of systemd unit options from the given string. Deserialize(string) ([]*unit.UnitOption, error) }
UnitSerializer contains methods for serializing and deserializing a slice of systemd unit options to and from a string.
func NewUnitSerializer ¶
func NewUnitSerializer() UnitSerializer
NewUnitSerializer creates and returns a new UnitSerializer.