config

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WatchAdmissionConf

func WatchAdmissionConf(path string, stopCh <-chan struct{})

WatchAdmissionConf listen the changes of the configuration file

Types

type AdmissionConfiguration

type AdmissionConfiguration struct {
	sync.Mutex
	ResGroupsConfig []ResGroupConfig `yaml:"resourceGroups"`
}

AdmissionConfiguration defines the configuration of admission.

func LoadAdmissionConf

func LoadAdmissionConf(confPath string) *AdmissionConfiguration

LoadAdmissionConf parse the configuration from config path

type Object

type Object struct {
	Key   string   `yaml:"key"`
	Value []string `yaml:"value"`
}

Object the key data for resource group kind

type ResGroupConfig

type ResGroupConfig struct {
	ResourceGroup string            `yaml:"resourceGroup"`
	Object        Object            `yaml:"object"`
	SchedulerName string            `yaml:"schedulerName"`
	Tolerations   []v1.Toleration   `yaml:"tolerations"`
	Labels        map[string]string `yaml:"labels"`
	Affinity      string            `yaml:"affinity"`
}

ResGroupConfig defines the configuration of admission.

Jump to

Keyboard shortcuts

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