Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { client.Client // ConsulClientConfig is the config for the Consul API client. ConsulClientConfig *consul.Config // ConsulServerConnMgr is the watcher for the Consul server addresses. ConsulServerConnMgr consul.ServerConnectionManager // AllowK8sNamespacesSet determines kube namespace that are reconciled. AllowK8sNamespacesSet mapset.Set // DenyK8sNamespacesSet determines kube namespace that are ignored. DenyK8sNamespacesSet mapset.Set // 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 // CrossNamespaceACLPolicy 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. CrossNamespaceACLPolicy string Log logr.Logger }
func (*Controller) Reconcile ¶
Reconcile reads a Kubernetes Namespace and reconciles the mapped namespace in Consul. TODO: Move the creation of a destination namespace to a dedicated, single-flight goroutine.
func (*Controller) SetupWithManager ¶
func (r *Controller) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager registers this controller with the manager.
Click to show internal directories.
Click to hide internal directories.