istio: istio.io/istio/pilot/pkg/bootstrap Index | Files

package bootstrap

import "istio.io/istio/pilot/pkg/bootstrap"

Index

Package Files

monitoring.go server.go

Constants

const (
    // ConfigMapKey should match the expected MeshConfig file name
    ConfigMapKey = "mesh"

    // DefaultMCPMaxMsgSize is the default maximum message size
    DefaultMCPMaxMsgSize = 1024 * 1024 * 4

    // DefaultMCPInitialWindowSize is the default InitialWindowSize value for the gRPC connection.
    DefaultMCPInitialWindowSize = 1024 * 1024

    // DefaultMCPInitialConnWindowSize is the default Initial ConnWindowSize value for the gRPC connection.
    DefaultMCPInitialConnWindowSize = 1024 * 1024

    // DefaultCertGracePeriodRatio is the default length of certificate rotation grace period,
    // configured as the ratio of the certificate TTL.
    DefaultCertGracePeriodRatio = 0.5

    // DefaultMinCertGracePeriod is the default minimum grace period for workload cert rotation.
    DefaultMinCertGracePeriod = 10 * time.Minute

    // Default directory to store Pilot key and certificate under $HOME directory
    DefaultDirectoryForKeyCert = "/pilot/key-cert"

    // Default CA certificate path
    // Currently, custom CA path is not supported; no API to get custom CA cert yet.
    DefaultCACertPath = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
)

Variables

var (
    // FilepathWalkInterval dictates how often the file system is walked for config
    FilepathWalkInterval = 100 * time.Millisecond

    // PilotCertDir is the default location for mTLS certificates used by pilot
    // Visible for tests - at runtime can be set by PILOT_CERT_DIR environment variable.
    PilotCertDir = "/etc/certs/"

    // DefaultPlugins is the default list of plugins to enable, when no plugin(s)
    // is specified through the command line
    DefaultPlugins = []string{
        plugin.Authn,
        plugin.Authz,
        plugin.Health,
        plugin.Mixer,
    }
)

func GetMeshConfig Uses

func GetMeshConfig(kube kubernetes.Interface, namespace, name string) (*v1.ConfigMap, *meshconfig.MeshConfig, error)

GetMeshConfig fetches the ProxyMesh configuration from Kubernetes ConfigMap.

type ConfigArgs Uses

type ConfigArgs struct {
    ControllerOptions          controller2.Options
    ClusterRegistriesNamespace string
    KubeConfig                 string
    FileDir                    string

    // Controller if specified, this controller overrides the other config settings.
    Controller model.ConfigStoreCache

    // DistributionTracking control
    DistributionCacheRetention time.Duration

    DisableInstallCRDs bool

    // DistributionTracking control
    DistributionTrackingEnabled bool
}

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 Uses

type ConsulArgs struct {
    Config    string
    ServerURL string
    Interval  time.Duration
}

ConsulArgs provides configuration for the Consul service registry.

type MeshArgs Uses

type MeshArgs struct {
    ConfigFile      string
    MixerAddress    string
    RdsRefreshDelay *types.Duration
}

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 Uses

type PilotArgs struct {
    DiscoveryOptions         envoy.DiscoveryServiceOptions
    Namespace                string
    Mesh                     MeshArgs
    Config                   ConfigArgs
    Service                  ServiceArgs
    MeshConfig               *meshconfig.MeshConfig
    NetworksConfigFile       string
    CtrlZOptions             *ctrlz.Options
    Plugins                  []string
    MCPMaxMessageSize        int
    MCPInitialWindowSize     int
    MCPInitialConnWindowSize int
    KeepaliveOptions         *istiokeepalive.Options
    // ForceStop is set as true when used for testing to make the server stop quickly
    ForceStop bool
}

PilotArgs provides all of the configuration parameters for the Pilot discovery service.

type Server Uses

type Server struct {
    HTTPListeningAddr       net.Addr
    GRPCListeningAddr       net.Addr
    SecureGRPCListeningAddr net.Addr
    MonitorListeningAddr    net.Addr

    // TODO(nmittler): Consider alternatives to exposing these directly
    EnvoyXdsServer    *envoyv2.DiscoveryServer
    ServiceController *aggregate.Controller
    // contains filtered or unexported fields
}

Server contains the runtime configuration for the Pilot discovery service.

func NewServer Uses

func NewServer(args PilotArgs) (*Server, error)

NewServer creates a new Server instance based on the provided arguments.

func (*Server) Start Uses

func (s *Server) Start(stop <-chan struct{}) error

Start starts all components of the Pilot discovery service on the port specified in DiscoveryServiceOptions. If Port == 0, a port number is automatically chosen. Content serving is started by this method, but is executed asynchronously. Serving can be canceled at any time by closing the provided stop channel.

type ServiceArgs Uses

type ServiceArgs struct {
    Registries []string
    Consul     ConsulArgs
}

ServiceArgs provides the composite configuration for all service registries in the system.

Package bootstrap imports 71 packages (graph) and is imported by 5 packages. Updated 2019-10-18. Refresh now. Tools for package owners.