controller

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APICallbacks added in v0.2.0

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

APICallbacks providers callbacks that work on API resources.

func NewAPICallbacks added in v0.2.0

func NewAPICallbacks(m ctrl.Manager, of xpresource.ManagedKind) *APICallbacks

NewAPICallbacks returns a new APICallbacks.

func (*APICallbacks) Apply added in v0.2.0

func (ac *APICallbacks) Apply(name string) terraform.CallbackFn

Apply makes sure the error is saved in async operation condition.

func (*APICallbacks) Destroy added in v0.2.0

func (ac *APICallbacks) Destroy(name string) terraform.CallbackFn

Destroy makes sure the error is saved in async operation condition.

type APISecretClient

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

APISecretClient is a client for getting k8s secrets

func (*APISecretClient) GetSecretData

func (a *APISecretClient) GetSecretData(ctx context.Context, ref *xpv1.SecretReference) (map[string][]byte, error)

GetSecretData gets and returns data for the referenced secret

func (*APISecretClient) GetSecretValue

func (a *APISecretClient) GetSecretValue(ctx context.Context, sel xpv1.SecretKeySelector) ([]byte, error)

GetSecretValue gets and returns value for key of the referenced secret

type CallbackProvider added in v0.2.0

type CallbackProvider interface {
	Apply(name string) terraform.CallbackFn
	Destroy(name string) terraform.CallbackFn
}

CallbackProvider provides functions that can be called with the result of async operations.

type Connector

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

Connector initializes the external client with credentials and other configuration parameters.

func NewConnector

func NewConnector(kube client.Client, ws Store, sf terraform.SetupFn, cfg *config.Resource, opts ...Option) *Connector

NewConnector returns a new Connector object.

func (*Connector) Connect

Connect makes sure the underlying client is ready to issue requests to the provider API.

type Option

type Option func(*Connector)

Option allows you to configure Connector.

func WithCallbackProvider added in v0.2.0

func WithCallbackProvider(ac CallbackProvider) Option

WithCallbackProvider configures the controller to use async variant of the functions of the Terraform client and run given callbacks once those operations are completed.

type Store

type Store interface {
	Workspace(ctx context.Context, c resource.SecretClient, tr resource.Terraformed, ts terraform.Setup, cfg *config.Resource) (*terraform.Workspace, error)
}

Store is where we can get access to the Terraform workspace of given resource.

type Workspace

Workspace is the set of methods that are needed for the controller to work.

Jump to

Keyboard shortcuts

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