Documentation
¶
Index ¶
- Constants
- type AppConfigDefaulter
- type AppConfigWebhook
- type AuthorizationPolicy
- type IstioWebhook
- type LabelerPodWebhook
- type MetricsTraitDefaulter
- type MultiClusterApplicationConfigurationValidator
- func (v *MultiClusterApplicationConfigurationValidator) Handle(ctx context.Context, req admission.Request) admission.Response
- func (v *MultiClusterApplicationConfigurationValidator) InjectClient(c client.Client) error
- func (v *MultiClusterApplicationConfigurationValidator) InjectDecoder(d *admission.Decoder) error
- type MultiClusterComponentValidator
- type MultiClusterConfigmapValidator
- type MultiClusterSecretValidator
- type VerrazzanoProjectValidator
- type WorkloadWebhook
Constants ¶
const ( MetricsBindingLabelerPodPath = "/metrics-binding-labeler-pod" PrometheusPortAnnotation = "prometheus.io/port" PrometheusPathAnnotation = "prometheus.io/path" PrometheusScrapeAnnotation = "prometheus.io/scrape" PrometheusPortDefault = "8080" PrometheusPathDefault = "/metrics" PrometheusScrapeDefault = "true" )
const ( MetricsAnnotation = "app.verrazzano.io/metrics" MetricsBindingGeneratorWorkloadPath = "/metrics-binding-generator-workload" )
const AppConfigDefaulterPath = "/appconfig-defaulter"
AppConfigDefaulterPath specifies the path of AppConfigDefaulter
const IstioAppLabel = "verrazzano.io/istio"
IstioAppLabel label to be used for all pods that are istio enabled
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) 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) InjectDecoder ¶ added in v1.2.0
func (a *LabelerPodWebhook) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder.
type MetricsTraitDefaulter ¶
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
func (v *MultiClusterApplicationConfigurationValidator) Handle(ctx context.Context, req admission.Request) admission.Response
Handle performs validation of created or updated MultiClusterApplicationConfiguration resources.
func (*MultiClusterApplicationConfigurationValidator) InjectClient ¶ added in v0.15.0
func (v *MultiClusterApplicationConfigurationValidator) InjectClient(c client.Client) error
InjectClient injects the client.
func (*MultiClusterApplicationConfigurationValidator) InjectDecoder ¶ added in v0.15.0
func (v *MultiClusterApplicationConfigurationValidator) InjectDecoder(d *admission.Decoder) error
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
func (v *MultiClusterComponentValidator) Handle(ctx context.Context, req admission.Request) admission.Response
Handle performs validation of created or updated MultiClusterComponent resources.
func (*MultiClusterComponentValidator) InjectClient ¶ added in v0.15.0
func (v *MultiClusterComponentValidator) InjectClient(c client.Client) error
InjectClient injects the client.
func (*MultiClusterComponentValidator) InjectDecoder ¶ added in v0.15.0
func (v *MultiClusterComponentValidator) InjectDecoder(d *admission.Decoder) error
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
func (v *MultiClusterConfigmapValidator) Handle(ctx context.Context, req admission.Request) admission.Response
Handle performs validation of created or updated MultiClusterConfigmap resources.
func (*MultiClusterConfigmapValidator) InjectClient ¶ added in v0.15.0
func (v *MultiClusterConfigmapValidator) InjectClient(c client.Client) error
InjectClient injects the client.
func (*MultiClusterConfigmapValidator) InjectDecoder ¶ added in v0.15.0
func (v *MultiClusterConfigmapValidator) InjectDecoder(d *admission.Decoder) error
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
func (v *MultiClusterSecretValidator) Handle(ctx context.Context, req admission.Request) admission.Response
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
func (v *VerrazzanoProjectValidator) Handle(ctx context.Context, req admission.Request) admission.Response
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) InjectDecoder ¶ added in v1.4.0
func (a *WorkloadWebhook) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder.
Source Files
¶
- appconfig_defaulter.go
- istio_defaulter.go
- metrics-binding-labeler-pod.go
- metrics-binding-updater-workload.go
- metrics_trait_defaulter.go
- multicluster_validation.go
- multiclusterapplicationconfiguration_webhook.go
- multiclustercomponent_webhook.go
- multiclusterconfigmap_webhook.go
- multiclustersecret_webhook.go
- project_authorization_policy.go
- verrazzanoproject_webhook.go