Documentation ¶
Overview ¶
Package v1alpha2 contains API Schema definitions for the mirrors v1alpha2 API group +kubebuilder:object:generate=true +groupName=mirrors.kts.studio
Index ¶
- Constants
- Variables
- type DeletePolicyType
- type DestType
- type MirrorStatus
- type SecretMirror
- func (in *SecretMirror) DeepCopy() *SecretMirror
- func (in *SecretMirror) DeepCopyInto(out *SecretMirror)
- func (in *SecretMirror) DeepCopyObject() runtime.Object
- func (r *SecretMirror) Default()
- func (r *SecretMirror) Hub()
- func (r *SecretMirror) PollPeriodDuration() time.Duration
- func (r *SecretMirror) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *SecretMirror) ValidateCreate() error
- func (r *SecretMirror) ValidateDelete() error
- func (r *SecretMirror) ValidateUpdate(old runtime.Object) error
- type SecretMirrorDestination
- type SecretMirrorList
- type SecretMirrorSource
- type SecretMirrorSpec
- type SecretMirrorStatus
- type SourceType
- type VaultAppRoleAuthSpec
- type VaultAuthSpec
- type VaultAuthType
- type VaultSourceStatusSpec
- type VaultSpec
- type VaultTokenAuthSpec
Constants ¶
const ( MirrorStatusPending MirrorStatus = "Pending" MirrorStatusActive = "Active" MirrorStatusError = "Error" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "mirrors.kts.studio", Version: "v1alpha2"} // 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 DeletePolicyType ¶
type DeletePolicyType string
const ( DeletePolicyDelete DeletePolicyType = "delete" DeletePolicyRetain = "retain" )
type DestType ¶
type DestType string
const ( DestTypeNamespaces DestType = "namespaces" DestTypeVault = "vault" )
type MirrorStatus ¶
type MirrorStatus string
type SecretMirror ¶
type SecretMirror struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SecretMirrorSpec `json:"spec,omitempty"` Status SecretMirrorStatus `json:"status,omitempty"` }
SecretMirror is the Schema for the secretmirrors API +kubebuilder:printcolumn:name="Source Type",type=string,JSONPath=`.spec.source.type` +kubebuilder:printcolumn:name="Source Name",type=string,JSONPath=`.spec.source.name` +kubebuilder:printcolumn:name="Destination Type",type=string,JSONPath=`.spec.destination.type` +kubebuilder:printcolumn:name="Delete Policy",type=string,JSONPath=`.spec.deletePolicy` +kubebuilder:printcolumn:name="Poll Period",type=integer,JSONPath=`.spec.pollPeriodSeconds` +kubebuilder:printcolumn:name="Mirror Status",type=string,JSONPath=`.status.mirrorStatus` +kubebuilder:printcolumn:name="Last Sync Time",type=string,JSONPath=`.status.lastSyncTime` +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (*SecretMirror) DeepCopy ¶
func (in *SecretMirror) DeepCopy() *SecretMirror
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretMirror.
func (*SecretMirror) DeepCopyInto ¶
func (in *SecretMirror) DeepCopyInto(out *SecretMirror)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SecretMirror) DeepCopyObject ¶
func (in *SecretMirror) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*SecretMirror) Default ¶
func (r *SecretMirror) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*SecretMirror) Hub ¶
func (r *SecretMirror) Hub()
func (*SecretMirror) PollPeriodDuration ¶
func (r *SecretMirror) PollPeriodDuration() time.Duration
func (*SecretMirror) SetupWebhookWithManager ¶
func (r *SecretMirror) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*SecretMirror) ValidateCreate ¶
func (r *SecretMirror) ValidateCreate() error
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*SecretMirror) ValidateDelete ¶
func (r *SecretMirror) ValidateDelete() error
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*SecretMirror) ValidateUpdate ¶
func (r *SecretMirror) ValidateUpdate(old runtime.Object) error
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type SecretMirrorDestination ¶
type SecretMirrorDestination struct { // Destination type. Possible values — namespaces, vault. Default: namespaces // +kubebuilder:default:=namespaces // +kubebuilder:validation:Enum=namespaces;vault Type DestType `json:"type,omitempty"` // An array of regular expressions to match namespaces where to copy a source secret // +optional Namespaces []string `json:"namespaces,omitempty"` // +optional Vault *VaultSpec `json:"vault,omitempty"` }
SecretMirrorDestination defines where to sync a secret data to
func (*SecretMirrorDestination) DeepCopy ¶
func (in *SecretMirrorDestination) DeepCopy() *SecretMirrorDestination
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretMirrorDestination.
func (*SecretMirrorDestination) DeepCopyInto ¶
func (in *SecretMirrorDestination) DeepCopyInto(out *SecretMirrorDestination)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretMirrorList ¶
type SecretMirrorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []SecretMirror `json:"items"` }
SecretMirrorList contains a list of SecretMirror
func (*SecretMirrorList) DeepCopy ¶
func (in *SecretMirrorList) DeepCopy() *SecretMirrorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretMirrorList.
func (*SecretMirrorList) DeepCopyInto ¶
func (in *SecretMirrorList) DeepCopyInto(out *SecretMirrorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SecretMirrorList) DeepCopyObject ¶
func (in *SecretMirrorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SecretMirrorSource ¶
type SecretMirrorSource struct { // +kubebuilder:default:=secret // +kubebuilder:validation:Enum=secret;vault Type SourceType `json:"type,omitempty"` // +kubebuilder:validation:Required Name string `json:"name,omitempty"` // +optional Vault *VaultSpec `json:"vault,omitempty"` }
SecretMirrorSource defines where to extract a secret data from
func (*SecretMirrorSource) DeepCopy ¶
func (in *SecretMirrorSource) DeepCopy() *SecretMirrorSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretMirrorSource.
func (*SecretMirrorSource) DeepCopyInto ¶
func (in *SecretMirrorSource) DeepCopyInto(out *SecretMirrorSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretMirrorSpec ¶
type SecretMirrorSpec struct { // +kubebuilder:validation:Required Source SecretMirrorSource `json:"source,omitempty"` Destination SecretMirrorDestination `json:"destination,omitempty"` // What to do with Secret objects created by a SecretMirror. Two policies exist – delete // (deletes all created secrets) and retain (leaves them in the cluster). Default: delete // +kubebuilder:validation:Enum=delete;retain DeletePolicy DeletePolicyType `json:"deletePolicy,omitempty"` // How often to check for secret changes. Default: 180 seconds PollPeriodSeconds int64 `json:"pollPeriodSeconds,omitempty"` }
SecretMirrorSpec defines the desired behaviour of Secret mirroring
func (*SecretMirrorSpec) DeepCopy ¶
func (in *SecretMirrorSpec) DeepCopy() *SecretMirrorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretMirrorSpec.
func (*SecretMirrorSpec) DeepCopyInto ¶
func (in *SecretMirrorSpec) DeepCopyInto(out *SecretMirrorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretMirrorStatus ¶
type SecretMirrorStatus struct { // Mirroring status - Active, Pending or Error // +kubebuilder:default:=Pending // +kubebuilder:validation:Enum=Pending;Active;Error MirrorStatus MirrorStatus `json:"mirrorStatus,omitempty"` // Timestamp of last successful mirrorring LastSyncTime metav1.Time `json:"lastSyncTime,omitempty"` VaultSource *VaultSourceStatusSpec `json:"vaultSource,omitempty"` }
SecretMirrorStatus defines the observed state of SecretMirror
func (*SecretMirrorStatus) DeepCopy ¶
func (in *SecretMirrorStatus) DeepCopy() *SecretMirrorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretMirrorStatus.
func (*SecretMirrorStatus) DeepCopyInto ¶
func (in *SecretMirrorStatus) DeepCopyInto(out *SecretMirrorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SourceType ¶
type SourceType string
const ( SourceTypeSecret SourceType = "secret" SourceTypeVault = "vault" )
type VaultAppRoleAuthSpec ¶
type VaultAppRoleAuthSpec struct { // Reference to a Secret containing role-id and secret-id // +optional SecretRef v1.SecretReference `json:"secretRef,omitempty"` // approle Vault prefix. Default: approle AppRolePath string `json:"appRolePath,omitempty"` // A key in the SecretRef which contains role-id value. Default: role-id RoleIDKey string `json:"roleIDKey,omitempty"` // A key in the SecretRef which contains secret-id value. Default: secret-id SecretIDKey string `json:"secretIDKey,omitempty"` }
VaultAppRoleAuthSpec specifies approle-specific auth data
func (*VaultAppRoleAuthSpec) DeepCopy ¶
func (in *VaultAppRoleAuthSpec) DeepCopy() *VaultAppRoleAuthSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultAppRoleAuthSpec.
func (*VaultAppRoleAuthSpec) DeepCopyInto ¶
func (in *VaultAppRoleAuthSpec) DeepCopyInto(out *VaultAppRoleAuthSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VaultAuthSpec ¶
type VaultAuthSpec struct { // +optional AppRole *VaultAppRoleAuthSpec `json:"approle,omitempty"` // +optional Token *VaultTokenAuthSpec `json:"token,omitempty"` }
VaultAuthSpec describes how to authenticate against a Vault server
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.
func (*VaultAuthSpec) Type ¶
func (s *VaultAuthSpec) Type() VaultAuthType
type VaultAuthType ¶
type VaultAuthType string
const ( VaultAuthTypeAppRole VaultAuthType = "appRole" VaultAuthTypeToken VaultAuthType = "token" )
type VaultSourceStatusSpec ¶
type VaultSourceStatusSpec struct { // Contains LeaseID of a Vault dynamic secret LeaseID string `json:"leaseID,omitempty"` // Contains lease duration of a Vault dynamic secret LeaseDuration int `json:"leaseDuration,omitempty"` }
VaultSourceStatusSpec describes Vault-specific status
func (*VaultSourceStatusSpec) DeepCopy ¶
func (in *VaultSourceStatusSpec) DeepCopy() *VaultSourceStatusSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultSourceStatusSpec.
func (*VaultSourceStatusSpec) DeepCopyInto ¶
func (in *VaultSourceStatusSpec) DeepCopyInto(out *VaultSourceStatusSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VaultSpec ¶
type VaultSpec struct { // Addr specifies a Vault endpoint URL (e.g. https://vault.example.com) Addr string `json:"addr,omitempty"` // Path specifies a vault secret path (e.g. secret/data/some-secret or mongodb/creds/mymongo) Path string `json:"path,omitempty"` // +optional Auth VaultAuthSpec `json:"auth,omitempty"` }
VaultSpec contains information of secret location
func (*VaultSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultSpec.
func (*VaultSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VaultTokenAuthSpec ¶
type VaultTokenAuthSpec struct { // Reference to a Secret containing token // +optional SecretRef v1.SecretReference `json:"secretRef,omitempty"` // A key in the SecretRef which contains token value. Default: token // +optional TokenKey string `json:"tokenKey,omitempty"` }
VaultTokenAuthSpec specifies token-specific auth data
func (*VaultTokenAuthSpec) DeepCopy ¶
func (in *VaultTokenAuthSpec) DeepCopy() *VaultTokenAuthSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultTokenAuthSpec.
func (*VaultTokenAuthSpec) DeepCopyInto ¶
func (in *VaultTokenAuthSpec) DeepCopyInto(out *VaultTokenAuthSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.