apiserver

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OIDCPath           = "/oidc/"
	AuthPath           = "/auth/"
	APIKeyPasswordPath = "/apis/auth.tkestack.io/v1/apikeys/default/password"

	APIKeyPath           = "/apis/auth.tkestack.io/v1/apikeys"
	DefaultTitle         = "TKEStack"
	DefaultLogoDir       = "default"
	HtmlTmplDir          = "web/auth/templates/"
	FlagConsoleTitle     = "title"
	FlagConsoleLogoDir   = "logo-dir"
	ConfigConsoleTitle   = "console_config.title"
	ConfigConsoleLogoDir = "console_config.logo_dir"
)

Variables

This section is empty.

Functions

func DefaultAPIResourceConfigSource

func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig

DefaultAPIResourceConfigSource returns which groupVersion enabled and its resources enabled/disabled.

func IgnoreAuthPathPrefixes

func IgnoreAuthPathPrefixes() []string

func IgnoreAuthzPathPrefixes added in v1.3.1

func IgnoreAuthzPathPrefixes() []string

Types

type APIServer

type APIServer struct {
	GenericAPIServer *genericapiserver.GenericAPIServer
}

APIServer contains state for a tke api server.

func (*APIServer) InstallAPIs

func (m *APIServer) InstallAPIs(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter, restStorageProviders ...storage.RESTStorageProvider)

InstallAPIs will install the APIs for the restStorageProviders if they are enabled.

type CompletedConfig

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

CompletedConfig embed a private pointer of Config.

func (CompletedConfig) New

func (c CompletedConfig) New(delegationTarget genericapiserver.DelegationTarget) (*APIServer, error)

New returns a new instance of APIServer from the given config.

type Config

type Config struct {
	GenericConfig *genericapiserver.RecommendedConfig
	ExtraConfig   ExtraConfig
}

Config contains the core configuration instance of apiserver and additional configuration.

func (*Config) Complete

func (cfg *Config) Complete() CompletedConfig

Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.

type ConsoleConfig added in v1.9.1

type ConsoleConfig struct {
	Title   string
	LogoDir string
}

func NewConsoleConfigOptions added in v1.9.1

func NewConsoleConfigOptions() *ConsoleConfig

NewAuthOptions creates a AuthOptions object with default parameters.

func (*ConsoleConfig) AddFlags added in v1.9.1

func (o *ConsoleConfig) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags for console to the specified FlagSet object.

func (*ConsoleConfig) ApplyFlags added in v1.9.1

func (o *ConsoleConfig) ApplyFlags() []error

ApplyFlags parsing parameters from the command line or configuration file to the options instance.

type ExtraConfig

type ExtraConfig struct {
	ServerName              string
	APIResourceConfigSource serverstorage.APIResourceConfigSource
	StorageFactory          serverstorage.StorageFactory
	VersionedInformers      versionedinformers.SharedInformerFactory

	OIDCExternalAddress  string
	DexConfig            *dexserver.Config
	DexStorage           dexstorage.Storage
	CasbinEnforcer       *casbin.SyncedEnforcer
	TokenAuthn           *authenticator.TokenAuthenticator
	APIKeyAuthn          *authenticator.APIKeyAuthenticator
	Authorizer           authorizer.Authorizer
	CasbinReloadInterval time.Duration
	PrivilegedUsername   string
	ConsoleConfig        *ConsoleConfig
}

ExtraConfig contains the additional configuration of apiserver.

Jump to

Keyboard shortcuts

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