v1beta1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MPL-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package v1beta1 contains API Schema definitions for the secrets v1beta1 API group +kubebuilder:object:generate=true +groupName=secrets.hashicorp.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "secrets.hashicorp.com", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Destination

type Destination struct {
	// Name of the Secret
	Name string `json:"name"`
	// Create the destination Secret.
	// If the Secret already exists this should be set to false.
	Create bool `json:"create,omitempty"`
	// Labels to apply to the Secret. Requires Create to be set to true.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations to apply to the Secret. Requires Create to be set to true.
	Annotations map[string]string `json:"annotations,omitempty"`
	// Type of Kubernetes Secret. Requires Create to be set to true.
	// Defaults to Opaque.
	Type v1.SecretType `json:"type,omitempty"`
}

Destination provides the configuration that will be applied to the destination Kubernetes Secret during a Vault Secret -> K8s Secret sync.

func (*Destination) DeepCopy

func (in *Destination) DeepCopy() *Destination

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Destination.

func (*Destination) DeepCopyInto

func (in *Destination) DeepCopyInto(out *Destination)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RolloutRestartTarget

type RolloutRestartTarget struct {
	// +kubebuilder:validation:Enum={Deployment,DaemonSet,StatefulSet}
	Kind string `json:"kind"`
	Name string `json:"name"`
}

RolloutRestartTarget provides the configuration required to perform a rollout-restart of the supported resources upon Vault Secret rotation. The rollout-restart is triggered by patching the target resource's 'spec.template.metadata.annotations' to include 'vso.secrets.hashicorp.com/restartedAt' with a timestamp value of when the trigger was executed. E.g. vso.secrets.hashicorp.com/restartedAt: "2023-03-23T13:39:31Z"

Supported resources: Deployment, DaemonSet, StatefulSet

func (*RolloutRestartTarget) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutRestartTarget.

func (*RolloutRestartTarget) DeepCopyInto

func (in *RolloutRestartTarget) DeepCopyInto(out *RolloutRestartTarget)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StorageEncryption

type StorageEncryption struct {
	// Mount path of the Transit engine in Vault.
	Mount string `json:"mount"`
	// KeyName to use for encrypt/decrypt operations via Vault Transit.
	KeyName string `json:"keyName"`
}

StorageEncryption provides the necessary configuration need to encrypt the storage cache entries using Vault's Transit engine. It only supports Kubernetes Auth for now.

func (*StorageEncryption) DeepCopy

func (in *StorageEncryption) DeepCopy() *StorageEncryption

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageEncryption.

func (*StorageEncryption) DeepCopyInto

func (in *StorageEncryption) DeepCopyInto(out *StorageEncryption)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultAuth

type VaultAuth struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VaultAuthSpec   `json:"spec,omitempty"`
	Status VaultAuthStatus `json:"status,omitempty"`
}

VaultAuth is the Schema for the vaultauths API

func (*VaultAuth) DeepCopy

func (in *VaultAuth) DeepCopy() *VaultAuth

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAuth.

func (*VaultAuth) DeepCopyInto

func (in *VaultAuth) DeepCopyInto(out *VaultAuth)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VaultAuth) DeepCopyObject

func (in *VaultAuth) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VaultAuthConfigAWS

type VaultAuthConfigAWS struct {
	// Vault role to use for authenticating
	Role string `json:"role"`
	// AWS Region to use for signing the authentication request
	Region string `json:"region,omitempty"`
	// The Vault header value to include in the STS signing request
	HeaderValue string `json:"headerValue,omitempty"`

	// The role session name to use when creating a webidentity provider
	SessionName string `json:"sessionName,omitempty"`

	// The STS endpoint to use; if not set will use the default
	STSEndpoint string `json:"stsEndpoint,omitempty"`

	// The IAM endpoint to use; if not set will use the default
	IAMEndpoint string `json:"iamEndpoint,omitempty"`

	// SecretRef is the name of a Kubernetes Secret which holds credentials for
	// AWS. Expected keys include `access_key_id`, `secret_access_key`,
	// `session_token`
	SecretRef string `json:"secretRef,omitempty"`

	// IRSAServiceAccount name to use with IAM Roles for Service Accounts
	// (IRSA), and should be annotated with "eks.amazonaws.com/role-arn". This
	// ServiceAccount will be checked for other EKS annotations:
	// eks.amazonaws.com/audience and eks.amazonaws.com/token-expiration
	IRSAServiceAccount string `json:"irsaServiceAccount,omitempty"`
}

