webhooks

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2023 License: UPL-1.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsBindingLabelerPodPath = "/metrics-binding-labeler-pod"

	PrometheusPortAnnotation   = "prometheus.io/port"
	PrometheusPathAnnotation   = "prometheus.io/path"
	PrometheusScrapeAnnotation = "prometheus.io/scrape"

	PrometheusPortDefault   = "8080"
	PrometheusPathDefault   = "/metrics"
	PrometheusScrapeDefault = "true"
)
View Source
const (
	MetricsAnnotation                   = "app.verrazzano.io/metrics"
	MetricsBindingGeneratorWorkloadPath = "/metrics-binding-generator-workload"
)
View Source
const AppConfigDefaulterPath = "/appconfig-defaulter"

AppConfigDefaulterPath specifies the path of AppConfigDefaulter

View Source
const IstioAppLabel = "verrazzano.io/istio"

IstioAppLabel label to be used for all pods that are istio enabled

View Source
const IstioDefaulterPath = "/istio-defaulter"

IstioDefaulterPath specifies the path of Istio defaulter webhook

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfigDefaulter

type AppConfigDefaulter interface {
	Default(appConfig *oamv1.ApplicationConfiguration, dryRun bool, log *zap.SugaredLogger) error
	Cleanup(appConfig *oamv1.ApplicationConfiguration, dryRun bool, log *zap.SugaredLogger) error
}

AppConfigDefaulter supplies appconfig default values

type AppConfigWebhook

type AppConfigWebhook struct {
	Client      client.Client
	KubeClient  kubernetes.Interface
	IstioClient istioversionedclient.Interface
	Defaulters  []AppConfigDefaulter
	// contains filtered or unexported fields
}

AppConfigWebhook uses a list of AppConfigDefaulters to supply appconfig default values

func (*AppConfigWebhook) Handle

Handle handles appconfig mutate Request

func (*AppConfigWebhook) InjectDecoder

func (a *AppConfigWebhook) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects admission.Decoder

type AuthorizationPolicy added in v0.14.0

type AuthorizationPolicy struct {
	client.Client
	KubeClient  kubernetes.Interface
	IstioClient istioversionedclient.Interface
}

AuthorizationPolicy type for fixing up authorization policies for projects

type IstioWebhook

type IstioWebhook struct {
	client.Client
	IstioClient   istioversionedclient.Interface
	Decoder       *admission.Decoder
	KubeClient    kubernetes.Interface
	DynamicClient dynamic.Interface
}

IstioWebhook type for istio defaulter webhook

func (*IstioWebhook) Handle

Handle is the entry point for the mutating webhook. This function is called for any pods that are created in a namespace with the label istio-injection=enabled.

func (*IstioWebhook) InjectDecoder

func (a *IstioWebhook) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

type LabelerPodWebhook added in v1.2.0

type LabelerPodWebhook struct {
	client.Client
	Decoder       *admission.Decoder
	DynamicClient dynamic.Interface
}

LabelerPodWebhook type for the mutating webhook

func (*LabelerPodWebhook) Handle added in v1.2.0

Handle is the handler for the mutating webhook

func (*LabelerPodWebhook) InjectDecoder added in v1.2.0

func (a *LabelerPodWebhook) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

type MetricsTraitDefaulter

type MetricsTraitDefaulter struct {
	Client client.Client
}

MetricsTraitDefaulter supplies default MetricsTrait

func (*MetricsTraitDefaulter) Cleanup

func (m *MetricsTraitDefaulter) Cleanup(appConfig *oamv1.ApplicationConfiguration, dryRun bool, log *zap.SugaredLogger) error

Cleanup is not used by the metrics trait defaulter

func (*MetricsTraitDefaulter) Default

func (m *MetricsTraitDefaulter) Default(appConfig *oamv1.ApplicationConfiguration, dryRun bool, log *zap.SugaredLogger) error

Default method adds default MetricsTrait to ApplicationConfiguration

