controller

package
v0.0.0-...-95aba1e Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IntializerConfigmapName string
	InitializerName         string
	IntializerNamespace     string
)

Functions

func ConfigMapToConfig

func ConfigMapToConfig(cm *coreV1.ConfigMap) (*[]Config, error)

func FileToConfig

func FileToConfig(filePath string) (*[]Config, error)

func GetAliases

func GetAliases(app string, config []Config) []coreV1.HostAlias

func GetAliasesByKV

func GetAliasesByKV(k, v string, config []Config) []coreV1.HostAlias

func GetClient

func GetClient(kubeMaster, kubeConfig string) *kubernetes.Clientset

Get a clientset with in-cluster config.

Types

type Config

type Config struct {
	Name    string             `yaml:"name"`
	App     string             `yaml:"app"`
	Label   string             `yaml:"label"`
	Aliases []coreV1.HostAlias `yaml:"hostAliases"`
}

type Controller

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

func NewHostAliasesInitializer

func NewHostAliasesInitializer(clientset *kubernetes.Clientset, conf *[]Config) *Controller

func (*Controller) Run

func (c *Controller) Run(ctx <-chan struct{})

Jump to

Keyboard shortcuts

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