Documentation
¶
Index ¶
Constants ¶
const ( // GatewayOperatorControlPlaneNameManagingPluginsLabel is the label set on // Services to indicate that the ControlPlane is managing plugins for the // Service. GatewayOperatorControlPlaneNameManagingPluginsLabel = consts.OperatorLabelPrefix + "control-plane-managing-plugins-name" // GatewayOperatorControlPlaneNamespaceManagingPluginsLabel is the label set on // Services to indicate that the ControlPlane's namespace that is managing plugins // for the Service. GatewayOperatorControlPlaneNamespaceManagingPluginsLabel = consts.OperatorLabelPrefix + "control-plane-managing-plugins-namespace" // GatewayOperatorControlPlaneManagedPluginsAnnotation is the annotationset on // Services to indicate which plugins attached to this Service are managed // by the ControlPlane. // The annotation value is set to a comma separated list of KongPlugin names // that are managed by the ControlPlane. GatewayOperatorControlPlaneManagedPluginsAnnotation = consts.OperatorAnnotationPrefix + "control-plane-managed-plugins" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControlPlaneDataPlanePluginsSpecChangedPredicate ¶
ControlPlaneDataPlanePluginsSpecChangedPredicate is a predicate that checks if the ControlPlane's DataPlane metrics extensions have changed.
func (ControlPlaneDataPlanePluginsSpecChangedPredicate) Create ¶
func (ControlPlaneDataPlanePluginsSpecChangedPredicate) Create(e event.CreateEvent) bool
Create returns true if at least one DataPlane metrics extensions is set on the ControlPlane.
func (ControlPlaneDataPlanePluginsSpecChangedPredicate) Delete ¶
func (ControlPlaneDataPlanePluginsSpecChangedPredicate) Delete(e event.DeleteEvent) bool
Delete returns true if the ControlPlane's DataPlanePluginOptions is set.
func (ControlPlaneDataPlanePluginsSpecChangedPredicate) Update ¶
func (ControlPlaneDataPlanePluginsSpecChangedPredicate) Update(e event.UpdateEvent) bool
Update returns true if the ControlPlane's DataPlane metrics extensions have changed.
type PrometheusPluginConfig ¶
type PrometheusPluginConfig struct { Latency bool `json:"latency_metrics"` Bandwidth bool `json:"bandwidth_metrics"` UpstreamHealth bool `json:"upstream_health_metrics"` StatusCode bool `json:"status_code_metrics"` }
PrometheusPluginConfig holds the configuration for the Prometheus plugin.
Ref: https://docs.konghq.com/hub/kong-inc/prometheus/configuration/.
type Reconciler ¶
type Reconciler struct { client.Client CacheSyncTimeout time.Duration LoggingMode osslogging.Mode DataPlaneScraperManagerNotifier ScrapeUpdateNotifier }
Reconciler reconciles ControlPlane plugins as specified in ControlPlane's spec.controlPlaneOptions.dataplanePlugins field. It ensures that the KongPlugin instances are created and their configuration is up to date. It also ensures that the Services that have their plugins managed by the ControlPlane have the correct annotation set.
func (*Reconciler) Reconcile ¶
Reconcile moves the current state of an object to the intended state.
func (*Reconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type ScrapeUpdateNotifier ¶
type ScrapeUpdateNotifier interface { NotifyAdd(ctx context.Context, cp *gwtypes.ControlPlane) NotifyRemove(ctx context.Context, cp types.NamespacedName) }
ScrapeUpdateNotifier is an interface for notifying the scrapers manager about the need to add or remove a scraper for a DataPlane associated with the provided ControlPlane.