kube

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ByHub                   = "IndexByHub"
	EnvConfigMapType        = "hub-variables"
	ManualEnvConfigMapType  = "hub-manual-variables"
	AutomationConfigMapType = "hub-automation"
	LabelMdaiHubName        = "mydecisive.ai/hub-name"
	ConfigMapTypeLabel      = "mydecisive.ai/configmap-type"
)

Variables

This section is empty.

Functions

func NewK8sClient

func NewK8sClient(logger *zap.Logger) (kubernetes.Interface, error)

func NewK8sDynamicClient

func NewK8sDynamicClient(logger *zap.Logger) (dynamic.Interface, error)

Types

type ConfigMapController

type ConfigMapController struct {
	InformerFactory informers.SharedInformerFactory
	CmInformer      coreinformers.ConfigMapInformer

	Logger *zap.Logger
	// contains filtered or unexported fields
}

func NewConfigMapController

func NewConfigMapController(configMapTypes []string, namespace string, clientset kubernetes.Interface, logger *zap.Logger) (*ConfigMapController, error)

func (*ConfigMapController) GetAllHubsToDataMap

func (cmc *ConfigMapController) GetAllHubsToDataMap() (map[string]map[string]string, error)

func (*ConfigMapController) GetConfigMapByHubName

func (cmc *ConfigMapController) GetConfigMapByHubName(hubName string) (*v1.ConfigMap, error)

GetConfigMapByHubName returns the first ConfigMap found for the given hub name. This function assumes that the ConfigMaps of certain type filtered by label are unique per hub.

func (*ConfigMapController) GetHubData

func (cmc *ConfigMapController) GetHubData(hubName string) ([]map[string]string, error)

func (*ConfigMapController) Run

func (cmc *ConfigMapController) Run() error

func (*ConfigMapController) Stop

func (cmc *ConfigMapController) Stop()

type ConfigMapStore

type ConfigMapStore interface {
	Run() error
	Stop()

	GetAllHubsToDataMap() (map[string]map[string]string, error)
	GetHubData(hubName string) ([]map[string]string, error)
	GetConfigMapByHubName(hubName string) (*v1.ConfigMap, error)
}

type HomeDirGetterFunc

type HomeDirGetterFunc func() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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