webhooks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: UPL-1.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

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) error
	Cleanup(appConfig *oamv1.ApplicationConfiguration, dryRun bool) 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 MetricsTraitDefaulter

type MetricsTraitDefaulter struct {
}

MetricsTraitDefaulter supplies default MetricsTrait

func (*MetricsTraitDefaulter) Cleanup

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

Cleanup is not used by the metrics trait defaulter

func (*MetricsTraitDefaulter) Default

func (m *MetricsTraitDefaulter) Default(appConfig *oamv1.ApplicationConfiguration, dryRun bool) 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 NetPolicyDefaulter added in v0.15.0

type NetPolicyDefaulter struct {
	Client          client.Client
	NamespaceClient typedv1.NamespaceInterface
}

func (*NetPolicyDefaulter) Cleanup added in v0.15.0

func (n *NetPolicyDefaulter) Cleanup(appConfig *oamv1.ApplicationConfiguration, dryRun bool) error

Cleanup deletes the Istio network policy associated with the app config.

func (*NetPolicyDefaulter) Default added in v0.15.0

func (n *NetPolicyDefaulter) Default(appConfig *oamv1.ApplicationConfiguration, dryRun bool) error

Default handles creating the Istio network policy for the application. The network policy is needed to allow ingress to the istiod pod from the Istio proxy sidecar that runs in the application pods. This function also adds the Verrazzano namespace label to the app config namespace (if needed) so the network policy can match the namespace with a selector.

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.

Jump to

Keyboard shortcuts

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