watch_and_update

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProjectGVK = newGVK("crds.kloudlite.io/v1", "Project")
	AppGVK     = newGVK("crds.kloudlite.io/v1", "App")

	// ManagedServiceGVK = newGVK("crds.kloudlite.io/v1", "ManagedService")
	ManagedResourceGVK       = newGVK("crds.kloudlite.io/v1", "ManagedResource")
	EnvironmentGVK           = newGVK("crds.kloudlite.io/v1", "Environment")
	RouterGVK                = newGVK("crds.kloudlite.io/v1", "Router")
	NodePoolGVK              = newGVK("clusters.kloudlite.io/v1", "NodePool")
	DeviceGVK                = newGVK("wireguard.kloudlite.io/v1", "Device")
	BuildRunGVK              = newGVK("distribution.kloudlite.io/v1", "BuildRun")
	ClusterManagedServiceGVK = newGVK("crds.kloudlite.io/v1", "ClusterManagedService")
	HelmChartGVK             = newGVK("crds.kloudlite.io/v1", "HelmChart")
	ProjectManageServiceGVK  = newGVK("crds.kloudlite.io/v1", "ProjectManagedService")

	// native resources
	PersistentVolumeClaimGVK = newGVK("v1", "PersistentVolumeClaim")
	PersistentVolumeGVK      = newGVK("v1", "PersistentVolume")
	VolumeAttachmentGVK      = newGVK("storage.k8s.io/v1", "VolumeAttachment")
	IngressGVK               = newGVK("networking.k8s.io/v1", "Ingress")
	SecretGVK                = newGVK("v1", "Secret")
	ConfigmapGVK             = newGVK("v1", "ConfigMap")
)

Functions

This section is empty.

Types

type GVK

type GVK struct {
	schema.GroupVersionKind
}

type MessageSender

type MessageSender interface {
	DispatchConsoleResourceUpdates(ctx context.Context, stu t.ResourceUpdate) error
	DispatchInfraResourceUpdates(ctx context.Context, stu t.ResourceUpdate) error
	DispatchContainerRegistryResourceUpdates(ctx context.Context, stu t.ResourceUpdate) error
}

func NewGRPCMessageSender

func NewGRPCMessageSender(ctx context.Context, cc *grpc.ClientConn, ev *env.Env, logger logging.Logger) (MessageSender, error)

type Reconciler

type Reconciler struct {
	client.Client
	Scheme *runtime.Scheme

	Name string
	Env  *env.Env

	MsgSender MessageSender
	// contains filtered or unexported fields
}

Reconciler reconciles a StatusWatcher object

func (*Reconciler) AddWatcherFinalizer

func (r *Reconciler) AddWatcherFinalizer(ctx context.Context, obj client.Object) (ctrl.Result, error)

func (*Reconciler) GetName

func (r *Reconciler) GetName() string

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, oReq ctrl.Request) (ctrl.Result, error)

+kubebuilder:rbac:groups=watcher.kloudlite.io,resources=statuswatchers,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=watcher.kloudlite.io,resources=statuswatchers/status,verbs=get;update;patch +kubebuilder:rbac:groups=watcher.kloudlite.io,resources=statuswatchers/finalizers,verbs=update

func (*Reconciler) RemoveWatcherFinalizer

func (r *Reconciler) RemoveWatcherFinalizer(ctx context.Context, obj client.Object) (ctrl.Result, error)

func (*Reconciler) SendResourceEvents

func (r *Reconciler) SendResourceEvents(ctx context.Context, obj *unstructured.Unstructured, logger logging.Logger) (ctrl.Result, error)

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, logger logging.Logger) error

SetupWithManager sets up the controllers with the Manager.

Jump to

Keyboard shortcuts

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