apiserverapp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package apiserverapp provides the aggregated API server application mode for coder-k8s.

Index

Constants

View Source
const (
	// DefaultSecureServingPort is the secure serving port used by aggregated-apiserver mode.
	DefaultSecureServingPort = 6443
)

Variables

This section is empty.

Functions

func InstallAPIGroup

func InstallAPIGroup(server *genericapiserver.GenericAPIServer, apiGroupInfo *genericapiserver.APIGroupInfo) error

InstallAPIGroup installs an API group into a generic API server.

func NewAPIGroupInfo

func NewAPIGroupInfo(
	scheme *runtime.Scheme,
	codecs serializer.CodecFactory,
	provider coder.ClientProvider,
) (*genericapiserver.APIGroupInfo, error)

NewAPIGroupInfo creates APIGroupInfo for the aggregation.coder.com API group.

func NewGenericAPIServer

func NewGenericAPIServer(recommendedConfig *genericapiserver.RecommendedConfig) (*genericapiserver.GenericAPIServer, error)

NewGenericAPIServer builds and configures a generic API server instance.

func NewRecommendedConfig

func NewRecommendedConfig(
	scheme *runtime.Scheme,
	codecs serializer.CodecFactory,
	secureServingOptions *genericoptions.SecureServingOptions,
) (*genericapiserver.RecommendedConfig, error)

NewRecommendedConfig builds a recommended generic API server config.

func NewScheme

func NewScheme() *runtime.Scheme

NewScheme builds the runtime scheme used by the aggregated API server.

func Run

func Run(ctx context.Context) error

Run starts the aggregated API server application mode.

func RunWithOptions

func RunWithOptions(ctx context.Context, opts Options) error

RunWithOptions starts the aggregated API server application mode.

Types

type Options

type Options struct {
	// SecureServingPort used when Listener is nil. Default: DefaultSecureServingPort.
	SecureServingPort int
	// Listener allows tests to bind to 127.0.0.1:0.
	Listener net.Listener
	// CoderURL is an optional fallback URL when CoderControlPlane status has no URL.
	CoderURL string
	// CoderSessionToken is the admin session token.
	CoderSessionToken string
	// CoderNamespace restricts the provider to serve only this namespace.
	// When non-empty, requests to other namespaces are rejected.
	CoderNamespace string
	// CoderRequestTimeout for SDK calls. Default 30s.
	CoderRequestTimeout time.Duration
	// ClientProvider overrides the default static provider.
	// When set, CoderURL/CoderSessionToken/CoderNamespace flags are ignored.
	ClientProvider coder.ClientProvider
}

Options configures aggregated-apiserver bootstrap behavior.

Jump to

Keyboard shortcuts

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