Documentation
¶
Overview ¶
Package controlplane contains code for setting up and running a OneX control plane API server.
Index ¶
Constants ¶
const ( // DefaultEndpointReconcilerInterval is the default amount of time for how often the endpoints for // the kubernetes Service are reconciled. DefaultEndpointReconcilerInterval = 10 * time.Second // DefaultEndpointReconcilerTTL is the default TTL timeout for the storage layer DefaultEndpointReconcilerTTL = 15 * time.Second // IdentityLeaseComponentLabelKey is used to apply a component label to identity lease objects, indicating: // 1. the lease is an identity lease (different from leader election leases) // 2. which component owns this lease IdentityLeaseComponentLabelKey = "apiserver.kubernetes.io/identity" // KubeAPIServer defines variable used internally when referring to kube-apiserver component KubeAPIServer = "kube-apiserver" // KubeAPIServerIdentityLeaseLabelSelector selects kube-apiserver identity leases KubeAPIServerIdentityLeaseLabelSelector = IdentityLeaseComponentLabelKey + "=" + KubeAPIServer )
Variables ¶
This section is empty.
Functions ¶
func AddStableAPIGroupVersionsEnabledByDefault ¶
func AddStableAPIGroupVersionsEnabledByDefault(versions ...schema.GroupVersion)
func DefaultAPIResourceConfigSource ¶
func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig
DefaultAPIResourceConfigSource returns which groupVersion enabled and its resources enabled/disabled.
Types ¶
type CompletedConfig ¶
type CompletedConfig struct {
// contains filtered or unexported fields
}
CompletedConfig embeds a private pointer that cannot be instantiated outside of this package.
func (CompletedConfig) New ¶
func (c CompletedConfig) New(delegationTarget genericapiserver.DelegationTarget) (*Instance, error)
New returns a new instance of APIServer from the given config. Certain config fields will be set to a default value if unset.
type Config ¶
type Config struct {
Generic *genericapiserver.RecommendedConfig
Extra
}
Config defines configuration for the onex-apiserver.
func (*Config) Complete ¶
func (c *Config) Complete() CompletedConfig
Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.
type Extra ¶
type Extra struct {
// Place you custom config here.
APIResourceConfigSource serverstorage.APIResourceConfigSource
StorageFactory serverstorage.StorageFactory
EventTTL time.Duration
EnableLogsSupport bool
ProxyTransport *http.Transport
// PeerProxy, if not nil, sets proxy transport between kube-apiserver peers for requests
// that can not be served locally
PeerProxy utilpeerproxy.Interface
// PeerEndpointLeaseReconciler updates the peer endpoint leases
PeerEndpointLeaseReconciler peerreconcilers.PeerEndpointLeaseReconciler
// For external resources and rest storage providers.
ExternalRESTStorageProviders []storage.RESTStorageProvider
// Number of masters running; all masters must be started with the
// same value for this field. (Numbers > 1 currently untested.)
MasterCount int
// KubeVersionedInformers kubeinformers.SharedInformerFactory
InternalVersionedInformers kubeinformers.SharedInformerFactory
ExternalPostStartHooks map[string]genericapiserver.PostStartHookFunc
}
Extra defines extra configuration for the onex-apiserver.
type Instance ¶
type Instance struct {
GenericAPIServer *genericapiserver.GenericAPIServer
APIResourceConfigSource serverstorage.APIResourceConfigSource
}
Instance contains state for a onex-apiserver instance.
func (*Instance) InstallAPIs ¶
func (m *Instance) InstallAPIs( apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter, restStorageProviders ...storage.RESTStorageProvider, ) error
Instance will install the APIs for the restStorageProviders if they are enabled.
func (*Instance) InstallLegacyAPI ¶
func (m *Instance) InstallLegacyAPI(c *completedConfig, restOptionsGetter generic.RESTOptionsGetter) error
InstallLegacyAPI will install the legacy APIs for the restStorageProviders if they are enabled.
Directories
¶
| Path | Synopsis |
|---|---|
|
admission
|
|
|
Package app does all of the work necessary to create a OneX APIServer by binding together the API, master and APIServer infrastructure.
|
Package app does all of the work necessary to create a OneX APIServer by binding together the API, master and APIServer infrastructure. |
|
options
Package options contains flags and options for initializing an apiserver
|
Package options contains flags and options for initializing an apiserver |
|
controller
|
|