controller

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Info = iota
	Debug
)

Log levels

Variables

This section is empty.

Functions

func ConduitInitContainers

func ConduitInitContainers(cc []*v1alpha.ConduitConnector, cp []*v1alpha.ConduitProcessor) []corev1.Container

ConduitInitContainers returns a slice of kubernetes container definitions

func ConduitPipelineVol

func ConduitPipelineVol(refName string) corev1.Volume

ConduitVolume returns a kubernetes configmap volume definition for the provided reference.

func ConduitRuntimeContainer

func ConduitRuntimeContainer(image, version string, envVars []corev1.EnvVar, flags *conduit.Flags) (corev1.Container, error)

ConduitRuntimeContainer returns a Kubernetes container definition

func ConduitVolume

func ConduitVolume(claimName string) corev1.Volume

ConduitVolume returns a kubernetes volume definition for the provided claim

func ConduitVolumeClaim

func ConduitVolumeClaim(nn types.NamespacedName, size string) *corev1.PersistentVolumeClaim

ConduitVolumeClaim returns pvc defintion of specified size and name.

func EnvVars

func EnvVars(c *v1alpha.Conduit) []corev1.EnvVar

EnvVars returns a slice of EnvVar with all connector settings. Only secrets are put into environment variables.

func PipelineConfigYAML

func PipelineConfigYAML(ctx context.Context, client client.Client, conduit *v1alpha.Conduit) (string, error)

PipelineConfigYAML produces a conduit pipeline configuration in YAML. Invalid configuration will result in a marshalling error.

func SchemaRegistryConfig

func SchemaRegistryConfig(ctx context.Context, cl client.Client, c *v1alpha.Conduit) (map[string][]byte, error)

Types

type Buildable added in v0.0.13

type Buildable interface {
	// contains filtered or unexported methods
}

type ConduitReconciler

type ConduitReconciler struct {
	client.Client
	logr.Logger
	record.EventRecorder
	// contains filtered or unexported fields
}

ConduitReconciler reconciles a Conduit object

func NewConduitReconciler

func NewConduitReconciler(
	meta *v1.ConduitInstanceMetadata,
	c client.Client,
	logger logr.Logger,
	recorder record.EventRecorder,
) *ConduitReconciler

func (*ConduitReconciler) CreateOrUpdateConfig

func (r *ConduitReconciler) CreateOrUpdateConfig(ctx context.Context, c *v1.Conduit) error

CreateOrUpdateConfig ensures the ConfigMap resource containing the Conduit pipeline is consistent with the Conduit resource. Status conditions are set depending on the outcome of the operation.

func (*ConduitReconciler) CreateOrUpdateDeployment

func (r *ConduitReconciler) CreateOrUpdateDeployment(ctx context.Context, c *v1.Conduit) error

CreateOrUpdateDeployment creates and the deployment to manage the runtime of the Conduit server. Updates on the Conduit resource will result in changes to the deployment and trigger a rolling upgrade. Status conditions are set depending on the outcome of the operation.

func (*ConduitReconciler) CreateOrUpdateSecret

func (r *ConduitReconciler) CreateOrUpdateSecret(ctx context.Context, c *v1.Conduit) error

CreateOrUpdateSecret creates a secret which will be used by the conduit instance to store sensitive information (credentials, etc)

func (*ConduitReconciler) CreateOrUpdateService

func (r *ConduitReconciler) CreateOrUpdateService(ctx context.Context, c *v1.Conduit) error

CreateOrUpdateService create a service pointing to the Conduit deployment Status conditions are set depending on the outcome of the operation.

func (*ConduitReconciler) CreateOrUpdateVolume

func (r *ConduitReconciler) CreateOrUpdateVolume(ctx context.Context, c *v1.Conduit) error

CreateOrUpdateVolume creates / updates the Conduit db volume resource. Status conditions are set depending on the outcome of the operation.

func (*ConduitReconciler) Reconcile

func (r *ConduitReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile difference between the desired state of the Conduit resource and runtime. Updates to the status and any errors encountered are accumulated through the progress of the loop. Returns all accumulated errors at the end of the loop.

func (*ConduitReconciler) SetupWithManager

func (r *ConduitReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*ConduitReconciler) UpdateStatus

func (r *ConduitReconciler) UpdateStatus(ctx context.Context, c *v1.Conduit) error

UpdateStatus keeps the Conduit resource status current using the commulative statuses of config, volume, deployment and service.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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