Documentation ¶
Index ¶
- Constants
- func DeleteValidatingWebhookConfiguration(ctx context.Context, kubeClient client.Client, name string) error
- func GetCachelessClient(restConfig *rest.Config) (client.Client, error)
- func RegisterWebhooks(ctx context.Context, webhookServer ctrlwebhook.Server, client client.Client, ...) error
- func UpdateValidatingWebhookConfiguration(ctx context.Context, kubeClient client.Client, o Options) error
- type GenericValidator
- type InstanceValidator
- type LandscaperDeploymentValidator
- type Options
- type ServiceTargetConfigValidator
- type TargetSchedulingValidator
- type WebhookedResourceDefinition
Constants ¶
const ( LandscaperDeploymentsResourceType = "landscaperdeployments" InstancesResourceType = "instances" ServiceTargetConfigsResourceType = "servicetargetconfigs" TargetSchedulingsResourceType = "targetschedulings" )
Variables ¶
This section is empty.
Functions ¶
func DeleteValidatingWebhookConfiguration ¶
func DeleteValidatingWebhookConfiguration(ctx context.Context, kubeClient client.Client, name string) error
DeleteValidatingWebhookConfiguration deletes a ValidatingWebhookConfiguration
func GetCachelessClient ¶
GetCachelessClient is a helper function that returns a client that can be used before the manager is started
func RegisterWebhooks ¶
func RegisterWebhooks(ctx context.Context, webhookServer ctrlwebhook.Server, client client.Client, scheme *runtime.Scheme, o Options) error
RegisterWebhooks generates certificates and registers the webhooks to the manager no-op if WebhookedResources in the given options is either nil or empty
Types ¶
type GenericValidator ¶
GenericValidator is an abstraction interface that implements admission.Handler and contains additional setter functions for the fields
type InstanceValidator ¶
type InstanceValidator struct {
// contains filtered or unexported fields
}
InstanceValidator represents a validator for an Instance
type LandscaperDeploymentValidator ¶
type LandscaperDeploymentValidator struct {
// contains filtered or unexported fields
}
LandscaperDeploymentValidator represents a validator for a LandscaperDeployment
type Options ¶
type Options struct { // Name of the ValidatingWebhookConfiguration that will be created WebhookConfigurationName string // the webhooks will be named <resource><webhook suffix> WebhookNameSuffix string // base path for the webhooks, the resource name will be appended WebhookBasePath string // name of the service under which the webhook can be reached ServiceName string // namespace of the service ServiceNamespace string // port of the service ServicePort int32 // LabelSelector that is used to filter all resources handled by this webhook ObjectSelector metav1.LabelSelector // the resources that should be handled by this webhook WebhookedResources []WebhookedResourceDefinition // certificates for the webhook CABundle []byte }
Options contains the configuration that is necessary to create a ValidatingWebhookConfiguration
type ServiceTargetConfigValidator ¶
type ServiceTargetConfigValidator struct {
// contains filtered or unexported fields
}
ServiceTargetConfigValidator represents a validator for a ServiceTargetConfig
type TargetSchedulingValidator ¶
type TargetSchedulingValidator struct {
// contains filtered or unexported fields
}
type WebhookedResourceDefinition ¶
type WebhookedResourceDefinition struct { // APIGroup of the resource APIGroup string // all APIVersions of the resource that should be handled APIVersions []string // name of the resource, lower-case plural form ResourceName string }
WebhookedResourceDefinition contains information about the resources that should be watched by the webhook