resources

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

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameLabel      = "app.kubernetes.io/name"
	InstanceLabel  = "app.kubernetes.io/instance"
	VersionLabel   = "app.kubernetes.io/version"
	ComponentLabel = "app.kubernetes.io/component"
	ManagedByLabel = "app.kubernetes.io/managed-by"
	ManagedByValue = "thanos-operator"
	StoreEndpoint  = "monitoring.banzaicloud.io/storeendpoint"

	HealthCheckPath = "/-/healthy"
	ReadyCheckPath  = "/-/ready"
)

Variables

This section is empty.

Functions

func Dispatch

func Dispatch(rr reconciler.ResourceReconciler, resourceList []Resource) (*reconcile.Result, error)

func GetArgs

func GetArgs(input interface{}) []string

func GetPort

func GetPort(address string) int32

func GetProbe

func GetProbe(port int32, path string) *corev1.Probe

func QualifiedName

func QualifiedName(parts ...string) string

func RunReconcilers

func RunReconcilers(reconcilers []ComponentReconciler) (ctrl.Result, error)

RunReconcilers run component reconcilers one by one and stop on first error.

Types

type ComponentReconciler

type ComponentReconciler func() (*reconcile.Result, error)

ComponentReconciler reconciler interface

type Labels

type Labels = map[string]string

type ObjectStoreReconciler

type ObjectStoreReconciler struct {
	ObjectStore *v1alpha1.ObjectStore
	*reconciler.GenericResourceReconciler
}

func NewObjectStoreReconciler

func NewObjectStoreReconciler(objectStore *v1alpha1.ObjectStore, genericReconciler *reconciler.GenericResourceReconciler) *ObjectStoreReconciler

func (*ObjectStoreReconciler) GetCommonLabels

func (t *ObjectStoreReconciler) GetCommonLabels() Labels

func (*ObjectStoreReconciler) GetObjectMeta

func (t *ObjectStoreReconciler) GetObjectMeta(name string) metav1.ObjectMeta

func (*ObjectStoreReconciler) QualifiedName

func (t *ObjectStoreReconciler) QualifiedName(name string) string

func (*ObjectStoreReconciler) ReconcileResources

func (t *ObjectStoreReconciler) ReconcileResources(resourceList []Resource) (*reconcile.Result, error)

type Resource

type Resource func() (runtime.Object, reconciler.DesiredState, error)

Resource redeclaration of function with return type kubernetes Object

type StoreEndpointComponentReconciler

type StoreEndpointComponentReconciler struct {
	StoreEndpoints []v1alpha1.StoreEndpoint
	*reconciler.GenericResourceReconciler
}

func NewStoreEndpointComponentReconciler

func NewStoreEndpointComponentReconciler(storeEndpoints *v1alpha1.StoreEndpointList, genericReconciler *reconciler.GenericResourceReconciler) *StoreEndpointComponentReconciler

func (*StoreEndpointComponentReconciler) ReconcileResources

func (t *StoreEndpointComponentReconciler) ReconcileResources(resourceList []Resource) (*reconcile.Result, error)

type StructElement

type StructElement struct {
	Field reflect.StructField
	Value reflect.Value
}

func StructElements

func StructElements(value reflect.Value) []StructElement

type ThanosComponentReconciler

type ThanosComponentReconciler struct {
	Thanos         *v1alpha1.Thanos
	ThanosList     []v1alpha1.Thanos
	StoreEndpoints []v1alpha1.StoreEndpoint
	*reconciler.GenericResourceReconciler
}

func NewThanosComponentReconciler

func NewThanosComponentReconciler(thanos *v1alpha1.Thanos, thanosList []v1alpha1.Thanos, storeEndpoints []v1alpha1.StoreEndpoint, genericReconciler *reconciler.GenericResourceReconciler) *ThanosComponentReconciler

func (*ThanosComponentReconciler) GetCommonLabels

func (t *ThanosComponentReconciler) GetCommonLabels() Labels

func (*ThanosComponentReconciler) GetNameMeta

func (t *ThanosComponentReconciler) GetNameMeta(name string) metav1.ObjectMeta

func (*ThanosComponentReconciler) GetObjectMeta

func (t *ThanosComponentReconciler) GetObjectMeta(name string) metav1.ObjectMeta

func (*ThanosComponentReconciler) QualifiedName

func (t *ThanosComponentReconciler) QualifiedName(name string) string

func (*ThanosComponentReconciler) ReconcileResources

func (t *ThanosComponentReconciler) ReconcileResources(resourceList []Resource) (*reconcile.Result, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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