config

package
v0.0.0-...-ea2048f Latest Latest
Warning

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

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

Documentation

Overview

Package config contains functions for creating management, scaled, and user contexts that user norman controllers.

Index

Constants

This section is empty.

Variables

View Source
var (
	UserStorageContext       types.StorageContext = "user"
	ManagementStorageContext types.StorageContext = "mgmt"
)

Functions

This section is empty.

Types

type ManagementContext

type ManagementContext struct {
	ClientGetter      proxy.ClientGetter
	RESTConfig        rest.Config
	ControllerFactory controller.SharedControllerFactory
	UnversionedClient rest.Interface
	DynamicClient     k8dynamic.Interface
	K8sClient         kubernetes.Interface
	APIExtClient      clientset.Interface
	Schemas           *types.Schemas
	Scheme            *runtime.Scheme
	Dialer            dialer.Factory
	UserManager       user.Manager
	SystemTokens      systemtokens.Interface
	CatalogManager    manager.CatalogManager

	Management managementv3.Interface
	Project    projectv3.Interface
	RBAC       rbacv1.Interface
	Core       corev1.Interface
	Apps       appsv1.Interface
	Wrangler   *wrangler.Context
}

func (*ManagementContext) WithAgent

func (c *ManagementContext) WithAgent(userAgent string) *ManagementContext

WithAgent returns a shallow copy of the Context that has been configured to use a user agent in its clients that is the given userAgent appended to "rancher-%s-%s".

type ScaleContextOptions

type ScaleContextOptions struct {
	ControllerFactory controller.SharedControllerFactory
}

type ScaledContext

type ScaledContext struct {
	ClientGetter      proxy.ClientGetter
	RESTConfig        rest.Config
	ControllerFactory controller.SharedControllerFactory
	UnversionedClient rest.Interface
	K8sClient         kubernetes.Interface
	APIExtClient      clientset.Interface
	Schemas           *types.Schemas
	AccessControl     types.AccessControl
	Dialer            dialer.Factory
	SystemTokens      systemtokens.Interface
	UserManager       user.Manager
	PeerManager       peermanager.PeerManager
	CatalogManager    manager.CatalogManager

	Management managementv3.Interface
	Project    projectv3.Interface
	RBAC       rbacv1.Interface
	Core       corev1.Interface
	Storage    storagev1.Interface

	Wrangler   *wrangler.Context
	RunContext context.Context
	// contains filtered or unexported fields
}

func NewScaledContext

func NewScaledContext(config rest.Config, opts *ScaleContextOptions) (*ScaledContext, error)

func (*ScaledContext) NewManagementContext

func (c *ScaledContext) NewManagementContext() (*ManagementContext, error)

func (*ScaledContext) Start

func (c *ScaledContext) Start(ctx context.Context) error

type UserContext

type UserContext struct {
	Management        *ManagementContext
	ClusterName       string
	RESTConfig        rest.Config
	ControllerFactory controller.SharedControllerFactory
	UnversionedClient rest.Interface
	APIExtClient      clientset.Interface
	K8sClient         kubernetes.Interface

	APIAggregation apiregistrationv1.Interface
	Apps           appsv1.Interface
	Autoscaling    autoscaling.Interface
	Catalog        catalog.Interface
	Project        projectv3.Interface
	Core           corev1.Interface
	RBAC           rbacv1.Interface
	Extensions     extv1beta1.Interface
	BatchV1        batchv1.Interface
	Networking     knetworkingv1.Interface
	Cluster        clusterv3.Interface
	Storage        storagev1.Interface

	RBACw          wrbacv1.Interface
	Corew          wcorev1.Interface
	KindNamespaces map[schema.GroupVersionKind]string
	// contains filtered or unexported fields
}

func NewUserContext

func NewUserContext(scaledContext *ScaledContext, config rest.Config, clusterName string) (*UserContext, error)

func (*UserContext) DeferredStart

func (w *UserContext) DeferredStart(ctx context.Context, register func(ctx context.Context) error) func() error

func (*UserContext) Start

func (w *UserContext) Start(ctx context.Context) error

func (*UserContext) UserOnlyContext

func (w *UserContext) UserOnlyContext() *UserOnlyContext

type UserOnlyContext

type UserOnlyContext struct {
	Schemas           *types.Schemas
	ClusterName       string
	RESTConfig        rest.Config
	ControllerFactory controller.SharedControllerFactory
	UnversionedClient rest.Interface
	K8sClient         kubernetes.Interface

	APIRegistration apiregistrationv1.Interface
	Apps            appsv1.Interface
	Autoscaling     autoscaling.Interface
	Project         projectv3.Interface
	Core            corev1.Interface
	RBAC            rbacv1.Interface
	Extensions      extv1beta1.Interface
	BatchV1         batchv1.Interface
	Networking      knetworkingv1.Interface
	Cluster         clusterv3.Interface
	Storage         storagev1.Interface
}

func NewUserOnlyContext

func NewUserOnlyContext(config *wrangler.Context) (*UserOnlyContext, error)

func (*UserOnlyContext) Start

func (w *UserOnlyContext) Start(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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