client

package
v0.1.64 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 41

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, schemes ...SchemeAdder) (client.Client, error)

New returns a new controller runtime caching client, initialized with core and unikorn resources for typed operation.

func NewContextWithCluster added in v0.1.64

func NewContextWithCluster(ctx context.Context, remote *ClusterContext) context.Context

func NewContextWithProvisionerClient added in v0.1.64

func NewContextWithProvisionerClient(ctx context.Context, client client.Client) context.Context

func NewScheme

func NewScheme(schemes ...SchemeAdder) (*runtime.Scheme, error)

NewScheme returns a scheme with all types that are required by unikorn. TODO: we'd really love to include ArgoCD here, but it's dependency hell. See https://github.com/argoproj/gitops-engine/issues/56 for a never ending commentary on the underlying problem.

func ProvisionerClientFromContext added in v0.1.64

func ProvisionerClientFromContext(ctx context.Context) (client.Client, error)

Types

type ClusterContext added in v0.1.64

type ClusterContext struct {
	// Client is a Kubernetes client that can access resources on the remote
	// cluster.  This is typically used to extract Kubenetes configuration to
	// chain to the next remote cluster.  It is also used when some combination
	// of Helm application/ArgoCD is broken and needs manual intervention.
	Client client.Client
	// ID is the unique remote cluster ID as cunsumed by the CD layer.
	// This is only set on invocation of a remote cluster provisioner.
	ID *cd.ResourceIdentifier
	// Host is the Kubernetes endpoint hostname. This is only set on
	// invocation of a remote cluster provisioner.
	Host string
	// Port is the Kubernetes endpoint port. This is only set on
	// invocation of a remote cluster provisioner.
	Port string
}

ClusterContext is available to all provisioners and is updated when invoked within the scope of a remote cluster provisioner. In general, you should avoid having to use this, because it implies hackery.

func ClusterFromContext added in v0.1.64

func ClusterFromContext(ctx context.Context) (*ClusterContext, error)

type SchemeAdder

type SchemeAdder func(*runtime.Scheme) error

SchemeAdder allows custom resources to be added to the scheme.

Jump to

Keyboard shortcuts

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