package options

import "k8s.io/kubernetes/pkg/controlplane/apiserver/options"

Package options contains flags and options for initializing an apiserver

Index

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, 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.

Source Files

options.go validation.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
30 packages
Last checked
3 hours ago

Tools for package owners.