virtual-kubelet: github.com/virtual-kubelet/virtual-kubelet/cmd/virtual-kubelet/internal/commands/root Index | Files

package root

import "github.com/virtual-kubelet/virtual-kubelet/cmd/virtual-kubelet/internal/commands/root"

Index

Package Files

flag.go http.go node.go opts.go root.go tracing.go tracing_register.go tracing_register_jaeger.go tracing_register_ocagent.go

Constants

const (
    DefaultNodeName             = "virtual-kubelet"
    DefaultOperatingSystem      = "Linux"
    DefaultInformerResyncPeriod = 1 * time.Minute
    DefaultMetricsAddr          = ":10255"
    DefaultListenPort           = 10250 // TODO(cpuguy83)(VK1.0): Change this to an addr instead of just a port.. we should not be listening on all interfaces.
    DefaultPodSyncWorkers       = 10
    DefaultKubeNamespace        = corev1.NamespaceAll
    DefaultKubeClusterDomain    = "cluster.local"

    DefaultTaintEffect = string(corev1.TaintEffectNoSchedule)
    DefaultTaintKey    = "virtual-kubelet.io/provider"
)

Defaults for root command options

Variables

var AcceptedCiphers = []uint16{
    tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
    tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
    tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
    tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,

    tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
    tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
    tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
    tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
}

AcceptedCiphers is the list of accepted TLS ciphers, with known weak ciphers elided Note this list should be a moving target.

func AvailableTraceExporters Uses

func AvailableTraceExporters() []string

AvailableTraceExporters gets the list of registered exporters

func GetTracingExporter Uses

func GetTracingExporter(name string, opts TracingExporterOptions) (trace.Exporter, error)

GetTracingExporter gets the specified tracing exporter passing in the options to the exporter init function. For an exporter to be available here it must be registered with `RegisterTracingExporter`.

func NewCommand Uses

func NewCommand(ctx context.Context, name string, s *provider.Store, c Opts) *cobra.Command

NewCommand creates a new top-level command. This command is used to start the virtual-kubelet daemon

func NewJaegerExporter Uses

func NewJaegerExporter(opts TracingExporterOptions) (trace.Exporter, error)

NewJaegerExporter creates a new opencensus tracing exporter.

func NewOCAgentExporter Uses

func NewOCAgentExporter(opts TracingExporterOptions) (trace.Exporter, error)

NewOCAgentExporter creates a new opencensus tracing exporter using the opencensus agent forwarder.

func NodeFromProvider Uses

func NodeFromProvider(ctx context.Context, name string, taint *v1.Taint, p provider.Provider, version string) *v1.Node

NodeFromProvider builds a kubernetes node object from a provider This is a temporary solution until node stuff actually split off from the provider interface itself.

func RegisterTracingExporter Uses

func RegisterTracingExporter(name string, f TracingExporterInitFunc)

RegisterTracingExporter registers a tracing exporter. For a user to select an exporter, it must be registered here.

func SetDefaultOpts Uses

func SetDefaultOpts(c *Opts) error

SetDefaultOpts sets default options for unset values on the passed in option struct. Fields tht are already set will not be modified.

type Opts Uses

type Opts struct {
    // Path to the kubeconfig to use to connect to the Kubernetes API server.
    KubeConfigPath string
    // Namespace to watch for pods and other resources
    KubeNamespace string
    // Domain suffix to append to search domains for the pods created by virtual-kubelet
    KubeClusterDomain string

    // Sets the port to listen for requests from the Kubernetes API server
    ListenPort int32

    // Node name to use when creating a node in Kubernetes
    NodeName string

    // Operating system to run pods for
    OperatingSystem string

    Provider           string
    ProviderConfigPath string

    TaintKey     string
    TaintEffect  string
    DisableTaint bool

    MetricsAddr string

    // Number of workers to use to handle pod notifications
    PodSyncWorkers       int
    InformerResyncPeriod time.Duration

    // Use node leases when supported by Kubernetes (instead of node status updates)
    EnableNodeLease bool

    TraceExporters  []string
    TraceSampleRate string
    TraceConfig     TracingExporterOptions

    // Startup Timeout is how long to wait for the kubelet to start
    StartupTimeout time.Duration

    Version string
}

Opts stores all the options for configuring the root virtual-kubelet command. It is used for setting flag values.

You can set the default options by creating a new `Opts` struct and passing it into `SetDefaultOpts`

type TracingExporterInitFunc Uses

type TracingExporterInitFunc func(TracingExporterOptions) (trace.Exporter, error)

TracingExporterInitFunc is the function that is called to initialize an exporter. This is used when registering an exporter and called when a user specified they want to use the exporter.

type TracingExporterOptions Uses

type TracingExporterOptions struct {
    Tags        map[string]string
    ServiceName string
}

Package root imports 41 packages (graph) and is imported by 1 packages. Updated 2019-10-01. Refresh now. Tools for package owners.