v1alpha1

package
v0.0.0-...-a749e22 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the mail v1alpha1 API group +kubebuilder:object:generate=true +groupName=mail.linka.cloud

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "mail.linka.cloud", 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 AutoConfig

type AutoConfig struct {
	// Enabled is the flag to enable the autoconfig deployment
	// +optional
	// +kubebuilder:default=true
	Enabled *bool `json:"enabled,omitempty"`
	// Deployment is the autoconfig deployment configuration
	// +optional
	Deployment AutoConfigDeployment `json:"deployment,omitempty"`
	// Ingress is the optional ingress configuration
	// +optional
	Ingress IngressConfig `json:"ingress,omitempty"`
}

func (*AutoConfig) DeepCopy

func (in *AutoConfig) DeepCopy() *AutoConfig

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

func (*AutoConfig) DeepCopyInto

func (in *AutoConfig) DeepCopyInto(out *AutoConfig)

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

type AutoConfigDeployment

type AutoConfigDeployment struct {
	DeploymentConfig `json:",inline"`
	// Image is the github.com/linka-cloud/go-autoconfig image to use
	// +kubebuilder:validation:Required
	// +kubebuilder:default="docker.io/linkacloud/autoconfig:latest"
	Image string `json:"image,omitempty"`
}

func (*AutoConfigDeployment) DeepCopy

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

func (*AutoConfigDeployment) DeepCopyInto

func (in *AutoConfigDeployment) DeepCopyInto(out *AutoConfigDeployment)

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

type DeploymentConfig

type DeploymentConfig struct {
	// ServiceAccountName is the name of the service account to use for the deployment
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// Annotations is the optional annotations to add to the deployment
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// Labels is the optional labels to add to the deployment
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
	// Affinity is the optional affinity configuration for the deployment
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
	// Strategy is the deployment strategy to use to replace existing pods with new ones.
	// +optional
	Strategy appsv1.DeploymentStrategy `json:"strategy,omitempty"`
	// SecurityContext is the optional security context for the deployment
	// +optional
	SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
	// TopologySpreadConstraints is the optional topology spread constraints configuration for the deployment
	// +optional
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
	// Tolerations are the optional toleration configurations for the deployment
	// +optional
	Tolerations []corev1.Toleration `json:"toleration,omitempty"`
	// NodeSelector is the optional node selector configuration for the deployment
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// Resources is the optional resource configuration for the deployment
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// Env is extra environment variables to pass to the mail server container
	// It can be used to override the default configuration
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
	// VolumeMounts is the optional extra volume mounts configuration for the deployment
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
	// Volumes is the optional extra volumes configuration for the deployment
	Volumes []corev1.Volume `json:"volumes,omitempty"`
}

func (*DeploymentConfig) DeepCopy

func (in *DeploymentConfig) DeepCopy() *DeploymentConfig

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

func (*DeploymentConfig) DeepCopyInto

func (in *DeploymentConfig) DeepCopyInto(out *DeploymentConfig)

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

type Features

type Features struct {
	// POP3 enables the POP3 protocol
	// +optional
	// +kubebuilder:default=false
	POP3 *bool `json:"pop3,omitempty"`
	// SpoofProtection enables the Spoof Protection feature
	// +optional
	// +kubebuilder:default=true
	SpoofProtection *bool `json:"spoofProtection,omitempty"`
	// Clamav enables clamav
	// +optional
	// +kubebuilder:default=false
	Clamav *bool `json:"clamav,omitempty"`
	// Amavis enables amaivs
	// +optional
	// +kubebuilder:default=true
	Amavis *bool `json:"amavis,omitempty"`
	// Fail2Ban enables fail2ban
	// +optional
	// +kubebuilder:default=true
	Fail2ban *bool `json:"fail2ban,omitempty"`
	// ManageSieve enables managesieve
	// +optional
	// +kubebuilder:default=true
	ManageSieve *bool `json:"manageSieve,omitempty"`
	// Quota enables quota
	// +optional
	// +kubebuilder:default=true
	Quotas *bool `json:"quotas,omitempty"`
	// Spamassassin enables spamassassin
	// +optional
	// +kubebuilder:default=true
	Spamassassin *bool `json:"spamassassin,omitempty"`
	// SpamassassinKam enables spamassassin kam
	// +optional
	// +kubebuilder:default=false
	SpamassassinKam *bool `json:"spamassassinKam,omitempty"`
	// Postgrey enables postgrey
	// +optional
	// +kubebuilder:default=false
	Postgrey *bool `json:"postgrey,omitempty"`
	// LDAP is the optional LDAP configuration
	// It expects an Active Directory like server
	// LDAP is not supported yet
	// +optional
	LDAP LDAPConfig `json:"ldap,omitempty"`
}

