app

package
v1.31.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 84 Imported by: 346

Documentation

Overview

Package app does all of the work necessary to configure and run a Kubernetes app process.

Package app does all of the work necessary to configure and run a Kubernetes app process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProxyCommand added in v1.1.1

func NewProxyCommand() *cobra.Command

NewProxyCommand creates a *cobra.Command object with default parameters

Types

type Conntracker added in v1.2.0

type Conntracker interface {
	// SetMax adjusts nf_conntrack_max.
	SetMax(ctx context.Context, max int) error
	// SetTCPEstablishedTimeout adjusts nf_conntrack_tcp_timeout_established.
	SetTCPEstablishedTimeout(ctx context.Context, seconds int) error
	// SetTCPCloseWaitTimeout adjusts nf_conntrack_tcp_timeout_close_wait.
	SetTCPCloseWaitTimeout(ctx context.Context, seconds int) error
	// SetTCPBeLiberal adjusts nf_conntrack_tcp_be_liberal.
	SetTCPBeLiberal(ctx context.Context, value int) error
	// SetUDPTimeout adjusts nf_conntrack_udp_timeout.
	SetUDPTimeout(ctx context.Context, seconds int) error
	// SetUDPStreamTimeout adjusts nf_conntrack_udp_timeout_stream.
	SetUDPStreamTimeout(ctx context.Context, seconds int) error
}

Conntracker is an interface to the global sysctl. Descriptions of the various sysctl fields can be found here:

https://www.kernel.org/doc/Documentation/networking/nf_conntrack-sysctl.txt

type Options added in v1.7.0

type Options struct {
	// ConfigFile is the location of the proxy server's configuration file.
	ConfigFile string
	// WriteConfigTo is the path where the default configuration will be written.
	WriteConfigTo string
	// CleanupAndExit, when true, makes the proxy server clean up iptables and ipvs rules, then exit.
	CleanupAndExit bool
	// InitAndExit, when true, makes the proxy server makes configurations that need privileged access, then exit.
	InitAndExit bool
	// contains filtered or unexported fields
}

Options contains everything necessary to create and run a proxy server.

func NewOptions added in v1.7.0

func NewOptions() *Options

NewOptions returns initialized Options

func (*Options) AddFlags added in v1.10.0

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags to fs and binds them to options.

func (*Options) Complete added in v1.7.0

func (o *Options) Complete(fs *pflag.FlagSet) error

Complete completes all the required options.

func (*Options) Run added in v1.7.0

func (o *Options) Run(ctx context.Context) error

Run runs the specified ProxyServer.

func (*Options) Validate added in v1.7.0

func (o *Options) Validate() error

Validate validates all the required options.

type ProxyServer

type ProxyServer struct {
	Config *kubeproxyconfig.KubeProxyConfiguration

	Client          clientset.Interface
	Broadcaster     events.EventBroadcaster
	Recorder        events.EventRecorder
	NodeRef         *v1.ObjectReference
	HealthzServer   *healthcheck.ProxierHealthServer
	Hostname        string
	PrimaryIPFamily v1.IPFamily
	NodeIPs         map[v1.IPFamily]net.IP

	Proxier proxy.Provider
	// contains filtered or unexported fields
}

ProxyServer represents all the parameters required to start the Kubernetes proxy server. All fields are required.

func (*ProxyServer) Run

func (s *ProxyServer) Run(ctx context.Context) error

Run runs the specified ProxyServer. This should never exit (unless CleanupAndExit is set). TODO: At the moment, Run() cannot return a nil error, otherwise it's caller will never exit. Update callers of Run to handle nil errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL