Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var SpecialDefaultResourcePrefixes = map[schema.GroupResource]string{
{Group: "", Resource: "replicationcontrollers"}: "controllers",
{Group: "", Resource: "endpoints"}: "services/endpoints",
{Group: "", Resource: "nodes"}: "minions",
{Group: "", Resource: "services"}: "services/specs",
{Group: "extensions", Resource: "ingresses"}: "ingress",
{Group: "extensions", Resource: "podsecuritypolicies"}: "podsecuritypolicy",
{Group: "policy", Resource: "podsecuritypolicies"}: "podsecuritypolicy",
}
SpecialDefaultResourcePrefixes are prefixes compiled into Kubernetes.
Functions ¶
func NewStorageFactory ¶
func NewStorageFactory( storageConfig storagebackend.Config, defaultMediaType string, serializer runtime.StorageSerializer, defaultResourceEncoding *serverstorage.DefaultResourceEncodingConfig, storageEncodingOverrides map[string]schema.GroupVersion, resourceEncodingOverrides []schema.GroupVersionResource, apiResourceConfig *serverstorage.ResourceConfig, ) (*serverstorage.DefaultStorageFactory, error)
NewStorageFactory builds the DefaultStorageFactory. Merges defaultResourceEncoding with the user specified overrides.
Types ¶
type APIServer ¶
type APIServer struct {
GenericAPIServer *genericapiserver.GenericAPIServer
}
APIServer contains state for a cluster master/apis server.
func (*APIServer) InstallAPIs ¶
func (m *APIServer) InstallAPIs(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter, restStorageProviders ...RESTStorageProvider)
InstallAPIs will install the APIs for the restStorageProviders if they are enabled.
type CompletedConfig ¶
type CompletedConfig struct {
// contains filtered or unexported fields
}
CompletedConfig complete config
func (CompletedConfig) New ¶
func (c CompletedConfig) New(delegateAPIServer genericapiserver.DelegationTarget) (*APIServer, error)
New returns a new instance of WardleServer from the given config.
type Config ¶
type Config struct { GenericConfig *genericapiserver.Config ExtraConfig ExtraConfig }
Config master config
func (*Config) Complete ¶
func (cfg *Config) Complete(informers informers.SharedInformerFactory) CompletedConfig
Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.
type ControllerProvider ¶
type ControllerProvider struct { NameFunc func() string PostFunc genericapiserver.PostStartHookFunc PreShutdownFunc genericapiserver.PreShutdownHookFunc }
ControllerProvider new custom controller and return this
type ControllerProviderConfig ¶
type ControllerProviderConfig struct { //NewParameters user input parameter and apimaster input parameter //these all use with NewFunc NewParameters []interface{} NewFunc func(para []interface{}) (*ControllerProvider, error) }
ControllerProviderConfig controller provider config this call before install api
type ExtraConfig ¶
type ExtraConfig struct { //APIServerName a name for this apiserver APIServerName string APIResourceConfigSource serverstorage.APIResourceConfigSource StorageFactory serverstorage.StorageFactory //ExtendRoutes add custom route. will call this function to add ExtendRoutesFunc func(c *restful.Container) ProxyTransport http.RoundTripper //RESTStorageProviders list. will be install this api. RESTStorageProviders []RESTStorageProvider //ControllerConfig config a controller ControllerConfig ControllerProviderConfig }
ExtraConfig user configure
type RESTStorageProvider ¶
type RESTStorageProvider interface { GroupName() string NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool) }
RESTStorageProvider is a factory type for REST storage.
Directories ¶
Path | Synopsis |
---|---|
Package options contains flags and options for initializing kube-apiserver
|
Package options contains flags and options for initializing kube-apiserver |