Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAzureKeyVaultTrait ¶
Types ¶
type Trait ¶
type Trait struct {
traitv1.Trait `property:",squash"`
// Enables automatic configuration of the trait.
Auto *bool `property:"auto" json:"auto,omitempty"`
// The Azure Tenant Id for accessing Key Vault
TenantID string `property:"tenant-id,omitempty"`
// The Azure Client Id for accessing Key Vault
ClientID string `property:"client-id,omitempty"`
// The Azure Client Secret for accessing Key Vault
ClientSecret string `property:"client-secret,omitempty"`
// The Azure Vault Name for accessing Key Vault
VaultName string `property:"vault-name,omitempty"`
// Define if we want to use the Camel Context Reload feature or not
ContextReloadEnabled *bool `property:"context-reload-enabled,omitempty"`
// Define if we want to use the Refresh Feature for secrets
RefreshEnabled *bool `property:"refresh-enabled,omitempty"`
// If Refresh is enabled, this defines the interval to check the refresh event
RefreshPeriod string `property:"refresh-period,omitempty"`
// If Refresh is enabled, the regular expression representing the secrets we want to track
Secrets string `property:"refresh-period,omitempty"`
// If Refresh is enabled, the connection String to point to the Eventhub service used to track updates
EventhubConnectionString string `property:"refresh-period,omitempty"`
// If Refresh is enabled, the account name for Azure Storage Blob service used to save checkpoint while consuming from Eventhub
BlobAccountName string `property:"refresh-period,omitempty"`
// If Refresh is enabled, the access key for Azure Storage Blob service used to save checkpoint while consuming from Eventhub
BlobAccessKey string `property:"refresh-period,omitempty"`
// If Refresh is enabled, the container name for Azure Storage Blob service used to save checkpoint while consuming from Eventhub
BlobContainerName string `property:"refresh-period,omitempty"`
}
The Azure Key Vault trait can be used to use secrets from Azure Key Vault service
The Azure Key Vault trait is disabled by default.
For more information about how to use secrets from Azure Key Vault component take a look at the components docs: xref:components::azure-key-vault-component.adoc[Azure Key Vault component]
A sample execution of this trait, would require the following trait options: -t azure-key-vault.enabled=true -t azure-key-vault.tenant-id="tenant-id" -t azure-key-vault.client-id="client-id" -t azure-key-vault.client-secret="client-secret" -t azure-key-vault.vault-name="vault-name"
To enable the automatic context reload on secrets updates you should define the following trait options: -t azure-key-vault.enabled=true -t azure-key-vault.tenant-id="tenant-id" -t azure-key-vault.client-id="client-id" -t azure-key-vault.client-secret="client-secret" -t azure-key-vault.vault-name="vault-name" -t azure-key-vault.context-reload-enabled="true" -t azure-key-vault.refresh-enabled="true" -t azure-key-vault.refresh-period="30000" -t azure-key-vault.secrets="test*" -t azure-key-vault.eventhub-connection-string="connection-string" -t azure-key-vault.blob-account-name="account-name" -t azure-key-vault.blob-container-name="container-name" -t azure-key-vault.blob-access-key="account-name"
+camel-k:trait=azure-key-vault.