type MultiClusterApplicationConfigurationValidator added in v0.15.0

type MultiClusterApplicationConfigurationValidator struct {
	// contains filtered or unexported fields
}

MultiClusterApplicationConfigurationValidator is a struct holding objects used during validation.

func (*MultiClusterApplicationConfigurationValidator) Handle added in v0.15.0

Handle performs validation of created or updated MultiClusterApplicationConfiguration resources.

func (*MultiClusterApplicationConfigurationValidator) InjectClient added in v0.15.0

InjectClient injects the client.

func (*MultiClusterApplicationConfigurationValidator) InjectDecoder added in v0.15.0

InjectDecoder injects the decoder.

type MultiClusterComponentValidator added in v0.15.0

type MultiClusterComponentValidator struct {
	// contains filtered or unexported fields
}

MultiClusterComponentValidator is a struct holding objects used during validation.

func (*MultiClusterComponentValidator) Handle added in v0.15.0

Handle performs validation of created or updated MultiClusterComponent resources.

func (*MultiClusterComponentValidator) InjectClient added in v0.15.0

InjectClient injects the client.

func (*MultiClusterComponentValidator) InjectDecoder added in v0.15.0

InjectDecoder injects the decoder.

type MultiClusterConfigmapValidator added in v0.15.0

type MultiClusterConfigmapValidator struct {
	// contains filtered or unexported fields
}

MultiClusterConfigmapValidator is a struct holding objects used during validation.

func (*MultiClusterConfigmapValidator) Handle added in v0.15.0

Handle performs validation of created or updated MultiClusterConfigmap resources.

func (*MultiClusterConfigmapValidator) InjectClient added in v0.15.0

InjectClient injects the client.

func (*MultiClusterConfigmapValidator) InjectDecoder added in v0.15.0

InjectDecoder injects the decoder.

type MultiClusterSecretValidator added in v0.15.0

type MultiClusterSecretValidator struct {
	// contains filtered or unexported fields
}

MultiClusterSecretValidator is a struct holding objects used during validation.

func (*MultiClusterSecretValidator) Handle added in v0.15.0

Handle performs validation of created or updated MultiClusterSecret resources.

func (*MultiClusterSecretValidator) InjectClient added in v0.15.0

func (v *MultiClusterSecretValidator) InjectClient(c client.Client) error

InjectClient injects the client.

func (*MultiClusterSecretValidator) InjectDecoder added in v0.15.0

func (v *MultiClusterSecretValidator) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

type VerrazzanoProjectValidator added in v0.15.0

type VerrazzanoProjectValidator struct {
	// contains filtered or unexported fields
}

VerrazzanoProjectValidator is a struct holding objects used during VerrazzanoProject validation.

func (*VerrazzanoProjectValidator) Handle added in v0.15.0

Handle performs validation of created or updated VerrazzanoProject resources.

func (*VerrazzanoProjectValidator) InjectClient added in v0.15.0

func (v *VerrazzanoProjectValidator) InjectClient(c client.Client) error

InjectClient injects the client.

func (*VerrazzanoProjectValidator) InjectDecoder added in v0.15.0

func (v *VerrazzanoProjectValidator) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

type WorkloadWebhook added in v1.4.0

type WorkloadWebhook struct {
	client.Client
	Decoder    *admission.Decoder
	KubeClient kubernetes.Interface
}

WorkloadWebhook type for the mutating webhook

func (*WorkloadWebhook) GetLegacyMetricsBinding added in v1.4.0

func (a *WorkloadWebhook) GetLegacyMetricsBinding(ctx context.Context, unst *unstructured.Unstructured) (*vzapp.MetricsBinding, error)

GetLegacyMetricsBinding returns the existing MetricsBinding (legacy resource) for the given workload - nil if it does not exist.

func (*WorkloadWebhook) Handle added in v1.4.0

Handle - handler for the mutating webhook

func (*WorkloadWebhook) InjectDecoder added in v1.4.0

func (a *WorkloadWebhook) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL