apicurioregistry

package
v0.0.0-...-3b6f037 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const CFG_DEP_CPU_LIMIT = "CPU_LIMIT"
View Source
const CFG_DEP_CPU_REQUESTS = "CPU_REQUESTS"
View Source
const CFG_DEP_MEMORY_LIMIT = "MEMORY_LIMIT"
View Source
const CFG_DEP_MEMORY_REQUESTS = "MEMORY_REQUESTS"
View Source
const CFG_DEP_REPLICAS = "REPLICAS"

dep

View Source
const CFG_DEP_ROUTE = "ROUTE"
View Source
const CFG_IMAGE_REGISTRY = "IMAGE_REGISTRY"
View Source
const CFG_IMAGE_VERSION = "IMAGE_VERSION"
View Source
const CFG_PERSISTENCE_TYPE = "PERSISTENCE_TYPE"

cfg

View Source
const CFG_STA_DEPLOYMENT_NAME = "CFG_STA_DEPLOYMENT_NAME"
View Source
const CFG_STA_IMAGE = "CFG_STA_IMAGE"

status

View Source
const CFG_STA_INGRESS_NAME = "CFG_STA_INGRESS_NAME"
View Source
const CFG_STA_REPLICA_COUNT = "CFG_STA_REPLICA_COUNT"
View Source
const CFG_STA_ROUTE = "CFG_STA_ROUTE"
View Source
const CFG_STA_SERVICE_NAME = "CFG_STA_SERVICE_NAME"
View Source
const ENV_APPLICATION_ID = "APPLICATION_ID"
View Source
const ENV_APPLICATION_SERVER_HOST = "APPLICATION_SERVER_HOST"
View Source
const ENV_APPLICATION_SERVER_PORT = "APPLICATION_SERVER_PORT"
View Source
const ENV_KAFKA_BOOTSTRAP_SERVERS = "KAFKA_BOOTSTRAP_SERVERS"
View Source
const ENV_QUARKUS_DATASOURCE_PASSWORD = "QUARKUS_DATASOURCE_PASSWORD"
View Source
const ENV_QUARKUS_DATASOURCE_URL = "QUARKUS_DATASOURCE_URL"
View Source
const ENV_QUARKUS_DATASOURCE_USERNAME = "QUARKUS_DATASOURCE_USERNAME"
View Source
const ENV_QUARKUS_PROFILE = "QUARKUS_PROFILE"

env

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

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)

func (*ApicurioRegistryReconciler) Reconcile

func (this *ApicurioRegistryReconciler) Reconcile(request reconcile.Request) (reconcile.Result, error)

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 EnvCF

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

func (*EnvCF) Compare

func (this *EnvCF) Compare(spec *ar.ApicurioRegistry) (bool, error)

func (*EnvCF) Describe

func (this *EnvCF) Describe() string

func (*EnvCF) Respond

func (this *EnvCF) Respond(spec *ar.ApicurioRegistry) (bool, error)

func (*EnvCF) Sense

func (this *EnvCF) Sense(spec *ar.ApicurioRegistry, request reconcile.Request) error

type Factory

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

func NewFactory

func NewFactory(ctx *Context) *Factory

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 (this *Factory) CreateIngress(serviceName string) *v1beta1.Ingress

func (*Factory) CreateService

func (this *Factory) CreateService() *core.Service

func (*Factory) CreateSpec

func (this *Factory) CreateSpec(spec *ar.ApicurioRegistry) *ar.ApicurioRegistry

func (*Factory) GetLabels

func (this *Factory) GetLabels() map[string]string

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

type IngressCF

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

func (*IngressCF) Compare

func (this *IngressCF) Compare(spec *ar.ApicurioRegistry) (bool, error)

func (*IngressCF) Describe

func (this *IngressCF) Describe() string

func (*IngressCF) Respond

func (this *IngressCF) Respond(spec *ar.ApicurioRegistry) (bool, error)

func (*IngressCF) Sense

func (this *IngressCF) Sense(spec *ar.ApicurioRegistry, request reconcile.Request) error

type IngressUF

type IngressUF = func(spec *extensions.Ingress)

type KubeCl

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

func NewKubeCl

func NewKubeCl(ctx *Context) *KubeCl

This is provides a way to update resources or otherwise talk to Kubernetes

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) GetService

func (this *KubeCl) GetService() (*core.Service, 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

func (*KubeCl) PatchService

func (this *KubeCl) PatchService(namespace, name string, updateFunc ServiceUF) error

type Patcher

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

func NewPatcher

func NewPatcher(ctx *Context) *Patcher

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

func (this *Patcher) AddIngressPatch(updateFunc IngressUF)

Add a function that will be executed to modify an Ingress

func (*Patcher) AddServicePatch

func (this *Patcher) AddServicePatch(updateFunc ServiceUF)

Add a function that will be executed to modify a Service

func (*Patcher) Execute

func (this *Patcher) Execute()

Do the patching

type RespondRes

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

type SenseRes

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

type ServiceCF

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

func (*ServiceCF) Compare

func (this *ServiceCF) Compare(spec *ar.ApicurioRegistry) (bool, error)

func (*ServiceCF) Describe

func (this *ServiceCF) Describe() string

func (*ServiceCF) Respond

func (this *ServiceCF) Respond(spec *ar.ApicurioRegistry) (bool, error)

func (*ServiceCF) Sense

func (this *ServiceCF) Sense(spec *ar.ApicurioRegistry, request reconcile.Request) error

type ServiceUF

type ServiceUF = func(spec *core.Service)

Jump to

Keyboard shortcuts

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