Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultTelemetryBindSocketDir = "/consul/mesh-inject"
)
Variables ¶
View Source
var NoMetadataErr = fmt.Errorf("failed to extract token metadata from description")
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 // K8sNamespaceConfig manages allow/deny Kubernetes namespaces. common.K8sNamespaceConfig // ConsulTenancyConfig manages settings related to Consul namespaces and partitions. common.ConsulTenancyConfig // EnableTransparentProxy controls whether transparent proxy should be enabled // for all proxy service registrations. EnableTransparentProxy bool // TProxyOverwriteProbes controls whether the pods controller should expose pod's HTTP probes // via Envoy proxy. TProxyOverwriteProbes bool // AuthMethod is the name of the Kubernetes Auth Method that // was used to login with Consul. The pods controller // will delete any tokens associated with this auth method // whenever service instances are deregistered. AuthMethod string // EnableTelemetryCollector controls whether the proxy service should be registered // with config to enable telemetry forwarding. EnableTelemetryCollector bool MetricsConfig metrics.Config Log logr.Logger // ResourceClient is a gRPC client for the resource service. It is public for testing purposes ResourceClient pbresource.ResourceServiceClient }
Controller watches Pod events and converts them to V2 Workloads and HealthStatus. The translation from Pod to Workload is 1:1 and the HealthStatus object is a representation of the Pod's Status field. Controller is also responsible for generating V2 Upstreams resources when not in transparent proxy mode. ProxyConfiguration is also optionally created.
func (*Controller) Reconcile ¶
Reconcile reads the state of a Kubernetes Pod and reconciles Consul workloads that are 1:1 mapped.
func (*Controller) SetupWithManager ¶
func (r *Controller) SetupWithManager(mgr ctrl.Manager) error
Click to show internal directories.
Click to hide internal directories.