Documentation ¶
Index ¶
- Constants
- type ConfigEntryController
- type Controller
- type IngressGatewayController
- func (r *IngressGatewayController) Logger(name types.NamespacedName) logr.Logger
- func (r *IngressGatewayController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *IngressGatewayController) SetupWithManager(mgr ctrl.Manager) error
- func (r *IngressGatewayController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type MeshController
- func (r *MeshController) Logger(name types.NamespacedName) logr.Logger
- func (r *MeshController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *MeshController) SetupWithManager(mgr ctrl.Manager) error
- func (r *MeshController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type ProxyDefaultsController
- func (r *ProxyDefaultsController) Logger(name types.NamespacedName) logr.Logger
- func (r *ProxyDefaultsController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ProxyDefaultsController) SetupWithManager(mgr ctrl.Manager) error
- func (r *ProxyDefaultsController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type ServiceDefaultsController
- func (r *ServiceDefaultsController) Logger(name types.NamespacedName) logr.Logger
- func (r *ServiceDefaultsController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ServiceDefaultsController) SetupWithManager(mgr ctrl.Manager) error
- func (r *ServiceDefaultsController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type ServiceIntentionsController
- func (r *ServiceIntentionsController) Logger(name types.NamespacedName) logr.Logger
- func (r *ServiceIntentionsController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ServiceIntentionsController) SetupWithManager(mgr ctrl.Manager) error
- func (r *ServiceIntentionsController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type ServiceResolverController
- func (r *ServiceResolverController) Logger(name types.NamespacedName) logr.Logger
- func (r *ServiceResolverController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ServiceResolverController) SetupWithManager(mgr ctrl.Manager) error
- func (r *ServiceResolverController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type ServiceRouterController
- func (r *ServiceRouterController) Logger(name types.NamespacedName) logr.Logger
- func (r *ServiceRouterController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ServiceRouterController) SetupWithManager(mgr ctrl.Manager) error
- func (r *ServiceRouterController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type ServiceSplitterController
- func (r *ServiceSplitterController) Logger(name types.NamespacedName) logr.Logger
- func (r *ServiceSplitterController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ServiceSplitterController) SetupWithManager(mgr ctrl.Manager) error
- func (r *ServiceSplitterController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type TerminatingGatewayController
- func (r *TerminatingGatewayController) Logger(name types.NamespacedName) logr.Logger
- func (r *TerminatingGatewayController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *TerminatingGatewayController) SetupWithManager(mgr ctrl.Manager) error
- func (r *TerminatingGatewayController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
Constants ¶
const ( FinalizerName = "finalizers.consul.hashicorp.com" ConsulAgentError = "ConsulAgentError" ExternallyManagedConfigError = "ExternallyManagedConfigError" MigrationFailedError = "MigrationFailedError" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigEntryController ¶
type ConfigEntryController struct { ConsulClient *capi.Client // DatacenterName indicates the Consul Datacenter name the controller is // operating in. Adds this value as metadata on managed resources. DatacenterName string // EnableConsulNamespaces indicates that a user is running Consul Enterprise // with version 1.7+ which supports namespaces. EnableConsulNamespaces bool // ConsulDestinationNamespace is the name of the Consul namespace to create // all config entries in. If EnableNSMirroring is true this is ignored. ConsulDestinationNamespace string // EnableNSMirroring causes Consul namespaces to be created to match the // k8s namespace of any config entry custom resource. Config entries will // be created in the matching Consul namespace. EnableNSMirroring bool // NSMirroringPrefix is an optional prefix that can be added to the Consul // namespaces created while mirroring. For example, if it is set to "k8s-", // then the k8s `default` namespace will be mirrored in Consul's // `k8s-default` namespace. NSMirroringPrefix string // CrossNSACLPolicy is the name of the ACL policy to attach to // any created Consul namespaces to allow cross namespace service discovery. // Only necessary if ACLs are enabled. CrossNSACLPolicy string }
ConfigEntryController is a generic controller that is used to reconcile all config entry types, e.g. ServiceDefaults, ServiceResolver, etc, since they share the same reconcile behaviour.
func (*ConfigEntryController) ReconcileEntry ¶
func (r *ConfigEntryController) ReconcileEntry(ctx context.Context, crdCtrl Controller, req ctrl.Request, configEntry common.ConfigEntryResource) (ctrl.Result, error)
ReconcileEntry reconciles an update to a resource. CRD-specific controller's call this function because it handles reconciliation of config entries generically. CRD-specific controller should pass themselves in as updater since we need to call back into their own update methods to ensure they update their internal state.
type Controller ¶
type Controller interface { // Update updates the state of the whole object. Update(context.Context, client.Object, ...client.UpdateOption) error // UpdateStatus updates the state of just the object's status. UpdateStatus(context.Context, client.Object, ...client.UpdateOption) error // Get retrieves an obj for the given object key from the Kubernetes Cluster. // obj must be a struct pointer so that obj can be updated with the response // returned by the Server. Get(ctx context.Context, key client.ObjectKey, obj client.Object) error // Logger returns a logger with values added for the specific controller // and request name. Logger(types.NamespacedName) logr.Logger }
Controller is implemented by CRD-specific controllers. It is used by ConfigEntryController to abstract CRD-specific controllers.
type IngressGatewayController ¶ added in v0.22.0
type IngressGatewayController struct { client.Client Log logr.Logger Scheme *runtime.Scheme ConfigEntryController *ConfigEntryController }
IngressGatewayController is the controller for IngressGateway resources.
func (*IngressGatewayController) Logger ¶ added in v0.22.0
func (r *IngressGatewayController) Logger(name types.NamespacedName) logr.Logger
func (*IngressGatewayController) SetupWithManager ¶ added in v0.22.0
func (r *IngressGatewayController) SetupWithManager(mgr ctrl.Manager) error
func (*IngressGatewayController) UpdateStatus ¶ added in v0.22.0
func (r *IngressGatewayController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type MeshController ¶ added in v0.26.0
type MeshController struct { client.Client Log logr.Logger Scheme *runtime.Scheme ConfigEntryController *ConfigEntryController }
MeshController reconciles a Mesh object
func (*MeshController) Logger ¶ added in v0.26.0
func (r *MeshController) Logger(name types.NamespacedName) logr.Logger
func (*MeshController) SetupWithManager ¶ added in v0.26.0
func (r *MeshController) SetupWithManager(mgr ctrl.Manager) error
func (*MeshController) UpdateStatus ¶ added in v0.26.0
func (r *MeshController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type ProxyDefaultsController ¶
type ProxyDefaultsController struct { client.Client Log logr.Logger Scheme *runtime.Scheme ConfigEntryController *ConfigEntryController }
ProxyDefaultsController reconciles a ProxyDefaults object
func (*ProxyDefaultsController) Logger ¶
func (r *ProxyDefaultsController) Logger(name types.NamespacedName) logr.Logger
func (*ProxyDefaultsController) SetupWithManager ¶
func (r *ProxyDefaultsController) SetupWithManager(mgr ctrl.Manager) error
func (*ProxyDefaultsController) UpdateStatus ¶
func (r *ProxyDefaultsController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type ServiceDefaultsController ¶
type ServiceDefaultsController struct { client.Client Log logr.Logger Scheme *runtime.Scheme ConfigEntryController *ConfigEntryController }
ServiceDefaultsController is the controller for ServiceDefaults resources.
func (*ServiceDefaultsController) Logger ¶
func (r *ServiceDefaultsController) Logger(name types.NamespacedName) logr.Logger
func (*ServiceDefaultsController) SetupWithManager ¶
func (r *ServiceDefaultsController) SetupWithManager(mgr ctrl.Manager) error
func (*ServiceDefaultsController) UpdateStatus ¶
func (r *ServiceDefaultsController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type ServiceIntentionsController ¶
type ServiceIntentionsController struct { client.Client Log logr.Logger Scheme *runtime.Scheme ConfigEntryController *ConfigEntryController }
ServiceIntentionsController reconciles a ServiceIntentions object
func (*ServiceIntentionsController) Logger ¶
func (r *ServiceIntentionsController) Logger(name types.NamespacedName) logr.Logger
func (*ServiceIntentionsController) SetupWithManager ¶
func (r *ServiceIntentionsController) SetupWithManager(mgr ctrl.Manager) error
func (*ServiceIntentionsController) UpdateStatus ¶
func (r *ServiceIntentionsController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type ServiceResolverController ¶
type ServiceResolverController struct { client.Client Log logr.Logger Scheme *runtime.Scheme ConfigEntryController *ConfigEntryController }
ServiceResolverController is the controller for ServiceResolver resources.
func (*ServiceResolverController) Logger ¶
func (r *ServiceResolverController) Logger(name types.NamespacedName) logr.Logger
func (*ServiceResolverController) SetupWithManager ¶
func (r *ServiceResolverController) SetupWithManager(mgr ctrl.Manager) error
func (*ServiceResolverController) UpdateStatus ¶
func (r *ServiceResolverController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type ServiceRouterController ¶
type ServiceRouterController struct { client.Client Log logr.Logger Scheme *runtime.Scheme ConfigEntryController *ConfigEntryController }
ServiceRouterController is the controller for ServiceRouter resources.
func (*ServiceRouterController) Logger ¶
func (r *ServiceRouterController) Logger(name types.NamespacedName) logr.Logger
func (*ServiceRouterController) SetupWithManager ¶
func (r *ServiceRouterController) SetupWithManager(mgr ctrl.Manager) error
func (*ServiceRouterController) UpdateStatus ¶
func (r *ServiceRouterController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type ServiceSplitterController ¶
type ServiceSplitterController struct { client.Client Log logr.Logger Scheme *runtime.Scheme ConfigEntryController *ConfigEntryController }
ServiceSplitterReconciler reconciles a ServiceSplitter object
func (*ServiceSplitterController) Logger ¶
func (r *ServiceSplitterController) Logger(name types.NamespacedName) logr.Logger
func (*ServiceSplitterController) SetupWithManager ¶
func (r *ServiceSplitterController) SetupWithManager(mgr ctrl.Manager) error
func (*ServiceSplitterController) UpdateStatus ¶
func (r *ServiceSplitterController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type TerminatingGatewayController ¶ added in v0.22.0
type TerminatingGatewayController struct { client.Client Log logr.Logger Scheme *runtime.Scheme ConfigEntryController *ConfigEntryController }
TerminatingGatewayController is the controller for TerminatingGateway resources.
func (*TerminatingGatewayController) Logger ¶ added in v0.22.0
func (r *TerminatingGatewayController) Logger(name types.NamespacedName) logr.Logger
func (*TerminatingGatewayController) SetupWithManager ¶ added in v0.22.0
func (r *TerminatingGatewayController) SetupWithManager(mgr ctrl.Manager) error
func (*TerminatingGatewayController) UpdateStatus ¶ added in v0.22.0
func (r *TerminatingGatewayController) UpdateStatus(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error