func (*Features) DeepCopy

func (in *Features) DeepCopy() *Features

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

func (*Features) DeepCopyInto

func (in *Features) DeepCopyInto(out *Features)

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

type IPv4

type IPv4 string

IPv4 is used for validation of an IPv6 address. +kubebuilder:validation:Pattern="^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$"

type IngressConfig

type IngressConfig struct {
	// Annotations is the optional annotations to add to the ingress
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
}

func (*IngressConfig) DeepCopy

func (in *IngressConfig) DeepCopy() *IngressConfig

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

func (*IngressConfig) DeepCopyInto

func (in *IngressConfig) DeepCopyInto(out *IngressConfig)

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

type LDAPConfig

type LDAPConfig struct {
	// Enabled enables the LDAP configuration
	// +optional
	Enabled bool `json:"enabled,omitempty"`
	// Host is the LDAP server host without ldap:// or ldaps://
	// Only TLS and StartTLS are supported
	// +kubebuilder:validation:Required
	Host string `json:"host,omitempty"`
	// Port is the LDAP server port
	// +kubebuilder:validation:Required
	Port int `json:"port,omitempty"`
	// StartTLS makes the connection should use StartTLS
	StartTLS bool `json:"startTLS,omitempty"`
	// Nameserver is the DNS server to use for the LDAP connection
	// +optional
	Nameserver *IPv4 `json:"nameserver,omitempty"`

	// BindSecret is the name of the secret containing the bind DN and password
	// It expects the following keys:
	// - bindDN: the DN of the LDAP lookup account
	// - bindPW: the password of the LDAP lookup account
	// +kubebuilder:validation:Required
	BindSecret string `json:"bindSecret,omitempty"`

	// SearchBase is the LDAP base where to search for users
	// +kubebuilder:validation:Required
	SearchBase string `json:"searchBase,omitempty"`
	// SearchFilter is the LDAP filter to use to search for users
	// +kubebuilder:validation:Required
	UserFilter string `json:"userFilter,omitempty"`
}

func (*LDAPConfig) DeepCopy

func (in *LDAPConfig) DeepCopy() *LDAPConfig

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

func (*LDAPConfig) DeepCopyInto

func (in *LDAPConfig) DeepCopyInto(out *LDAPConfig)

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

type MailServer

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

	Spec   MailServerSpec   `json:"spec,omitempty"`
	Status MailServerStatus `json:"status,omitempty"`
}

MailServer is the Schema for the mailservers API

func (*MailServer) DeepCopy

func (in *MailServer) DeepCopy() *MailServer

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

func (*MailServer) DeepCopyInto

func (in *MailServer) DeepCopyInto(out *MailServer)

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

func (*MailServer) DeepCopyObject

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

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

type MailServerList

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

MailServerList contains a list of MailServer

func (*MailServerList) DeepCopy

func (in *MailServerList) DeepCopy() *MailServerList

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

func (*MailServerList) DeepCopyInto

func (in *MailServerList) DeepCopyInto(out *MailServerList)

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

func (*MailServerList) DeepCopyObject

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

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

type MailServerSpec

type MailServerSpec struct {
	// Domain is the mail server domain name
	// +kubebuilder:validation:Required
	Domain string `json:"domain,omitempty"`
	// TODO(adphi): add DisableDNS option
	// DNSTTL is the TTL for the all the mail server's dns records
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=60
	DNSTTL uint32 `json:"dnsTTL,omitempty"`
	// SPF is the optional SPF configuration
	// If empty, the SPF record will be set to "v=spf1 mx ip4:$PUBLIC_IP -all"
	// $PUBLIC_IP will be replaced by the public IP of the mail server using `curl ifconfig.me`
	// +optional
	SPF string `json:"spf,omitempty"`
	// DMARC is the optional DMARC configuration
	// +optional
	// +kubebuilder:default="v=DMARC1; p=reject; rua=mailto:postmaster@{{ .Domain }}; ruf=mailto:postmaster@{{ .Domain }}; fo=0; adkim=r; aspf=r; pct=100; rf=afrf; ri=86400; sp=quarantine"
	DMARC string `json:"dmarc,omitempty"`
	// Image is the docker-mailserver image to use
	// +kubebuilder:validation:Required
	// +kubebuilder:default="docker.io/mailserver/docker-mailserver:9.1.0"
	Image            string `json:"image,omitempty"`
	DeploymentConfig `json:",inline"`

	// AutoConfig is the autoconfig deployment configuration
	// +optional
	AutoConfig AutoConfig `json:"autoconfig,omitempty"`
	// LoadBalancerClass is the optional load balancer class to use ofr the service
	// +optional
	LoadBalancerClass *string `json:"loadBalancerClass,omitempty"`
	// LoadBalancerIP is the optional IP address to request for the load balancer
	// +optional
	LoadBalancerIP *IPv4 `json:"loadBalancerIP,omitempty"`
	// OverrideIP is the optional IP address to use for the domain A record
	// +optional
	OverrideIP *IPv4 `json:"overrideIP,omitempty"`
	// Replicas is the number of replicas of the mail server
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:default=1
	Replicas *int32 `json:"replicas,omitempty"`
	// IssuerRef is the reference to the Cert Manager issuer to use for the certificate
	// +kubebuilder:validation:Required
	IssuerRef cmmeta.ObjectReference `json:"issuerRef"`

	// Features is the list of features to enable
	// By default all features are enabled
	// +optional
	Features Features `json:"features,omitempty"`

	// TODO(adphi): add custom config mounts support for the MailServer Deployment
	// Volume is the optional volume configuration
	// +optional
	Volume VolumeConfig `json:"volume,omitempty"`

	// Traefik is the optional Traefik configuration
	// +optional
	Traefik *TraefikConfig `json:"traefik,omitempty"`
}

