providers

package
v0.101.0 Latest Latest
Warning

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

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

Documentation

Overview

Package providers contains the core provider framework and common utilities for Clowder resource management

Index

Constants

This section is empty.

Variables

View Source
var ProvidersRegistration providersRegistration

ProvidersRegistration is an instance of the provider registration system. It is responsible for adding new providers to the registry so that they can be executed in the correct order.

View Source
var RootSecret = rc.NewSingleResourceIdent("root", "root_env", &core.Secret{})

RootSecret is the resource ident for the root environment secret object.

Functions

func CachedMakeComponent

func CachedMakeComponent(prov RootProvider, objList []rc.ResourceIdent, o obj.ClowdObject, suffix string, fn makeFnCache, usePVC bool) error

CachedMakeComponent is a generalised function that, given a ClowdObject will make the given service, deployment and PVC, based on the makeFn that is passed in.

func ExtractSecretData

func ExtractSecretData(secrets []core.Secret, fn ExtractFn, keys ...string)

ExtractSecretData takes a list of secrets, checks that the correct 'keys' are present and then runs the extract function on them.

func ExtractSecretDataAnno

func ExtractSecretDataAnno(secrets []core.Secret, fn ExtractFnAnno, annoKey string, keys ...string)

ExtractSecretDataAnno is just like ExtractSecretData except it expects an annotation to be present on the secret that will provide one of the values needed to extract the data out of the secret

func GetNamespacedName

func GetNamespacedName(o obj.ClowdObject, suffix string) types.NamespacedName

GetNamespacedName returns a unique name of an object in the format name-suffix.

func MakeOrGetSecret

func MakeOrGetSecret(obj obj.ClowdObject, cache *rc.ObjectCache, resourceIdent rc.ResourceIdent, nn types.NamespacedName, dataInit func() map[string]string) (*map[string]string, error)

MakeOrGetSecret tries to get the secret described by nn, if it exists it populates a map with the key/value pairs from the secret. If it doesn't exist the dataInit function is run and the resulting data is returned, as well as the secret being created.

Types

type ClowderProvider

type ClowderProvider interface {
	// Provide is the main function that performs the duty of the provider on a ClowdApp object, as
	// opposed to a ClowdEnvironment object.
	Provide(app *crd.ClowdApp) error
	EnvProvide() error
	GetConfig() *config.AppConfig
}

ClowderProvider is an interface providing a way for a provider to perform its duty.

type ExtractFn

type ExtractFn func(m *core.Secret)

ExtractFn is a function that can extract secret data from a function, the result of this function is usually declared as part of the function so no arguments are passed.

type ExtractFnAnno

type ExtractFnAnno func(m *core.Secret, annoVal string)

ExtractFnAnno is just like ExtractFn except it reads in the value of an annotation

type Labels

type Labels map[string]string

Labels is a map containing a key/value style map intended to hold k8s label information.

type ObjectMap

type ObjectMap map[rc.ResourceIdent]client.Object

ObjectMap providers a map of ResourceIdents to objects, it is used internally and for testing.

type Provider

type Provider struct {
	Client    client.Client
	Ctx       context.Context
	Env       *crd.ClowdEnvironment
	Cache     *rc.ObjectCache
	Log       logr.Logger
	Config    *config.AppConfig
	HashCache *hashcache.HashCache
}

Provider is a struct that holds a client/context and ClowdEnvironment object.

func (*Provider) GetCache added in v0.44.0

func (prov *Provider) GetCache() *rc.ObjectCache

GetCache returns the object cache used by the provider

func (*Provider) GetClient added in v0.44.0

func (prov *Provider) GetClient() client.Client

GetClient returns the Kubernetes client

func (*Provider) GetConfig added in v0.50.0

func (prov *Provider) GetConfig() *config.AppConfig

GetConfig returns the application configuration

func (*Provider) GetCtx added in v0.44.0

func (prov *Provider) GetCtx() context.Context

GetCtx returns the context for provider operations

func (*Provider) GetEnv added in v0.44.0

