k8s

package
v0.0.0-...-97dd610 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyToAuthentication

func CopyToAuthentication(key, rootNamespace string, pa *apiV1beta1.AuthenticationPolicy) *authentication.Policy

func CopyToAuthorization

func CopyToAuthorization(key, rootNamespace string, pa *apiV1beta1.AuthorizationPolicy) *authorization.Policy

Types

type Client

type Client interface {
	Init(options *config.Options) bool
	GetAuthorityCert(namespace string) (string, string)
	UpdateAuthorityCert(cert string, pri string, namespace string)
	UpdateAuthorityPublicKey(cert string) bool
	VerifyServiceAccount(token string, authorizationType string) (*rule.Endpoint, bool)
	UpdateWebhookConfig(options *config.Options, storage cert.Storage)
	GetNamespaceLabels(namespace string) map[string]string
	InitController(paHandler authentication.Handler, apHandler authorization.Handler)
	GetKubClient() *kubernetes.Clientset
}

func NewClient

func NewClient() Client

type ClientImpl

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

func (*ClientImpl) GetAuthorityCert

func (c *ClientImpl) GetAuthorityCert(namespace string) (string, string)

func (*ClientImpl) GetKubClient

func (c *ClientImpl) GetKubClient() *kubernetes.Clientset

func (*ClientImpl) GetNamespaceLabels

func (c *ClientImpl) GetNamespaceLabels(namespace string) map[string]string

func (*ClientImpl) Init

func (c *ClientImpl) Init(options *config.Options) bool

func (*ClientImpl) InitController

func (c *ClientImpl) InitController(
	authenticationHandler authentication.Handler,
	authorizationHandler authorization.Handler,
)

func (*ClientImpl) UpdateAuthorityCert

func (c *ClientImpl) UpdateAuthorityCert(cert string, pri string, namespace string)

func (*ClientImpl) UpdateAuthorityPublicKey

func (c *ClientImpl) UpdateAuthorityPublicKey(cert string) bool

func (*ClientImpl) UpdateWebhookConfig

func (c *ClientImpl) UpdateWebhookConfig(options *config.Options, storage cert.Storage)

func (*ClientImpl) VerifyServiceAccount

func (c *ClientImpl) VerifyServiceAccount(token string, authorizationType string) (*rule.Endpoint, bool)

type Controller

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

Controller is the controller implementation for Foo resources

func NewController

func NewController(
	clientSet clientSet.Interface,
	rootNamespace string,
	authenticationHandler authentication.Handler,
	authorizationHandler authorization.Handler,
	acInformer informerV1beta1.AuthenticationPolicyInformer,
	apInformer informerV1beta1.AuthorizationPolicyInformer,
) *Controller

NewController returns a new sample controller

func (*Controller) WaitSynced

func (c *Controller) WaitSynced()

type NotificationType

type NotificationType int
const (
	// AddNotification is a notification type for add events.
	AddNotification NotificationType = iota
	// UpdateNotification is a notification type for update events.
	UpdateNotification
	// DeleteNotification is a notification type for delete events.
	DeleteNotification
)

Jump to

Keyboard shortcuts

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