kube-aggregator: k8s.io/kube-aggregator/pkg/apiserver Index | Files | Directories

package apiserver

import "k8s.io/kube-aggregator/pkg/apiserver"


Package Files

apiserver.go apiservice_controller.go handler_apis.go handler_proxy.go resolvers.go

func DefaultAPIResourceConfigSource Uses

func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig

DefaultAPIResourceConfigSource returns default configuration for an APIResource.

type APIAggregator Uses

type APIAggregator struct {
    GenericAPIServer *genericapiserver.GenericAPIServer

    // provided for easier embedding
    APIRegistrationInformers informers.SharedInformerFactory
    // contains filtered or unexported fields

APIAggregator contains state for a Kubernetes cluster master/api server.

func (*APIAggregator) AddAPIService Uses

func (s *APIAggregator) AddAPIService(apiService *v1.APIService) error

AddAPIService adds an API service. It is not thread-safe, so only call it on one thread at a time please. It's a slow moving API, so its ok to run the controller on a single thread

func (*APIAggregator) PrepareRun Uses

func (s *APIAggregator) PrepareRun() (preparedAPIAggregator, error)

PrepareRun prepares the aggregator to run, by setting up the OpenAPI spec and calling the generic PrepareRun.

func (*APIAggregator) RemoveAPIService Uses

func (s *APIAggregator) RemoveAPIService(apiServiceName string)

RemoveAPIService removes the APIService from being handled. It is not thread-safe, so only call it on one thread at a time please. It's a slow moving API, so it's ok to run the controller on a single thread.

type APIHandlerManager Uses

type APIHandlerManager interface {
    AddAPIService(apiService *v1.APIService) error
    RemoveAPIService(apiServiceName string)

APIHandlerManager defines the behaviour that an API handler should have.

type APIServiceRegistrationController Uses

type APIServiceRegistrationController struct {
    // contains filtered or unexported fields

APIServiceRegistrationController is responsible for registering and removing API services.

func NewAPIServiceRegistrationController Uses

func NewAPIServiceRegistrationController(apiServiceInformer informers.APIServiceInformer, apiHandlerManager APIHandlerManager) *APIServiceRegistrationController

NewAPIServiceRegistrationController returns a new APIServiceRegistrationController.

func (*APIServiceRegistrationController) Enqueue Uses

func (c *APIServiceRegistrationController) Enqueue()

Enqueue queues all apiservices to be rehandled. This method is used by the controller to notify when the proxy cert content changes.

func (*APIServiceRegistrationController) Run Uses

func (c *APIServiceRegistrationController) Run(stopCh <-chan struct{}, handlerSyncedCh chan<- struct{})

Run starts APIServiceRegistrationController which will process all registration requests until stopCh is closed.

type CompletedConfig Uses

type CompletedConfig struct {
    // contains filtered or unexported fields

CompletedConfig same as Config, just to swap private object.

func (CompletedConfig) NewWithDelegate Uses

func (c CompletedConfig) NewWithDelegate(delegationTarget genericapiserver.DelegationTarget) (*APIAggregator, error)

NewWithDelegate returns a new instance of APIAggregator from the given config.

type Config Uses

type Config struct {
    GenericConfig *genericapiserver.RecommendedConfig
    ExtraConfig   ExtraConfig

Config represents the configuration needed to create an APIAggregator.

func (*Config) Complete Uses

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 ExtraConfig Uses

type ExtraConfig struct {
    // ProxyClientCert/Key are the client cert used to identify this proxy. Backing APIServices use
    // this to confirm the proxy's identity
    ProxyClientCertFile string
    ProxyClientKeyFile  string

    // If present, the Dial method will be used for dialing out to delegate
    // apiservers.
    ProxyTransport *http.Transport

    // Mechanism by which the Aggregator will resolve services. Required.
    ServiceResolver ServiceResolver

ExtraConfig represents APIServices-specific configuration

type ServiceResolver Uses

type ServiceResolver interface {
    ResolveEndpoint(namespace, name string, port int32) (*url.URL, error)

A ServiceResolver knows how to get a URL given a service.

func NewClusterIPServiceResolver Uses

func NewClusterIPServiceResolver(services listersv1.ServiceLister) ServiceResolver

NewClusterIPServiceResolver returns a ServiceResolver that directly calls the service's cluster IP.

func NewEndpointServiceResolver Uses

func NewEndpointServiceResolver(services listersv1.ServiceLister, endpoints listersv1.EndpointsLister) ServiceResolver

NewEndpointServiceResolver returns a ServiceResolver that chooses one of the service's endpoints.

func NewLoopbackServiceResolver Uses

func NewLoopbackServiceResolver(delegate ServiceResolver, host *url.URL) ServiceResolver

NewLoopbackServiceResolver returns a ServiceResolver that routes the kubernetes/default service with port 443 to loopback.



Package apiserver imports 52 packages (graph) and is imported by 10 packages. Updated 2020-07-26. Refresh now. Tools for package owners.