v1beta1

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package v1beta1 contains API Schema definitions for the mattermost v1beta1 API group +kubebuilder:object:generate=true +groupName=installation.mattermost.com

Index

Constants

View Source
const (
	// OperatorName is the name of the Mattermost operator
	OperatorName = "mattermost-operator"
	// DefaultMattermostImage is the default Mattermost docker image
	DefaultMattermostImage = "mattermost/mattermost-enterprise-edition"
	// DefaultMattermostVersion is the default Mattermost docker tag
	DefaultMattermostVersion = "9.2.3"
	// DefaultMattermostSize is the default number of users
	DefaultMattermostSize = "5000users"
	// DefaultMattermostDatabaseType is the default Mattermost database
	DefaultMattermostDatabaseType = "mysql"
	// DefaultFilestoreStorageSize is the default Storage size for Minio or Local Storage
	DefaultFilestoreStorageSize = "50Gi"
	// DefaultStorageSize is the default Storage size for the Database
	DefaultStorageSize = "50Gi"
	// DefaultPullPolicy is the default Pull Policy used by Mattermost app container
	DefaultPullPolicy = corev1.PullIfNotPresent
	// DefaultLocalFilePath is the default file path used with local (PVC) storage
	DefaultLocalFilePath = "/mattermost/data"
	// DefaultDatabaseVersion
	DefaultDatabaseVersion = "8.0"

	// ClusterLabel is the label applied across all components
	ClusterLabel = "installation.mattermost.com/installation"

	// ClusterResourceLabel is the label applied to a given Mattermost
	// as well as all other resources created to support it.
	ClusterResourceLabel = "installation.mattermost.com/resource"

	// MattermostAppContainerName is the name of the container which runs the
	// Mattermost application
	MattermostAppContainerName = "mattermost"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "installation.mattermost.com", Version: "v1beta1"}

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

	// Generated clients need a `GroupVersion` with name `SchemeGroupVersion`
	SchemeGroupVersion = GroupVersion
)

Functions

func GetMattermostAppContainer added in v1.12.0

func GetMattermostAppContainer(containers []corev1.Container) *corev1.Container

GetMattermostAppContainer gets container from PodSpec which runs Mattermost application from a deployment.

func GetMattermostAppContainerFromDeployment added in v1.12.0

func GetMattermostAppContainerFromDeployment(deployment *appsv1.Deployment) *corev1.Container

GetMattermostAppContainerFromDeployment gets container from Deployment which runs Mattermost application from a deployment.

func GetOpenAPIDefinitions added in v1.12.0

func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition

func MattermostResourceLabels added in v1.12.0

func MattermostResourceLabels(name string) map[string]string

MattermostResourceLabels returns the labels for selecting a given Mattermost as well as any external dependency resources that were created for the installation.

func MattermostSelectorLabels added in v1.12.0

func MattermostSelectorLabels(name string) map[string]string

MattermostSelectorLabels returns the selector labels for selecting the resources belonging to the given mattermost instance.

func MySQLLabels added in v1.12.0

func MySQLLabels() map[string]string

MySQLLabels returns the labels for selecting the resources belonging to the given mysql cluster.

func Resource added in v1.12.0

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource Function is not generated but required by generated clients

Types

type AWSLoadBalancerController added in v1.20.0

type AWSLoadBalancerController struct {
	// An AWS ALB Ingress will be created instead of nginx
	// +optional
	Enabled bool `json:"enabled,omitempty"`

	// Certificate arn for the ALB, required if SSL enabled
	// +optional
	CertificateARN string `json:"certificateARN,omitempty"`

	// Whether the Ingress will be internetfacing, default is false
	// +optional
	InternetFacing bool `json:"internetFacing,omitempty"`

	// Hosts allows specifying additional domain names for Mattermost to use.
	// +optional
	Hosts []IngressHost `json:"hosts,omitempty"`

	// IngressClassName for your ingress
	// +optional
	IngressClassName string `json:"ingressClassName,omitempty"`

	// Annotations defines annotations passed to the Ingress associated with Mattermost.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
}

func (*AWSLoadBalancerController) DeepCopy added in v1.20.0

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

func (*AWSLoadBalancerController) DeepCopyInto added in v1.20.0

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

type Database

type Database struct {
	// Defines the configuration of and external database.
	// +optional
	External *ExternalDatabase `json:"external,omitempty"`
	// Defines the configuration of database managed by Kubernetes operator.
	// +optional
	OperatorManaged *OperatorManagedDatabase `json:"operatorManaged,omitempty"`

	// DisableReadinessCheck instructs Operator to not add init container responsible for checking DB access.
	// Can be used to define custom init containers specified in `spec.PodExtensions.InitContainers`.
	// +optional
	DisableReadinessCheck bool `json:"disableReadinessCheck,omitempty"`
}

