options

package
v0.0.0-...-b479636 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

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 DefaultAdvertiseAddress

func DefaultAdvertiseAddress(s *ServerRunOptions, insecure *InsecureServingOptions) error

DefaultAdvertiseAddress sets the field AdvertiseAddress if unset. The field will be set based on the SecureServingOptions. If the SecureServingOptions is not present, DefaultExternalAddress will fall back to the insecure ServingOptions.

Types

type CertKey

type CertKey struct {
	// CertFile is a file containing a PEM-encoded certificate, and possibly the complete certificate chain
	CertFile string
	// KeyFile is a file containing a PEM-encoded private key for the certificate specified by CertFile
	KeyFile string
}

type ClientCertAuthenticationOptions

type ClientCertAuthenticationOptions struct {
	// ClientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates
	ClientCA string
}

func (*ClientCertAuthenticationOptions) AddFlags

type GeneratableKeyCert

type GeneratableKeyCert struct {
	CertKey CertKey

	// CACertFile is an optional file containing the certificate chain for CertKey.CertFile
	CACertFile string
	// CertDirectory is a directory that will contain the certificates.  If the cert and key aren't specifically set
	// this will be used to derive a match with the "pair-name"
	CertDirectory string
	// PairName is the name which will be used with CertDirectory to make a cert and key names
	// It becomes CertDirector/PairName.crt and CertDirector/PairName.key
	PairName string
}

type InsecureServingOptions

type InsecureServingOptions struct {
	BindAddress net.IP
	BindPort    int
}

InsecureServingOptions are for creating an unauthenticated, unauthorized, insecure port. No one should be using these anymore.

func NewInsecureServingOptions

func NewInsecureServingOptions() *InsecureServingOptions

NewInsecureServingOptions is for creating an unauthenticated, unauthorized, insecure port. No one should be using these anymore.

func (*InsecureServingOptions) AddDeprecatedFlags

func (s *InsecureServingOptions) AddDeprecatedFlags(fs *pflag.FlagSet)

func (*InsecureServingOptions) AddFlags

func (s *InsecureServingOptions) AddFlags(fs *pflag.FlagSet)

func (*InsecureServingOptions) ApplyTo

func (*InsecureServingOptions) DefaultExternalAddress

func (s *InsecureServingOptions) DefaultExternalAddress() (net.IP, error)

func (InsecureServingOptions) Validate

func (s InsecureServingOptions) Validate(portArg string) []error

type SecureServingOptions

type SecureServingOptions struct {
	BindAddress net.IP
	BindPort    int

	// ServerCert is the TLS cert info for serving secure traffic
	ServerCert GeneratableKeyCert
}

func NewSecureServingOptions

func NewSecureServingOptions() *SecureServingOptions

FIXME (rantuttl): Need to resolve naming for ServerCert

func (*SecureServingOptions) AddDeprecatedFlags

func (s *SecureServingOptions) AddDeprecatedFlags(fs *pflag.FlagSet)

func (*SecureServingOptions) AddFlags

func (s *SecureServingOptions) AddFlags(fs *pflag.FlagSet)

func (*SecureServingOptions) ApplyTo

ApplyTo fills up serving information in the server configuration.

func (*SecureServingOptions) DefaultExternalAddress

func (s *SecureServingOptions) DefaultExternalAddress() (net.IP, error)

func (*SecureServingOptions) MaybeDefaultWithSelfSignedCerts

func (s *SecureServingOptions) MaybeDefaultWithSelfSignedCerts(publicAddress string, alternateDNS []string, alternateIPs []net.IP) error

func (*SecureServingOptions) Validate

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

type ServerRunOptions

type ServerRunOptions struct {
	AdvertiseAddress net.IP

	CorsAllowedOriginList       []string
	ExternalHost                string
	MaxRequestsInFlight         int
	MaxMutatingRequestsInFlight int
	MinRequestTimeout           int
	TargetRAMMB                 int
	WatchCacheSizes             []string
}

ServerRunOptions contains the options while running a generic api server.

func NewServerRunOptions

func NewServerRunOptions() *ServerRunOptions

func (*ServerRunOptions) AddUniversalFlags

func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet)

FIXME (rantuttl): Decide which flags are really needed. AddFlags adds flags for a specific APIServer to the specified FlagSet

func (*ServerRunOptions) ApplyTo

func (s *ServerRunOptions) ApplyTo(c *server.Config) error

ApplyOptions applies the run options to the method receiver and returns self

func (*ServerRunOptions) DefaultAdvertiseAddress

func (s *ServerRunOptions) DefaultAdvertiseAddress(secure *SecureServingOptions) error

DefaultAdvertiseAddress sets the field AdvertiseAddress if unset. The field will be set based on the SecureServingOptions.

Jump to

Keyboard shortcuts

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