batteries

package
v0.0.0-...-aa38cc1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AllOrderedPlugins is the list of all the plugins in order.

Functions

This section is empty.

Types

type Batteries

type Batteries struct {
	BatteriesArgs []string
	// contains filtered or unexported fields
}

func New

func New() Batteries

func (*Batteries) AddFlags

func (s *Batteries) AddFlags(fs *pflag.FlagSet)

AddFlags adds the flags for the admin authentication to the given FlagSet.

func (Batteries) Complete

func (b Batteries) Complete()

func (Batteries) DefaultOffAdmissionPlugins

func (b Batteries) DefaultOffAdmissionPlugins() sets.Set[string]

func (Batteries) Disable

func (b Batteries) Disable(name Battery)

func (Batteries) Enable

func (b Batteries) Enable(name Battery)

func (Batteries) IsEnabled

func (b Batteries) IsEnabled(name Battery) bool

func (Batteries) RegisterAllAdmissionPlugins

func (b Batteries) RegisterAllAdmissionPlugins(plugins *admission.Plugins)

RegisterAllAdmissionPlugins registers all admission plugins based on the batteries configuration.

func (Batteries) Validate

func (b Batteries) Validate() []error

type BatteriesList

type BatteriesList map[Battery]BatterySpec

type Battery

type Battery string
const (
	// BatteryLeases is the name of the lease battery.
	BatteryLeases Battery = "leases"
	// BatteryAuthentication is the name of the authentication battery.
	BatteryAuthentication Battery = "authentication"
	// BatteryAuthorization is the name of the authorization battery.
	BatteryAuthorization Battery = "authorization"
	// BatteryAdmission is the name of the admission battery.
	BatteryAdmission Battery = "admission"
	// BatteryFlowControl is the name of the flow control battery.
	BatteryFlowControl Battery = "flowcontrol"
	// BatteryCRDs is the name of the CRD battery.
	BatteryCRDs Battery = "crds"
)

func (Battery) String

func (b Battery) String() string

type BatterySpec

type BatterySpec struct {
	// Enabled indicates whether the battery is enabled.
	Enabled bool

	// GroupNames is the list of group names that the battery is responsible for.
	// If disabled, the battery will not be registered for these groups.
	GroupNames []string
}

Jump to

Keyboard shortcuts

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