options

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 30 Imported by: 7

Documentation

Overview

Package options contains flags and options for initializing an apiserver

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServiceIPRange

func ServiceIPRange(passedServiceClusterIPRange net.IPNet) (net.IPNet, net.IP, error)

ServiceIPRange checks if the serviceClusterIPRange flag is nil, raising a warning if so and setting service ip range to the default value in kubeoptions.DefaultServiceIPCIDR for now until the default is removed per the deprecation timeline guidelines. Returns service ip range, api server service IP, and an error

Types

type CompletedOptions

type CompletedOptions struct {
	// contains filtered or unexported fields
}

type Options

type Options struct {
	Flagz                   flagz.Reader
	GenericServerRunOptions *genericoptions.ServerRunOptions
	Etcd                    *genericoptions.EtcdOptions
	SecureServing           *genericoptions.SecureServingOptionsWithLoopback
	Audit                   *genericoptions.AuditOptions
	Features                *genericoptions.FeatureOptions
	Admission               *kubeoptions.AdmissionOptions
	Authentication          *kubeoptions.BuiltInAuthenticationOptions
	Authorization           *kubeoptions.BuiltInAuthorizationOptions
	APIEnablement           *genericoptions.APIEnablementOptions
	EgressSelector          *genericoptions.EgressSelectorOptions
	Metrics                 *metrics.Options
	Logs                    *logs.Options
	Traces                  *genericoptions.TracingOptions

	EnableLogsHandler        bool
	EventTTL                 time.Duration
	MaxConnectionBytesPerSec int64

	ProxyClientCertFile string
	ProxyClientKeyFile  string

	// PeerCAFile is the ca bundle used by this kube-apiserver to verify peer apiservers'
	// serving certs when routing a request to the peer in the case the request can not be served
	// locally due to version skew.
	PeerCAFile string

	// PeerAdvertiseAddress is the IP for this kube-apiserver which is used by peer apiservers to route a request
	// to this apiserver. This happens in cases where the peer is not able to serve the request due to
	// version skew.
	PeerAdvertiseAddress peerreconcilers.PeerAdvertiseAddress

	EnableAggregatorRouting             bool
	AggregatorRejectForwardingRedirects bool

	ServiceAccountSigningKeyFile     string
	ServiceAccountIssuer             serviceaccount.TokenGenerator
	ServiceAccountTokenMaxExpiration time.Duration

	ShowHiddenMetricsForVersion string

	SystemNamespaces []string

	ServiceAccountSigningEndpoint string
}

Options define the flags and validation for a generic controlplane. If the structs are nil, the options are not added to the command line and not validated.

func NewOptions

func NewOptions() *Options

NewOptions creates a new ServerRunOptions object with default parameters

func (*Options) AddFlags

func (s *Options) AddFlags(fss *cliflag.NamedFlagSets)

func (*Options) Complete

func (o *Options) Complete(ctx context.Context, fss cliflag.NamedFlagSets, alternateDNS []string, alternateIPs []net.IP) (CompletedOptions, error)

func (*Options) Validate

func (s *Options) Validate() []error

Validate checks Options and return a slice of found errs.

Jump to

Keyboard shortcuts

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