v1alpha1

package
v0.0.0-...-42edd1d Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=secrets.meln5674.github.com

Index

Constants

View Source
const (
	DerivedFromNameLabel      = "secrets-operator.meln5674.github.com/derived-from.name"
	DerivedFromNamespaceLabel = "secrets-operator.meln5674.github.com/derived-from.namespace"
	DerivedFromGroupLabel     = "secrets-operator.meln5674.github.com/derived-from.group"
	DerivedFromKindLabel      = "secrets-operator.meln5674.github.com/derived-from.kind"
	DerivedFromVersionLabel   = "secrets-operator.meln5674.github.com/derived-from.version"
	DefaultIsMap              = false
)
View Source
const (
	DefaultTargetOverwrite = true
)

Variables

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

	// 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

func DerivedFromLabelValues

func DerivedFromLabelValues(obj client.Object) map[string]string

Types

type BinaryTarget

type BinaryTarget struct {
	TargetBase `json:",inline"`
	// Literal is a literal string to set. If this is in a Secret.data or ConfigMap.binaryData, this is expected to be base64-encoded
	// +optional
	Literal []byte `json:"literal,omitempty"`
}

Target specifies a target field in a Secret.stringData or ConfigMap.data

func (*BinaryTarget) DeepCopy

func (in *BinaryTarget) DeepCopy() *BinaryTarget

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

func (*BinaryTarget) DeepCopyInto

func (in *BinaryTarget) DeepCopyInto(out *BinaryTarget)

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

type DerivedSecret

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

	Spec   DerivedSecretSpec   `json:"spec,omitempty"`
	Status DerivedSecretStatus `json:"status,omitempty"`
}

DerivedSecret is the Schema for the derivedsecrets API

func (*DerivedSecret) DeepCopy

func (in *DerivedSecret) DeepCopy() *DerivedSecret

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

func (*DerivedSecret) DeepCopyInto

func (in *DerivedSecret) DeepCopyInto(out *DerivedSecret)

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

func (*DerivedSecret) DeepCopyObject

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

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

type DerivedSecretList

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

DerivedSecretList contains a list of DerivedSecret

func (*DerivedSecretList) DeepCopy

func (in *DerivedSecretList) DeepCopy() *DerivedSecretList

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

func (*DerivedSecretList) DeepCopyInto

func (in *DerivedSecretList) DeepCopyInto(out *DerivedSecretList)

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

func (*DerivedSecretList) DeepCopyObject

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

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

type DerivedSecretSpec

type DerivedSecretSpec struct {
	// References is a list of ConfigMaps or Secrets that can be referenced in the data or stringData templates
	References []SensitiveReference `json:"references"`
	// ServiceAccountName is the name of a ServiceAccount in the same Namespace as the DerivedSecret that will be used to create the derived Secret
	// Required if targetNamespace is set, and not the same as the current namespace
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// TargetType is the "type" field of the derived Secret. Same default as a Secret
	// +optional
	TargetType corev1.SecretType `json:"targetType"`
	// TargetName is the name of the Secret to create. Defaults to the same as the DerivedSecret
	// +optional
	TargetName string `json:"targetName,omitempty"`
	// TargetNamespace is the name of the Secret to create. Defaults to the same as the DerivedSecret
	// +optional
	TargetNamespace string `json:"targetNamespace,omitempty"`

	// Data is a map of keys to values that should produce base64-encoded binary data (e.g. with b64enc) to include in the Secret's data
	// +optional
	// Data FieldSet `json:"data,omitempty"` // controller-tools doesn't work
	Data map[string]BinaryTarget `json:"data,omitempty"`
	// StringData is a set of map of keys to templates that should produce string data to include in the Secret's stringData
	// +optional
	// StringData FieldSet `json:"stringData,omitempty"` // controller-tools doesn't work
	StringData map[string]StringTarget `json:"stringData,omitempty"`
	// Prefab is a set of common options to use instead of data/stringData
	// +optional
	Prefab *Prefabs `json:"prefab,omityempty"`
}

DerivedSecretSpec defines the desired state of DerivedSecret

func (*DerivedSecretSpec) DeepCopy

func (in *DerivedSecretSpec) DeepCopy() *DerivedSecretSpec

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

func (*DerivedSecretSpec) DeepCopyInto

func (in *DerivedSecretSpec) DeepCopyInto(out *DerivedSecretSpec)

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

type DerivedSecretStatus

type DerivedSecretStatus struct {
	// SecretName is the name of the secret that was generated, if any
	// +optional
	SecretName string `json:"secretName,omitempty"`
	// SecretNamespace is the namespace of the secret that was generated, if any
	// +optional
	SecretNamespace string `json:"secretNamespace,omitempty"`
	// Error is the error message from the last sync attempt, if any
	// +optional
	Error string `json:"error,omitempty"`
	// LastSync is the time when the secret was last generated
	// +optional
	LastSync *metav1.Time `json:"lastSync,omitempty"`
	// LastSyncAttempt is the time when the secret was last attmpted to be generated
	// +optional
	LastSyncAttempt *metav1.Time `json:"lastSyncAttempt,omitempty"`
}

DerivedSecretStatus defines the observed state of DerivedSecret

func (*DerivedSecretStatus) DeepCopy

