Documentation
¶
Index ¶
- Constants
- func KeyTypeToX509PublicKeyAlgorithm(keyType mgrconfig.KeyType) (x509.PublicKeyAlgorithm, error)
- func Run(cfg Config, scheme *runtime.Scheme, setupControllers SetupControllersFunc, ...) error
- func SetupCacheIndexes(ctx context.Context, mgr manager.Manager, cfg Config) error
- func SetupControllers(mgr manager.Manager, c *Config) (map[string]ControllerDef, error)
- type AdmissionRequestHandlerFunc
- type AutoHandler
- type Config
- type Controller
- type ControllerDef
- type MetricsAccessFilter
- type SetupControllersFunc
Constants ¶
const ( // GatewayClassControllerName is the name of the GatewayClass controller. GatewayClassControllerName = "GatewayClass" // GatewayControllerName is the name of the Gateway controller. GatewayControllerName = "Gateway" // ControlPlaneControllerName is the name of ControlPlane controller. ControlPlaneControllerName = "ControlPlane" // DataPlaneControllerName is the name of the DataPlane controller. DataPlaneControllerName = "DataPlane" // DataPlaneBlueGreenControllerName is the name of the DataPlaneBlueGreen controller. DataPlaneBlueGreenControllerName = "DataPlaneBlueGreen" // DataPlaneOwnedServiceFinalizerControllerName is the name of the DataPlaneOwnedServiceFinalizer controller. DataPlaneOwnedServiceFinalizerControllerName = "DataPlaneOwnedServiceFinalizer" // DataPlaneOwnedSecretFinalizerControllerName is the name of the DataPlaneOwnedSecretFinalizer controller. DataPlaneOwnedSecretFinalizerControllerName = "DataPlaneOwnedSecretFinalizer" // DataPlaneOwnedDeploymentFinalizerControllerName is the name of the DataPlaneOwnedDeploymentFinalizer controller. DataPlaneOwnedDeploymentFinalizerControllerName = "DataPlaneOwnedDeploymentFinalizer" // KonnectExtensionControllerName is the name of the KonnectExtension controller. KonnectExtensionControllerName = "KonnectExtension" // AIGatewayControllerName is the name of the AIGateway controller. AIGatewayControllerName = "AIGateway" // KongPluginInstallationControllerName is the name of the KongPluginInstallation controller. KongPluginInstallationControllerName = "KongPluginInstallation" // KonnectAPIAuthConfigurationControllerName is the name of the KonnectAPIAuthConfiguration controller. KonnectAPIAuthConfigurationControllerName = "KonnectAPIAuthConfiguration" // KonnectGatewayControlPlaneControllerName is the name of the KonnectGatewayControlPlane controller. KonnectGatewayControlPlaneControllerName = "KonnectGatewayControlPlane" // KonnectCloudGatewayNetworkControllerName is the name of the KonnectCloudGatewayNetwork controller. KonnectCloudGatewayNetworkControllerName = "KonnectCloudGatewayNetwork" // KonnectCloudGatewayDataPlaneGroupConfigurationControllerName is the name of the KonnectCloudGatewayDataPlaneGroupConfiguration controller. KonnectCloudGatewayDataPlaneGroupConfigurationControllerName = "KonnectCloudGatewayDataPlaneGroupConfiguration" // KonnectCloudGatewayTransitGatewayControllerName is the name of the KonnectCloudGatewayTransitGateway controller. KonnectCloudGatewayTransitGatewayControllerName = "KonnectCloudGatewayTransitGateway" // KongServiceControllerName is the name of the KongService controller. KongServiceControllerName = "KongService" // KongRouteControllerName is the name of the KongRoute controller. KongRouteControllerName = "KongRoute" // KongConsumerControllerName is the name of the KongConsumer controller. KongConsumerControllerName = "KongConsumer" // KongConsumerGroupControllerName is the name of the KongConsumerGroup controller. KongConsumerGroupControllerName = "KongConsumerGroup" // KongPluginBindingControllerName is the name of the KongPluginBinding controller. KongPluginBindingControllerName = "KongPluginBinding" // KongPluginControllerName is the name of the KongPlugin controller. KongPluginControllerName = "KongPlugin" // KongUpstreamControllerName is the name of the KongUpstream controller. KongUpstreamControllerName = "KongUpstream" // KongTargetControllerName is the name of the KongTarget controller. KongTargetControllerName = "KongTarget" // KongServicePluginBindingFinalizerControllerName is the name of the KongService PluginBinding finalizer controller. KongServicePluginBindingFinalizerControllerName = "KongServicePluginBindingFinalizer" // KongRoutePluginBindingFinalizerControllerName is the name of the KongRoute PluginBinding finalizer controller. KongRoutePluginBindingFinalizerControllerName = "KongRoutePluginBindingFinalizer" // KongConsumerPluginBindingFinalizerControllerName is the name of the KongConsumer PluginBinding finalizer controller. KongConsumerPluginBindingFinalizerControllerName = "KongConsumerPluginBindingFinalizer" // KongConsumerGroupPluginBindingFinalizerControllerName is the name of the KongConsumerGroup PluginBinding finalizer controller. KongConsumerGroupPluginBindingFinalizerControllerName = "KongConsumerGroupPluginBindingFinalizer" // KongCredentialsSecretControllerName is the name of the Credentials Secret controller. KongCredentialsSecretControllerName = "KongCredentialSecret" // KongCredentialBasicAuthControllerName is the name of the KongCredentialBasicAuth controller. KongCredentialBasicAuthControllerName = "KongCredentialBasicAuth" //nolint:gosec // KongCredentialAPIKeyControllerName is the name of the KongCredentialAPIKey controller. KongCredentialAPIKeyControllerName = "KongCredentialAPIKey" //nolint:gosec // KongCredentialACLControllerName is the name of the KongCredentialACL controller. KongCredentialACLControllerName = "KongCredentialACL" //nolint:gosec // KongCredentialHMACControllerName is the name of the KongCredentialHMAC controller. KongCredentialHMACControllerName = "KongCredentialHMAC" //nolint:gosec // KongCredentialJWTControllerName is the name of the KongCredentialJWT controller. KongCredentialJWTControllerName = "KongCredentialJWT" //nolint:gosec // KongCACertificateControllerName is the name of the KongCACertificate controller. KongCACertificateControllerName = "KongCACertificate" // KongCertificateControllerName is the name of the KongCertificate controller. KongCertificateControllerName = "KongCertificate" // KongVaultControllerName is the name of KongVault controller. KongVaultControllerName = "KongVault" // KongKeyControllerName is the name of KongKey controller. KongKeyControllerName = "KongKey" // KongKeySetControllerName is the name of KongKeySet controller. KongKeySetControllerName = "KongKeySet" // KongSNIControllerName is the name of KongSNI controller. KongSNIControllerName = "KongSNI" // KongDataPlaneClientCertificateControllerName is the name of KongDataPlaneClientCertificate controller. KongDataPlaneClientCertificateControllerName = "KongDataPlaneClientCertificate" )
Variables ¶
This section is empty.
Functions ¶
func KeyTypeToX509PublicKeyAlgorithm ¶ added in v1.5.0
func KeyTypeToX509PublicKeyAlgorithm(keyType mgrconfig.KeyType) (x509.PublicKeyAlgorithm, error)
KeyTypeToX509PublicKeyAlgorithm converts a KeyType to an x509.PublicKeyAlgorithm.
func Run ¶
func Run( cfg Config, scheme *runtime.Scheme, setupControllers SetupControllersFunc, startedChan chan<- struct{}, metadata metadata.Info, ) error
Run runs the manager. Parameter cfg represents the configuration for the manager that for normal operation is derived from command-line flags. The function setupControllers is expected to return a list of configured ControllerDef that will be added to the manager. The function admissionRequestHandler is used to construct the admission webhook handler for the validating webhook that is added to the manager too. Argument startedChan can be used as a signal to notify the caller when the manager has been started. Specifically, this channel gets closed when manager.Start() is called. Pass nil if you don't need this signal.
func SetupCacheIndexes ¶ added in v1.6.0
SetupCacheIndexes sets up all the cache indexes required by the controllers.
func SetupControllers ¶
SetupControllers returns a list of ControllerDefs based on config.
Types ¶
type AdmissionRequestHandlerFunc ¶
AdmissionRequestHandlerFunc is a function that returns an implementation of admission.RequestHandler, (validation webhook) it's passed to Run function and called later.
type AutoHandler ¶
AutoHandler decides whether the specific controller shall be enabled (true) or disabled (false).
type Config ¶
type Config struct { MetricsAddr string MetricsAccessFilter MetricsAccessFilter ProbeAddr string LeaderElection bool LeaderElectionNamespace string AnonymousReports bool LoggingMode logging.Mode ValidateImages bool Out *os.File ControllerName string ControllerNamespace string APIServerPath string KubeconfigPath string ClusterCASecretName string ClusterCASecretNamespace string ClusterCAKeyType mgrconfig.KeyType ClusterCAKeySize int LoggerOpts *zap.Options EnforceConfig bool // ServiceAccountToImpersonate is the name of the service account to impersonate, // by the controller manager, when making requests to the API server. // Use for testing purposes only. ServiceAccountToImpersonate string // controllers for standard APIs and features GatewayControllerEnabled bool ControlPlaneControllerEnabled bool DataPlaneControllerEnabled bool DataPlaneBlueGreenControllerEnabled bool // Controllers for specialty APIs and experimental features. AIGatewayControllerEnabled bool KongPluginInstallationControllerEnabled bool KonnectSyncPeriod time.Duration KonnectMaxConcurrentReconciles uint GatewayAPIExperimentalEnabled bool // Controllers for Konnect APIs. KonnectControllersEnabled bool }
Config represents the configuration for the manager.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a default configuration for the manager.
type Controller ¶
Controller is a Kubernetes controller that can be plugged into Manager.
type ControllerDef ¶
type ControllerDef struct { Enabled bool Controller Controller }
ControllerDef is a specification of a Controller that can be conditionally registered with Manager.
func SetupControllersShim ¶
func SetupControllersShim(mgr manager.Manager, c *Config) ([]ControllerDef, error)
SetupControllersShim runs SetupControllers and returns its result as a slice of the map values.
func (*ControllerDef) MaybeSetupWithManager ¶
MaybeSetupWithManager runs SetupWithManager on the controller if it is enabled and its AutoHandler (if any) indicates that it can load.
func (*ControllerDef) Name ¶
func (c *ControllerDef) Name() string
Name returns a human-readable name of the controller.
type MetricsAccessFilter ¶ added in v1.5.0
type MetricsAccessFilter string
MetricsAccessFilter defines the access filter function for the metrics endpoint.
const ( // MetricsAccessFilterOff disabled the access filter on metrics endpoint. MetricsAccessFilterOff MetricsAccessFilter = "off" // MetricsAccessFilterRBAC enables the access filter on metrics endpoint. // For more information consult: // https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/metrics/filters#WithAuthenticationAndAuthorization MetricsAccessFilterRBAC MetricsAccessFilter = "rbac" )
func (*MetricsAccessFilter) Set ¶ added in v1.5.0
func (mf *MetricsAccessFilter) Set(v string) error
Set implements flag.Value.
func (MetricsAccessFilter) String ¶ added in v1.5.0
func (mf MetricsAccessFilter) String() string
String returns the string representation of the MetricsFilter.
type SetupControllersFunc ¶
type SetupControllersFunc func(manager.Manager, *Config) ([]ControllerDef, error)
SetupControllersFunc represents function to setup controllers, which is called in Run function.