MailServerSpec defines the desired state of MailServer

func (*MailServerSpec) DeepCopy

func (in *MailServerSpec) DeepCopy() *MailServerSpec

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

func (*MailServerSpec) DeepCopyInto

func (in *MailServerSpec) DeepCopyInto(out *MailServerSpec)

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

type MailServerStatus

type MailServerStatus struct {
	Domain         string `json:"domain,omitempty"`
	Replicas       int32  `json:"replicas,omitempty"`
	Selector       string `json:"selector"`
	VolumeSize     string `json:"volumeSize,omitempty"`
	LoadBalancerIP string `json:"loadBalancerIP,omitempty"`
	Traefik        *bool  `json:"traefik"`
	AutoConfig     *bool  `json:"autoconfig"`
}

MailServerStatus defines the observed state of MailServer

func (*MailServerStatus) DeepCopy

func (in *MailServerStatus) DeepCopy() *MailServerStatus

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

func (*MailServerStatus) DeepCopyInto

func (in *MailServerStatus) DeepCopyInto(out *MailServerStatus)

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

type TraefikConfig

type TraefikConfig struct {
	// CRDs enables the Traefik IngressRoute and Middleware Custom Resource Definitions usage
	// +optional
	CRDs bool `json:"crds,omitempty"`
	// EntryPoints is the list of entry points to use for the Traefik IngressRoute
	Entrypoints TraefikEntrypoints `json:"entrypoints,omitempty"`
}

func (*TraefikConfig) DeepCopy

func (in *TraefikConfig) DeepCopy() *TraefikConfig

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

func (*TraefikConfig) DeepCopyInto

func (in *TraefikConfig) DeepCopyInto(out *TraefikConfig)

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

type TraefikEntrypoints

type TraefikEntrypoints struct {
	// HTTP is the optional HTTP entrypoint configuration
	// +optional
	// +kubebuilder:default="web"
	HTTP string `json:"http,omitempty"`
	// HTTPS is the optional HTTPS entrypoint configuration
	// +optional
	// +kubebuilder:default="websecure"
	HTTPS string `json:"https,omitempty"`
}

func (*TraefikEntrypoints) DeepCopy

func (in *TraefikEntrypoints) DeepCopy() *TraefikEntrypoints

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

func (*TraefikEntrypoints) DeepCopyInto

func (in *TraefikEntrypoints) DeepCopyInto(out *TraefikEntrypoints)

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

type VolumeConfig

type VolumeConfig struct {
	// StorageClass is the name of the storage class to use
	// +optional
	// +kubebuilder:default=""
	StorageClass string `json:"storageClass,omitempty"`
	// Size is the size of the volume, defaults to 1Gi
	// +optional
	// +kubebuilder:default="1Gi"
	Size string `json:"size,omitempty"`
	// AccessModes is the access modes to use, defaults to ReadWriteMany
	// +optional
	// +kubebuilder:default="ReadWriteMany"
	AccessMode corev1.PersistentVolumeAccessMode `json:"accessMode,omitempty"`
}

func (*VolumeConfig) DeepCopy

func (in *VolumeConfig) DeepCopy() *VolumeConfig

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

func (*VolumeConfig) DeepCopyInto

func (in *VolumeConfig) DeepCopyInto(out *VolumeConfig)

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