controller

package
v0.0.0-...-def978a Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PodSecurityModeEnforcing ...
	PodSecurityModeEnforcing = "pod-security.kubernetes.io/enforce"
	// PodSecurityModeWarn ...
	PodSecurityModeWarn = "pod-security.kubernetes.io/warn"
)

Variables

This section is empty.

Functions

func Contains

func Contains(array []string, word string) bool

Contains is checking does array contain single word.

Types

type Config

type Config struct {
	Maintainers     []Team   `yaml:"maintainers"`
	AdminNamespaces []string `yaml:"adminnamespaces"`
	LimitCPU        string   `yaml:"limitcpu"`
	LimitMemory     string   `yaml:"limitmemory"`
	RequestCPU      string   `yaml:"requestcpu"`
	RequestMemory   string   `yaml:"requestmemory"`
}

Config ...

type Controller

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

Controller contains controller variables that is needed to work in class.

func NewNamespaceWatcher

func NewNamespaceWatcher(kclient *kubernetes.Clientset, configFile string) (*Controller, error)

NewNamespaceWatcher creates a new nsController.

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{}, wg *sync.WaitGroup)

Run starts the process for listening for event changes and acting upon those changes.

type Team

type Team struct {
	Team       string            `yaml:"team"`
	Labels     map[string]string `yaml:"labels"`
	NameSpaces []string          `yaml:"namespaces"`
}

Team ...

func FindTeam

func FindTeam(name string, config *Config) (*Team, error)

FindTeam finds correct team for namespace.

Jump to

Keyboard shortcuts

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