Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APICallbacks ¶
type APICallbacks struct {
// contains filtered or unexported fields
}
APICallbacks providers callbacks that work on API resources.
func NewAPICallbacks ¶
func NewAPICallbacks(m ctrl.Manager, of xpresource.ManagedKind) *APICallbacks
NewAPICallbacks returns a new APICallbacks.
func (*APICallbacks) Apply ¶
func (ac *APICallbacks) Apply(name string) terraform.CallbackFn
Apply makes sure the error is saved in async operation condition.
func (*APICallbacks) Destroy ¶
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 ¶
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 ¶
func (c *Connector) Connect(ctx context.Context, mg xpresource.Managed) (managed.ExternalClient, error)
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 ¶
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 Options ¶
type Options struct { controller.Options // Provider contains all resource configurations of the provider which can // be used to pick the related one. Since the selection is done in runtime, // we need to pass everything and generated code will pick the one. Provider *config.Provider // WorkspaceStore will be used to pick/initialize the workspace the specific CR // instance should use. WorkspaceStore *terraform.WorkspaceStore // SetupFn contains the provider-specific initialization logic, such as // preparing the auth token for Terraform CLI. SetupFn terraform.SetupFn // SecretStoreConfigGVK is the GroupVersionKind for the Secret StoreConfig // resource. Setting this enables External Secret Stores for the controller // by adding connection.DetailsManager as a ConnectionPublisher. SecretStoreConfigGVK *schema.GroupVersionKind }
Options contains incriminating options for a given Upjet controller instance.
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 ¶
type Workspace interface { ApplyAsync(terraform.CallbackFn) error Apply(context.Context) (terraform.ApplyResult, error) DestroyAsync(terraform.CallbackFn) error Destroy(context.Context) error Refresh(context.Context) (terraform.RefreshResult, error) Plan(context.Context) (terraform.PlanResult, error) }
Workspace is the set of methods that are needed for the controller to work.