reconciler

package
v0.0.0-...-5fb8a3f Latest Latest
Warning

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

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

Documentation

Overview

The reconciler ensures that a base set of K8s resources is always available in the cluster. These are necessary to ensure correct out-of-the-box functionality. All resources containing the metropolis.monogon.dev/builtin=true label are assumed to be managed by the reconciler. It currently does not revert modifications made by admins, it is planned to create an admission plugin prohibiting such modifications to resources with the metropolis.monogon.dev/builtin label to deal with that problem. This would also solve a potential issue where you could delete resources just by adding the metropolis.monogon.dev/builtin=true label.

Index

Constants

View Source
const (
	// BuiltinLabelKey is used as a k8s label to mark built-in objects (ie.,
	// managed by the reconciler)
	BuiltinLabelKey = "metropolis.monogon.dev/builtin"
	// BuiltinLabelValue is used as a k8s label value, under the
	// BuiltinLabelKey key.
	BuiltinLabelValue = "true"
	// BuiltinRBACPrefix is used to prefix all built-in objects that are part
	// of the rbac/v1 API (eg.  {Cluster,}Role{Binding,} objects). This
	// corresponds to the colon-separated 'namespaces' notation used by
	// Kubernetes system (system:) objects.
	BuiltinRBACPrefix = "metropolis:"
)

Variables

This section is empty.

Functions

func False

func False() *bool

func True

func True() *bool

True is a sad workaround for all the pointer booleans in K8s specs

func WaitReady

func WaitReady(ctx context.Context, etcdClient client.Namespaced) error

WaitReady watches the reconciler status and returns once initial reconciliation is done and the reconciled state is compatible.

Types

type Service

type Service struct {
	// Etcd is an etcd client for the curator namespace.
	Etcd client.Namespaced
	// ClientSet is what the reconciler uses to interact with the apiserver.
	ClientSet kubernetes.Interface
	// NodeID is the ID of the local node.
	NodeID string
	// contains filtered or unexported fields
}

Service is the reconciler service.

func (*Service) Run

func (s *Service) Run(ctx context.Context) error

Run is the root runnable of the reconciler service.

Jump to

Keyboard shortcuts

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