VaultAuthConfigAWS provides VaultAuth configuration options needed for authenticating to Vault via an AWS AuthMethod. Will use creds from `SecretRef` or `IRSAServiceAccount` if provided, in that order. If neither are provided, the underlying node role or instance profile will be used to authenticate to Vault.

func (*VaultAuthConfigAWS) DeepCopy

func (in *VaultAuthConfigAWS) DeepCopy() *VaultAuthConfigAWS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAuthConfigAWS.

func (*VaultAuthConfigAWS) DeepCopyInto

func (in *VaultAuthConfigAWS) DeepCopyInto(out *VaultAuthConfigAWS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultAuthConfigAppRole

type VaultAuthConfigAppRole struct {
	// RoleID of the AppRole Role to use for authenticating to Vault.
	RoleID string `json:"roleId"`

	// SecretRef is the name of a Kubernetes secret in the consumer's (VDS/VSS/PKI) namespace which
	// provides the AppRole Role's SecretID. The secret must have a key named `id` which holds the
	// AppRole Role's secretID.
	SecretRef string `json:"secretRef"`
}

VaultAuthConfigAppRole provides VaultAuth configuration options needed for authenticating to Vault via an AppRole AuthMethod.

func (*VaultAuthConfigAppRole) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAuthConfigAppRole.

func (*VaultAuthConfigAppRole) DeepCopyInto

func (in *VaultAuthConfigAppRole) DeepCopyInto(out *VaultAuthConfigAppRole)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultAuthConfigJWT

type VaultAuthConfigJWT struct {
	// Role to use for authenticating to Vault.
	Role string `json:"role"`
	// SecretRef is the name of a Kubernetes secret in the consumer's (VDS/VSS/PKI) namespace which
	// provides the JWT token to authenticate to Vault's JWT authentication backend. The secret must
	// have a key named `jwt` which holds the JWT token.
	SecretRef string `json:"secretRef,omitempty"`
	// ServiceAccount to use when creating a ServiceAccount token to authenticate to Vault's
	// JWT authentication backend.
	ServiceAccount string `json:"serviceAccount,omitempty"`
	// TokenAudiences to include in the ServiceAccount token.
	TokenAudiences []string `json:"audiences,omitempty"`
	// TokenExpirationSeconds to set the ServiceAccount token.
	// +kubebuilder:default=600
	// +kubebuilder:validation:Minimum=600
	TokenExpirationSeconds int64 `json:"tokenExpirationSeconds,omitempty"`
}

VaultAuthConfigJWT provides VaultAuth configuration options needed for authenticating to Vault.

func (*VaultAuthConfigJWT) DeepCopy

func (in *VaultAuthConfigJWT) DeepCopy() *VaultAuthConfigJWT

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAuthConfigJWT.

func (*VaultAuthConfigJWT) DeepCopyInto

func (in *VaultAuthConfigJWT) DeepCopyInto(out *VaultAuthConfigJWT)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultAuthConfigKubernetes

type VaultAuthConfigKubernetes struct {
	// Role to use for authenticating to Vault.
	Role string `json:"role"`
	// ServiceAccount to use when authenticating to Vault's kubernetes
	// authentication backend.
	ServiceAccount string `json:"serviceAccount"`
	// TokenAudiences to include in the ServiceAccount token.
	TokenAudiences []string `json:"audiences,omitempty"`
	// TokenExpirationSeconds to set the ServiceAccount token.
	// +kubebuilder:default=600
	// +kubebuilder:validation:Minimum=600
	TokenExpirationSeconds int64 `json:"tokenExpirationSeconds,omitempty"`
}

VaultAuthConfigKubernetes provides VaultAuth configuration options needed for authenticating to Vault.

func (*VaultAuthConfigKubernetes) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAuthConfigKubernetes.

func (*VaultAuthConfigKubernetes) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultAuthList

type VaultAuthList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VaultAuth `json:"items"`
}