func (in *DerivedSecretStatus) DeepCopy() *DerivedSecretStatus

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

func (*DerivedSecretStatus) DeepCopyInto

func (in *DerivedSecretStatus) DeepCopyInto(out *DerivedSecretStatus)

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

type Prefabs

type Prefabs struct {
	// CopyAll indicates that all keys from all references should be copied verbatim, and produce an error if any keys overlap
	// +optional
	CopyAll *bool `json:"copyAll,omitempty"`
	// CopyIncluding indicates that just the specified keys in the specified references should be copied verbatim, and produce an error if any keys overlap
	// +optional
	CopyIncluding []ReferenceSubset `json:"copyIncluding,omitempty"`
	// CopyExcluding indicates that all but the specified keys in the specified references should be copied verbatim, and produce an error if any keys overlap
	// +optional
	CopyExcluding []ReferenceSubset `json:"copyExcluding,omitempty"`
}

Prefabs specifies common use cases to use instead of manually defining data/stringData/binaryData

func (*Prefabs) DeepCopy

func (in *Prefabs) DeepCopy() *Prefabs

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

func (*Prefabs) DeepCopyInto

func (in *Prefabs) DeepCopyInto(out *Prefabs)

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

type Reference

type Reference struct {
	// Name is the name to reference this ConfigMap in a template
	// Name ReferenceName `json:"name"` // controller-tools doesn't work
	Name string `json:"name"`
	// ConfigMapRef specifies the ConfigMap to use
	ConfigMapRef corev1.ConfigMapEnvSource `json:"configMapRef"`
}

Reference binds a ConfigMap to a name that can be referenced in a template

func (*Reference) AsSensitiveReference

func (r *Reference) AsSensitiveReference() SensitiveReference

AsSensitiveReference converts a non-sensitive (ConfigMap) Reference to one that could possibly contain a Secret instead

func (*Reference) DeepCopy

func (in *Reference) DeepCopy() *Reference

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

func (*Reference) DeepCopyInto

func (in *Reference) DeepCopyInto(out *Reference)

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

type ReferenceSubset

type ReferenceSubset struct {
	// Name is the name of the Reference in question
	// Name ReferenceName `json:"name"` // controller-tools doesn't work
	Name string `json:"name"`
	// Keys is the list of keys in question
	// +optional
	// Keys []ReferenceKey `json:"keys,omitempty"` // controller-tools doesn't work
	Keys []string `json:"keys,omitempty"`
	// AllKeys indicates all keys in the Reference should be considered
	// +optional
	AllKeys *bool `json:"allKeys,omityempty"`
}

ReferenceSubset refers to a subset of keys in a Reference

func (*ReferenceSubset) DeepCopy

func (in *ReferenceSubset) DeepCopy() *ReferenceSubset

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

func (*ReferenceSubset) DeepCopyInto

func (in *ReferenceSubset) DeepCopyInto(out *ReferenceSubset)

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

type SensitiveReference

type SensitiveReference struct {
	// Name is the name to reference this ConfigMap/Secret
	// Name ReferenceName `json:"name"` // controller-tools doesn't work
	Name string `json:"name"`
	// ConfigMapRef specifies a ConfigMap to use
	// +optional
	ConfigMapRef *corev1.ConfigMapEnvSource `json:"configMapRef,omitEmpty"`
	// SecretRef specifies a Secret to use
	// +optional
	SecretRef *corev1.SecretEnvSource `json:"secretRef,omityEmpty"`
}

SensitiveReference binds a Secret or ConfigMap to a name that can be referenced in a template

func (*SensitiveReference) DeepCopy

func (in *SensitiveReference) DeepCopy() *SensitiveReference

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

func (*SensitiveReference) DeepCopyInto

func (in *SensitiveReference) DeepCopyInto(out *SensitiveReference)

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

type StringTarget

type StringTarget struct {
	TargetBase `json:",inline"`
	// Literal is a literal string to set. If this is in a Secret.data or ConfigMap.binaryData, this is expected to be base64-encoded
	// +optional
	Literal *string `json:"literal,omitempty"`
}

Target specifies a target field in a Secret.stringData or ConfigMap.data

func (*StringTarget) DeepCopy

func (in *StringTarget) DeepCopy() *StringTarget

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

func (*StringTarget) DeepCopyInto

func (in *StringTarget) DeepCopyInto(out *StringTarget)

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

type TargetBase

type TargetBase struct {
	// Template is a golang text/template template to evaluate using References. If this is in a Secret.data or ConfigMap.binaryData, this is expected to produce base64-encoded data
	// +optional
	Template *string `json:"template,omitempty"`
	// Overwrite indicates that the operator should overwrite any value with the same same when updating the derived Secret or ConfigMap, if false, it will be left alone
	// +optional
	Overwrite *bool `json:"overwrite"`
	// IsMap indicates that a target's template output is not a single field, but instead, should be parsed as a YAML map and the merged into the final map.
	IsMap *bool `json:"isMap,omitempty"`
}

func (*TargetBase) DeepCopy

func (in *TargetBase) DeepCopy() *TargetBase

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

func (*TargetBase) DeepCopyInto

func (in *TargetBase) DeepCopyInto(out *TargetBase)

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