v1alpha2

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package v1alpha2 contains API Schema definitions for the passbolt v1alpha2 API group +kubebuilder:object:generate=true +groupName=passbolt.tagesspiegel.de

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "passbolt.tagesspiegel.de", 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
)
View Source
var (
	// GetByID is a function that returns the name of a secret by its ID.
	GetSecretID func(name string) (string, error) = nil
	// GetBySecretName is a function that returns the ID of a secret by its name.
	GetSecretName func(id string) (string, error) = nil
)

Functions

This section is empty.

Types

type FieldName

type FieldName string
const (
	FieldNameUsername FieldName = "username"
	FieldNamePassword FieldName = "password"
	FieldNameUri      FieldName = "uri"
)

type PassboltSecret

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

	Spec   PassboltSecretSpec   `json:"spec,omitempty"`
	Status PassboltSecretStatus `json:"status,omitempty"`
}

PassboltSecret is the Schema for the passboltsecrets API

func (*PassboltSecret) ConvertFrom added in v1.3.0

func (dst *PassboltSecret) ConvertFrom(srcRaw conversion.Hub) error

ConvertFrom converts from the Hub version (v1alpha2) to this version.

func (*PassboltSecret) ConvertTo added in v1.3.0

func (src *PassboltSecret) ConvertTo(dstRaw conversion.Hub) error

ConvertTo converts this CronJob to the Hub version (v1alpha2).

func (*PassboltSecret) DeepCopy

func (in *PassboltSecret) DeepCopy() *PassboltSecret

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

func (*PassboltSecret) DeepCopyInto

func (in *PassboltSecret) DeepCopyInto(out *PassboltSecret)

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

func (*PassboltSecret) DeepCopyObject

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

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

func (*PassboltSecret) SetupWebhookWithManager

func (r *PassboltSecret) SetupWebhookWithManager(mgr ctrl.Manager) error

type PassboltSecretList

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

PassboltSecretList contains a list of PassboltSecret

func (*PassboltSecretList) DeepCopy

func (in *PassboltSecretList) DeepCopy() *PassboltSecretList

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

func (*PassboltSecretList) DeepCopyInto

func (in *PassboltSecretList) DeepCopyInto(out *PassboltSecretList)

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

func (*PassboltSecretList) DeepCopyObject

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

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

type PassboltSecretSpec

type PassboltSecretSpec struct {
	// LeaveOnDelete defines if the secret should be deleted from Kubernetes when the PassboltSecret is deleted.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=true
	LeaveOnDelete bool `json:"leaveOnDelete,omitempty"`
	// SecretType is the type of the secret. Defaults to Opaque.
	// If set to kubernetes.io/dockerconfigjson, the secret will be created as a docker config secret.
	// We also expect the PassboltSecretName to be set in this case.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default=Opaque
	// +kubebuilder:validation:Enum=Opaque;kubernetes.io/dockerconfigjson
	SecretType corev1.SecretType `json:"secretType,omitempty"`
	// PassboltSecretName is the name of the passbolt secret name to be used as a docker config secret.
	// +kubebuilder:validation:Optional
	PassboltSecretName *string `json:"passboltSecretName,omitempty"`
	// Secrets is a list of secrets to be fetched from passbolt.
	// +kubebuilder:validation:Optional
	Secrets []SecretSpec `json:"secrets,omitempty"`
}

PassboltSecretSpec defines the desired state of PassboltSecret

func (*PassboltSecretSpec) DeepCopy

func (in *PassboltSecretSpec) DeepCopy() *PassboltSecretSpec

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

func (*PassboltSecretSpec) DeepCopyInto

func (in *PassboltSecretSpec) DeepCopyInto(out *PassboltSecretSpec)

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

type PassboltSecretStatus

type PassboltSecretStatus struct {
	// SyncStatus is the status of the last sync.
	// +kubebuilder:validation:Enum=Success;Error;Unknown
	// +kubebuilder:default=Unknown
	SyncStatus SyncStatus `json:"syncStatus"`
	// LastSync is the last time the secret was synced from passbolt.
	// +kubebuilder:validation:Optional
	LastSync metav1.Time `json:"lastSync"`
	// SyncErrors is a list of errors that occurred during the last sync.
	SyncErrors []SyncError `json:"syncErrors,omitempty"`
}

PassboltSecretStatus defines the observed state of PassboltSecret

func (*PassboltSecretStatus) DeepCopy

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

func (*PassboltSecretStatus) DeepCopyInto

func (in *PassboltSecretStatus) DeepCopyInto(out *PassboltSecretStatus)

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

type PassboltSpec

type PassboltSpec struct {
	// Name of the secret in passbolt
	// +kubebuilder:validation:Required
	Name string `json:"name"`
	// Field is the field in the passbolt secret to be read.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Enum=username;password;uri
	Field FieldName `json:"field,omitempty"`
	// Value is the plain text value of the secret.
	// This field allows to set a static value or using go templating to generate the value.
	// Valid template variables are:
	//   - Password
	//   - Username
	//   - URI
	// +kubebuilder:validation:Optional
	Value *string `json:"value,omitempty"`
}

func (*PassboltSpec) DeepCopy

func (in *PassboltSpec) DeepCopy() *PassboltSpec

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

func (*PassboltSpec) DeepCopyInto

func (in *PassboltSpec) DeepCopyInto(out *PassboltSpec)

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

type SecretSpec

type SecretSpec struct {
	// Name of the secret in passbolt
	// +kubebuilder:validation:Required
	PassboltSecret PassboltSpec `json:"passboltSecret"`
	// KubernetesSecretKey is the key in the kubernetes secret where the passbolt secret will be stored.
	// +kubebuilder:validation:Required
	KubernetesSecretKey string `json:"kubernetesSecretKey"`
}

SecretSpec defines the secret mapping between passbolt and kubernetes.

func (*SecretSpec) DeepCopy

func (in *SecretSpec) DeepCopy() *SecretSpec

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

func (*SecretSpec) DeepCopyInto

func (in *SecretSpec) DeepCopyInto(out *SecretSpec)

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

type SyncError

type SyncError struct {
	// Message is the error message.
	Message string `json:"message"`
	// SecretName is the name of the secret that failed to sync.
	SecretName string `json:"secretName"`
	// SecretKey is the key of the secret that failed to sync.
	SecretKey string `json:"secretKey"`
	// Time is the time the error occurred.
	Time metav1.Time `json:"time"`
}

func (*SyncError) DeepCopy

func (in *SyncError) DeepCopy() *SyncError

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

func (*SyncError) DeepCopyInto

func (in *SyncError) DeepCopyInto(out *SyncError)

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

func (SyncError) Error

func (s SyncError) Error() string

type SyncStatus

type SyncStatus string
const (
	SyncStatusSuccess SyncStatus = "Success"
	SyncStatusError   SyncStatus = "Error"
	SyncStatusUnknown SyncStatus = "Unknown"
)

Jump to

Keyboard shortcuts

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