cluster

package
v0.23.4 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const ArchUnknown string = "unknown"

Variables

View Source
var NotFoundError = errors.New("cluster client does not exist")

NotFoundError indicates there is no cluster client for the given key.

Functions

This section is empty.

Types

type ClientCache added in v0.23.4

type ClientCache interface {
	// GetK8sClient returns the Kubernetes client for the cluster or an error for unknown clusters, connections
	// in a transient error state, or if the connection is of a different type (i.e. Docker Compose).
	GetK8sClient(clusterKey types.NamespacedName) (k8s.Client, error)
}

ClientCache provides cached clients for use by reconcilers.

All clients are goroutine-safe.

type ConnectionManager added in v0.23.4

type ConnectionManager struct {
	// contains filtered or unexported fields
}

func NewConnectionManager added in v0.23.4

func NewConnectionManager() *ConnectionManager

func (*ConnectionManager) GetComposeDockerClient added in v0.23.4

func (k *ConnectionManager) GetComposeDockerClient(key types.NamespacedName) (docker.Client, error)

GetComposeDockerClient gets the Docker client for the instance that Docker Compose is deploying to.

This is not currently exposed by the ClientCache interface as Docker Compose logic has not been migrated to the apiserver.

func (*ConnectionManager) GetK8sClient added in v0.23.4

func (k *ConnectionManager) GetK8sClient(key types.NamespacedName) (k8s.Client, error)

type Reconciler

type Reconciler struct {
	// contains filtered or unexported fields
}

func NewReconciler

func NewReconciler(ctrlClient ctrlclient.Client, store store.RStore, localDockerEnv docker.LocalEnv, connManager *ConnectionManager) *Reconciler

func (*Reconciler) CreateBuilder

func (r *Reconciler) CreateBuilder(mgr ctrl.Manager) (*builder.Builder, error)

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

func (*Reconciler) SetFakeClientsForTesting added in v0.23.4

func (r *Reconciler) SetFakeClientsForTesting(k8sClient k8s.Client, dockerClient docker.Client)

Jump to

Keyboard shortcuts

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