Database defines the database configuration for Mattermost.

func (*Database) DeepCopy

func (in *Database) DeepCopy() *Database

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

func (*Database) DeepCopyInto

func (in *Database) DeepCopyInto(out *Database)

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

func (*Database) IsExternal added in v1.12.0

func (db *Database) IsExternal() bool

IsExternal returns true if the Database is set to external.

func (*Database) OverrideReplicasAndResourcesFromSize added in v1.12.0

func (db *Database) OverrideReplicasAndResourcesFromSize(size mattermostv1alpha1.ClusterInstallationSize)

func (*Database) SetDefaultReplicasAndResources added in v1.12.0

func (db *Database) SetDefaultReplicasAndResources()

func (*Database) SetDefaults added in v1.12.0

func (db *Database) SetDefaults()

SetDefaults sets the missing values in Database to the default ones.

type DeploymentTemplate added in v1.20.0

type DeploymentTemplate struct {
	// Defines the revision history limit for the mattermost deployment.
	// +optional
	RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
}

DeploymentTemplate defines configuration for the template for Mattermost deployment.

func (*DeploymentTemplate) DeepCopy added in v1.20.0

func (in *DeploymentTemplate) DeepCopy() *DeploymentTemplate

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

func (*DeploymentTemplate) DeepCopyInto added in v1.20.0

func (in *DeploymentTemplate) DeepCopyInto(out *DeploymentTemplate)

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

type ElasticSearch

type ElasticSearch struct {
	Host string `json:"host,omitempty"`
	// +optional
	UserName string `json:"username,omitempty"`
	// +optional
	Password string `json:"password,omitempty"`
}

ElasticSearch defines the ElasticSearch configuration for Mattermost.

func (*ElasticSearch) DeepCopy

func (in *ElasticSearch) DeepCopy() *ElasticSearch

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

func (*ElasticSearch) DeepCopyInto

func (in *ElasticSearch) DeepCopyInto(out *ElasticSearch)

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

type ExternalDatabase added in v1.12.0

type ExternalDatabase struct {
	// Secret contains data necessary to connect to the external database.
	// The Kubernetes Secret should contain:
	//   - Key: DB_CONNECTION_STRING | Value: Full database connection string.
	// It can also contain optional fields, such as:
	//   - Key: MM_SQLSETTINGS_DATASOURCEREPLICAS | Value: Connection string to read replicas of the database.
	//   - Key: DB_CONNECTION_CHECK_URL | Value: The URL used for checking that the database is accessible.
	//     Omitting this value in the secret will cause Operator to skip adding init container for database check.
	Secret string `json:"secret,omitempty"`
}

ExternalDatabase defines the configuration of the external database that should be used by Mattermost.

func (*ExternalDatabase) DeepCopy added in v1.12.0

func (in *ExternalDatabase) DeepCopy() *ExternalDatabase

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

func (*ExternalDatabase) DeepCopyInto added in v1.12.0

func (in *ExternalDatabase) DeepCopyInto(out *ExternalDatabase)

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

type ExternalFileStore added in v1.12.0

type ExternalFileStore struct {
	// Set to use an external MinIO deployment or S3.
	URL string `json:"url,omitempty"`
	// Set to the bucket name of your external MinIO or S3.
	Bucket string `json:"bucket,omitempty"`
	// Optionally enter the name of already existing secret.
	// Secret should have two values: "accesskey" and "secretkey".
	Secret string `json:"secret,omitempty"`

	// Optionally use service account with IAM role to access AWS services, like S3.
	UseServiceAccount bool `json:"useServiceAccount,omitempty"`
}

ExternalFileStore defines the configuration of the external file store that should be used by Mattermost.

func (*ExternalFileStore) DeepCopy added in v1.12.0

func (in *ExternalFileStore) DeepCopy() *ExternalFileStore

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

func (*ExternalFileStore) DeepCopyInto added in v1.12.0

func (in *ExternalFileStore) DeepCopyInto(out *ExternalFileStore)

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

type ExternalVolumeFileStore added in v1.20.0

type ExternalVolumeFileStore struct {
	// The name of the matching volume claim for the externally managed volume.
	VolumeClaimName string `json:"volumeClaimName,omitempty"`
}

ExternalVolumeFileStore defines the configuration of an externally managed volume file store.

func (*ExternalVolumeFileStore) DeepCopy added in v1.20.0

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

func (*ExternalVolumeFileStore) DeepCopyInto added in v1.20.0

func (in *ExternalVolumeFileStore) DeepCopyInto(out *ExternalVolumeFileStore)

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

type FileStore added in v1.12.0

