Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the mattermost v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=mattermost.com
Package v1alpha1 contains API Schema definitions for the mattermost.com v1alpha1 API group +kubebuilder:object:generate=true +groupName=mattermost.com
Index ¶
- Constants
- Variables
- func ClusterInstallationResourceLabels(name string) map[string]string
- func ClusterInstallationSelectorLabels(name string) map[string]string
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func MySQLLabels() map[string]string
- func Resource(resource string) schema.GroupResource
- type AppDeployment
- type BlueGreen
- type Canary
- type ClusterInstallation
- func (mattermost *ClusterInstallation) ClusterInstallationLabels(name string) map[string]string
- func (in *ClusterInstallation) DeepCopy() *ClusterInstallation
- func (in *ClusterInstallation) DeepCopyInto(out *ClusterInstallation)
- func (in *ClusterInstallation) DeepCopyObject() runtime.Object
- func (mattermost *ClusterInstallation) GetContainerByName(deployment *appsv1.Deployment, containerName string) *corev1.Container
- func (mattermost *ClusterInstallation) GetImageName() string
- func (mattermost *ClusterInstallation) GetMattermostAppContainer(deployment *appsv1.Deployment) *corev1.Container
- func (mattermost *ClusterInstallation) GetProductionDeploymentName() string
- func (mattermost *ClusterInstallation) SetDefaults() error
- func (mattermost *ClusterInstallation) SetReplicasAndResourcesFromSize() error
- type ClusterInstallationList
- type ClusterInstallationSize
- func (cis *ClusterInstallationSize) CalculateCPUMilliRequirement(includeDatabase, includeMinio bool) int64
- func (cis *ClusterInstallationSize) CalculateMemoryMilliRequirement(includeDatabase, includeMinio bool) int64
- func (cis *ClusterInstallationSize) CalculateResourceMilliRequirements(includeDatabase, includeMinio bool) (int64, int64)
- func (in *ClusterInstallationSize) DeepCopy() *ClusterInstallationSize
- func (in *ClusterInstallationSize) DeepCopyInto(out *ClusterInstallationSize)
- type ClusterInstallationSpec
- type ClusterInstallationStatus
- type ComponentSize
- type Database
- type ElasticSearch
- type MattermostRestoreDB
- type MattermostRestoreDBList
- type MattermostRestoreDBSpec
- type MattermostRestoreDBStatus
- type Minio
- type RestoreState
- type RunningState
Constants ¶
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 = "5.28.0" // DefaultMattermostSize is the default number of users DefaultMattermostSize = "5000users" // DefaultMattermostDatabaseType is the default Mattermost database DefaultMattermostDatabaseType = "mysql" // DefaultMinioStorageSize is the default Storage size for Minio DefaultMinioStorageSize = "50Gi" // DefaultStorageSize is the default Storage size for the Database DefaultStorageSize = "50Gi" // ClusterLabel is the label applied across all compoments ClusterLabel = "v1alpha1.mattermost.com/installation" // ClusterResourceLabel is the label applied to a given ClusterInstallation // as well as all other resources created to support it. ClusterResourceLabel = "v1alpha1.mattermost.com/resource" // BlueName is the name of the blue Mattermmost installation in a blue/green // deployment type. BlueName = "blue" // GreenName is the name of the green Mattermmost installation in a blue/green // deployment type. GreenName = "green" // MattermostAppContainerName is the name of the container which runs the // Mattermost application MattermostAppContainerName = "mattermost" )
const Size10000String = "10000users"
Size10000String represents estimated installation sizing for 10000 users.
const Size1000String = "1000users"
Size1000String represents estimated installation sizing for 1000 users.
const Size100String = "100users"
Size100String represents estimated installation sizing for 100 users.
const Size25000String = "25000users"
Size25000String represents estimated installation sizing for 25000 users.
const Size5000String = "5000users"
Size5000String represents estimated installation sizing for 5000 users.
const SizeMiniHAString = "miniHA"
SizeMiniHAString represents a very small dev installation with multiple replicas.
const SizeMiniSingletonString = "miniSingleton"
SizeMiniSingletonString represents a very small dev installation.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "mattermost.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 // Generated clients need a `GroupVersion` with name `SchemeGroupVersion` SchemeGroupVersion = GroupVersion )
Functions ¶
func ClusterInstallationResourceLabels ¶
ClusterInstallationResourceLabels returns the labels for selecting a given ClusterInstallation as well as any external dependency resources that were created for the installation.
func ClusterInstallationSelectorLabels ¶
ClusterInstallationSelectorLabels returns the selector labels for selecting the resources belonging to the given mattermost clusterinstallation.
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func MySQLLabels ¶
MySQLLabels returns the labels for selecting the resources belonging to the given mysql cluster.
func Resource ¶
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 AppDeployment ¶
type AppDeployment struct { // Name defines the name of the deployment // +optional Name string `json:"name,omitempty"` // IngressName defines the ingress name that will be used by the deployment. // This option is not used for Canary builds. // +optional IngressName string `json:"ingressName,omitempty"` // Image defines the base Docker image that will be used for the deployment. // Required when BlueGreen or Canary is enabled. // +optional Image string `json:"image,omitempty"` // Version defines the Docker image version that will be used for the deployment. // Required when BlueGreen or Canary is enabled. // +optional Version string `json:"version,omitempty"` // +optional ResourceLabels map[string]string `json:"resourceLabels,omitempty"` }
AppDeployment defines the configuration of deployment for a ClusterInstallation.
func (*AppDeployment) DeepCopy ¶
func (in *AppDeployment) DeepCopy() *AppDeployment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppDeployment.
func (*AppDeployment) DeepCopyInto ¶
func (in *AppDeployment) DeepCopyInto(out *AppDeployment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AppDeployment) GetDeploymentImageName ¶
func (d *AppDeployment) GetDeploymentImageName() string
GetDeploymentImageName returns the container image name that matches the spec of the deployment.
type BlueGreen ¶
type BlueGreen struct { // ProductionDeployment defines if the current production is blue or green. // +optional ProductionDeployment string `json:"productionDeployment,omitempty"` // Enable defines if BlueGreen deployment will be applied. // +optional Enable bool `json:"enable,omitempty"` // Blue defines the blue deployment. // +optional Blue AppDeployment `json:"blue,omitempty"` // Green defines the green deployment. // +optional Green AppDeployment `json:"green,omitempty"` }
BlueGreen defines the configuration of BlueGreen deployment for a ClusterInstallation
func (*BlueGreen) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlueGreen.
func (*BlueGreen) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BlueGreen) SetDefaults ¶
func (bg *BlueGreen) SetDefaults(mattermost *ClusterInstallation) error
SetDefaults sets the missing values in BlueGreen to the default ones
type Canary ¶
type Canary struct { // Enable defines if a canary build will be deployed. // +optional Enable bool `json:"enable,omitempty"` // Deployment defines the canary deployment. // +optional Deployment AppDeployment `json:"deployment,omitempty"` }
Canary defines the configuration of Canary deployment for a ClusterInstallation
func (*Canary) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Canary.
func (*Canary) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Canary) SetDefaults ¶
func (canary *Canary) SetDefaults(mattermost *ClusterInstallation) error
SetDefaults sets the missing values in Canary to the default ones
type ClusterInstallation ¶
type ClusterInstallation struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the desired behavior of the Mattermost cluster. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status Spec ClusterInstallationSpec `json:"spec"` // Most recent observed status of the Mattermost cluster. Read-only. Not // included when requesting from the apiserver, only from the Mattermost // Operator API itself. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status Status ClusterInstallationStatus `json:"status,omitempty"` }
ClusterInstallation is the Schema for the clusterinstallations API +k8s:openapi-gen=true +kubebuilder:object:root=true +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 (*ClusterInstallation) ClusterInstallationLabels ¶
func (mattermost *ClusterInstallation) ClusterInstallationLabels(name string) map[string]string
ClusterInstallationLabels returns the labels for selecting the resources belonging to the given mattermost clusterinstallation.
func (*ClusterInstallation) DeepCopy ¶
func (in *ClusterInstallation) DeepCopy() *ClusterInstallation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstallation.
func (*ClusterInstallation) DeepCopyInto ¶
func (in *ClusterInstallation) DeepCopyInto(out *ClusterInstallation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterInstallation) DeepCopyObject ¶
func (in *ClusterInstallation) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterInstallation) GetContainerByName ¶
func (mattermost *ClusterInstallation) GetContainerByName(deployment *appsv1.Deployment, containerName string) *corev1.Container
GetContainerByName gets container from a deployment by name
func (*ClusterInstallation) GetImageName ¶
func (mattermost *ClusterInstallation) GetImageName() string
GetImageName returns the container image name that matches the spec of the ClusterInstallation.
func (*ClusterInstallation) GetMattermostAppContainer ¶
func (mattermost *ClusterInstallation) GetMattermostAppContainer(deployment *appsv1.Deployment) *corev1.Container
GetMattermostAppContainer gets container which runs Mattermost application from a deployment.
func (*ClusterInstallation) GetProductionDeploymentName ¶
func (mattermost *ClusterInstallation) GetProductionDeploymentName() string
GetProductionDeploymentName returns the name of the deployment that is currently designated as production.
func (*ClusterInstallation) SetDefaults ¶
func (mattermost *ClusterInstallation) SetDefaults() error
SetDefaults set the missing values in the manifest to the default ones
func (*ClusterInstallation) SetReplicasAndResourcesFromSize ¶
func (mattermost *ClusterInstallation) 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 ClusterInstallationList ¶
type ClusterInstallationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterInstallation `json:"items"` }
ClusterInstallationList contains a list of ClusterInstallation +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ClusterInstallationList) DeepCopy ¶
func (in *ClusterInstallationList) DeepCopy() *ClusterInstallationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstallationList.
func (*ClusterInstallationList) DeepCopyInto ¶
func (in *ClusterInstallationList) DeepCopyInto(out *ClusterInstallationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterInstallationList) DeepCopyObject ¶
func (in *ClusterInstallationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterInstallationSize ¶
type ClusterInstallationSize struct { App ComponentSize Minio ComponentSize Database ComponentSize }
ClusterInstallationSize is sizing configuration used to convert user count to replica and resource requirements.
func GetClusterSize ¶
func GetClusterSize(key string) (ClusterInstallationSize, error)
GetClusterSize returns a ClusterInstallationSize based on the provided size key.
func (*ClusterInstallationSize) CalculateCPUMilliRequirement ¶
func (cis *ClusterInstallationSize) CalculateCPUMilliRequirement(includeDatabase, includeMinio bool) int64
CalculateCPUMilliRequirement returns the milli value for the CPU request of the cluster size.
func (*ClusterInstallationSize) CalculateMemoryMilliRequirement ¶
func (cis *ClusterInstallationSize) CalculateMemoryMilliRequirement(includeDatabase, includeMinio bool) int64
CalculateMemoryMilliRequirement returns the milli value for the memory request of the cluster size.
func (*ClusterInstallationSize) CalculateResourceMilliRequirements ¶
func (cis *ClusterInstallationSize) CalculateResourceMilliRequirements(includeDatabase, includeMinio bool) (int64, int64)
CalculateResourceMilliRequirements returns the milli values for the CPU and memory requests of the cluster size.
func (*ClusterInstallationSize) DeepCopy ¶
func (in *ClusterInstallationSize) DeepCopy() *ClusterInstallationSize
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstallationSize.
func (*ClusterInstallationSize) DeepCopyInto ¶
func (in *ClusterInstallationSize) DeepCopyInto(out *ClusterInstallationSize)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterInstallationSpec ¶
type ClusterInstallationSpec struct { // Image defines the ClusterInstallation Docker image. Image string `json:"image,omitempty"` // Version defines the ClusterInstallation Docker image version. Version string `json:"version,omitempty"` // Size defines the size of the ClusterInstallation. 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, 250000users. If replicas and resource // requests/limits are not specified, and Size is not provided the configuration for 5000users will be applied. // Setting 'Replicas', 'Resources', 'Minio.Replicas', 'Minio.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"` // Replicas defines the number of replicas to use for the Mattermost app servers. // 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 Mattermost app server pods. // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty"` // IngressName defines the name to be used when creating the ingress rules IngressName string `json:"ingressName"` // Secret that contains the mattermost license // +optional MattermostLicenseSecret string `json:"mattermostLicenseSecret,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 *corev1.Affinity `json:"affinity,omitempty"` Minio Minio `json:"minio,omitempty"` Database Database `json:"database,omitempty"` // +optional BlueGreen BlueGreen `json:"blueGreen,omitempty"` // +optional Canary Canary `json:"canary,omitempty"` // +optional ElasticSearch ElasticSearch `json:"elasticSearch,omitempty"` // +optional UseServiceLoadBalancer bool `json:"useServiceLoadBalancer,omitempty"` // +optional ServiceAnnotations map[string]string `json:"serviceAnnotations,omitempty"` // +optional UseIngressTLS bool `json:"useIngressTLS,omitempty"` // +optional ResourceLabels map[string]string `json:"resourceLabels,omitempty"` // +optional IngressAnnotations map[string]string `json:"ingressAnnotations,omitempty"` // Optional environment variables to set in the Mattermost application pods. // +optional MattermostEnv []corev1.EnvVar `json:"mattermostEnv,omitempty"` // Defines the probe to check if the application is up and running. // +optional LivenessProbe corev1.Probe `json:"livenessProbe,omitempty"` // Defines the probe to check if the application is ready to accept traffic. // +optional ReadinessProbe corev1.Probe `json:"readinessProbe,omitempty"` }
ClusterInstallationSpec defines the desired state of ClusterInstallation +k8s:openapi-gen=true
func (*ClusterInstallationSpec) DeepCopy ¶
func (in *ClusterInstallationSpec) DeepCopy() *ClusterInstallationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstallationSpec.
func (*ClusterInstallationSpec) DeepCopyInto ¶
func (in *ClusterInstallationSpec) DeepCopyInto(out *ClusterInstallationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterInstallationStatus ¶
type ClusterInstallationStatus 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 name of the blue deployment in BlueGreen // +optional BlueName string `json:"blueName,omitempty"` // The name of the green deployment in BlueGreen // +optional GreenName string `json:"greenName,omitempty"` }
ClusterInstallationStatus defines the observed state of ClusterInstallation
func (*ClusterInstallationStatus) DeepCopy ¶
func (in *ClusterInstallationStatus) DeepCopy() *ClusterInstallationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstallationStatus.
func (*ClusterInstallationStatus) DeepCopyInto ¶
func (in *ClusterInstallationStatus) DeepCopyInto(out *ClusterInstallationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentSize ¶
type ComponentSize struct { Replicas int32 Resources corev1.ResourceRequirements }
ComponentSize is sizing configuration for different components of a ClusterInstallation.
func (*ComponentSize) DeepCopy ¶
func (in *ComponentSize) DeepCopy() *ComponentSize
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSize.
func (*ComponentSize) DeepCopyInto ¶
func (in *ComponentSize) DeepCopyInto(out *ComponentSize)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Database ¶
type Database struct { // Defines the type of database to use for an Operator-Managed database. This // value is ignored when using a User-Managed database. Type string `json:"type,omitempty"` // Optionally enter the name of an already-existing Secret for connecting to // the database. This secret should be configured as follows: // // User-Managed Database // - Key: DB_CONNECTION_STRING | Value: <FULL_DATABASE_CONNECTION_STRING> // Operator-Managed Database // - Key: ROOT_PASSWORD | Value: <ROOT_DATABASE_PASSWORD> // - Key: USER | Value: <USER_NAME> // - Key: PASSWORD | Value: <USER_PASSWORD> // - Key: DATABASE Value: <DATABASE_NAME> // // Notes: // If you define all secret values for both User-Managed and // Operator-Managed database types, the User-Managed connection string will // take precedence and the Operator-Managed values will be ignored. If the // secret is left blank, the default behavior is to use an Operator-Managed // database with strong randomly-generated database credentials. // +optional Secret string `json:"secret,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 corev1.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"` }
Database defines the database configuration for a ClusterInstallation.
func (*Database) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Database.
func (*Database) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Database) SetDefaults ¶
func (db *Database) SetDefaults()
SetDefaults sets the missing values in Database to the default ones
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 a ClusterInstallation.
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 MattermostRestoreDB ¶
type MattermostRestoreDB struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MattermostRestoreDBSpec `json:"spec,omitempty"` Status MattermostRestoreDBStatus `json:"status,omitempty"` }
MattermostRestoreDB is the Schema for the mattermostrestoredbs API +k8s:openapi-gen=true +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:priority=0,name="State",type=string,JSONPath=".status.state",description="State of Mattermost DB Restore" +kubebuilder:printcolumn:priority=0,name="Original DB Replicas",type=string,JSONPath=".status.originalDBReplicas",description="Original DB Replicas"
func (*MattermostRestoreDB) DeepCopy ¶
func (in *MattermostRestoreDB) DeepCopy() *MattermostRestoreDB
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MattermostRestoreDB.
func (*MattermostRestoreDB) DeepCopyInto ¶
func (in *MattermostRestoreDB) DeepCopyInto(out *MattermostRestoreDB)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MattermostRestoreDB) DeepCopyObject ¶
func (in *MattermostRestoreDB) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MattermostRestoreDBList ¶
type MattermostRestoreDBList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MattermostRestoreDB `json:"items"` }
MattermostRestoreDBList contains a list of MattermostRestoreDB
func (*MattermostRestoreDBList) DeepCopy ¶
func (in *MattermostRestoreDBList) DeepCopy() *MattermostRestoreDBList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MattermostRestoreDBList.
func (*MattermostRestoreDBList) DeepCopyInto ¶
func (in *MattermostRestoreDBList) DeepCopyInto(out *MattermostRestoreDBList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MattermostRestoreDBList) DeepCopyObject ¶
func (in *MattermostRestoreDBList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MattermostRestoreDBSpec ¶
type MattermostRestoreDBSpec struct { // MattermostClusterName defines the ClusterInstallation name. MattermostClusterName string `json:"mattermostClusterName,omitempty"` // RestoreSecret defines the secret that holds the credentials to // MySQL Operator be able to download the DB backup file RestoreSecret string `json:"restoreSecret,omitempty"` // InitBucketURL defines where the DB backup file is located. InitBucketURL string `json:"initBucketURL,omitempty"` // MattermostDBUser defines the user to access the database. // Need to set if the user is different from `mmuser`. // +optional MattermostDBUser string `json:"mattermostDBUser,omitempty"` // MattermostDBPassword defines the user password to access the database. // Need to set if the user is different from the one created by the operator. // +optional MattermostDBPassword string `json:"mattermostDBPassword,omitempty"` // MattermostDBName defines the database name. // Need to set if different from `mattermost`. // +optional MattermostDBName string `json:"mattermostDBName,omitempty"` }
MattermostRestoreDBSpec defines the desired state of MattermostRestoreDB +k8s:openapi-gen=true
func (*MattermostRestoreDBSpec) DeepCopy ¶
func (in *MattermostRestoreDBSpec) DeepCopy() *MattermostRestoreDBSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MattermostRestoreDBSpec.
func (*MattermostRestoreDBSpec) DeepCopyInto ¶
func (in *MattermostRestoreDBSpec) DeepCopyInto(out *MattermostRestoreDBSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MattermostRestoreDBStatus ¶
type MattermostRestoreDBStatus struct { // Represents the state of the Mattermost restore Database. // +optional State RestoreState `json:"state,omitempty"` // The original number of database replicas. will be used to restore after applying the db restore process. // +optional OriginalDBReplicas int32 `json:"originalDBReplicas,omitempty"` }
MattermostRestoreDBStatus defines the observed state of MattermostRestoreDB +k8s:openapi-gen=true
func (*MattermostRestoreDBStatus) DeepCopy ¶
func (in *MattermostRestoreDBStatus) DeepCopy() *MattermostRestoreDBStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MattermostRestoreDBStatus.
func (*MattermostRestoreDBStatus) DeepCopyInto ¶
func (in *MattermostRestoreDBStatus) DeepCopyInto(out *MattermostRestoreDBStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Minio ¶
type Minio 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 corev1.ResourceRequirements `json:"resources,omitempty"` // Set to use an external MinIO deployment or S3. Must also set 'Secret' and 'ExternalBucket'. // +optional ExternalURL string `json:"externalURL,omitempty"` // Set to the bucket name of your external MinIO or S3. // +optional ExternalBucket string `json:"externalBucket,omitempty"` // Optionally enter the name of already existing secret. // Secret should have two values: "accesskey" and "secretkey". // Required when "ExternalURL" is set. // +optional Secret string `json:"secret,omitempty"` }
Minio defines the configuration of Minio for a ClusterInstallation.
func (*Minio) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Minio.
func (*Minio) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Minio) IsExternal ¶
IsExternal returns true if the MinIO/S3 instance is external
func (*Minio) SetDefaults ¶
func (mi *Minio) SetDefaults()
SetDefaults sets the missing values in Minio to the default ones
type RestoreState ¶
type RestoreState string
RestoreState is the state of the Mattermost Restore Database
const ( // Restoring is the state when the Mattermost DB is being restored. Restoring RestoreState = "restoring" // Finished is the state when the Mattermost DB restore process is complete. Finished RestoreState = "finished" // Failed is the state when the Mattermost DB restore process is failed due a non existing cluster installation. Failed RestoreState = "failed" )
Restore States: Two types of restore states are implemented: restoring and finished.
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" // 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.