Documentation
¶
Overview ¶
Package controllers provides the main controller implementations for Clowder resources
Index ¶
- Constants
- Variables
- func CreateAPIServer() *http.Server
- func GetAppResourceFigures(ctx context.Context, client client.Client, o *crd.ClowdApp) (crd.AppResourceStatus, string, error)
- func GetAppResourceStatus(ctx context.Context, client client.Client, o *crd.ClowdApp) (bool, error)
- func GetEnvResourceFigures(ctx context.Context, client client.Client, o *crd.ClowdEnvironment) (crd.EnvResourceStatus, string, error)
- func GetEnvResourceStatus(ctx context.Context, client client.Client, o *crd.ClowdEnvironment) (bool, string, error)
- func GetJobsStatus(jobs *batchv1.JobList, cji *crd.ClowdJobInvocation) bool
- func GetManagedApps() []string
- func GetManagedEnvs() []string
- func GetPresentApps() []string
- func GetPresentEnvs() []string
- func NewSkippedError(errString string) error
- func ReadEnv() string
- func ReleaseEnv()
- func ReportDependencies(ctx context.Context, pClient client.Client, app *crd.ClowdApp, ...) error
- func Run(signalHandler context.Context, metricsAddr string, probeAddr string, ...)
- func SetAppResourceStatus(ctx context.Context, client client.Client, o *crd.ClowdApp) error
- func SetClowdAppConditions(ctx context.Context, client client.Client, o *crd.ClowdApp, state string, ...) error
- func SetClowdEnvConditions(ctx context.Context, client client.Client, o *crd.ClowdEnvironment, ...) error
- func SetClowdJobInvocationConditions(ctx context.Context, client client.Client, o *crd.ClowdJobInvocation, ...) error
- func SetEnv(name string)
- func SetEnvResourceStatus(ctx context.Context, client client.Client, o *crd.ClowdEnvironment) error
- func UpdateInvokedJobStatus(jobs *batchv1.JobList, cji *crd.ClowdJobInvocation) error
- type ClowdAppReconciler
- type ClowdAppReconciliation
- type ClowdEnvironmentReconciler
- type ClowdEnvironmentReconciliation
- type ClowdJobInvocationReconciler
- func (r *ClowdJobInvocationReconciler) HandleNotReady(ctx context.Context, app crd.ClowdApp, cji crd.ClowdJobInvocation) error
- func (r *ClowdJobInvocationReconciler) InvokeJob(cache *rc.ObjectCache, job *crd.Job, app *crd.ClowdApp, ...) error
- func (r *ClowdJobInvocationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ClowdJobInvocationReconciler) SetupWithManager(mgr ctrl.Manager) error
- type HandlerFuncBuilder
- type HandlerFuncs
- type ReconciliationMetrics
- type SkippedError
- type Watcher
Constants ¶
const (
// SILENTFAIL represents a silent failure mode for environment operations
SILENTFAIL = "SILENTFAIL"
)
const (
// SKIPRECONCILE represents a mode to skip reconciliation operations
SKIPRECONCILE = "SKIPRECONCILE"
)
Variables ¶
var ( // Scheme defines the runtime scheme for the Clowder controller Scheme = runtime.NewScheme() // CacheConfig holds the cache configuration for the Clowder controller CacheConfig *rc.CacheConfig // DebugOptions holds the debug configuration options for the Clowder controller DebugOptions rc.DebugOptions // ProtectedGVKs holds the map of protected GroupVersionKinds that should not be deleted ProtectedGVKs = make(map[schema.GroupVersionKind]bool) )
var Version string
Version contains the current version of Clowder
Functions ¶
func CreateAPIServer ¶ added in v0.53.0
CreateAPIServer creates and configures the HTTP API server for Clowder configuration endpoints
func GetAppResourceFigures ¶ added in v0.21.0
func GetAppResourceFigures(ctx context.Context, client client.Client, o *crd.ClowdApp) (crd.AppResourceStatus, string, error)
GetAppResourceFigures calculates and returns resource usage figures for a ClowdApp
func GetAppResourceStatus ¶ added in v0.21.0
GetAppResourceStatus determines if all resources for a ClowdApp are ready
func GetEnvResourceFigures ¶ added in v0.21.0
func GetEnvResourceFigures(ctx context.Context, client client.Client, o *crd.ClowdEnvironment) (crd.EnvResourceStatus, string, error)
GetEnvResourceFigures calculates and returns resource usage figures for a ClowdEnvironment
func GetEnvResourceStatus ¶ added in v0.21.0
func GetEnvResourceStatus(ctx context.Context, client client.Client, o *crd.ClowdEnvironment) (bool, string, error)
GetEnvResourceStatus determines if all resources for a ClowdEnvironment are ready
func GetJobsStatus ¶ added in v0.21.0
func GetJobsStatus(jobs *batchv1.JobList, cji *crd.ClowdJobInvocation) bool
GetJobsStatus returns true if all jobs in the ClowdJobInvocation have completed successfully
func GetManagedApps ¶ added in v0.53.0
func GetManagedApps() []string
GetManagedApps returns a list of all managed ClowdApp names
func GetManagedEnvs ¶ added in v0.53.0
func GetManagedEnvs() []string
GetManagedEnvs returns a list of all managed ClowdEnvironment names
func GetPresentApps ¶ added in v0.53.0
func GetPresentApps() []string
GetPresentApps returns a list of all present ClowdApp names
func GetPresentEnvs ¶ added in v0.53.0
func GetPresentEnvs() []string
GetPresentEnvs returns a list of all present ClowdEnvironment names
func NewSkippedError ¶ added in v0.50.0
NewSkippedError creates a new SkippedError with the given message
func ReadEnv ¶ added in v0.19.0
func ReadEnv() string
ReadEnv returns the currently set environment name
func ReleaseEnv ¶ added in v0.19.0
func ReleaseEnv()
ReleaseEnv releases the current environment lock
func ReportDependencies ¶ added in v0.72.0
func ReportDependencies(ctx context.Context, pClient client.Client, app *crd.ClowdApp, env *crd.ClowdEnvironment) error
ReportDependencies reports dependency status and issues for a ClowdApp
func Run ¶
func Run(signalHandler context.Context, metricsAddr string, probeAddr string, enableLeaderElection bool, config *rest.Config, enableWebHooks bool)
Run inits the manager and controllers and then starts the manager
func SetAppResourceStatus ¶ added in v0.21.0
SetAppResourceStatus the status on the passed ClowdObject interface.
func SetClowdAppConditions ¶
func SetClowdAppConditions(ctx context.Context, client client.Client, o *crd.ClowdApp, state string, oldStatus *crd.ClowdAppStatus, err error) error
SetClowdAppConditions updates the status conditions for a ClowdApp
func SetClowdEnvConditions ¶
func SetClowdEnvConditions(ctx context.Context, client client.Client, o *crd.ClowdEnvironment, state string, oldStatus *crd.ClowdEnvironmentStatus, err error) error
SetClowdEnvConditions updates the status conditions for a ClowdEnvironment
func SetClowdJobInvocationConditions ¶ added in v0.21.0
func SetClowdJobInvocationConditions(ctx context.Context, client client.Client, o *crd.ClowdJobInvocation, state string, err error) error
SetClowdJobInvocationConditions updates the status conditions for a ClowdJobInvocation
func SetEnv ¶ added in v0.19.0
func SetEnv(name string)
SetEnv sets the current environment name for the controller
func SetEnvResourceStatus ¶ added in v0.21.0
SetEnvResourceStatus the status on the passed ClowdObject interface.
func UpdateInvokedJobStatus ¶ added in v0.21.0
func UpdateInvokedJobStatus(jobs *batchv1.JobList, cji *crd.ClowdJobInvocation) error
UpdateInvokedJobStatus updates the status of invoked jobs in a ClowdJobInvocation
Types ¶
type ClowdAppReconciler ¶
type ClowdAppReconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
Recorder record.EventRecorder
HashCache *hashcache.HashCache
}
ClowdAppReconciler reconciles a ClowdApp object
func (*ClowdAppReconciler) SetupWithManager ¶
func (r *ClowdAppReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up with Manager
type ClowdAppReconciliation ¶ added in v0.50.0
type ClowdAppReconciliation struct {
// contains filtered or unexported fields
}
ClowdAppReconciliation manages the reconciliation state and context for a ClowdApp resource
type ClowdEnvironmentReconciler ¶
type ClowdEnvironmentReconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
Recorder record.EventRecorder
HashCache *hashcache.HashCache
}
ClowdEnvironmentReconciler reconciles a ClowdEnvironment object
func (*ClowdEnvironmentReconciler) Reconcile ¶
func (r *ClowdEnvironmentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile fn
func (*ClowdEnvironmentReconciler) SetupWithManager ¶
func (r *ClowdEnvironmentReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up with manager
type ClowdEnvironmentReconciliation ¶ added in v0.50.0
type ClowdEnvironmentReconciliation struct {
// contains filtered or unexported fields
}
ClowdEnvironmentReconciliation represents a single reconciliation event This type is created by ClowdEnvironmentReconciler which handles the reconciliation cycle as a whole ClowdEnvironmentReconciliation encapsulates all of the state and logic requires for a single reconciliation event
type ClowdJobInvocationReconciler ¶
type ClowdJobInvocationReconciler struct {
client.Client
APIReader client.Reader
Log logr.Logger
Scheme *runtime.Scheme
Recorder record.EventRecorder
}
ClowdJobInvocationReconciler reconciles a ClowdJobInvocation object
func (*ClowdJobInvocationReconciler) HandleNotReady ¶ added in v0.62.0
func (r *ClowdJobInvocationReconciler) HandleNotReady(ctx context.Context, app crd.ClowdApp, cji crd.ClowdJobInvocation) error
HandleNotReady checks if the ClowdApp is ready and if not, requeues for reconiliation
func (*ClowdJobInvocationReconciler) InvokeJob ¶
func (r *ClowdJobInvocationReconciler) InvokeJob(cache *rc.ObjectCache, job *crd.Job, app *crd.ClowdApp, env *crd.ClowdEnvironment, cji *crd.ClowdJobInvocation) error
InvokeJob is responsible for applying the Job. It also updates and reports the status of that job
func (*ClowdJobInvocationReconciler) Reconcile ¶
func (r *ClowdJobInvocationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile CJI Resources
func (*ClowdJobInvocationReconciler) SetupWithManager ¶
func (r *ClowdJobInvocationReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager registers the CJI with the main manager process
type HandlerFuncBuilder ¶ added in v0.90.0
type HandlerFuncBuilder func(logr logr.Logger, ctrlName string) HandlerFuncs
HandlerFuncBuilder is a function that builds handler functions for a controller
type HandlerFuncs ¶ added in v0.54.0
type HandlerFuncs struct {
// Create returns true if the Create event should be processed
CreateFunc func(event.CreateEvent) (bool, string)
// Delete returns true if the Delete event should be processed
DeleteFunc func(event.DeleteEvent) (bool, string)
// Update returns true if the Update event should be processed
UpdateFunc func(event.UpdateEvent) (bool, string)
// Generic returns true if the Generic event should be processed
GenericFunc func(event.GenericEvent) (bool, string)
}
HandlerFuncs contains handler functions for Kubernetes resource events
type ReconciliationMetrics ¶ added in v0.31.0
type ReconciliationMetrics struct {
// contains filtered or unexported fields
}
ReconciliationMetrics holds metrics data for ClowdApp reconciliation operations
type SkippedError ¶ added in v0.50.0
type SkippedError struct {
// contains filtered or unexported fields
}
SkippedError represents an error that occurred during reconciliation that can be skipped
func (SkippedError) Error ¶ added in v0.50.0
func (se SkippedError) Error() string
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package clowderconfig provides a struct for the Clowder config.
|
Package clowderconfig provides a struct for the Clowder config. |
|
Package config provides the configuration for the Clowder config.
|
Package config provides the configuration for the Clowder config. |
|
Package errors provides custom error types and error handling utilities for Clowder
|
Package errors provides custom error types and error handling utilities for Clowder |
|
Package hashcache provides a thread-safe hash cache implementation for Kubernetes objects
|
Package hashcache provides a thread-safe hash cache implementation for Kubernetes objects |
|
Package object defines interfaces and utilities for working with Clowder objects
|
Package object defines interfaces and utilities for working with Clowder objects |
|
Package providers contains the core provider framework and common utilities for Clowder resource management
|
Package providers contains the core provider framework and common utilities for Clowder resource management |
|
autoscaler
Package autoscaler provides KEDA-based autoscaling functionality for Clowder deployments
|
Package autoscaler provides KEDA-based autoscaling functionality for Clowder deployments |
|
confighash
Package confighash provides configuration hash management for Clowder applications
|
Package confighash provides configuration hash management for Clowder applications |
|
cronjob
Package cronjob provides cron job management functionality for Clowder applications
|
Package cronjob provides cron job management functionality for Clowder applications |
|
database
Package database provides database connectivity and management for Clowder applications
|
Package database provides database connectivity and management for Clowder applications |
|
dependencies
Package dependencies provides dependency management functionality for Clowder applications
|
Package dependencies provides dependency management functionality for Clowder applications |
|
deployment
Package deployment provides deployment management functionality for Clowder applications
|
Package deployment provides deployment management functionality for Clowder applications |
|
featureflags
Package featureflags provides feature flag management for Clowder applications
|
Package featureflags provides feature flag management for Clowder applications |
|
inmemorydb
Package inmemorydb provides in-memory database provisioning including Redis and ElastiCache
|
Package inmemorydb provides in-memory database provisioning including Redis and ElastiCache |
|
iqe
Package iqe provides IQE (Insights Quality Engineering) testing functionality for Clowder applications
|
Package iqe provides IQE (Insights Quality Engineering) testing functionality for Clowder applications |
|
job
Package job provides job and cron job management for Clowder applications
|
Package job provides job and cron job management for Clowder applications |
|
kafka
Package kafka provides Kafka messaging infrastructure management for Clowder applications
|
Package kafka provides Kafka messaging infrastructure management for Clowder applications |
|
logging
Package logging provides logging configuration management for Clowder applications
|
Package logging provides logging configuration management for Clowder applications |
|
metrics
Package metrics provides metrics collection and monitoring functionality for Clowder applications
|
Package metrics provides metrics collection and monitoring functionality for Clowder applications |
|
metrics/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 |
|
namespace
Package namespace provides namespace management functionality for Clowder applications
|
Package namespace provides namespace management functionality for Clowder applications |
|
objectstore
Package objectstore provides object storage provisioning and management for Clowder applications
|
Package objectstore provides object storage provisioning and management for Clowder applications |
|
pullsecrets
Package pullsecrets provides pull secret management functionality for Clowder applications
|
Package pullsecrets provides pull secret management functionality for Clowder applications |
|
reverseproxy
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. |
|
serviceaccount
Package serviceaccount provides service account and RBAC management for Clowder applications
|
Package serviceaccount provides service account and RBAC management for Clowder applications |
|
servicemesh
Package servicemesh provides service mesh integration functionality for Clowder applications
|
Package servicemesh provides service mesh integration functionality for Clowder applications |
|
sidecar
Package sidecar provides sidecar container management functionality for Clowder applications
|
Package sidecar provides sidecar container management functionality for Clowder applications |
|
sizing
Package sizing provides resource sizing and scaling functionality for Clowder applications
|
Package sizing provides resource sizing and scaling functionality for Clowder applications |
|
sizing/sizingconfig
Package sizingconfig provides configuration management for resource sizing policies
|
Package sizingconfig provides configuration management for resource sizing policies |
|
utils
Package utils provides utility functions and helpers for Clowder providers
|
Package utils provides utility functions and helpers for Clowder providers |
|
web
Package web provides web service and ingress management functionality for Clowder applications
|
Package web provides web service and ingress management functionality for Clowder applications |