type FileStore struct {
	// Defines the configuration of an external file store.
	// +optional
	External *ExternalFileStore `json:"external,omitempty"`
	// Defines the configuration of externally managed PVC backed storage.
	// +optional
	ExternalVolume *ExternalVolumeFileStore `json:"externalVolume,omitempty"`
	// Defines the configuration of file store managed by Kubernetes operator.
	// +optional
	OperatorManaged *OperatorManagedMinio `json:"operatorManaged,omitempty"`
	// Defines the configuration of PVC backed storage (local). This is NOT recommended for production environments.
	// +optional
	Local *LocalFileStore `json:"local,omitempty"`
}

FileStore defines the file store configuration for Mattermost.

func (*FileStore) DeepCopy added in v1.12.0

func (in *FileStore) DeepCopy() *FileStore

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

func (*FileStore) DeepCopyInto added in v1.12.0

func (in *FileStore) DeepCopyInto(out *FileStore)

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

func (*FileStore) IsExternal added in v1.12.0

func (fs *FileStore) IsExternal() bool

IsExternal returns true if the MinIO/S3 instance is external.

func (*FileStore) IsExternalVolume added in v1.20.0

func (fs *FileStore) IsExternalVolume() bool

IsExternalVolume returns true if the filestore requested is an externally managed volume.

func (*FileStore) IsLocal added in v1.20.0

func (fs *FileStore) IsLocal() bool

IsLocal returns true if the filestore requested is local (PVC backed).

func (*FileStore) OverrideReplicasAndResourcesFromSize added in v1.12.0

func (fs *FileStore) OverrideReplicasAndResourcesFromSize(size mattermostv1alpha1.ClusterInstallationSize)

func (*FileStore) SetDefaultReplicasAndResources added in v1.12.0

func (fs *FileStore) SetDefaultReplicasAndResources()

func (*FileStore) SetDefaults added in v1.12.0

func (fs *FileStore) SetDefaults()

SetDefaults sets the missing values in FileStore to the default ones.

type Ingress added in v1.16.0

type Ingress struct {
	// Enabled determines whether the Operator should create Ingress resource or not.
	// Disabling ingress on existing installation will cause Operator to remove it.
	Enabled bool `json:"enabled"`
	// Host defines the Ingress host to be used when creating the ingress rules.
	// +optional
	Host string `json:"host,omitempty"`

	// Hosts allows specifying additional domain names for Mattermost to use.
	// +optional
	Hosts []IngressHost `json:"hosts,omitempty"`

	// Annotations defines annotations passed to the Ingress associated with Mattermost.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// TLSSecret specifies secret used for configuring TLS for Ingress.
	// If empty TLS will not be configured.
	// +optional
	TLSSecret string `json:"tlsSecret,omitempty"`
	// IngressClass will be set on Ingress resource to associate it with specified IngressClass resource.
	// +optional
	IngressClass *string `json:"ingressClass,omitempty"`
}

Ingress defines configuration for Ingress resource created by the Operator.

func (*Ingress) DeepCopy added in v1.16.0

func (in *Ingress) DeepCopy() *Ingress

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

func (*Ingress) DeepCopyInto added in v1.16.0

func (in *Ingress) DeepCopyInto(out *Ingress)

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

type IngressHost added in v1.18.0

type IngressHost struct {
	HostName string `json:"hostName,omitempty"`
}

IngressHost specifies additional hosts configuration.

func (*IngressHost) DeepCopy added in v1.18.0

func (in *IngressHost) DeepCopy() *IngressHost

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

func (*IngressHost) DeepCopyInto added in v1.18.0

func (in *IngressHost) DeepCopyInto(out *IngressHost)

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

type LocalFileStore added in v1.20.0

type LocalFileStore struct {
	// Set to use local (PVC) storage, require explicit enabled to prevent accidental misconfiguration.
	Enabled bool `json:"enabled"`
	// Defines the storage size for the PVC. (default 50Gi)
	// +optional
	// +kubebuilder:validation:Pattern=^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
	StorageSize string `json:"storageSize,omitempty"`
}

LocalFileStore defines the configuration of the local file store that should be used by Mattermost (PVC configuration).

func (*LocalFileStore) DeepCopy added in v1.20.0

func (in *LocalFileStore) DeepCopy() *LocalFileStore

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

func (*LocalFileStore) DeepCopyInto added in v1.20.0

func (in *LocalFileStore) DeepCopyInto(out *LocalFileStore)

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

type Mattermost

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

	Spec   MattermostSpec   `json:"spec,omitempty"`
	Status MattermostStatus `json:"status,omitempty"`
}

Mattermost is the Schema for the mattermosts API +k8s:openapi-gen=true +kubebuilder:object:root=true +kubebuilder:resource:shortName="mm" +kubebuilder:subresource:status +kubebuilder:printcolumn:priority=0,name="State",type=string,JSONPath=".status.state",description="State of Mattermost" +kubebuilder:printcolumn:priority=0,name="Image",type=string,JSONPath=".status.image",description="Image of Mattermost" +kubebuilder:printcolumn:priority=0,name="Version",type=string,JSONPath=".status.version",description="Version of Mattermost" +kubebuilder:printcolumn:priority=0,name="Endpoint",type=string,JSONPath=".status.endpoint",description="Endpoint"

