Documentation ¶
Index ¶
- func New(ctx context.Context, schemes ...SchemeAdder) (client.Client, error)
- func NewContextWithCluster(ctx context.Context, remote *ClusterContext) context.Context
- func NewContextWithProvisionerClient(ctx context.Context, client client.Client) context.Context
- func NewScheme(schemes ...SchemeAdder) (*runtime.Scheme, error)
- func ProvisionerClientFromContext(ctx context.Context) (client.Client, error)
- type ClusterContext
- type SchemeAdder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
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 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.
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 ¶
SchemeAdder allows custom resources to be added to the scheme.
Click to show internal directories.
Click to hide internal directories.