VaultAuthList contains a list of VaultAuth

func (*VaultAuthList) DeepCopy

func (in *VaultAuthList) DeepCopy() *VaultAuthList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAuthList.

func (*VaultAuthList) DeepCopyInto

func (in *VaultAuthList) DeepCopyInto(out *VaultAuthList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VaultAuthList) DeepCopyObject

func (in *VaultAuthList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VaultAuthSpec

type VaultAuthSpec struct {
	// VaultConnectionRef of the corresponding VaultConnection CustomResource.
	// If no value is specified the Operator will default to the `default` VaultConnection,
	// configured in its own Kubernetes namespace.
	VaultConnectionRef string `json:"vaultConnectionRef,omitempty"`
	// Namespace to auth to in Vault
	Namespace string `json:"namespace,omitempty"`
	// Method to use when authenticating to Vault.
	// +kubebuilder:validation:Enum=kubernetes;jwt;appRole;aws
	Method string `json:"method"`
	// Mount to use when authenticating to auth method.
	Mount string `json:"mount"`
	// Params to use when authenticating to Vault
	Params map[string]string `json:"params,omitempty"`
	// Headers to be included in all Vault requests.
	Headers map[string]string `json:"headers,omitempty"`
	// Kubernetes specific auth configuration, requires that the Method be set to `kubernetes`.
	Kubernetes *VaultAuthConfigKubernetes `json:"kubernetes,omitempty"`
	// AppRole specific auth configuration, requires that the Method be set to `appRole`.
	AppRole *VaultAuthConfigAppRole `json:"appRole,omitempty"`
	// JWT specific auth configuration, requires that the Method be set to `jwt`.
	JWT *VaultAuthConfigJWT `json:"jwt,omitempty"`
	// AWS specific auth configuration, requires that Method be set to `aws`.
	AWS *VaultAuthConfigAWS `json:"aws,omitempty"`
	// StorageEncryption provides the necessary configuration to encrypt the client storage cache.
	// This should only be configured when client cache persistence with encryption is enabled.
	// This is done by passing setting the manager's commandline argument
	// --client-cache-persistence-model=direct-encrypted. Typically there should only ever
	// be one VaultAuth configured with StorageEncryption in the Cluster, and it should have
	// the label: cacheStorageEncryption=true
	StorageEncryption *StorageEncryption `json:"storageEncryption,omitempty"`
}

VaultAuthSpec defines the desired state of VaultAuth

func (*VaultAuthSpec) DeepCopy

func (in *VaultAuthSpec) DeepCopy() *VaultAuthSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAuthSpec.

func (*VaultAuthSpec) DeepCopyInto

func (in *VaultAuthSpec) DeepCopyInto(out *VaultAuthSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultAuthStatus

type VaultAuthStatus struct {
	// Valid auth mechanism.
	Valid bool   `json:"valid"`
	Error string `json:"error"`
}

VaultAuthStatus defines the observed state of VaultAuth

func (*VaultAuthStatus) DeepCopy

func (in *VaultAuthStatus) DeepCopy() *VaultAuthStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAuthStatus.

func (*VaultAuthStatus) DeepCopyInto

func (in *VaultAuthStatus) DeepCopyInto(out *VaultAuthStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultConnection

type VaultConnection struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VaultConnectionSpec   `json:"spec,omitempty"`
	Status VaultConnectionStatus `json:"status,omitempty"`
}

VaultConnection is the Schema for the vaultconnections API

func (*VaultConnection) DeepCopy

func (in *VaultConnection) DeepCopy() *VaultConnection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultConnection.

func (*VaultConnection) DeepCopyInto

func (in *VaultConnection) DeepCopyInto(out *VaultConnection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VaultConnection) DeepCopyObject

func (in *VaultConnection) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VaultConnectionList

type VaultConnectionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VaultConnection `json:"items"`
}

VaultConnectionList contains a list of VaultConnection

func (*VaultConnectionList) DeepCopy

func (in *VaultConnectionList) DeepCopy() *VaultConnectionList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultConnectionList.

func (*VaultConnectionList) DeepCopyInto

func (in *VaultConnectionList) DeepCopyInto(out *VaultConnectionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VaultConnectionList) DeepCopyObject

func (in *VaultConnectionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VaultConnectionSpec

type VaultConnectionSpec struct {
	// Address of the Vault server
	Address string `json:"address"`
	// Headers to be included in all Vault requests.
	Headers map[string]string `json:"headers,omitempty"`
	// TLSServerName to use as the SNI host for TLS connections.
	TLSServerName string `json:"tlsServerName,omitempty"`
	// CACertSecretRef is the name of a Kubernetes secret containing the trusted PEM encoded CA certificate chain as `ca.crt`.
	CACertSecretRef string `json:"caCertSecretRef,omitempty"`
	// SkipTLSVerify for TLS connections.
	SkipTLSVerify bool `json:"skipTLSVerify,omitempty"`
}

VaultConnectionSpec defines the desired state of VaultConnection

func (*VaultConnectionSpec) DeepCopy

func (in *VaultConnectionSpec) DeepCopy() *VaultConnectionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultConnectionSpec.

func (*VaultConnectionSpec) DeepCopyInto

func (in *VaultConnectionSpec) DeepCopyInto(out *VaultConnectionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultConnectionStatus

type VaultConnectionStatus struct {
	// Valid auth mechanism.
	Valid bool `json:"valid"`
}

VaultConnectionStatus defines the observed state of VaultConnection

func (*VaultConnectionStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultConnectionStatus.

func (*VaultConnectionStatus) DeepCopyInto

func (in *VaultConnectionStatus) DeepCopyInto(out *VaultConnectionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultDynamicSecret

type VaultDynamicSecret struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VaultDynamicSecretSpec   `json:"spec,omitempty"`
	Status VaultDynamicSecretStatus `json:"status,omitempty"`
}

VaultDynamicSecret is the Schema for the vaultdynamicsecrets API

func (*VaultDynamicSecret) DeepCopy

func (in *VaultDynamicSecret) DeepCopy() *VaultDynamicSecret

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultDynamicSecret.

func (*VaultDynamicSecret) DeepCopyInto

func (in *VaultDynamicSecret) DeepCopyInto(out *VaultDynamicSecret)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VaultDynamicSecret) DeepCopyObject

func (in *VaultDynamicSecret) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VaultDynamicSecretList

type VaultDynamicSecretList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VaultDynamicSecret `json:"items"`
}

VaultDynamicSecretList contains a list of VaultDynamicSecret

func (*VaultDynamicSecretList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultDynamicSecretList.

func (*VaultDynamicSecretList) DeepCopyInto

func (in *VaultDynamicSecretList) DeepCopyInto(out *VaultDynamicSecretList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VaultDynamicSecretList) DeepCopyObject

func (in *VaultDynamicSecretList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VaultDynamicSecretSpec

type VaultDynamicSecretSpec struct {
	// VaultAuthRef to the VaultAuth resource
	// If no value is specified the Operator will default to the `default` VaultAuth,
	// configured in its own Kubernetes namespace.
	VaultAuthRef string `json:"vaultAuthRef,omitempty"`
	// Namespace where the secrets engine is mounted in Vault.
	Namespace string `json:"namespace,omitempty"`
	// Mount path of the secret's engine in Vault.
	Mount string `json:"mount"`
	// RequestHTTPMethod to use when syncing Secrets from Vault.
	// Setting a value here is not typically required.
	// If left unset the Operator will make requests using the GET method.
	// In the case where Params are specified the Operator will use the PUT method.
	// Please consult https://developer.hashicorp.com/vault/docs/secrets if you are
	// uncertain about what method to use.
	// Of note, the Vault client treats PUT and POST as being equivalent.
	// The underlying Vault client implementation will always use the PUT method.
	// +kubebuilder:validation:Enum={GET,POST,PUT}
	RequestHTTPMethod string `json:"requestHTTPMethod,omitempty"`
	// Path in Vault to get the credentials for, and is relative to Mount.
	// Please consult https://developer.hashicorp.com/vault/docs/secrets if you are
	// uncertain about what 'path' should be set to.
	Path string `json:"path"`
	// Params that can be passed when requesting credentials/secrets.
	// When Params is set the configured RequestHTTPMethod will be
	// ignored. See RequestHTTPMethod for more details.
	// Please consult https://developer.hashicorp.com/vault/docs/secrets if you are
	// uncertain about what 'params' should/can be set to.
	Params map[string]string `json:"params,omitempty"`
	// RenewalPercent is the percent out of 100 of the lease duration when the
	// lease is renewed. Defaults to 67 percent plus jitter.
	// +kubebuilder:default=67
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=90
	RenewalPercent int `json:"renewalPercent,omitempty"`
	// Revoke the existing lease on VDS resource deletion.
	Revoke bool `json:"revoke,omitempty"`
	// AllowStaticCreds should be set when syncing credentials that are periodically
	// rotated by the Vault server, rather than created upon request. These secrets
	// are sometimes referred to as "static roles", or "static credentials", with a
	// request path that contains "static-creds".
	AllowStaticCreds bool `json:"allowStaticCreds,omitempty"`
	// RolloutRestartTargets should be configured whenever the application(s) consuming the Vault secret does
	// not support dynamically reloading a rotated secret.
	// In that case one, or more RolloutRestartTarget(s) can be configured here. The Operator will
	// trigger a "rollout-restart" for each target whenever the Vault secret changes between reconciliation events.
	// See RolloutRestartTarget for more details.
	RolloutRestartTargets []RolloutRestartTarget `json:"rolloutRestartTargets,omitempty"`
	// Destination provides configuration necessary for syncing the Vault secret to Kubernetes.
	Destination Destination `json:"destination"`
}

VaultDynamicSecretSpec defines the desired state of VaultDynamicSecret

func (*VaultDynamicSecretSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultDynamicSecretSpec.

func (*VaultDynamicSecretSpec) DeepCopyInto

func (in *VaultDynamicSecretSpec) DeepCopyInto(out *VaultDynamicSecretSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultDynamicSecretStatus

type VaultDynamicSecretStatus struct {
	// LastRenewalTime of the last successful secret lease renewal.
	LastRenewalTime int64 `json:"lastRenewalTime"`
	// LastGeneration is the Generation of the last reconciled resource.
	LastGeneration int64 `json:"lastGeneration"`
	// SecretLease for the Vault secret.
	SecretLease VaultSecretLease `json:"secretLease"`
	// StaticCredsMetaData contains the static creds response meta-data
	StaticCredsMetaData VaultStaticCredsMetaData `json:"staticCredsMetaData,omitempty"`
	// LastRuntimePodUID used for tracking the transition from one Pod to the next.
	// It is used to mitigate the effects of a Vault lease renewal storm.
	LastRuntimePodUID types.UID `json:"lastRuntimePodUID,omitempty"`
	// SecretMAC used when deciding whether new Vault secret data should be synced.
	//
	// The controller will compare the "new" Vault secret data to this value using HMAC,
	// if they are different, then the data will be synced to the Destination.
	//
	// The SecretMac is also used to detect drift in the Destination Secret's Data.
	// If drift is detected the data will be synced to the Destination.
	// SecretMAC will only be stored when VaultDynamicSecretSpec.AllowStaticCreds is true.
	SecretMAC string `json:"secretMAC,omitempty"`
}

VaultDynamicSecretStatus defines the observed state of VaultDynamicSecret

func (*VaultDynamicSecretStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultDynamicSecretStatus.

func (*VaultDynamicSecretStatus) DeepCopyInto

func (in *VaultDynamicSecretStatus) DeepCopyInto(out *VaultDynamicSecretStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultPKISecret

type VaultPKISecret struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VaultPKISecretSpec   `json:"spec,omitempty"`
	Status VaultPKISecretStatus `json:"status,omitempty"`
}

VaultPKISecret is the Schema for the vaultpkisecrets API

func (*VaultPKISecret) DeepCopy

func (in *VaultPKISecret) DeepCopy() *VaultPKISecret

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultPKISecret.

func (*VaultPKISecret) DeepCopyInto

func (in *VaultPKISecret) DeepCopyInto(out *VaultPKISecret)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VaultPKISecret) DeepCopyObject

func (in *VaultPKISecret) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VaultPKISecret) GetIssuerAPIData

func (v *VaultPKISecret) GetIssuerAPIData() map[string]interface{}

type VaultPKISecretList

type VaultPKISecretList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VaultPKISecret `json:"items"`
}

VaultPKISecretList contains a list of VaultPKISecret

func (*VaultPKISecretList) DeepCopy

func (in *VaultPKISecretList) DeepCopy() *VaultPKISecretList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultPKISecretList.

func (*VaultPKISecretList) DeepCopyInto

func (in *VaultPKISecretList) DeepCopyInto(out *VaultPKISecretList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VaultPKISecretList) DeepCopyObject

func (in *VaultPKISecretList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VaultPKISecretSpec

type VaultPKISecretSpec struct {
	// VaultAuthRef of the VaultAuth resource
	// If no value is specified the Operator will default to the `default` VaultAuth,
	// configured in its own Kubernetes namespace.
	VaultAuthRef string `json:"vaultAuthRef,omitempty"`

	// Namespace to get the secret from in Vault
	Namespace string `json:"namespace,omitempty"`

	// Mount for the secret in Vault
	Mount string `json:"mount"`

	// Role in Vault to use when issuing TLS certificates.
	Role string `json:"role"`

	// Revoke the certificate when the resource is deleted.
	Revoke bool `json:"revoke,omitempty"`

	// Clear the Kubernetes secret when the resource is deleted.
	Clear bool `json:"clear,omitempty"`

	// ExpiryOffset to use for computing when the certificate should be renewed.
	// The rotation time will be difference between the expiration and the offset.
	// Should be in duration notation e.g. 30s, 120s, etc.
	// Set to empty string "" to prevent certificate rotation.
	ExpiryOffset string `json:"expiryOffset,omitempty"`

	// IssuerRef reference to an existing PKI issuer, either by Vault-generated
	// identifier, the literal string default to refer to the currently
	// configured default issuer, or the name assigned to an issuer.
	// This parameter is part of the request URL.
	IssuerRef string `json:"issuerRef,omitempty"`

	// RolloutRestartTargets should be configured whenever the application(s) consuming the Vault secret does
	// not support dynamically reloading a rotated secret.
	// In that case one, or more RolloutRestartTarget(s) can be configured here. The Operator will
	// trigger a "rollout-restart" for each target whenever the Vault secret changes between reconciliation events.
	// See RolloutRestartTarget for more details.
	RolloutRestartTargets []RolloutRestartTarget `json:"rolloutRestartTargets,omitempty"`

	// Destination provides configuration necessary for syncing the Vault secret
	// to Kubernetes. If the type is set to "kubernetes.io/tls", the Vault
	// response fields "certificate" and "private_key" will be copied to fields
	// "tls.crt" and "tls.key", respectively, in the Kubernetes secret.
	Destination Destination `json:"destination"`

	// CommonName to include in the request.
	CommonName string `json:"commonName,omitempty"`

	// AltNames to include in the request
	// May contain both DNS names and email addresses.
	AltNames []string `json:"altNames,omitempty"`

	// IPSans to include in the request.
	IPSans []string `json:"ipSans,omitempty"`

	// The requested URI SANs.
	URISans []string `json:"uriSans,omitempty"`

	// Requested other SANs, in an array with the format
	// oid;type:value for each entry.
	OtherSans []string `json:"otherSans,omitempty"`

	// TTL for the certificate; sets the expiration date.
	// If not specified the Vault role's default,
	// backend default, or system default TTL is used, in that order.
	// Cannot be larger than the mount's max TTL.
	// Note: this only has an effect when generating a CA cert or signing a CA cert,
	// not when generating a CSR for an intermediate CA.
	// Should be in duration notation e.g. 120s, 2h, etc.
	TTL string `json:"ttl,omitempty"`

	// Format for the certificate. Choices: "pem", "der", "pem_bundle".
	// If "pem_bundle",
	// any private key and issuing cert will be appended to the certificate pem.
	// If "der", the value will be base64 encoded.
	// Default: pem
	Format string `json:"format,omitempty"`

	// PrivateKeyFormat, generally the default will be controlled by the Format
	// parameter as either base64-encoded DER or PEM-encoded DER.
	// However, this can be set to "pkcs8" to have the returned
	// private key contain base64-encoded pkcs8 or PEM-encoded
	// pkcs8 instead.
	// Default: der
	PrivateKeyFormat string `json:"privateKeyFormat,omitempty"`

	// NotAfter field of the certificate with specified date value.
	// The value format should be given in UTC format YYYY-MM-ddTHH:MM:SSZ
	NotAfter string `json:"notAfter,omitempty"`

	// ExcludeCNFromSans from DNS or Email Subject Alternate Names.
	// Default: false
	ExcludeCNFromSans bool `json:"excludeCNFromSans,omitempty"`
}

VaultPKISecretSpec defines the desired state of VaultPKISecret

func (*VaultPKISecretSpec) DeepCopy

func (in *VaultPKISecretSpec) DeepCopy() *VaultPKISecretSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultPKISecretSpec.

func (*VaultPKISecretSpec) DeepCopyInto

func (in *VaultPKISecretSpec) DeepCopyInto(out *VaultPKISecretSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultPKISecretStatus

type VaultPKISecretStatus struct {
	SerialNumber string `json:"serialNumber,omitempty"`
	Expiration   int64  `json:"expiration,omitempty"`
	Valid        bool   `json:"valid"`
	Error        string `json:"error"`
}

VaultPKISecretStatus defines the observed state of VaultPKISecret

func (*VaultPKISecretStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultPKISecretStatus.

func (*VaultPKISecretStatus) DeepCopyInto

func (in *VaultPKISecretStatus) DeepCopyInto(out *VaultPKISecretStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultSecretLease

type VaultSecretLease struct {
	// ID of the Vault secret.
	ID string `json:"id"`
	// LeaseDuration of the Vault secret.
	LeaseDuration int `json:"duration"`
	// Renewable Vault secret lease
	Renewable bool `json:"renewable"`
	// RequestID of the Vault secret request.
	RequestID string `json:"requestID"`
}

func (*VaultSecretLease) DeepCopy

func (in *VaultSecretLease) DeepCopy() *VaultSecretLease

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultSecretLease.

func (*VaultSecretLease) DeepCopyInto

func (in *VaultSecretLease) DeepCopyInto(out *VaultSecretLease)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultStaticCredsMetaData

type VaultStaticCredsMetaData struct {
	// LastVaultRotation represents the last time Vault rotated the password
	LastVaultRotation int64 `json:"lastVaultRotation"`
	// RotationPeriod is number in seconds between each rotation, effectively a
	// "time to live". This value is compared to the LastVaultRotation to
	// determine if a password needs to be rotated
	RotationPeriod int64 `json:"rotationPeriod"`
	// TTL is the seconds remaining before the next rotation.
	TTL int64 `json:"ttl"`
}

func (*VaultStaticCredsMetaData) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultStaticCredsMetaData.

func (*VaultStaticCredsMetaData) DeepCopyInto

func (in *VaultStaticCredsMetaData) DeepCopyInto(out *VaultStaticCredsMetaData)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultStaticSecret

type VaultStaticSecret struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VaultStaticSecretSpec   `json:"spec,omitempty"`
	Status VaultStaticSecretStatus `json:"status,omitempty"`
}

VaultStaticSecret is the Schema for the vaultstaticsecrets API

func (*VaultStaticSecret) DeepCopy

func (in *VaultStaticSecret) DeepCopy() *VaultStaticSecret

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultStaticSecret.

func (*VaultStaticSecret) DeepCopyInto

func (in *VaultStaticSecret) DeepCopyInto(out *VaultStaticSecret)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VaultStaticSecret) DeepCopyObject

func (in *VaultStaticSecret) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VaultStaticSecretList

type VaultStaticSecretList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VaultStaticSecret `json:"items"`
}

VaultStaticSecretList contains a list of VaultStaticSecret

func (*VaultStaticSecretList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultStaticSecretList.

func (*VaultStaticSecretList) DeepCopyInto

func (in *VaultStaticSecretList) DeepCopyInto(out *VaultStaticSecretList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VaultStaticSecretList) DeepCopyObject

func (in *VaultStaticSecretList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VaultStaticSecretSpec

type VaultStaticSecretSpec struct {
	// VaultAuthRef of the VaultAuth resource
	// If no value is specified the Operator will default to the `default` VaultAuth,
	// configured in its own Kubernetes namespace.
	VaultAuthRef string `json:"vaultAuthRef,omitempty"`
	// Namespace to get the secret from in Vault
	Namespace string `json:"namespace,omitempty"`
	// Mount for the secret in Vault
	Mount string `json:"mount"`
	// Path of the secret in Vault, corresponds to the `path` parameter for,
	// kv-v1: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v1#read-secret
	// kv-v2: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2#read-secret-version
	Path string `json:"path"`
	// Version of the secret to fetch. Only valid for type kv-v2. Corresponds to version query parameter:
	// https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2#version
	// +kubebuilder:validation:Minimum=0
	Version int `json:"version,omitempty"`
	// Type of the Vault static secret
	// +kubebuilder:validation:Enum={kv-v1,kv-v2}
	Type string `json:"type"`
	// RefreshAfter a period of time, in duration notation
	RefreshAfter string `json:"refreshAfter,omitempty"`
	// HMACSecretData determines whether the Operator computes the
	// HMAC of the Secret's data. The MAC value will be stored in
	// the resource's Status.SecretMac field, and will be used for drift detection
	// and during incoming Vault secret comparison.
	// Enabling this feature is recommended to ensure that Secret's data stays consistent with Vault.
	// +kubebuilder:default=true
	HMACSecretData bool `json:"hmacSecretData,omitempty"`
	// RolloutRestartTargets should be configured whenever the application(s) consuming the Vault secret does
	// not support dynamically reloading a rotated secret.
	// In that case one, or more RolloutRestartTarget(s) can be configured here. The Operator will
	// trigger a "rollout-restart" for each target whenever the Vault secret changes between reconciliation events.
	// All configured targets wil be ignored if HMACSecretData is set to false.
	// See RolloutRestartTarget for more details.
	RolloutRestartTargets []RolloutRestartTarget `json:"rolloutRestartTargets,omitempty"`
	// Destination provides configuration necessary for syncing the Vault secret to Kubernetes.
	Destination Destination `json:"destination"`
}

VaultStaticSecretSpec defines the desired state of VaultStaticSecret

func (*VaultStaticSecretSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultStaticSecretSpec.

func (*VaultStaticSecretSpec) DeepCopyInto

func (in *VaultStaticSecretSpec) DeepCopyInto(out *VaultStaticSecretSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VaultStaticSecretStatus

type VaultStaticSecretStatus struct {
	// SecretMAC used when deciding whether new Vault secret data should be synced.
	//
	// The controller will compare the "new" Vault secret data to this value using HMAC,
	// if they are different, then the data will be synced to the Destination.
	//
	// The SecretMac is also used to detect drift in the Destination Secret's Data.
	// If drift is detected the data will be synced to the Destination.
	SecretMAC string `json:"secretMAC,omitempty"`
}

VaultStaticSecretStatus defines the observed state of VaultStaticSecret

func (*VaultStaticSecretStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultStaticSecretStatus.

func (*VaultStaticSecretStatus) DeepCopyInto

func (in *VaultStaticSecretStatus) DeepCopyInto(out *VaultStaticSecretStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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