func (*Mattermost) AWSLoadBalancerEnabled added in v1.20.0

func (mm *Mattermost) AWSLoadBalancerEnabled() bool

func (*Mattermost) DeepCopy

func (in *Mattermost) DeepCopy() *Mattermost

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

func (*Mattermost) DeepCopyInto

func (in *Mattermost) DeepCopyInto(out *Mattermost)

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

func (*Mattermost) DeepCopyObject

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

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

func (*Mattermost) GetAWSLoadBalancerHostNames added in v1.20.0

func (mm *Mattermost) GetAWSLoadBalancerHostNames() []string

func (*Mattermost) GetAWSLoadBalancerIngressAnnotations added in v1.20.0

func (mm *Mattermost) GetAWSLoadBalancerIngressAnnotations() map[string]string

GetIngresAnnotations returns Mattermost Ingress annotations.

func (*Mattermost) GetImageName added in v1.12.0

func (mm *Mattermost) GetImageName() string

GetImageName returns the container image name that matches the spec of the ClusterInstallation.

func (*Mattermost) GetIngresAnnotations added in v1.16.0

func (mm *Mattermost) GetIngresAnnotations() map[string]string

GetIngresAnnotations returns Mattermost Ingress annotations.

func (*Mattermost) GetIngressClass added in v1.16.0

func (mm *Mattermost) GetIngressClass() *string

GetIngressClass returns IngressClass for Mattermost Ingress.

func (*Mattermost) GetIngressHost added in v1.16.0

func (mm *Mattermost) GetIngressHost() string

GetIngressHost returns Mattermost primary Ingress host.

func (*Mattermost) GetIngressHostNames added in v1.18.0

func (mm *Mattermost) GetIngressHostNames() []string

GetIngressHostNames returns all Ingress host names configured for Mattermost. It skips duplicated entries.

func (*Mattermost) GetIngressTLSSecret added in v1.16.0

func (mm *Mattermost) GetIngressTLSSecret() string

GetIngressTLSSecret returns Mattermost Ingress TLS secret.

func (*Mattermost) GetProductionDeploymentName added in v1.12.0

func (mm *Mattermost) GetProductionDeploymentName() string

GetProductionDeploymentName returns the name of the deployment that is currently designated as production.

func (*Mattermost) IngressEnabled added in v1.16.0

func (mm *Mattermost) IngressEnabled() bool

IngressEnabled determines whether Mattermost Ingress should be created.

func (*Mattermost) MattermostLabels added in v1.12.0

func (mm *Mattermost) MattermostLabels(name string) map[string]string

MattermostLabels returns the labels for selecting the resources belonging to the given mattermost.

func (*Mattermost) MattermostPodLabels added in v1.19.0

func (mm *Mattermost) MattermostPodLabels(name string) map[string]string

MattermostPodLabels returns the labels for selecting the pods belonging to the given mattermost.

func (*Mattermost) SetDefaults added in v1.12.0

func (mm *Mattermost) SetDefaults() error

SetDefaults sets the missing values in the manifest to the default ones

func (*Mattermost) SetReplicasAndResourcesFromSize added in v1.12.0

func (mm *Mattermost) SetReplicasAndResourcesFromSize() error

SetReplicasAndResourcesFromSize will use the Size field to determine the number of replicas and resource requests to set for a ClusterInstallation. If the Size field is not set, values for default size will be used. Setting Size to new value will override current values for Replicas and Resources. The Size field is erased after adjusting the values.

type MattermostList

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

MattermostList contains a list of Mattermost

func (*MattermostList) DeepCopy

func (in *MattermostList) DeepCopy() *MattermostList

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

func (*MattermostList) DeepCopyInto

func (in *MattermostList) DeepCopyInto(out *MattermostList)

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

func (*MattermostList) DeepCopyObject

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

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

type MattermostSpec

