cluster

package
v0.32.4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const ArchUnknown string = "unknown"

Variables

Functions

func DockerClientFromEnv added in v0.26.3

func DockerClientFromEnv(ctx context.Context, env docker.Env) (docker.Client, error)

func KubernetesClientFromEnv added in v0.26.3

func KubernetesClientFromEnv(ctx context.Context, contextOverride k8s.KubeContextOverride, namespaceOverride k8s.NamespaceOverride) (k8s.Client, error)

KubernetesClientFromEnv creates a client based on the machine environment.

The Kubernetes Client APIs are really defined for automatic dependency injection. (as opposed to the Kubernetes convention of nested factory structs.)

If you have to edit the below, it's easier to let wire generate the factory code for you, then adapt it here.

Types

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(clusterKey types.NamespacedName) (k8s.Client, metav1.MicroTime, error)

type DockerClientFactory added in v0.26.3

type DockerClientFactory interface {
	New(ctx context.Context, env docker.Env) (docker.Client, error)
}

func FakeDockerClientOrError added in v0.26.3

func FakeDockerClientOrError(client docker.Client, err error) DockerClientFactory

type DockerClientFunc added in v0.26.3

type DockerClientFunc func(ctx context.Context, env docker.Env) (docker.Client, error)

func (DockerClientFunc) New added in v0.26.3

type KubernetesClientFactory added in v0.26.3

type KubernetesClientFactory interface {
	New(ctx context.Context, contextOverride k8s.KubeContextOverride, namespaceOverride k8s.NamespaceOverride) (k8s.Client, error)
}

func FakeKubernetesClientOrError added in v0.26.3

func FakeKubernetesClientOrError(client k8s.Client, err error) KubernetesClientFactory

type KubernetesClientFunc added in v0.26.3

type KubernetesClientFunc func(ctx context.Context, contextOverride k8s.KubeContextOverride, namespaceOverride k8s.NamespaceOverride) (k8s.Client, error)

func (KubernetesClientFunc) New added in v0.26.3

func (k KubernetesClientFunc) New(ctx context.Context, contextOverride k8s.KubeContextOverride, namespaceOverride k8s.NamespaceOverride) (k8s.Client, error)

type Reconciler

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

func NewReconciler

func NewReconciler(
	globalCtx context.Context,
	ctrlClient ctrlclient.Client,
	store store.RStore,
	clock clockwork.Clock,
	connManager *ConnectionManager,
	localDockerEnv docker.LocalEnv,
	dockerClientFactory DockerClientFactory,
	k8sClientFactory KubernetesClientFactory,
	wsList *server.WebsocketList,
	base xdg.Base,
	apiServerName model.APIServerName,
) *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)

Jump to

Keyboard shortcuts

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