controller

package
v0.0.0-...-8f325c2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NATSImage  = "ghcr.io/xigxog/nats:2.9.23"
	VaultImage = "ghcr.io/xigxog/vault:1.14.4-v0.2.1-alpha"
)
View Source
const (
	TenYears     string = "87600h"
	HundredYears string = "876000h"
)
View Source
const (
	FieldOwner client.FieldOwner = "kubefox-operator"
)

Variables

View Source
var (
	BrokerImage    = fmt.Sprintf("ghcr.io/xigxog/kubefox/broker:%s", kubefox.Version())
	BootstrapImage = fmt.Sprintf("ghcr.io/xigxog/kubefox/bootstrap:%s", kubefox.Version())
)
View Source
var (
	ErrNotFound = fmt.Errorf("not found")
)

Functions

func IgnoreNotFound

func IgnoreNotFound(err error) error

Types

type Client

type Client struct {
	client.Client
}

func (*Client) Apply

func (c *Client) Apply(ctx context.Context, obj client.Object) error

func (*Client) ApplyTemplate

func (c *Client) ApplyTemplate(ctx context.Context, name string, data *templates.Data) error

func (*Client) GetPlatform

func (r *Client) GetPlatform(ctx context.Context, namespace string) (*v1alpha1.Platform, error)

func (*Client) Merge

func (c *Client) Merge(ctx context.Context, obj client.Object) error

type ComponentManager

type ComponentManager struct {
	Instance string
	Client   *Client
	Log      *logkf.Logger
}

func (*ComponentManager) ReconcileComponents

func (cm *ComponentManager) ReconcileComponents(ctx context.Context, namespace string) (bool, error)

func (*ComponentManager) SetupComponent

func (cm *ComponentManager) SetupComponent(ctx context.Context, td *TemplateData) (bool, error)

type DeploymentReconciler

type DeploymentReconciler struct {
	*Client

	Instance string
	Scheme   *runtime.Scheme
	// contains filtered or unexported fields
}

DeploymentReconciler reconciles a Deployment object

func (*DeploymentReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*DeploymentReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type PlatformReconciler

type PlatformReconciler struct {
	*Client

	Instance  string
	Namespace string
	VaultAddr string

	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

PlatformReconciler reconciles a Platform object

func (*PlatformReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*PlatformReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ReleaseReconciler

type ReleaseReconciler struct {
	*Client

	Instance string
	Scheme   *runtime.Scheme
	// contains filtered or unexported fields
}

ReleaseReconciler reconciles a Release object

func (*ReleaseReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*ReleaseReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type TemplateData

type TemplateData struct {
	templates.Data

	Template string
	Obj      client.Object
}

Jump to

Keyboard shortcuts

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