apiserver

package
v1.60.4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 40 Imported by: 7

Documentation

Index

Constants

View Source
const (
	// APISigningKeySecretName is the selfsigned cert secret name
	//nolint:gosec // This is not a real secret
	APISigningKeySecretName = "cdi-api-signing-key"
)

Variables

This section is empty.

Functions

func UploadTokenRequestAPI added in v1.5.0

func UploadTokenRequestAPI() []*restful.WebService

UploadTokenRequestAPI returns web service for swagger generation

Types

type AuthConfig added in v1.9.3

type AuthConfig struct {
	AllowedNames       []string
	UserHeaders        []string
	GroupHeaders       []string
	ExtraPrefixHeaders []string

	ClientCABytes              []byte
	RequestheaderClientCABytes []byte

	CertPool *x509.CertPool
}

AuthConfig contains extension-apiserver-authentication data

func (*AuthConfig) ValidateName added in v1.21.0

func (ac *AuthConfig) ValidateName(name string) bool

ValidateName checks if name is allowed

type AuthConfigWatcher added in v1.9.3

type AuthConfigWatcher interface {
	GetAuthConfig() *AuthConfig
}

AuthConfigWatcher is the interface of authConfigWatcher

func NewAuthConfigWatcher added in v1.9.3

func NewAuthConfigWatcher(ctx context.Context, client kubernetes.Interface) (AuthConfigWatcher, error)

NewAuthConfigWatcher crates a new authConfigWatcher

type CdiAPIAuthorizer

type CdiAPIAuthorizer interface {
	Authorize(req *restful.Request) (bool, string, error)
}

CdiAPIAuthorizer defines methods to authorize api requests

func NewAuthorizorFromConfig

func NewAuthorizorFromConfig(config *restclient.Config, authConfigWatcher AuthConfigWatcher) (CdiAPIAuthorizer, error)

NewAuthorizorFromConfig creates a new CdiAPIAuthorizor

type CdiAPIServer added in v1.4.0

type CdiAPIServer interface {
	Start(<-chan struct{}) error
}

CdiAPIServer is the public interface to the CDI API

func NewCdiAPIServer added in v1.4.0

func NewCdiAPIServer(bindAddress string,
	bindPort uint,
	client kubernetes.Interface,
	aggregatorClient aggregatorclient.Interface,
	cdiClient cdiclient.Interface,
	snapClient snapclient.Interface,
	controllerRuntimeClient client.Client,
	authorizor CdiAPIAuthorizer,
	authConfigWatcher AuthConfigWatcher,
	cdiConfigTLSWatcher cryptowatch.CdiConfigTLSWatcher,
	certWatcher CertWatcher,
	installerLabels map[string]string) (CdiAPIServer, error)

NewCdiAPIServer returns an initialized CDI api server

type CertWatcher added in v1.13.0

type CertWatcher interface {
	GetCertificate(_ *tls.ClientHelloInfo) (*tls.Certificate, error)
}

CertWatcher is the interface for resources that watch certs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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