type MattermostSpec struct {
	// Size defines the size of the Mattermost. This is typically specified in
	// number of users. This will override replica and resource requests/limits
	// appropriately for the provided number of users. This is a write-only
	// field - its value is erased after setting appropriate values of resources.
	// Accepted values are: 100users, 1000users, 5000users, 10000users,
	// and 250000users. If replicas and resource requests/limits are not
	// specified, and Size is not provided the configuration for 5000users will
	// be applied. Setting 'Replicas', 'Scheduling.Resources', 'FileStore.Replicas',
	// 'FileStore.Resource', 'Database.Replicas', or 'Database.Resources' will
	// override the values set by Size. Setting new Size will override previous
	// values regardless if set by Size or manually.
	// +optional
	Size string `json:"size,omitempty"`

	// Image defines the Mattermost Docker image.
	Image string `json:"image,omitempty"`
	// Version defines the Mattermost Docker image version.
	Version string `json:"version,omitempty"`
	// Replicas defines the number of replicas to use for the Mattermost app
	// servers.
	Replicas *int32 `json:"replicas,omitempty"`
	// Optional environment variables to set in the Mattermost application pods.
	// +optional
	MattermostEnv []v1.EnvVar `json:"mattermostEnv,omitempty"`
	// LicenseSecret is the name of the secret containing a Mattermost license.
	// +optional
	LicenseSecret string `json:"licenseSecret,omitempty"`
	// IngressName defines the host to be used when creating the ingress rules.
	// Deprecated: Use Spec.Ingress.Host instead.
	// +optional
	IngressName string `json:"ingressName"`
	// IngressAnnotations defines annotations passed to the Ingress associated with Mattermost.
	// Deprecated: Use Spec.Ingress.Annotations.
	// +optional
	IngressAnnotations map[string]string `json:"ingressAnnotations,omitempty"`
	// UseIngressTLS specifies whether TLS secret should be configured for Ingress.
	// Deprecated: Use Spec.Ingress.TLSSecret.
	// +optional
	UseIngressTLS bool `json:"useIngressTLS,omitempty"`
	// +optional
	UseServiceLoadBalancer bool `json:"useServiceLoadBalancer,omitempty"`
	// +optional
	ServiceAnnotations map[string]string `json:"serviceAnnotations,omitempty"`
	// +optional
	ResourceLabels map[string]string `json:"resourceLabels,omitempty"`

	// Ingress defines configuration for Ingress resource created by the Operator.
	// +optional
	Ingress *Ingress `json:"ingress,omitempty"`

	// +optional
	AWSLoadBalancerController *AWSLoadBalancerController `json:"awsLoadBalancerController,omitempty"`
	// Volumes allows for mounting volumes from various sources into the
	// Mattermost application pods.
	// +optional
	Volumes []v1.Volume `json:"volumes,omitempty"`
	// Defines additional volumeMounts to add to Mattermost application pods.
	// +optional
	VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`
	// Specify Mattermost deployment pull policy.
	// +optional
	ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// Specify Mattermost image pull secrets.
	// +optional
	ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

	// Custom DNS configuration to use for the Mattermost Installation pods.
	// +optional
	DNSConfig *v1.PodDNSConfig `json:"dnsConfig,omitempty"`
	// Custom DNS policy to use for the Mattermost Installation pods.
	// +optional
	DNSPolicy v1.DNSPolicy `json:"dnsPolicy,omitempty"`

	// External Services
	Database      Database      `json:"database,omitempty"`
	FileStore     FileStore     `json:"fileStore,omitempty"`
	ElasticSearch ElasticSearch `json:"elasticSearch,omitempty"`

	// Scheduling defines the configuration related to scheduling of the Mattermost pods
	// as well as resource constraints. These settings generally don't need to be changed.
	// +optional
	Scheduling Scheduling `json:"scheduling,omitempty"`
	// Probes defines configuration of liveness and readiness probe for Mattermost pods.
	// These settings generally don't need to be changed.
	// +optional
	Probes Probes `json:"probes,omitempty"`

	// PodTemplate defines configuration for the template for Mattermost pods.
	// +optional
	PodTemplate *PodTemplate `json:"podTemplate,omitempty"`

	// DeploymentTemplate defines configuration for the template for Mattermost deployment.
	// +optional
	DeploymentTemplate *DeploymentTemplate `json:"deploymentTemplate,omitempty"`

	// UpdateJob defines configuration for the template for the update job.
	// +optional
	UpdateJob *UpdateJob `json:"updateJob,omitempty"`

	// PodExtensions specify custom extensions for Mattermost pods.
	// This can be used for custom readiness checks etc.
	// These settings generally don't need to be changed.
	// +optional
	PodExtensions PodExtensions `json:"podExtensions,omitempty"`

	// ResourcePatch specifies JSON patches that can be applied to resources created by Mattermost Operator.
	//
	// WARNING: ResourcePatch is highly experimental and subject to change.
	// Some patches may be impossible to perform or may impact the stability of Mattermost server.
	//
	// Use at your own risk when no other options are available.
	ResourcePatch *ResourcePatch `json:"resourcePatch,omitempty"`
}

MattermostSpec defines the desired state of Mattermost +k8s:openapi-gen=true

func (*MattermostSpec) DeepCopy

func (in *MattermostSpec) DeepCopy() *MattermostSpec

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

func (*MattermostSpec) DeepCopyInto

func (in *MattermostSpec) DeepCopyInto(out *MattermostSpec)

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

type MattermostStatus

type MattermostStatus struct {
	// Represents the running state of the Mattermost instance
	// +optional
	State RunningState `json:"state,omitempty"`
	// The version currently running in the Mattermost instance
	// +optional
	Version string `json:"version,omitempty"`
	// The image running on the pods in the Mattermost instance
	// +optional
	Image string `json:"image,omitempty"`
	// The endpoint to access the Mattermost instance
	// +optional
	Endpoint string `json:"endpoint,omitempty"`
	// Total number of non-terminated pods targeted by this Mattermost deployment
	// +optional
	Replicas int32 `json:"replicas,omitempty"`
	// Total number of non-terminated pods targeted by this Mattermost deployment
	// that are running with the desired image.
	// +optional
	UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`
	// The last observed Generation of the Mattermost resource that was acted on.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// The last observed error in the deployment of this Mattermost instance
	// +optional
	Error string `json:"error,omitempty"`
	// Status of specified resource patches.
	ResourcePatch *ResourcePatchStatus `json:"resourcePatch,omitempty"`
}