func (prov *Provider) GetEnv() *crd.ClowdEnvironment

GetEnv returns the ClowdEnvironment associated with this provider

func (*Provider) GetLog added in v0.44.0

func (prov *Provider) GetLog() logr.Logger

GetLog returns the logger instance for the provider

type RootProvider added in v0.44.0

type RootProvider interface {
	GetClient() client.Client
	GetCtx() context.Context
	GetEnv() *crd.ClowdEnvironment
	GetCache() *rc.ObjectCache
	GetLog() logr.Logger
	GetConfig() *config.AppConfig
}

RootProvider defines the basic interface that all providers should implement

Directories

Path Synopsis
Package autoscaler provides KEDA-based autoscaling functionality for Clowder deployments
Package autoscaler provides KEDA-based autoscaling functionality for Clowder deployments
Package confighash provides configuration hash management for Clowder applications
Package confighash provides configuration hash management for Clowder applications
Package cronjob provides cron job management functionality for Clowder applications
Package cronjob provides cron job management functionality for Clowder applications
Package database provides database connectivity and management for Clowder applications
Package database provides database connectivity and management for Clowder applications
Package dependencies provides dependency management functionality for Clowder applications
Package dependencies provides dependency management functionality for Clowder applications
Package deployment provides deployment management functionality for Clowder applications
Package deployment provides deployment management functionality for Clowder applications
Package featureflags provides feature flag management for Clowder applications
Package featureflags provides feature flag management for Clowder applications
Package inmemorydb provides in-memory database provisioning including Redis and ElastiCache
Package inmemorydb provides in-memory database provisioning including Redis and ElastiCache
Package iqe provides IQE (Insights Quality Engineering) testing functionality for Clowder applications
Package iqe provides IQE (Insights Quality Engineering) testing functionality for Clowder applications
Package job provides job and cron job management for Clowder applications
Package job provides job and cron job management for Clowder applications
Package kafka provides Kafka messaging infrastructure management for Clowder applications
Package kafka provides Kafka messaging infrastructure management for Clowder applications
Package logging provides logging configuration management for Clowder applications
Package logging provides logging configuration management for Clowder applications
Package metrics provides metrics collection and monitoring functionality for Clowder applications
Package metrics provides metrics collection and monitoring functionality for Clowder applications
subscriptions
Package v1alpha1 contains the group version info +kubebuilder:object:generate=true +groupName=operators.coreos.com
Package v1alpha1 contains the group version info +kubebuilder:object:generate=true +groupName=operators.coreos.com
Package namespace provides namespace management functionality for Clowder applications
Package namespace provides namespace management functionality for Clowder applications
Package objectstore provides object storage provisioning and management for Clowder applications
Package objectstore provides object storage provisioning and management for Clowder applications
Package pullsecrets provides pull secret management functionality for Clowder applications
Package pullsecrets provides pull secret management functionality for Clowder applications
Package reverseproxy provides a Clowder provider for deploying a reverse proxy in ephemeral environments.
Package reverseproxy provides a Clowder provider for deploying a reverse proxy in ephemeral environments.
Package serviceaccount provides service account and RBAC management for Clowder applications
Package serviceaccount provides service account and RBAC management for Clowder applications
Package servicemesh provides service mesh integration functionality for Clowder applications
Package servicemesh provides service mesh integration functionality for Clowder applications
Package sidecar provides sidecar container management functionality for Clowder applications
Package sidecar provides sidecar container management functionality for Clowder applications
Package sizing provides resource sizing and scaling functionality for Clowder applications
Package sizing provides resource sizing and scaling functionality for Clowder applications
sizingconfig
Package sizingconfig provides configuration management for resource sizing policies
Package sizingconfig provides configuration management for resource sizing policies
Package utils provides utility functions and helpers for Clowder providers
Package utils provides utility functions and helpers for Clowder providers
Package web provides web service and ingress management functionality for Clowder applications
Package web provides web service and ingress management functionality for Clowder applications

Jump to

Keyboard shortcuts

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