Documentation ¶
Index ¶
- Constants
- func PrepareMattermostJobTemplate(name, namespace string, baseDeployment *appsv1.Deployment) *batchv1.Job
- type Object
- type ResourceHelper
- func (r *ResourceHelper) Create(owner v1.Object, desired Object, reqLogger logr.Logger) error
- func (r *ResourceHelper) CreateDeploymentIfNotExists(owner v1.Object, deployment *appsv1.Deployment, reqLogger logr.Logger) error
- func (r *ResourceHelper) CreateIngressIfNotExists(owner v1.Object, ingress *v1beta1.Ingress, reqLogger logr.Logger) error
- func (r *ResourceHelper) CreateMinioInstanceIfNotExists(owner v1.Object, instance *minioOperator.MinIOInstance, logger logr.Logger) error
- func (r *ResourceHelper) CreateMySQLClusterIfNotExists(owner v1.Object, cluster *mysqlOperator.MysqlCluster, reqLogger logr.Logger) error
- func (r *ResourceHelper) CreateOrUpdateMinioSecret(owner v1.Object, desired *corev1.Secret, logger logr.Logger) error
- func (r *ResourceHelper) CreateRoleBindingIfNotExists(owner v1.Object, roleBinding *rbacv1.RoleBinding, reqLogger logr.Logger) error
- func (r *ResourceHelper) CreateRoleIfNotExists(owner v1.Object, role *rbacv1.Role, reqLogger logr.Logger) error
- func (r *ResourceHelper) CreateServiceAccountIfNotExists(owner v1.Object, serviceAccount *corev1.ServiceAccount, reqLogger logr.Logger) error
- func (r *ResourceHelper) CreateServiceIfNotExists(owner v1.Object, service *corev1.Service, reqLogger logr.Logger) error
- func (r *ResourceHelper) FetchMattermostUpdateJob(namespace string) (*batchv1.Job, error)
- func (r *ResourceHelper) GetMinioService(mmName, mmNamespace string) (string, error)
- func (r *ResourceHelper) GetOrCreateMySQLSecrets(owner v1.Object, name string, reqLogger logr.Logger) (*corev1.Secret, error)
- func (r *ResourceHelper) LaunchMattermostUpdateJob(jobNamespace string, baseDeployment *appsv1.Deployment) error
- func (r *ResourceHelper) RestartMattermostUpdateJob(currentJob *batchv1.Job, deployment *appsv1.Deployment) error
- func (r *ResourceHelper) Update(current, desired Object, reqLogger logr.Logger) error
Constants ¶
View Source
const UpdateJobName = "mattermost-update-check"
Variables ¶
This section is empty.
Functions ¶
func PrepareMattermostJobTemplate ¶
func PrepareMattermostJobTemplate(name, namespace string, baseDeployment *appsv1.Deployment) *batchv1.Job
Types ¶
type ResourceHelper ¶
type ResourceHelper struct {
// contains filtered or unexported fields
}
ResourceHelper provides helper methods to create, updated and fetch different resources.
func NewResourceHelper ¶
func NewResourceHelper(client client.Client, scheme *runtime.Scheme) *ResourceHelper
func (*ResourceHelper) CreateDeploymentIfNotExists ¶
func (r *ResourceHelper) CreateDeploymentIfNotExists(owner v1.Object, deployment *appsv1.Deployment, reqLogger logr.Logger) error
func (*ResourceHelper) CreateIngressIfNotExists ¶
func (*ResourceHelper) CreateMinioInstanceIfNotExists ¶
func (r *ResourceHelper) CreateMinioInstanceIfNotExists(owner v1.Object, instance *minioOperator.MinIOInstance, logger logr.Logger) error
func (*ResourceHelper) CreateMySQLClusterIfNotExists ¶
func (r *ResourceHelper) CreateMySQLClusterIfNotExists(owner v1.Object, cluster *mysqlOperator.MysqlCluster, reqLogger logr.Logger) error
func (*ResourceHelper) CreateOrUpdateMinioSecret ¶
func (*ResourceHelper) CreateRoleBindingIfNotExists ¶
func (r *ResourceHelper) CreateRoleBindingIfNotExists(owner v1.Object, roleBinding *rbacv1.RoleBinding, reqLogger logr.Logger) error
func (*ResourceHelper) CreateRoleIfNotExists ¶
func (*ResourceHelper) CreateServiceAccountIfNotExists ¶
func (r *ResourceHelper) CreateServiceAccountIfNotExists(owner v1.Object, serviceAccount *corev1.ServiceAccount, reqLogger logr.Logger) error
func (*ResourceHelper) CreateServiceIfNotExists ¶
func (*ResourceHelper) FetchMattermostUpdateJob ¶
func (r *ResourceHelper) FetchMattermostUpdateJob(namespace string) (*batchv1.Job, error)
FetchMattermostUpdateJob gets update job
func (*ResourceHelper) GetMinioService ¶
func (r *ResourceHelper) GetMinioService(mmName, mmNamespace string) (string, error)
func (*ResourceHelper) GetOrCreateMySQLSecrets ¶
func (*ResourceHelper) LaunchMattermostUpdateJob ¶
func (r *ResourceHelper) LaunchMattermostUpdateJob( jobNamespace string, baseDeployment *appsv1.Deployment, ) error
func (*ResourceHelper) RestartMattermostUpdateJob ¶
func (r *ResourceHelper) RestartMattermostUpdateJob( currentJob *batchv1.Job, deployment *appsv1.Deployment, ) error
RestartMattermostUpdateJob removes existing update job if it exists and creates new one.
Click to show internal directories.
Click to hide internal directories.