MattermostStatus defines the observed state of Mattermost

func (*MattermostStatus) ClearDeploymentPatchStatus added in v1.17.0

func (s *MattermostStatus) ClearDeploymentPatchStatus()

func (*MattermostStatus) ClearServicePatchStatus added in v1.17.0

func (s *MattermostStatus) ClearServicePatchStatus()

func (*MattermostStatus) DeepCopy

func (in *MattermostStatus) DeepCopy() *MattermostStatus

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

func (*MattermostStatus) DeepCopyInto

func (in *MattermostStatus) DeepCopyInto(out *MattermostStatus)

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

func (*MattermostStatus) SetDeploymentPatchStatus added in v1.17.0

func (s *MattermostStatus) SetDeploymentPatchStatus(applied bool, err error)

SetDeploymentPatchStatus sets status of deployment patch.

func (*MattermostStatus) SetServicePatchStatus added in v1.17.0

func (s *MattermostStatus) SetServicePatchStatus(applied bool, err error)

SetServicePatchStatus sets status of service patch.

type OperatorManagedDatabase added in v1.12.0

type OperatorManagedDatabase struct {
	// Defines the type of database to use for an Operator-Managed database.
	Type string `json:"type,omitempty"`
	// Defines the storage size for the database. ie 50Gi
	// +optional
	// +kubebuilder:validation:Pattern=^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
	StorageSize string `json:"storageSize,omitempty"`
	// Defines the number of database replicas.
	// For redundancy use at least 2 replicas.
	// Setting this will override the number of replicas set by 'Size'.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
	// Defines the resource requests and limits for the database pods.
	// +optional
	Resources v1.ResourceRequirements `json:"resources,omitempty"`
	// Defines the AWS S3 bucket where the Database Backup is stored.
	// The operator will download the file to restore the data.
	// +optional
	InitBucketURL string `json:"initBucketURL,omitempty"`
	// Defines the interval for backups in cron expression format.
	// +optional
	BackupSchedule string `json:"backupSchedule,omitempty"`
	// Defines the object storage url for uploading backups.
	// +optional
	BackupURL string `json:"backupURL,omitempty"`
	// Defines the backup retention policy.
	// +optional
	BackupRemoteDeletePolicy string `json:"backupRemoteDeletePolicy,omitempty"`
	// Defines the secret to be used for uploading/restoring backup.
	// +optional
	BackupSecretName string `json:"backupSecretName,omitempty"`
	// Defines the secret to be used when performing a database restore.
	// +optional
	BackupRestoreSecretName string `json:"backupRestoreSecretName,omitempty"`
	// Defines the cluster version for the database to use
	// +optional
	Version string `json:"version,omitempty"`
}

OperatorManagedDatabase defines the configuration of a database managed by Kubernetes Operator.

func (*OperatorManagedDatabase) DeepCopy added in v1.12.0

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

func (*OperatorManagedDatabase) DeepCopyInto added in v1.12.0

func (in *OperatorManagedDatabase) DeepCopyInto(out *OperatorManagedDatabase)

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

func (*OperatorManagedDatabase) OverrideReplicasAndResourcesFromSize added in v1.12.0

func (omd *OperatorManagedDatabase) OverrideReplicasAndResourcesFromSize(size mattermostv1alpha1.ClusterInstallationSize)

func (*OperatorManagedDatabase) SetDefaultReplicasAndResources added in v1.12.0

func (omd *OperatorManagedDatabase) SetDefaultReplicasAndResources()

func (*OperatorManagedDatabase) SetDefaults added in v1.12.0

func (omd *OperatorManagedDatabase) SetDefaults()

SetDefaults sets the missing values in OperatorManagedDatabase to the default ones.

type OperatorManagedMinio added in v1.12.0

