v1alpha3

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: 11 Imported by: 0

Documentation

Overview

Package v1alpha3 contains API Schema definitions for the passbolt v1alpha3 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: "v1alpha3"}

	// 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 (
	ErrInvalidSecretType              = errors.New("invalid secret type")
	ErrPassboltSecretNameIsRequired   = errors.New("passboltSecretName is required for secret type")
	ErrSecretsAreNotAllowed           = errors.New("secrets are not allowed")
	ErrFieldAndValueAreNotAllowed     = errors.New("field and value are not allowed")
	ErrFieldOrValueIsRequired         = errors.New("field or value is required")
	ErrSecretsAreRequired             = errors.New("secrets are required")
	ErrPassboltSecretNameIsNotAllowed = errors.New("passboltSecretName is not allowed")
)

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) 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) Default

func (r *PassboltSecret) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*PassboltSecret) Hub

func (*PassboltSecret) Hub()

Hub marks this type as a conversion hub.

func (*PassboltSecret) SetupWebhookWithManager

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

func (*PassboltSecret) ValidateCreate

func (r *PassboltSecret) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*PassboltSecret) ValidateDelete

func (r *PassboltSecret) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*PassboltSecret) ValidateUpdate

func (r *PassboltSecret) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

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 PassboltSecretRef

type PassboltSecretRef struct {
	// Name of the secret in passbolt
	// +kubebuilder:validation:Required
	ID string `json:"id"`
	// 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 (*PassboltSecretRef) DeepCopy

func (in *PassboltSecretRef) DeepCopy() *PassboltSecretRef

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

func (*PassboltSecretRef) DeepCopyInto

func (in *PassboltSecretRef) DeepCopyInto(out *PassboltSecretRef)

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

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"`
	// 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"`
	// PassboltSecretID is the ID of the passbolt secret to be used as a docker config secret.
	// +kubebuilder:validation:Optional
	PassboltSecretID *string `json:"passboltSecretID,omitempty"`

	// PassboltSecrets is a map of string (key in K8s secret) and struct that contains the reference to the secret in passbolt.
	// +kubebuilder:validation:Optional
	PassboltSecrets map[string]PassboltSecretRef `json:"passboltSecrets,omitempty"`

	// PlainTextFields is a map of string (key in K8s secret) and string (value in K8s secret).
	// +kubebuilder:validation:Optional
	PlainTextFields map[string]string `json:"plainTextFields,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 SyncError

type SyncError struct {
	// Message is the error message.
	Message string `json:"message"`
	// PassboltSecretID is the name of the secret that failed to sync.
	PassboltSecretID string `json:"passboltSecretID"`
	// 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