Documentation ¶
Index ¶
Constants ¶
const ( // ConfigMapKey should match the expected MeshConfig file name ConfigMapKey = "mesh" // CopilotTimeout when to cancel remote gRPC call to copilot CopilotTimeout = 5 * time.Second // FilepathWalkInterval dictates how often the file system is walked for config FilepathWalkInterval = 100 * time.Millisecond )
Variables ¶
This section is empty.
Functions ¶
func GetMeshConfig ¶
func GetMeshConfig(kube kubernetes.Interface, namespace, name string) (*v1.ConfigMap, *meshconfig.MeshConfig, error)
GetMeshConfig fetches the ProxyMesh configuration from Kubernetes ConfigMap.
Types ¶
type AdmissionArgs ¶
type AdmissionArgs struct { // ExternalAdmissionWebhookName is the name of the // ExternalAdmissionHook which describes he external admission // webhook and resources and operations it applies to. ExternalAdmissionWebhookName string // ServiceName is the service name of the webhook. ServiceName string // SecretName is the name of k8s secret that contains the webhook // server key/cert and corresponding CA cert that signed them. The // server key/cert are used to serve the webhook and the CA cert // is provided to k8s apiserver during admission controller // registration. SecretName string // Port where the webhook is served. Per k8s admission // registration requirements this should be 443 unless there is // only a single port for the service. Port int // RegistrationDelay controls how long admission registration // occurs after the webhook is started. This is used to avoid // potential races where registration completes and k8s apiserver // invokes the webhook before the HTTP server is started. RegistrationDelay time.Duration }
AdmissionArgs provides configuration options for the admission controller. This is a partial duplicate of admit.ControllerOptions (other fields are filled out before constructing the admission controller). Only used if running with k8s, Consul, or Eureka (not in a mock environment).
type ConfigArgs ¶
type ConfigArgs struct { ClusterRegistriesDir string KubeConfig string CFConfig string ControllerOptions kube.ControllerOptions FileDir string }
ConfigArgs provide configuration options for the configuration controller. If FileDir is set, that directory will be monitored for CRD yaml files and will update the controller as those files change (This is used for testing purposes). Otherwise, a CRD client is created based on the configuration.
type ConsulArgs ¶
ConsulArgs provides configuration for the Consul service registry.
type EurekaArgs ¶
EurekaArgs provides configuration for the Eureka service registry
type MeshArgs ¶
MeshArgs provide configuration options for the mesh. If ConfigFile is provided, an attempt will be made to load the mesh from the file. Otherwise, a default mesh will be used with optional overrides.
type PilotArgs ¶
type PilotArgs struct { DiscoveryOptions envoy.DiscoveryServiceOptions Namespace string Mesh MeshArgs Config ConfigArgs Service ServiceArgs Admission AdmissionArgs RDSv2 bool }
PilotArgs provides all of the configuration parameters for the Pilot discovery service.
type Server ¶
type Server struct { ServiceController *aggregate.Controller HTTPListeningAddr net.Addr GRPCListeningAddr net.Addr EnvoyXdsServer *envoyv2.DiscoveryServer HTTPServer *http.Server GRPCServer *grpc.Server DiscoveryService *envoy.DiscoveryService // An in-memory service discovery, enabled if 'mock' registry is added. // Currently used for tests. MemoryServiceDiscovery *mock.ServiceDiscovery // contains filtered or unexported fields }
Server contains the runtime configuration for the Pilot discovery service.
func (*Server) Start ¶
Start starts all components of the Pilot discovery service on the port specified in DiscoveryServiceOptions. If Port == 0, a port number is automatically chosen. This method returns the address on which the server is listening for incoming connections. Content serving is started by this method, but is executed asynchronously. Serving can be cancelled at any time by closing the provided stop channel.
type ServiceArgs ¶
type ServiceArgs struct { Registries []string Consul ConsulArgs Eureka EurekaArgs }
ServiceArgs provides the composite configuration for all service registries in the system.