Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- type ApicurioRegistryReconciler
- type CompareRes
- type ConfReplicasCF
- type Configuration
- func (this *Configuration) ClearConfig(key string)
- func (this *Configuration) EnvChanged() bool
- func (this *Configuration) GetConfig(key string) string
- func (this *Configuration) GetConfigInt32P(key string) *int32
- func (this *Configuration) GetErrors() (errorsPresent *[]string)
- func (this *Configuration) GetImage() string
- func (this *Configuration) GetSpecName() string
- func (this *Configuration) GetSpecNamespace() string
- func (this *Configuration) SetConfig(key string, value string)
- func (this *Configuration) SetConfigInt32P(key string, value *int32)
- func (this *Configuration) Update(spec *ar.ApicurioRegistry)
- type Context
- type ControlFunction
- func NewConfReplicasCF(ctx *Context) ControlFunction
- func NewDeploymentCF(ctx *Context) ControlFunction
- func NewEnvCF(ctx *Context) ControlFunction
- func NewHostConfigCF(ctx *Context) ControlFunction
- func NewImageConfigCF(ctx *Context) ControlFunction
- func NewIngressCF(ctx *Context) ControlFunction
- func NewServiceCF(ctx *Context) ControlFunction
- type DeploymentCF
- type DeploymentUF
- type EnvCF
- type Factory
- func (this *Factory) CreateDeployment() *apps.Deployment
- func (this *Factory) CreateIngress(serviceName string) *v1beta1.Ingress
- func (this *Factory) CreateService() *core.Service
- func (this *Factory) CreateSpec(spec *ar.ApicurioRegistry) *ar.ApicurioRegistry
- func (this *Factory) GetLabels() map[string]string
- type HostConfigCF
- type ImageConfigCF
- func (this *ImageConfigCF) Compare(spec *registryv1alpha1.ApicurioRegistry) (bool, error)
- func (this *ImageConfigCF) Describe() string
- func (this *ImageConfigCF) Respond(spec *registryv1alpha1.ApicurioRegistry) (bool, error)
- func (this *ImageConfigCF) Sense(spec *registryv1alpha1.ApicurioRegistry, request reconcile.Request) error
- type IngressCF
- type IngressUF
- type KubeCl
- func (this *KubeCl) Client() kubernetes.Interface
- func (this *KubeCl) GetDeployment() (*apps.Deployment, error)
- func (this *KubeCl) GetIngress() (*extensions.Ingress, error)
- func (this *KubeCl) GetService() (*core.Service, error)
- func (this *KubeCl) PatchDeployment(namespace, name string, updateFunc func(*apps.Deployment)) error
- func (this *KubeCl) PatchIngress(namespace, name string, updateFunc func(*extensions.Ingress)) error
- func (this *KubeCl) PatchService(namespace, name string, updateFunc ServiceUF) error
- type Patcher
- type RespondRes
- type SenseRes
- type ServiceCF
- type ServiceUF
Constants ¶
const CFG_DEP_CPU_LIMIT = "CPU_LIMIT"
const CFG_DEP_CPU_REQUESTS = "CPU_REQUESTS"
const CFG_DEP_MEMORY_LIMIT = "MEMORY_LIMIT"
const CFG_DEP_MEMORY_REQUESTS = "MEMORY_REQUESTS"
const CFG_DEP_REPLICAS = "REPLICAS"
dep
const CFG_DEP_ROUTE = "ROUTE"
const CFG_IMAGE_REGISTRY = "IMAGE_REGISTRY"
const CFG_IMAGE_VERSION = "IMAGE_VERSION"
const CFG_PERSISTENCE_TYPE = "PERSISTENCE_TYPE"
cfg
const CFG_STA_DEPLOYMENT_NAME = "CFG_STA_DEPLOYMENT_NAME"
const CFG_STA_IMAGE = "CFG_STA_IMAGE"
status
const CFG_STA_INGRESS_NAME = "CFG_STA_INGRESS_NAME"
const CFG_STA_REPLICA_COUNT = "CFG_STA_REPLICA_COUNT"
const CFG_STA_ROUTE = "CFG_STA_ROUTE"
const CFG_STA_SERVICE_NAME = "CFG_STA_SERVICE_NAME"
const ENV_APPLICATION_ID = "APPLICATION_ID"
const ENV_APPLICATION_SERVER_HOST = "APPLICATION_SERVER_HOST"
const ENV_APPLICATION_SERVER_PORT = "APPLICATION_SERVER_PORT"
const ENV_KAFKA_BOOTSTRAP_SERVERS = "KAFKA_BOOTSTRAP_SERVERS"
const ENV_QUARKUS_DATASOURCE_PASSWORD = "QUARKUS_DATASOURCE_PASSWORD"
const ENV_QUARKUS_DATASOURCE_URL = "QUARKUS_DATASOURCE_URL"
const ENV_QUARKUS_DATASOURCE_USERNAME = "QUARKUS_DATASOURCE_USERNAME"
const ENV_QUARKUS_PROFILE = "QUARKUS_PROFILE"
env
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApicurioRegistryReconciler ¶
type ApicurioRegistryReconciler struct {
// contains filtered or unexported fields
}
func NewApicurioRegistryReconciler ¶
func NewApicurioRegistryReconciler(mgr manager.Manager) *ApicurioRegistryReconciler
func (*ApicurioRegistryReconciler) AddControlFunction ¶
func (this *ApicurioRegistryReconciler) AddControlFunction(cf ControlFunction)
type CompareRes ¶
type CompareRes struct {
// contains filtered or unexported fields
}
type ConfReplicasCF ¶
type ConfReplicasCF struct {
// contains filtered or unexported fields
}
func (*ConfReplicasCF) Compare ¶
func (this *ConfReplicasCF) Compare(spec *ar.ApicurioRegistry) (bool, error)
func (*ConfReplicasCF) Describe ¶
func (this *ConfReplicasCF) Describe() string
func (*ConfReplicasCF) Respond ¶
func (this *ConfReplicasCF) Respond(spec *ar.ApicurioRegistry) (bool, error)
func (*ConfReplicasCF) Sense ¶
func (this *ConfReplicasCF) Sense(spec *ar.ApicurioRegistry, request reconcile.Request) error
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
func NewConfiguration ¶
func NewConfiguration(log logr.Logger) *Configuration
func (*Configuration) ClearConfig ¶
func (this *Configuration) ClearConfig(key string)
func (*Configuration) EnvChanged ¶
func (this *Configuration) EnvChanged() bool
func (*Configuration) GetConfig ¶
func (this *Configuration) GetConfig(key string) string
func (*Configuration) GetConfigInt32P ¶
func (this *Configuration) GetConfigInt32P(key string) *int32
func (*Configuration) GetErrors ¶
func (this *Configuration) GetErrors() (errorsPresent *[]string)
func (*Configuration) GetImage ¶
func (this *Configuration) GetImage() string
func (*Configuration) GetSpecName ¶
func (this *Configuration) GetSpecName() string
func (*Configuration) GetSpecNamespace ¶
func (this *Configuration) GetSpecNamespace() string
func (*Configuration) SetConfig ¶
func (this *Configuration) SetConfig(key string, value string)
func (*Configuration) SetConfigInt32P ¶
func (this *Configuration) SetConfigInt32P(key string, value *int32)
func (*Configuration) Update ¶
func (this *Configuration) Update(spec *ar.ApicurioRegistry)
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
A long-lived singleton container for shared components
func NewContext ¶
func NewContext(c controller.Controller, scheme *runtime.Scheme, log logr.Logger, client client.Client) *Context
Create a new context when the operator is deployed, provide mostly static data
type ControlFunction ¶
type ControlFunction interface { // Sense - get information from the system/environment and update CR status // error -> log and move to the next CF Sense(spec *ar.ApicurioRegistry, request reconcile.Request) error // Compare the measured data in CR status with the intended state in CR spec, // Do not communicate with the environment here, just CR. // If true there was a discrepancy and the next stage will be executed, else skipped // or error -> log and move to next CF, reschedule Compare(spec *ar.ApicurioRegistry) (bool, error) // Do an action to get the system into alignment with the desired state // bool -> something was updated. reschedule until stable // error -> log and move to next CF, reschedule Respond(spec *ar.ApicurioRegistry) (bool, error) // Return the description of the CF Describe() string }
Defines an interface for a component responsible for some part of the reconciliation
func NewConfReplicasCF ¶
func NewConfReplicasCF(ctx *Context) ControlFunction
This CF makes sure number of replicas is aligned If there is some other way of determining the number of replicas needed outside of CR, modify the Sense stage so this CF knows about it
func NewDeploymentCF ¶
func NewDeploymentCF(ctx *Context) ControlFunction
func NewEnvCF ¶
func NewEnvCF(ctx *Context) ControlFunction
func NewHostConfigCF ¶
func NewHostConfigCF(ctx *Context) ControlFunction
func NewImageConfigCF ¶
func NewImageConfigCF(ctx *Context) ControlFunction
func NewIngressCF ¶
func NewIngressCF(ctx *Context) ControlFunction
func NewServiceCF ¶
func NewServiceCF(ctx *Context) ControlFunction
type DeploymentCF ¶
type DeploymentCF struct {
// contains filtered or unexported fields
}
func (*DeploymentCF) Compare ¶
func (this *DeploymentCF) Compare(spec *ar.ApicurioRegistry) (bool, error)
func (*DeploymentCF) Describe ¶
func (this *DeploymentCF) Describe() string
func (*DeploymentCF) Respond ¶
func (this *DeploymentCF) Respond(spec *ar.ApicurioRegistry) (bool, error)
func (*DeploymentCF) Sense ¶
func (this *DeploymentCF) Sense(spec *ar.ApicurioRegistry, request reconcile.Request) error
type DeploymentUF ¶
type DeploymentUF = func(spec *apps.Deployment)
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func NewFactory ¶
Factory creates new resources for the operator, afterwards, they should not be recreated unless there is an otherwise unrecoverable error
func (*Factory) CreateDeployment ¶
func (this *Factory) CreateDeployment() *apps.Deployment
func (*Factory) CreateIngress ¶
func (*Factory) CreateService ¶
func (*Factory) CreateSpec ¶
func (this *Factory) CreateSpec(spec *ar.ApicurioRegistry) *ar.ApicurioRegistry
type HostConfigCF ¶
type HostConfigCF struct {
// contains filtered or unexported fields
}
func (*HostConfigCF) Compare ¶
func (this *HostConfigCF) Compare(spec *ar.ApicurioRegistry) (bool, error)
func (*HostConfigCF) Describe ¶
func (this *HostConfigCF) Describe() string
func (*HostConfigCF) Respond ¶
func (this *HostConfigCF) Respond(spec *ar.ApicurioRegistry) (bool, error)
func (*HostConfigCF) Sense ¶
func (this *HostConfigCF) Sense(spec *ar.ApicurioRegistry, request reconcile.Request) error
type ImageConfigCF ¶
type ImageConfigCF struct {
// contains filtered or unexported fields
}
This CF takes care of keeping the "image" section of the CRD applied.
func (*ImageConfigCF) Compare ¶
func (this *ImageConfigCF) Compare(spec *registryv1alpha1.ApicurioRegistry) (bool, error)
func (*ImageConfigCF) Describe ¶
func (this *ImageConfigCF) Describe() string
func (*ImageConfigCF) Respond ¶
func (this *ImageConfigCF) Respond(spec *registryv1alpha1.ApicurioRegistry) (bool, error)
func (*ImageConfigCF) Sense ¶
func (this *ImageConfigCF) Sense(spec *registryv1alpha1.ApicurioRegistry, request reconcile.Request) error
type IngressUF ¶
type IngressUF = func(spec *extensions.Ingress)
type KubeCl ¶
type KubeCl struct {
// contains filtered or unexported fields
}
func (*KubeCl) Client ¶
func (this *KubeCl) Client() kubernetes.Interface
func (*KubeCl) GetDeployment ¶
func (this *KubeCl) GetDeployment() (*apps.Deployment, error)
func (*KubeCl) GetIngress ¶
func (this *KubeCl) GetIngress() (*extensions.Ingress, error)
func (*KubeCl) PatchDeployment ¶
func (this *KubeCl) PatchDeployment(namespace, name string, updateFunc func(*apps.Deployment)) error
func (*KubeCl) PatchIngress ¶
func (this *KubeCl) PatchIngress(namespace, name string, updateFunc func(*extensions.Ingress)) error
type Patcher ¶
type Patcher struct {
// contains filtered or unexported fields
}
func NewPatcher ¶
Patcher provides an easy way to modify resources that are tracked by this operator
func (*Patcher) AddDeploymentPatch ¶
func (this *Patcher) AddDeploymentPatch(updateFunc DeploymentUF)
Add a function that will be executed to modify a Deployment
func (*Patcher) AddIngressPatch ¶
Add a function that will be executed to modify an Ingress
func (*Patcher) AddServicePatch ¶
Add a function that will be executed to modify a Service
type RespondRes ¶
type RespondRes struct {
// contains filtered or unexported fields
}