github.com/crossplane/upjet@v1.3.0/pkg/controller/options.go (about) 1 // SPDX-FileCopyrightText: 2023 The Crossplane Authors <https://crossplane.io> 2 // 3 // SPDX-License-Identifier: Apache-2.0 4 5 package controller 6 7 import ( 8 "crypto/tls" 9 "time" 10 11 "github.com/crossplane/crossplane-runtime/pkg/controller" 12 "k8s.io/apimachinery/pkg/runtime/schema" 13 14 "github.com/crossplane/upjet/pkg/config" 15 "github.com/crossplane/upjet/pkg/terraform" 16 ) 17 18 // Options contains incriminating options for a given Upjet controller instance. 19 type Options struct { 20 controller.Options 21 22 // Provider contains all resource configurations of the provider which can 23 // be used to pick the related one. Since the selection is done in runtime, 24 // we need to pass everything and generated code will pick the one. 25 Provider *config.Provider 26 27 // WorkspaceStore will be used to pick/initialize the workspace the specific CR 28 // instance should use. 29 WorkspaceStore *terraform.WorkspaceStore 30 31 OperationTrackerStore *OperationTrackerStore 32 33 // SetupFn contains the provider-specific initialization logic, such as 34 // preparing the auth token for Terraform CLI. 35 SetupFn terraform.SetupFn 36 37 // SecretStoreConfigGVK is the GroupVersionKind for the Secret StoreConfig 38 // resource. Setting this enables External Secret Stores for the controller 39 // by adding connection.DetailsManager as a ConnectionPublisher. 40 SecretStoreConfigGVK *schema.GroupVersionKind 41 42 // ESSOptions for External Secret Stores. 43 ESSOptions *ESSOptions 44 45 // PollJitter adds the specified jitter to the configured reconcile period 46 // of the up-to-date resources in managed.Reconciler. 47 PollJitter time.Duration 48 49 // StartWebhooks enables starting of the conversion webhooks by the 50 // provider's controllerruntime.Manager. 51 StartWebhooks bool 52 } 53 54 // ESSOptions for External Secret Stores. 55 type ESSOptions struct { 56 TLSConfig *tls.Config 57 TLSSecretName *string 58 }