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
- Variables
- type ServerRunOptions
- func (s *ServerRunOptions) AddEtcdStorageFlags(fs *pflag.FlagSet)
- func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet)
- func (s *ServerRunOptions) NewSelfClient() (clientset.Interface, error)
- func (s *ServerRunOptions) StorageGroupsToEncodingVersion() (map[string]unversioned.GroupVersion, error)
- func (o *ServerRunOptions) WithEtcdOptions() *ServerRunOptions
Constants ¶
const ( ModeAlwaysAllow string = "AlwaysAllow" ModeAlwaysDeny string = "AlwaysDeny" ModeABAC string = "ABAC" ModeWebhook string = "Webhook" ModeRBAC string = "RBAC" )
const (
DefaultDeserializationCacheSize = 50000
)
const (
DefaultEtcdPathPrefix = "/registry"
)
Variables ¶
var AuthorizationModeChoices = []string{ModeAlwaysAllow, ModeAlwaysDeny, ModeABAC, ModeWebhook, ModeRBAC}
var DefaultServiceNodePortRange = utilnet.PortRange{Base: 30000, Size: 2768}
Functions ¶
This section is empty.
Types ¶
type ServerRunOptions ¶
type ServerRunOptions struct { APIGroupPrefix string APIPrefix string AdmissionControl string AdmissionControlConfigFile string AdvertiseAddress net.IP // Authorization mode and associated flags. AuthorizationMode string AuthorizationPolicyFile string AuthorizationWebhookConfigFile string AuthorizationWebhookCacheAuthorizedTTL time.Duration AuthorizationRBACSuperUser string BasicAuthFile string BindAddress net.IP CertDirectory string ClientCAFile string CloudConfigFile string CloudProvider string CorsAllowedOriginList []string DefaultStorageMediaType string DeleteCollectionWorkers int // Used to specify the storage version that should be used for the legacy v1 api group. DeprecatedStorageVersion string AuditLogPath string AuditLogMaxAge int AuditLogMaxBackups int AuditLogMaxSize int EnableLogsSupport bool EnableProfiling bool EnableSwaggerUI bool EnableWatchCache bool EtcdServersOverrides []string StorageConfig storagebackend.Config ExternalHost string InsecureBindAddress net.IP InsecurePort int KeystoneURL string KubernetesServiceNodePort int LongRunningRequestRE string MasterCount int MasterServiceNamespace string MaxRequestsInFlight int MinRequestTimeout int OIDCCAFile string OIDCClientID string OIDCIssuerURL string OIDCUsernameClaim string OIDCGroupsClaim 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 TLSCertFile string TLSPrivateKeyFile string TokenAuthFile string WatchCacheSizes []string }
ServerRunOptions contains the options while running a generic api server.
func NewServerRunOptions ¶
func NewServerRunOptions() *ServerRunOptions
func (*ServerRunOptions) AddEtcdStorageFlags ¶
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 ¶
func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet)
AddFlags adds flags for a specific APIServer to the specified FlagSet
func (*ServerRunOptions) NewSelfClient ¶
func (s *ServerRunOptions) NewSelfClient() (clientset.Interface, error)
Returns a clientset 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 the s.DeprecatedStorageVersion and s.StorageVersions flags.
func (*ServerRunOptions) WithEtcdOptions ¶
func (o *ServerRunOptions) WithEtcdOptions() *ServerRunOptions