type OperatorManagedMinio struct {
	// Defines the storage size for Minio. ie 50Gi
	// +optional
	// +kubebuilder:validation:Pattern=^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
	StorageSize string `json:"storageSize,omitempty"`
	// Defines the number of Minio replicas.
	// Supply 1 to run Minio in standalone mode with no redundancy.
	// Supply 4 or more to run Minio in distributed mode.
	// Note that it is not possible to upgrade Minio from standalone to distributed mode.
	// Setting this will override the number of replicas set by 'Size'.
	// More info: https://docs.min.io/docs/distributed-minio-quickstart-guide.html
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
	// Defines the resource requests and limits for the Minio pods.
	// +optional
	Resources v1.ResourceRequirements `json:"resources,omitempty"`
}

OperatorManagedMinio defines the configuration of a Minio file store managed by Kubernetes Operator.

func (*OperatorManagedMinio) DeepCopy added in v1.12.0

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

func (*OperatorManagedMinio) DeepCopyInto added in v1.12.0

func (in *OperatorManagedMinio) DeepCopyInto(out *OperatorManagedMinio)

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

func (*OperatorManagedMinio) OverrideReplicasAndResourcesFromSize added in v1.12.0

func (omm *OperatorManagedMinio) OverrideReplicasAndResourcesFromSize(size mattermostv1alpha1.ClusterInstallationSize)

func (*OperatorManagedMinio) SetDefaultReplicasAndResources added in v1.12.0

func (omm *OperatorManagedMinio) SetDefaultReplicasAndResources()

func (*OperatorManagedMinio) SetDefaults added in v1.12.0

func (omm *OperatorManagedMinio) SetDefaults()

SetDefaults sets the missing values in OperatorManagedMinio to the default ones.

type Patch added in v1.17.0

type Patch struct {
	Disable bool   `json:"disable,omitempty"`
	Patch   string `json:"patch,omitempty"`
}

func (*Patch) DeepCopy added in v1.17.0

func (in *Patch) DeepCopy() *Patch

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

func (*Patch) DeepCopyInto added in v1.17.0

func (in *Patch) DeepCopyInto(out *Patch)

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

type PatchStatus added in v1.17.0

type PatchStatus struct {
	Applied bool   `json:"applied,omitempty"`
	Error   string `json:"error,omitempty"`
}

PatchStatus represents status of particular patch.

func (*PatchStatus) DeepCopy added in v1.17.0

func (in *PatchStatus) DeepCopy() *PatchStatus

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

func (*PatchStatus) DeepCopyInto added in v1.17.0

func (in *PatchStatus) DeepCopyInto(out *PatchStatus)

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

type PodExtensions added in v1.16.0

type PodExtensions struct {
	// Additional InitContainers injected into pods.
	// The setting does not override InitContainers defined by the Operator.
	InitContainers []v1.Container `json:"initContainers,omitempty"`

	// Additional sidecar containers injected into pods.
	// The setting does not override any sidecar containers defined by the Operator.
	// Note that sidecars are injected as standard pod containers alongside the
	// Mattermost application server. In the future, this may be migrated to
	// use the currently-feature-gated init container method introduced in k8s v1.28:
	// https://kubernetes.io/blog/2023/08/25/native-sidecar-containers/
	SidecarContainers []v1.Container `json:"sidecarContainers,omitempty"`

	// Additional Container Ports injected into pod's main container.
	// The setting does not override ContainerPorts defined by the Operator.
	ContainerPorts []v1.ContainerPort `json:"containerPorts,omitempty"`
}

PodExtensions specify customized extensions for a pod.

func (*PodExtensions) DeepCopy added in v1.16.0

func (in *PodExtensions) DeepCopy() *PodExtensions

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

func (*PodExtensions) DeepCopyInto added in v1.16.0

func (in *PodExtensions) DeepCopyInto(out *PodExtensions)

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

type PodTemplate added in v1.19.0

type PodTemplate struct {
	// Defines the security context for the Mattermost app server pods.
	// +optional
	SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"`
	// Defines the security context for the Mattermost app server container.
	// +optional
	ContainerSecurityContext *v1.SecurityContext `json:"containerSecurityContext,omitempty"`
	// Defines annotations to add to the Mattermost app server pods.
	// Overrides of default prometheus annotations are ignored.
	// +optional
	ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty"`
	// Defines labels to add to the Mattermost app server pods.
	// Overrides what is set in ResourceLabels, does not override default labels (app and cluster labels).
	// +optional
	ExtraLabels map[string]string `json:"extraLabels,omitempty"`
}

PodTemplate defines configuration for the template for Mattermost pods.

func (*PodTemplate) DeepCopy added in v1.19.0

func (in *PodTemplate) DeepCopy() *PodTemplate

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

func (*PodTemplate) DeepCopyInto added in v1.19.0

func (in *PodTemplate) DeepCopyInto(out *PodTemplate)

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

