controller

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MPL-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TenYears     string = "87600h"
	HundredYears string = "876000h"
)
View Source
const (
	NATSImage = "ghcr.io/xigxog/nats:2.10.14"
)

Variables

View Source
var (
	BrokerImage    = fmt.Sprintf("ghcr.io/xigxog/kubefox/broker:%s", build.Info.Version)
	BootstrapImage = fmt.Sprintf("ghcr.io/xigxog/kubefox/bootstrap:%s", build.Info.Version)
	HTTPSrvImage   = fmt.Sprintf("ghcr.io/xigxog/kubefox/httpsrv:%s", build.Info.Version)
)
View Source
var (
	ErrResourceVersionConflict = errors.New("resource version conflict")
)

Functions

func IgnoreFailedWebhookErr

func IgnoreFailedWebhookErr(err error) error

func IsFailedWebhookErr

func IsFailedWebhookErr(err error) bool

IsFailedWebhookErr will return true if error indicates it was caused by calling a webhook. This is useful during operator startup when the Pod is not marked ready which causes the webhooks to fail.

func RetryConflictWebhookErr

func RetryConflictWebhookErr(err error) (ctrl.Result, error)

Types

type AppDeploymentReconciler

type AppDeploymentReconciler struct {
	*Client

	CompMgr *ComponentManager
	// contains filtered or unexported fields
}

AppDeploymentReconciler reconciles a AppDeployment object

func (*AppDeploymentReconciler) Reconcile

func (r *AppDeploymentReconciler) 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 (*AppDeploymentReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type Client

type Client struct {
	k8s.Client
}

func (*Client) AddFinalizer

func (r *Client) AddFinalizer(ctx context.Context, obj client.Object, finalizer string) error

func (*Client) ApplyTemplate

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

func (*Client) DeleteTemplate

func (c *Client) DeleteTemplate(ctx context.Context, name string, data *templates.Data, log *logkf.Logger) error

func (*Client) GetPlatform

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

func (*Client) RemoveFinalizer

func (r *Client) RemoveFinalizer(ctx context.Context, obj client.Object, finalizer string) error

type ComponentManager

type ComponentManager struct {
	*Client
	// contains filtered or unexported fields
}

func NewComponentManager

func NewComponentManager(instance string, cli *Client) *ComponentManager

func (*ComponentManager) ReconcileApps

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

func (*ComponentManager) SetupComponent

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

type EnvironmentReconciler

type EnvironmentReconciler struct {
	*Client
	// contains filtered or unexported fields
}

EnvironmentReconciler reconciles a Environment object

func (*EnvironmentReconciler) Reconcile

func (r *EnvironmentReconciler) 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 (*EnvironmentReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NeedsReconcileFunc

type NeedsReconcileFunc func(app v1alpha1.ReleaseApp) bool

type PlatformReconciler

type PlatformReconciler struct {
	*Client

	Instance  string
	Namespace string
	VaultURL  string

	LogLevel  string
	LogFormat string

	CompMgr *ComponentManager
	// 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 ReleaseManifestReconciler

type ReleaseManifestReconciler struct {
	*Client
	// contains filtered or unexported fields
}

ReleaseManifestReconciler reconciles a ReleaseManifest object

func (*ReleaseManifestReconciler) Reconcile

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 (*ReleaseManifestReconciler) SetupWithManager

func (r *ReleaseManifestReconciler) 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
}

func (*TemplateData) ForComponent

func (td *TemplateData) ForComponent(template string, obj client.Object, defs *common.ContainerSpec, comp templates.Component) *TemplateData

type VirtualEnvContext

type VirtualEnvContext struct {
	context.Context
	*v1alpha1.VirtualEnvironment

	Environment *v1alpha1.Environment
	Data        *api.Data
	Policy      *v1alpha1.ReleasePolicy

	EnvFound bool

	Now metav1.Time
}

type VirtualEnvReconciler

type VirtualEnvReconciler struct {
	*Client

	CompMgr *ComponentManager
	// contains filtered or unexported fields
}

func (*VirtualEnvReconciler) Reconcile

func (r *VirtualEnvReconciler) 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 (*VirtualEnvReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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