kube

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigMapTypeLabel             = "mydecisive.ai/configmap-type"
	OctantConnectionsConfigMapType = "octant-connections"
)
View Source
const (
	ByHubAndType            = "IndexByHubAndType"
	ByType                  = "IndexByType"
	EnvConfigMapType        = "hub-variables"
	AutomationConfigMapType = "hub-automation"
	VariablesSchemaMapType  = "hub-variables-schema"
	LabelMdaiHubName        = "mydecisive.ai/hub-name"
	// Deprecated: migrate to VariablesSchemaMapType.
	ManualEnvConfigMapType = "hub-manual-variables"
)
View Source
const (
	SecretTypeLabel              = "mydecisive.ai/secret-type"
	OctantIntegrationDatadogType = "octant-integration-datadog"
	OctantIntegrationArgoType    = "octant-integration-argo"
)

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 {
	// contains filtered or unexported fields
}

func NewConfigMapController

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

func (*ConfigMapController) CreateConfigMap added in v0.4.3

func (cmc *ConfigMapController) CreateConfigMap(ctx context.Context, namespace string, cm *v1.ConfigMap) error

CreateConfigMap creates the provided configmap in the provided namespace.

func (*ConfigMapController) GetConfigmapByNameAndNamespace added in v0.4.0

func (cmc *ConfigMapController) GetConfigmapByNameAndNamespace(name, namespace string) (*v1.ConfigMap, error)

GetConfigmapByNameAndNamespace returns the requested configmap, if it exists.

func (*ConfigMapController) Run

func (cmc *ConfigMapController) Run() error

func (*ConfigMapController) Stop

func (cmc *ConfigMapController) Stop()

func (*ConfigMapController) UpdateConfigMap added in v0.4.3

func (cmc *ConfigMapController) UpdateConfigMap(ctx context.Context, namespace string, cm *v1.ConfigMap) error

UpdateConfigMap updates an existing configmap with the provided configmap in the provided namespace.

type ConfigMapStore

type ConfigMapStore interface {
	Run() error
	Stop()

	GetConfigmapByNameAndNamespace(name, namespace string) (*v1.ConfigMap, error)
	CreateConfigMap(ctx context.Context, namespace string, cm *v1.ConfigMap) error
	UpdateConfigMap(ctx context.Context, namespace string, cm *v1.ConfigMap) error
}

type HomeDirGetterFunc

type HomeDirGetterFunc func() (string, error)

type HubConfigMapController added in v0.4.0

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

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

func NewHubConfigMapController added in v0.4.0

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

func (*HubConfigMapController) GetAllHubsAutomationConfigMapData added in v0.4.0

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

GetAllHubsAutomationConfigMapData returns automation config map data for all hubs.

func (*HubConfigMapController) GetAllHubsEnvConfigMapData added in v0.4.0

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

GetAllHubsEnvConfigMapData returns variables config map data for all hubs.

func (*HubConfigMapController) GetAllHubsToDataMap deprecated added in v0.4.0

func (cmc *HubConfigMapController) 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 (*HubConfigMapController) GetAllHubsVariablesSchemaConfigMapData added in v0.4.0

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

GetAllHubsVariablesSchemaConfigMapData returns variables schema config map data for all hubs.

func (*HubConfigMapController) GetAutomationConfigMapDataByHubName added in v0.4.0

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

GetAutomationConfigMapDataByHubName returns automation config map data for the given hub.

func (*HubConfigMapController) GetConfigMapByHubName deprecated added in v0.4.0

func (cmc *HubConfigMapController) 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 (*HubConfigMapController) GetEnvConfigMapDataByHubName added in v0.4.0

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

GetEnvConfigMapDataByHubName returns variables config map data for the given hub.

func (*HubConfigMapController) GetVariablesSchemaConfigMapDataByHubName added in v0.4.0

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

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

func (*HubConfigMapController) Run added in v0.4.0

func (cmc *HubConfigMapController) Run() error

func (*HubConfigMapController) Stop added in v0.4.0

func (cmc *HubConfigMapController) Stop()

type HubConfigMapStore added in v0.4.0

type HubConfigMapStore 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 SecretController added in v0.4.0

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

func NewSecretController added in v0.4.0

func NewSecretController(secretTypes []string, namespace string, clientset kubernetes.Interface, logger *zap.Logger) (*SecretController, error)

func (*SecretController) CreateSecret added in v0.4.3

func (sc *SecretController) CreateSecret(ctx context.Context, namespace string, secret *v1.Secret) error

CreateSecret creates the provided secret in the provided namespace.

func (*SecretController) GetSecretByNameAndNamespace added in v0.4.0

func (sc *SecretController) GetSecretByNameAndNamespace(name, namespace string) (*v1.Secret, error)

GetSecretByNameAndNamespace returns the requested secret, if it exists.

func (*SecretController) Run added in v0.4.0

func (sc *SecretController) Run() error

func (*SecretController) Stop added in v0.4.0

func (sc *SecretController) Stop()

func (*SecretController) UpdateSecret added in v0.4.3

func (sc *SecretController) UpdateSecret(ctx context.Context, namespace string, secret *v1.Secret) error

UpdateSecret updates an existing secret with the provided secret in the provided namespace.

type SecretStore added in v0.4.0

type SecretStore interface {
	Run() error
	Stop()

	GetSecretByNameAndNamespace(name, namespace string) (*v1.Secret, error)
	CreateSecret(ctx context.Context, namespace string, secret *v1.Secret) error
	UpdateSecret(ctx context.Context, namespace string, secret *v1.Secret) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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