app

package
v0.2.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 60 Imported by: 0

Documentation

Overview

Package app does all of the work necessary to create a Kubernetes APIServer by binding together the API, master and APIServer infrastructure. It can be configured and called directly or via the hyperkube framework.

Package app does all of the work necessary to create a OneX APIServer by binding together the API, master and APIServer infrastructure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOneXAPIServerConfig

CreateOneXAPIServerConfig creates all the resources for running kube-apiserver, but runs none of them.

func CreateProxyTransport added in v0.2.0

func CreateProxyTransport() *http.Transport

CreateProxyTransport creates the dialer infrastructure to connect to the nodes.

func CreateServerChain

func CreateServerChain(config CompletedConfig) (*aggregatorapiserver.APIAggregator, error)

CreateServerChain creates the apiservers connected via delegation.

func NewAPIServerCommand

func NewAPIServerCommand(serverRunOptions ...Option) *cobra.Command

NewAPIServerCommand creates a *cobra.Command object with default parameters.

func Run

Run runs the specified APIServer. This should never exit.

Types

type CompletedConfig added in v0.2.0

type CompletedConfig struct {
	// contains filtered or unexported fields
}

type Config added in v0.2.0

type Config struct {
	Options options.CompletedOptions

	Aggregator    *aggregatorapiserver.Config
	ControlPlane  *controlplane.Config
	ApiExtensions *apiextensionsapiserver.Config

	ExtraConfig
}

func NewConfig

func NewConfig(opts options.CompletedOptions) (*Config, error)

NewConfig creates all the resources for running kube-apiserver, but runs none of them.

func (*Config) Complete added in v0.2.0

func (c *Config) Complete() (CompletedConfig, error)

type ExtraConfig added in v0.2.0

type ExtraConfig struct{}

type Option

type Option func(*options.ServerRunOptions)

func WithAdmissionInitializers

func WithAdmissionInitializers(initializer func(c *genericapiserver.RecommendedConfig) ([]admission.PluginInitializer, error)) Option

WithAdmissionInitializers returns an Option function that sets the external admission initializers in the ServerRunOptions.

func WithAdmissionPlugin

func WithAdmissionPlugin(name string, registerFunc RegisterFunc) Option

WithAdmissionPlugin returns an Option function that adds an admission plugin to the recommended plugin order list and registers the plugin using the provided RegisterFunc in the ServerRunOptions.

func WithAlternateDNS

func WithAlternateDNS(dns ...string) Option

WithAlternateDNS returns an Option function that sets the alternate DNS configurations in the ServerRunOptions.

func WithEtcdOptions

func WithEtcdOptions(prefix string, versions ...schema.GroupVersion) Option

WithLegacyCode returns an Option that sets the external group versions in the ServerRunOptions.

func WithGetOpenAPIDefinitions

func WithGetOpenAPIDefinitions(getOpenAPIDefinitions common.GetOpenAPIDefinitions) Option

WithOpenAPIDefinitions sets the OpenAPI definitions for the server.

func WithPostStartHook

func WithPostStartHook(name string, hook genericapiserver.PostStartHookFunc) Option

WithPostStartHook returns an Option function that sets the external post-start hook with the given name in the ServerRunOptions.

func WithRESTStorageProviders

func WithRESTStorageProviders(providers ...storage.RESTStorageProvider) Option

WithRESTStorageProviders returns an Option function that sets the external REST storage providers in the ServerRunOptions.

func WithSharedInformerFactory

func WithSharedInformerFactory(informers controlplane.ExternalSharedInformerFactory) Option

WithSharedInformerFactory returns an Option function that sets the external SharedInformerFactory in the ServerRunOptions.

type RegisterFunc

type RegisterFunc func(plugins *admission.Plugins)

Directories

Path Synopsis
Package options contains flags and options for initializing an apiserver
Package options contains flags and options for initializing an apiserver

Jump to

Keyboard shortcuts

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