options

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

package options is the public flags and options used by a generic api server. It takes a minimal set of dependencies and does not reference implementations, in order to ensure it may be reused by multiple components (such as CLI commands that wish to generate or validate config).

Index

Constants

View Source
const (
	ModeAlwaysAllow string = "AlwaysAllow"
	ModeAlwaysDeny  string = "AlwaysDeny"
	ModeABAC        string = "ABAC"
	ModeWebhook     string = "Webhook"
	ModeRBAC        string = "RBAC"
)
View Source
const (
	DefaultEtcdPathPrefix = "/registry"
)
View Source
const (
	// TODO: This can be tightened up. It still matches objects named watch or proxy.
	DefaultLongRunningRequestRE = "(/|^)((watch|proxy)(/|$)|(logs?|portforward|exec|attach)/?$)"
)

Variables

View Source
var DefaultServiceNodePortRange = utilnet.PortRange{Base: 30000, Size: 2768}

Functions

This section is empty.

Types

type ServerRunOptions

type ServerRunOptions struct {
	AdmissionControl           string
	AdmissionControlConfigFile string
	AdvertiseAddress           net.IP

	// Authorization mode and associated flags.
	AuthorizationMode                        string
	AuthorizationPolicyFile                  string
	AuthorizationWebhookConfigFile           string
	AuthorizationWebhookCacheAuthorizedTTL   time.Duration
	AuthorizationWebhookCacheUnauthorizedTTL time.Duration
	AuthorizationRBACSuperUser               string

	AnonymousAuth                bool
	BasicAuthFile                string
	BindAddress                  net.IP
	CertDirectory                string
	ClientCAFile                 string
	CloudConfigFile              string
	CloudProvider                string
	CorsAllowedOriginList        []string
	DefaultStorageMediaType      string
	DeleteCollectionWorkers      int
	AuditLogPath                 string
	AuditLogMaxAge               int
	AuditLogMaxBackups           int
	AuditLogMaxSize              int
	EnableGarbageCollection      bool
	EnableProfiling              bool
	EnableContentionProfiling    bool
	EnableSwaggerUI              bool
	EnableWatchCache             bool
	EtcdServersOverrides         []string
	StorageConfig                storagebackend.Config
	ExternalHost                 string
	InsecureBindAddress          net.IP
	InsecurePort                 int
	KeystoneURL                  string
	KeystoneCAFile               string
	KubernetesServiceNodePort    int
	LongRunningRequestRE         string
	MasterCount                  int
	MasterServiceNamespace       string
	MaxRequestsInFlight          int
	MinRequestTimeout            int
	OIDCCAFile                   string
	OIDCClientID                 string
	OIDCIssuerURL                string
	OIDCUsernameClaim            string
	OIDCGroupsClaim              string
	RequestHeaderUsernameHeaders []string
	RequestHeaderClientCAFile    string
	RequestHeaderAllowedNames    []string
	RuntimeConfig                config.ConfigurationMap
	SecurePort                   int
	ServiceClusterIPRange        net.IPNet // TODO: make this a list
	ServiceNodePortRange         utilnet.PortRange
	StorageVersions              string
	// The default values for StorageVersions. StorageVersions overrides
	// these; you can change this if you want to change the defaults (e.g.,
	// for testing). This is not actually exposed as a flag.
	DefaultStorageVersions string
	TargetRAMMB            int
	TLSCAFile              string
	TLSCertFile            string
	TLSPrivateKeyFile      string
	SNICertKeys            []config.NamedCertKey
	TokenAuthFile          string
	EnableAnyToken         bool
	WatchCacheSizes        []string
}

ServerRunOptions contains the options while running a generic api server.

func NewServerRunOptions

func NewServerRunOptions() *ServerRunOptions

func (*ServerRunOptions) AddEtcdStorageFlags added in v1.4.0

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

AddEtcdFlags adds flags related to etcd storage for a specific APIServer to the specified FlagSet

func (*ServerRunOptions) AddUniversalFlags added in v1.4.0

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

AddFlags adds flags for a specific APIServer to the specified FlagSet

func (*ServerRunOptions) AuthenticationRequestHeaderConfig added in v1.5.0

func (s *ServerRunOptions) AuthenticationRequestHeaderConfig() *authenticator.RequestHeaderConfig

AuthenticationRequestHeaderConfig returns an authenticator config object for these options if necessary. nil otherwise.

func (*ServerRunOptions) NewSelfClient

func (s *ServerRunOptions) NewSelfClient(token string) (clientset.Interface, error)

Returns a clientset which can be used to talk to this apiserver.

func (*ServerRunOptions) NewSelfClientConfig added in v1.5.0

func (s *ServerRunOptions) NewSelfClientConfig(token string) (*restclient.Config, error)

Returns a clientconfig which can be used to talk to this apiserver.

func (*ServerRunOptions) StorageGroupsToEncodingVersion

func (s *ServerRunOptions) StorageGroupsToEncodingVersion() (map[string]unversioned.GroupVersion, error)

StorageGroupsToEncodingVersion returns a map from group name to group version, computed from s.StorageVersions flag.

func (*ServerRunOptions) WithEtcdOptions added in v1.4.0

func (o *ServerRunOptions) WithEtcdOptions() *ServerRunOptions

Jump to

Keyboard shortcuts

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