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, opts ...APICallbacksOption) *APICallbacks
NewAPICallbacks returns a new APICallbacks.
func (*APICallbacks) Create ¶ added in v0.9.0
func (ac *APICallbacks) Create(name string) terraform.CallbackFn
Create 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.
func (*APICallbacks) Update ¶ added in v0.9.0
func (ac *APICallbacks) Update(name string) terraform.CallbackFn
Update makes sure the error is saved in async operation condition.
type APICallbacksOption ¶ added in v0.9.0
type APICallbacksOption func(callbacks *APICallbacks)
APICallbacksOption represents a configurable option for the APICallbacks
func WithEventHandler ¶ added in v0.9.0
func WithEventHandler(e *handler.EventHandler) APICallbacksOption
WithEventHandler sets the EventHandler for the APICallbacks so that the APICallbacks instance can requeue reconcile requests in the context of the asynchronous operations.
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 { Create(name string) terraform.CallbackFn Update(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 ESSOptions ¶ added in v0.9.0
ESSOptions for External Secret Stores.
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.
func WithConnectorEventHandler ¶ added in v0.9.0
func WithConnectorEventHandler(e *handler.EventHandler) Option
WithConnectorEventHandler configures the EventHandler so that the external clients can requeue reconciliation requests.
func WithLogger ¶ added in v0.9.0
WithLogger configures a logger for the Connector.
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 // ESSOptions for External Secret Stores. ESSOptions *ESSOptions }
Options contains incriminating options for a given Upjet controller instance.
type ProviderSharer ¶ added in v0.9.0
type ProviderSharer interface {
}ProviderSharer shares a native provider process with the receiver.
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) Import(context.Context, resource.Terraformed) (terraform.ImportResult, error) Plan(context.Context) (terraform.PlanResult, error) }
Workspace is the set of methods that are needed for the controller to work.