root

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AcceptedCiphers is the list of accepted TLS ciphers, with known weak ciphers elided Note this list should be a moving target.

Functions

func BuildAuthn

func BuildAuthn(client authenticationclient.TokenReviewInterface, authn opts.Authentication, clientCACert string) (authenticator.Request, func(<-chan struct{}), error)

BuildAuthn creates an authenticator compatible with the virtual-kubelet's needs

func BuildAuthz

BuildAuthz creates an authorizer compatible with the virtual-kubelet's needs

func NewCommand

func NewCommand(name string, s *provider.Store, o *opts.Opts) *cobra.Command

NewCommand creates a new top-level command. This command is used to start the virtual-kubelet daemon

func NewNodeAuthorizerAttributesGetter

func NewNodeAuthorizerAttributesGetter(nodeName types.NodeName) authorizer.RequestAttributesGetter

NewNodeAuthorizerAttributesGetter creates a new authorizer.RequestAttributesGetter for the node.

func NodeFromProvider

func NodeFromProvider(ctx context.Context, name string, taint *v1.Taint, p provider.Provider, version string) *v1.Node

NodeFromProvider builds a kubernetes node object from a provider This is a temporary solution until node stuff actually split off from the provider interface itself.

Types

type AuthInterface

AuthInterface contains all methods required by the auth filters

func BuildAuth

func BuildAuth(nodeName types.NodeName, client clientset.Interface, config opts.Opts) (AuthInterface, func(<-chan struct{}), error)

BuildAuth creates an authenticator, an authorizer, and a matching authorizer attributes getter compatible with the virtual-kubelet's needs

func NewVirtualKubeletAuth

func NewVirtualKubeletAuth(authenticator authenticator.Request, authorizerAttributeGetter authorizer.RequestAttributesGetter, authorizer authorizer.Authorizer) AuthInterface

NewVirtualKubeletAuth returns a AuthInterface composed of the given authenticator, attribute getter, and authorizer

type ServeMuxWithAuth

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

ServeMuxWithAuth implements api.ServerMux

func NewServeMuxWithAuth

func NewServeMuxWithAuth(ctx context.Context, auth AuthInterface) *ServeMuxWithAuth

NewServeMuxWithAuth initiate an instance for ServeMuxWithAuth

func (*ServeMuxWithAuth) Handle

func (s *ServeMuxWithAuth) Handle(path string, h http.Handler)

Handle enables auth filter for mux Handle

func (*ServeMuxWithAuth) ServeHTTP

func (s *ServeMuxWithAuth) ServeHTTP(w http.ResponseWriter, r *http.Request)

type VirtualKubeletAuth

type VirtualKubeletAuth struct {
	// authenticator identifies the user for requests to the Kubelet API
	authenticator.Request
	// authorizerAttributeGetter builds authorization.Attributes for a request to the Kubelet API
	authorizer.RequestAttributesGetter
	// authorizer determines whether a given authorization.Attributes is allowed
	authorizer.Authorizer
}

VirtualKubeletAuth implements AuthInterface

Jump to

Keyboard shortcuts

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