Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the mailhog v1alpha1 API group +kubebuilder:object:generate=true +groupName=mailhog.operators.patrick.mx
Index ¶
- Constants
- Variables
- type BackingResource
- type MailhogFilesSpec
- type MailhogInstance
- type MailhogInstanceList
- type MailhogInstanceSettingsSpec
- type MailhogInstanceSpec
- type MailhogInstanceStatus
- type MailhogJimSpec
- type MailhogStorageMaildirSpec
- type MailhogStorageMongoDbSpec
- type MailhogUpstreamSpec
- type MailhogWebUserSpec
- type OperatorConfig
- type StorageSetting
- type TrafficInletResource
Constants ¶
const (
MemoryStorage StorageSetting = "memory"
MaildirStorage StorageSetting = "maildir"
MongoDBStorage StorageSetting = "mongodb"
DeploymentBacking BackingResource = "deployment"
DeploymentConfigBacking BackingResource = "deploymentConfig"
RouteTrafficInlet TrafficInletResource = "route"
NoTrafficInlet TrafficInletResource = "none"
)
Variables ¶
var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "mailhog.operators.patrick.mx", 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 ¶
This section is empty.
Types ¶
type BackingResource ¶ added in v0.1.1
type BackingResource string
type MailhogFilesSpec ¶ added in v0.1.2
type MailhogFilesSpec struct {
// SmtpUpstreams Intercepted emails can be forwarded to upstreams via the UI
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
SmtpUpstreams []MailhogUpstreamSpec `json:"smtpUpstreams,omitempty"`
// WebUsers If WebUsers are defined, UI/API Access will be protected with basic auth
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
WebUsers []MailhogWebUserSpec `json:"webUsers,omitempty"`
}
func (*MailhogFilesSpec) DeepCopy ¶ added in v0.1.2
func (in *MailhogFilesSpec) DeepCopy() *MailhogFilesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MailhogFilesSpec.
func (*MailhogFilesSpec) DeepCopyInto ¶ added in v0.1.2
func (in *MailhogFilesSpec) DeepCopyInto(out *MailhogFilesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MailhogInstance ¶
type MailhogInstance struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MailhogInstanceSpec `json:"spec,omitempty"`
// Status last observed status
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
Status MailhogInstanceStatus `json:"status,omitempty"`
}
MailhogInstance is the Schema for the mailhoginstances API
+kubebuilder:object:root=true +kubebuilder:printcolumn:name="Image",type=string,JSONPath=`.spec.image` +kubebuilder:printcolumn:name="Replicas",type=integer,JSONPath=`.spec.replicas` +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:subresource:status +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.podCount,selectorpath=.status.labelSelector
func (*MailhogInstance) DeepCopy ¶
func (in *MailhogInstance) DeepCopy() *MailhogInstance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MailhogInstance.
func (*MailhogInstance) DeepCopyInto ¶
func (in *MailhogInstance) DeepCopyInto(out *MailhogInstance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MailhogInstance) DeepCopyObject ¶
func (in *MailhogInstance) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MailhogInstanceList ¶
type MailhogInstanceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MailhogInstance `json:"items"`
}
MailhogInstanceList contains a list of MailhogInstance
func (*MailhogInstanceList) DeepCopy ¶
func (in *MailhogInstanceList) DeepCopy() *MailhogInstanceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MailhogInstanceList.
func (*MailhogInstanceList) DeepCopyInto ¶
func (in *MailhogInstanceList) DeepCopyInto(out *MailhogInstanceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MailhogInstanceList) DeepCopyObject ¶
func (in *MailhogInstanceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MailhogInstanceSettingsSpec ¶
type MailhogInstanceSettingsSpec struct {
// Hostname is the hostname for smtp ehlo/helo
//
//+kubebuilder:validation:Optional
//+kubebuilder:validation:Format=hostname
//+optional
//+nullable
Hostname string `json:"hostname,omitempty"`
// CorsOrigin if set, this value is added into the Access-Control-Allow-Origin header returned by the API
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
CorsOrigin string `json:"corsOrigin,omitempty"`
// Storage which storage backend to use, eg memory
//
//+kubebuilder:validation:Enum=memory;maildir;mongodb
//+kubebuilder:validation:Optional
//+kubebuilder:default:="memory"
Storage StorageSetting `json:"storage,omitempty"`
// StorageMongoDb are only used when storage is set to mongodb
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
StorageMongoDb MailhogStorageMongoDbSpec `json:"storageMongoDb,omitempty"`
// StorageMaildir is only used when storage is set to maildir
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
StorageMaildir MailhogStorageMaildirSpec `json:"storageMaildir,omitempty"`
// Files that configure more in-depth settings that require an additional configmap
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
Files *MailhogFilesSpec `json:"files,omitempty"`
// Resources allows to override the default resources of the created pods
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
// Affinity allows to override the podtemplates affinity settings
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
Affinity *corev1.Affinity `json:"affinity,omitempty"`
// Jim is the chaos monkey
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
Jim MailhogJimSpec `json:"jim,omitempty"`
}
MailhogInstanceSettingsSpec are settings related to the mailhog instance
func (*MailhogInstanceSettingsSpec) DeepCopy ¶
func (in *MailhogInstanceSettingsSpec) DeepCopy() *MailhogInstanceSettingsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MailhogInstanceSettingsSpec.
func (*MailhogInstanceSettingsSpec) DeepCopyInto ¶
func (in *MailhogInstanceSettingsSpec) DeepCopyInto(out *MailhogInstanceSettingsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MailhogInstanceSpec ¶
type MailhogInstanceSpec struct {
// Image is the mailhog image to be used
//
//+kubebuilder:validation:Required
//+kubebuilder:validation:MinLength=4
//+kubebuilder:default:="mailhog/mailhog:latest"
Image string `json:"image,omitempty"`
// Replicas is the count of pods to create
//
//+kubebuilder:validation:Minimum=0
//+kubebuilder:validation:Maximum=10
//+kubebuilder:validation:Required
//+kubebuilder:default:=1
Replicas int32 `json:"replicas,omitempty"`
// Settings are mailhog configuration options, see https://github.com/mailhog/MailHog/blob/master/docs/CONFIG.md
//
//+kubebuilder:validation:Optional
//+kubebuilder:default:={storage:"memory"}
Settings MailhogInstanceSettingsSpec `json:"settings,omitempty"`
// WebTrafficInlet defines how the webinterface is exposed
//
//+kubebuilder:validation:Required
//+kubebuilder:default:="none"
//+kubebuilder:validation:Enum=none;route
WebTrafficInlet TrafficInletResource `json:"webTrafficInlet,omitempty"`
// BackingResource controls if a deploymentConfig or deployment is used
//
//+kubebuilder:validation:Required
//+kubebuilder:default:="deployment"
//+kubebuilder:validation:Enum=deployment;deploymentConfig
BackingResource BackingResource `json:"backingResource,omitempty"`
}
MailhogInstanceSpec defines the desired state of MailhogInstance
func (*MailhogInstanceSpec) DeepCopy ¶
func (in *MailhogInstanceSpec) DeepCopy() *MailhogInstanceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MailhogInstanceSpec.
func (*MailhogInstanceSpec) DeepCopyInto ¶
func (in *MailhogInstanceSpec) DeepCopyInto(out *MailhogInstanceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MailhogInstanceStatus ¶
type MailhogInstanceStatus struct {
// Pods all the podnames owned by the cr
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
Pods []string `json:"pods,omitempty"`
// PodCount is the amount of last seen pods belonging to this cr
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
PodCount int `json:"podCount,omitempty"`
// LabelSelector is the labelselector which can be used by HPA
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
LabelSelector string `json:"labelSelector,omitempty"`
}
MailhogInstanceStatus defines the observed state of MailhogInstance
func (*MailhogInstanceStatus) DeepCopy ¶
func (in *MailhogInstanceStatus) DeepCopy() *MailhogInstanceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MailhogInstanceStatus.
func (*MailhogInstanceStatus) DeepCopyInto ¶
func (in *MailhogInstanceStatus) DeepCopyInto(out *MailhogInstanceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MailhogJimSpec ¶ added in v0.1.2
type MailhogJimSpec struct {
// Invite set to true activates jim using the default values (see mh doc)
//
//+kubebuilder:validation:Optional
//+kubebuilder:default:=false
//+optional
//+nullable
Invite bool `json:"invite,omitempty"`
// Disconnect Chance of randomly disconnecting a session (float, eg "0.005")
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
Disconnect string `json:"disconnect,omitempty"`
// Accept Chance of accepting an incoming connection (float, eg "0.99")
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
Accept string `json:"accept,omitempty"`
// LinkspeedAffect Chance of applying a rate limit (float, eg "0.1")
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
LinkspeedAffect string `json:"linkspeedAffect,omitempty"`
// LinkspeedMin Minimum link speed (in bytes per second, eg "1024")
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
LinkspeedMin string `json:"linkspeedMin,omitempty"`
// LinkspeedMax Maximum link speed (in bytes per second, eg "10240")
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
LinkspeedMax string `json:"linkspeedMax,omitempty"`
// RejectSender Chance of rejecting a MAIL FROM command (float, eg "0.05")
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
RejectSender string `json:"rejectSender,omitempty"`
// RejectRecipient Chance of rejecting a RCPT TO command (float, eg "0.05")
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
RejectRecipient string `json:"rejectRecipient,omitempty"`
// RejectAuth Chance of rejecting an AUTH command (float, eg "0.05")
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
RejectAuth string `json:"rejectAuth,omitempty"`
}
MailhogJimSpec invites jim into mailhog, the builtin chaos monkey see https://github.com/mailhog/MailHog/blob/master/docs/JIM.md
func (*MailhogJimSpec) DeepCopy ¶ added in v0.1.2
func (in *MailhogJimSpec) DeepCopy() *MailhogJimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MailhogJimSpec.
func (*MailhogJimSpec) DeepCopyInto ¶ added in v0.1.2
func (in *MailhogJimSpec) DeepCopyInto(out *MailhogJimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MailhogStorageMaildirSpec ¶
type MailhogStorageMaildirSpec struct {
// Path Maildir path (for maildir storage backend)
//
//+kubebuilder:validation:Optional
//+kubebuilder:validation:MinLength:=3
//+kubebuilder:validation:Pattern:=`^(/)([\S]+(/)?)+$`
//+optional
//+nullable
Path string `json:"path,omitempty"`
}
MailhogStorageMaildirSpec are settings applicable if the storage backend is maildir
func (*MailhogStorageMaildirSpec) DeepCopy ¶
func (in *MailhogStorageMaildirSpec) DeepCopy() *MailhogStorageMaildirSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MailhogStorageMaildirSpec.
func (*MailhogStorageMaildirSpec) DeepCopyInto ¶
func (in *MailhogStorageMaildirSpec) DeepCopyInto(out *MailhogStorageMaildirSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MailhogStorageMongoDbSpec ¶
type MailhogStorageMongoDbSpec struct {
// URI MongoDB host and port
//
//+kubebuilder:validation:Optional
//+kubebuilder:validation:MinLength:=3
//+kubebuilder:validation:Pattern:=`^(mongodb:(?:\/{2})?)((\w+?):(\w+?)@|:?@?)(\w+?):(\d+).*$`
//+kubebuilder:validation:Format=uri
//+optional
//+nullable
URI string `json:"uri,omitempty"`
// Db MongoDB database name for message storage
//
//+kubebuilder:validation:Optional
//+kubebuilder:validation:MinLength:=2
//+kubebuilder:validation:Pattern:=`^[\w-_]+$`
//+optional
//+nullable
Db string `json:"db,omitempty"`
// Collection MongoDB collection name for message storage
//
//+kubebuilder:validation:Optional
//+kubebuilder:validation:MinLength:=2
//+kubebuilder:validation:Pattern:=`^[\w-_]+$`
//+optional
//+nullable
Collection string `json:"collection,omitempty"`
}
MailhogStorageMongoDbSpec are settings applicable if the storage backend is mongodb
func (*MailhogStorageMongoDbSpec) DeepCopy ¶
func (in *MailhogStorageMongoDbSpec) DeepCopy() *MailhogStorageMongoDbSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MailhogStorageMongoDbSpec.
func (*MailhogStorageMongoDbSpec) DeepCopyInto ¶
func (in *MailhogStorageMongoDbSpec) DeepCopyInto(out *MailhogStorageMongoDbSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MailhogUpstreamSpec ¶ added in v0.1.2
type MailhogUpstreamSpec struct {
// Name the Name this server will be shown under in the UI
//
//+kubebuilder:validation:Required
//+kubebuilder:validation:MinLength=2
Name string `json:"name,omitempty"`
// Save is an option provided for compat reasons with mailhogs struct, just set it to true
//
//+kubebuilder:validation:Required
//+kubebuilder:default:=true
Save bool `json:"save,omitempty"`
// Email the target Email address where the mail will be resent to
//
//+kubebuilder:validation:Required
//+kubebuilder:validation:MinLength=4
Email string `json:"email,omitempty"`
// Host SMTP target Host hostname
//
//+kubebuilder:validation:Required
//+kubebuilder:validation:MinLength=2
Host string `json:"host,omitempty"`
// Port SMTP target Port
//
//+kubebuilder:validation:Required
//+kubebuilder:validation:MinLength=2
Port string `json:"port,omitempty"`
// Username the Username used for SMTP authentication
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
Username string `json:"username,omitempty"`
// Password the Password used for SMTP authentication
//
//+kubebuilder:validation:Optional
//+optional
//+nullable
Password string `json:"password,omitempty"`
// Mechanism the SMTP login Mechanism used. This is _required_ when providing upstream user / password credentials
//
//+kubebuilder:validation:Optional
//+kubebuilder:validation:MinLength=4
//+kubebuilder:validation:Enum=PLAIN;CRAMMD5
//+optional
//+nullable
Mechanism string `json:"mechanism,omitempty"`
}
func (*MailhogUpstreamSpec) DeepCopy ¶ added in v0.1.2
func (in *MailhogUpstreamSpec) DeepCopy() *MailhogUpstreamSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MailhogUpstreamSpec.
func (*MailhogUpstreamSpec) DeepCopyInto ¶ added in v0.1.2
func (in *MailhogUpstreamSpec) DeepCopyInto(out *MailhogUpstreamSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MailhogWebUserSpec ¶ added in v0.1.2
type MailhogWebUserSpec struct {
// Name is the username
//
//+kubebuilder:validation:Required
//+kubebuilder:validation:MinLength=2
Name string `json:"name,omitempty"`
// PasswordHash is the bcrypt hash of the user's password
//
//+kubebuilder:validation:Required
//+kubebuilder:validation:MinLength=3
PasswordHash string `json:"passwordHash,omitempty"`
}
func (*MailhogWebUserSpec) DeepCopy ¶ added in v0.1.2
func (in *MailhogWebUserSpec) DeepCopy() *MailhogWebUserSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MailhogWebUserSpec.
func (*MailhogWebUserSpec) DeepCopyInto ¶ added in v0.1.2
func (in *MailhogWebUserSpec) DeepCopyInto(out *MailhogWebUserSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperatorConfig ¶
type OperatorConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// ControllerManagerConfigurationSpec returns the configurations for controllers
cfg.ControllerManagerConfigurationSpec `json:",inline"`
}
OperatorConfig is the Schema for the projectconfigs API
func (*OperatorConfig) DeepCopy ¶
func (in *OperatorConfig) DeepCopy() *OperatorConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorConfig.
func (*OperatorConfig) DeepCopyInto ¶
func (in *OperatorConfig) DeepCopyInto(out *OperatorConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OperatorConfig) DeepCopyObject ¶
func (in *OperatorConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StorageSetting ¶ added in v0.1.1
type StorageSetting string
type TrafficInletResource ¶ added in v0.1.1
type TrafficInletResource string