type Probes added in v1.12.0

type Probes struct {
	// Defines the probe to check if the application is up and running.
	// +optional
	LivenessProbe v1.Probe `json:"livenessProbe,omitempty"`
	// Defines the probe to check if the application is ready to accept traffic.
	// +optional
	ReadinessProbe v1.Probe `json:"readinessProbe,omitempty"`
}

Probes defines configuration of liveness and readiness probe for Mattermost pods.

func (*Probes) DeepCopy added in v1.12.0

func (in *Probes) DeepCopy() *Probes

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

func (*Probes) DeepCopyInto added in v1.12.0

func (in *Probes) DeepCopyInto(out *Probes)

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

type ResourcePatch added in v1.17.0

type ResourcePatch struct {
	Service    *Patch `json:"service,omitempty"`
	Deployment *Patch `json:"deployment,omitempty"`
}

ResourcePatch allows defined custom patches to resources.

func (*ResourcePatch) ApplyToDeployment added in v1.17.0

func (rp *ResourcePatch) ApplyToDeployment(deployment *appsv1.Deployment) (*appsv1.Deployment, bool, error)

ApplyToDeployment applies patch and returns resulting deployment.

func (*ResourcePatch) ApplyToService added in v1.17.0

func (rp *ResourcePatch) ApplyToService(service *v1.Service) (*v1.Service, bool, error)

ApplyToService applies patch and returns resulting service.

func (*ResourcePatch) DeepCopy added in v1.17.0

func (in *ResourcePatch) DeepCopy() *ResourcePatch

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

func (*ResourcePatch) DeepCopyInto added in v1.17.0

func (in *ResourcePatch) DeepCopyInto(out *ResourcePatch)

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

func (*ResourcePatch) IsEmpty added in v1.17.0

func (rp *ResourcePatch) IsEmpty() bool

type ResourcePatchStatus added in v1.17.0

type ResourcePatchStatus struct {
	ServicePatch    *PatchStatus `json:"servicePatch,omitempty"`
	DeploymentPatch *PatchStatus `json:"deploymentPatch,omitempty"`
}

ResourcePatchStatus defines status of ResourcePatch

func (*ResourcePatchStatus) DeepCopy added in v1.17.0

func (in *ResourcePatchStatus) DeepCopy() *ResourcePatchStatus

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

func (*ResourcePatchStatus) DeepCopyInto added in v1.17.0

func (in *ResourcePatchStatus) DeepCopyInto(out *ResourcePatchStatus)

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

type RunningState

type RunningState string

RunningState is the state of the Mattermost instance

const (
	// Reconciling is the state when the Mattermost instance is being updated
	Reconciling RunningState = "reconciling"
	// Ready is the state when the Mattermost instance is ready to start serving
	// traffic but not fully stable.
	Ready RunningState = "ready"
	// Stable is the state when the Mattermost instance is fully running
	Stable RunningState = "stable"
)

Running States: Two types of instance running states are implemented: reconciling and stable. If any changes are being made on the mattermost instance, the state will be set to reconciling. If the reconcile loop reaches the end without requeuing then the state will be set to stable.

type Scheduling added in v1.12.0

type Scheduling struct {
	// Defines the resource requests and limits for the Mattermost app server pods.
	// +optional
	Resources v1.ResourceRequirements `json:"resources,omitempty"`
	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// If specified, affinity will define the pod's scheduling constraints
	// +optional
	Affinity *v1.Affinity `json:"affinity,omitempty"`
	// Defines tolerations for the Mattermost app server pods
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
	// +optional
	Tolerations []v1.Toleration `json:"tolerations,omitempty"`
}

Scheduling defines the configuration related to scheduling of the Mattermost pods as well as resource constraints.

func (*Scheduling) DeepCopy added in v1.12.0

func (in *Scheduling) DeepCopy() *Scheduling

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

func (*Scheduling) DeepCopyInto added in v1.12.0

func (in *Scheduling) DeepCopyInto(out *Scheduling)

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

type UpdateJob added in v1.19.0

type UpdateJob struct {
	// Determines whether to disable the Operator's creation of the update job.
	// +optional
	Disabled bool `json:"disabled,omitempty"`
	// Defines annotations to add to the update job pod.
	// +optional
	ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty"`
	// Defines labels to add to the update job pod.
	// Overrides what is set in ResourceLabels, does not override default label (app label).
	// +optional
	ExtraLabels map[string]string `json:"extraLabels,omitempty"`
}

UpdateJob defines configuration for the template for the update job pod.

func (*UpdateJob) DeepCopy added in v1.19.0

func (in *UpdateJob) DeepCopy() *UpdateJob

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

func (*UpdateJob) DeepCopyInto added in v1.19.0

func (in *UpdateJob) DeepCopyInto(out *UpdateJob)

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