keyvaults

package
v0.0.0-...-5653ff1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeyVaultClient

func GetKeyVaultClient(creds config.Credentials) (keyvault.VaultsClient, error)

func GetObjectID

func GetObjectID(ctx context.Context, creds config.Credentials, tenantID string, clientID string) (*string, error)

func HandleCreationError

func HandleCreationError(instance *v1alpha1.KeyVault, err error) (bool, error)

func NewOpsClient

func NewOpsClient(creds config.Credentials, keyvaultName string) *kvops.BaseClient

func ParseAccessPolicy

ParseAccessPolicy - helper function to parse access policies from Kubernetes spec

func ParseNetworkPolicy

func ParseNetworkPolicy(ruleSet *v1alpha1.NetworkRuleSet) keyvault.NetworkRuleSet

ParseNetworkPolicy - helper function to parse network policies from Kubernetes spec

Types

type AzureKeyVaultManager

type AzureKeyVaultManager struct {
	Creds  config.Credentials
	Scheme *runtime.Scheme
}

func NewAzureKeyVaultManager

func NewAzureKeyVaultManager(creds config.Credentials, scheme *runtime.Scheme) *AzureKeyVaultManager

func (*AzureKeyVaultManager) CreateVault

func (m *AzureKeyVaultManager) CreateVault(ctx context.Context, instance *v1alpha1.KeyVault, sku azurev1alpha1.KeyVaultSku, tags map[string]*string) (keyvault.Vault, error)

CreateVault creates a new key vault

func (*AzureKeyVaultManager) Delete

func (*AzureKeyVaultManager) DeleteVault

func (m *AzureKeyVaultManager) DeleteVault(ctx context.Context, groupName string, vaultName string) (result autorest.Response, err error)

DeleteVault removes the resource group named by env var

func (*AzureKeyVaultManager) Ensure

func (*AzureKeyVaultManager) GetParents

func (*AzureKeyVaultManager) GetStatus

func (*AzureKeyVaultManager) GetVault

func (m *AzureKeyVaultManager) GetVault(ctx context.Context, groupName string, vaultName string) (result keyvault.Vault, err error)

CheckExistence checks for the presence of a keyvault instance on Azure

type KeyVaultManager

type KeyVaultManager interface {
	CreateVault(ctx context.Context, instance *azurev1alpha1.KeyVault, sku azurev1alpha1.KeyVaultSku, tags map[string]*string) (keyvault.Vault, error)

	// DeleteVault removes the resource group named by env var
	DeleteVault(ctx context.Context, groupName string, vaultName string) (result autorest.Response, err error)

	// CheckExistence checks for the presence of a keyvault instance on Azure
	GetVault(ctx context.Context, groupName string, vaultName string) (result keyvault.Vault, err error)

	// also embed async client methods
	resourcemanager.ARMClient
}

type KeyvaultKeyClient

type KeyvaultKeyClient struct {
	Creds          config.Credentials
	KeyvaultClient *AzureKeyVaultManager
}

KeyvaultKeyClient emcompasses the methods needed for the keyops client to fulfill the ARMClient interface

func NewKeyvaultKeyClient

func NewKeyvaultKeyClient(creds config.Credentials, client *AzureKeyVaultManager) *KeyvaultKeyClient

func (*KeyvaultKeyClient) Delete

Delete ensures the requested resource is gone from Azure

func (*KeyvaultKeyClient) Ensure

Ensure idempotently implements the user's requested state

func (*KeyvaultKeyClient) GetParents

GetParents returns the kube resources most likely to be parents to this resource

func (*KeyvaultKeyClient) GetStatus

func (g *KeyvaultKeyClient) GetStatus(obj runtime.Object) (*v1alpha1.ASOStatus, error)

Jump to

Keyboard shortcuts

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