helper

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureFirewallControllerRBAC

func EnsureFirewallControllerRBAC(ctx context.Context, seedConfig, shootConfig *rest.Config, deploy *v2.FirewallDeployment, shootNamespace string, shootAccess *v2.ShootAccess) error

func GetAccessKubeconfig

func GetAccessKubeconfig(c *AccessConfig) ([]byte, error)

func MustNewFirewallScheme

func MustNewFirewallScheme() *runtime.Scheme

Types

type AccessConfig

type AccessConfig struct {
	Ctx          context.Context
	Config       *rest.Config
	Namespace    string
	ApiServerURL string
	Deployment   *v2.FirewallDeployment
	ForShoot     bool
}

type ShootAccessHelper

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

func NewShootAccessHelper

func NewShootAccessHelper(seed client.Client, access *v2.ShootAccess) *ShootAccessHelper

NewShootAccessHelper provides shoot access functions based on shoot access secrets, i.e. Gardener's generic kubeconfig and token secret.

func NewSingleClusterModeHelper added in v0.2.0

func NewSingleClusterModeHelper(shootConfig *rest.Config) *ShootAccessHelper

NewSingleClusterModeHelper provides shoot access functions when running in a single-mode cluster, i.e. the shoot client equals the seed client.

func (*ShootAccessHelper) Client

func (s *ShootAccessHelper) Client(ctx context.Context) (client.Client, error)

func (*ShootAccessHelper) Config

func (*ShootAccessHelper) RESTConfig

func (s *ShootAccessHelper) RESTConfig(ctx context.Context) (*rest.Config, error)

func (*ShootAccessHelper) Raw

func (s *ShootAccessHelper) Raw(ctx context.Context) ([]byte, error)

type ShootAccessTokenUpdater

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

func NewShootAccessTokenUpdater

func NewShootAccessTokenUpdater(s *ShootAccessHelper, tokenDir string) (*ShootAccessTokenUpdater, error)

func (*ShootAccessTokenUpdater) UpdateContinuously

func (s *ShootAccessTokenUpdater) UpdateContinuously(log logr.Logger, stop context.Context) error

func (*ShootAccessTokenUpdater) UpdateShootAccess added in v0.2.2

func (s *ShootAccessTokenUpdater) UpdateShootAccess(shootAccess *v2.ShootAccess)

Jump to

Keyboard shortcuts

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