apiserver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 38 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// DefaultPeerEndpointReconcileInterval is the default amount of time for how often
	// the peer endpoint leases are reconciled.
	DefaultPeerEndpointReconcileInterval = 10 * time.Second
	// DefaultPeerEndpointReconcilerTTL is the default TTL timeout for peer endpoint
	// leases on the storage layer
	DefaultPeerEndpointReconcilerTTL = 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"
)

Variables

This section is empty.

Functions

func BuildGenericConfig

func BuildGenericConfig(
	s controlplaneoptions.CompletedOptions,
	schemes []*runtime.Scheme,
	getOpenAPIDefinitions func(ref openapicommon.ReferenceCallback) map[string]openapicommon.OpenAPIDefinition,
) (
	genericConfig *genericapiserver.RecommendedConfig,
	kubeSharedInformers informers.SharedInformerFactory,
	storageFactory *serverstorage.DefaultStorageFactory,
	lastErr error,
)

BuildGenericConfig takes the master server options and produces the genericapiserver.Config associated with it.

func BuildPeerProxy

func BuildPeerProxy(
	leaseInformer coordinationv1informers.LeaseInformer,
	loopbackClientConfig *rest.Config,
	proxyClientCertFile string,
	proxyClientKeyFile string,
	peerCAFile string,
	peerAdvertiseAddress reconcilers.PeerAdvertiseAddress,
	apiServerID string,
	reconciler reconcilers.PeerEndpointLeaseReconciler,
	serializer runtime.NegotiatedSerializer,
) (utilpeerproxy.Interface, error)

func CreateAPIExtensionsConfig

func CreateAPIExtensionsConfig(
	onexAPIServerConfig server.Config,
	kubeInformers kubeinformers.SharedInformerFactory,
	pluginInitializers []admission.PluginInitializer,
	commandOptions controlplaneoptions.CompletedOptions,
	masterCount int,
	serviceResolver webhook.ServiceResolver,
	authResolverWrapper webhook.AuthenticationInfoResolverWrapper,
) (*apiextensionsapiserver.Config, error)

func CreatePeerEndpointLeaseReconciler

func CreatePeerEndpointLeaseReconciler(c genericapiserver.Config, storageFactory serverstorage.StorageFactory) (reconcilers.PeerEndpointLeaseReconciler, error)

CreatePeerEndpointLeaseReconciler creates a apiserver endpoint lease reconciliation loop The peer endpoint leases are used to find network locations of apiservers for peer proxy

Types

This section is empty.

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