kube

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ByHubAndType            = "IndexByHubAndType"
	ByType                  = "IndexByType"
	EnvConfigMapType        = "hub-variables"
	AutomationConfigMapType = "hub-automation"
	VariablesSchemaMapType  = "hub-variables-schema"
	LabelMdaiHubName        = "mydecisive.ai/hub-name"
	ConfigMapTypeLabel      = "mydecisive.ai/configmap-type"
	// Deprecated: migrate to VariablesSchemaMapType.
	ManualEnvConfigMapType = "hub-manual-variables"
)

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) GetAllHubsAutomationConfigMapData added in v0.3.1

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

GetAllHubsAutomationConfigMapData returns automation config map data for all hubs.

func (*ConfigMapController) GetAllHubsEnvConfigMapData added in v0.3.1

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

GetAllHubsEnvConfigMapData returns variables config map data for all hubs.

func (*ConfigMapController) GetAllHubsToDataMap deprecated

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

Deprecated: use a type-specific GetAllHubs*ConfigMapData helper for deterministic lookups. This method flattens multiple watched ConfigMap types into one value per hub and can be ambiguous. Still used in gateway

func (*ConfigMapController) GetAllHubsVariablesSchemaConfigMapData added in v0.3.1

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

GetAllHubsVariablesSchemaConfigMapData returns variables schema config map data for all hubs.

func (*ConfigMapController) GetAutomationConfigMapDataByHubName added in v0.3.1

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

GetAutomationConfigMapDataByHubName returns automation config map data for the given hub.

func (*ConfigMapController) GetConfigMapByHubName deprecated

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

Deprecated: use a type-specific Get*ConfigMapDataByHubName helper when the informer may watch multiple ConfigMap types per hub. GetConfigMapByHubName returns the only ConfigMap found for the given hub name. Still used in event hub

func (*ConfigMapController) GetEnvConfigMapDataByHubName added in v0.3.1

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

GetEnvConfigMapDataByHubName returns variables config map data for the given hub.

func (*ConfigMapController) GetVariablesSchemaConfigMapDataByHubName added in v0.3.1

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

GetVariablesSchemaConfigMapDataByHubName returns variables schema config map data for the given hub.

func (*ConfigMapController) Run

func (cmc *ConfigMapController) Run() error

func (*ConfigMapController) Stop

func (cmc *ConfigMapController) Stop()

type ConfigMapStore

type ConfigMapStore interface {
	Run() error
	Stop()

	// Deprecated: use a type-specific GetAllHubs*ConfigMapData helper for deterministic lookups.
	GetAllHubsToDataMap() (map[string]map[string]string, error)
	// Deprecated: use GetEnvConfigMapDataByHubName, GetAutomationConfigMapDataByHubName, or GetVariablesSchemaConfigMapDataByHubName
	GetConfigMapByHubName(hubName string) (*v1.ConfigMap, error)
	GetEnvConfigMapDataByHubName(hubName string) (map[string]string, bool, error)
	GetAutomationConfigMapDataByHubName(hubName string) (map[string]string, bool, error)
	GetVariablesSchemaConfigMapDataByHubName(hubName string) (map[string]string, bool, error)
	GetAllHubsEnvConfigMapData() (map[string]map[string]string, error)
	GetAllHubsAutomationConfigMapData() (map[string]map[string]string, error)
	GetAllHubsVariablesSchemaConfigMapData() (map[string]map[string]string, 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