Documentation ¶
Index ¶
- Constants
- func CopyServiceEmptyAutoAssignedFields(desired, actual *corev1.Service)
- 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) CreateIngressClassIfNotExists(owner v1.Object, ingressClass *networkingv1.IngressClass, ...) error
- func (r *ResourceHelper) CreateIngressIfNotExists(owner v1.Object, ingress *networkingv1.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 *mysqlv1alpha1.MysqlCluster, reqLogger logr.Logger) error
- func (r *ResourceHelper) CreateOrUpdateMinioSecret(owner v1.Object, desired *corev1.Secret, logger logr.Logger) error
- func (r *ResourceHelper) CreatePvcIfNotExists(owner v1.Object, pvc *corev1.PersistentVolumeClaim, reqLogger 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) DeleteIngress(key types.NamespacedName, reqLogger logr.Logger) error
- func (r *ResourceHelper) DeleteIngressClass(key types.NamespacedName, reqLogger logr.Logger) error
- func (r *ResourceHelper) DeleteService(key types.NamespacedName, 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(owner metav1.Object, jobNamespace string, baseDeployment *appsv1.Deployment, ...) error
- func (r *ResourceHelper) RestartMattermostUpdateJob(owner metav1.Object, 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 CopyServiceEmptyAutoAssignedFields ¶ added in v1.16.0
CopyServiceEmptyAutoAssignedFields copies fields from an existing service that are populated automatically by Kubernetes when not provided to avoid issues with changing immutable fields.
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) CreateIngressClassIfNotExists ¶ added in v1.20.0
func (r *ResourceHelper) CreateIngressClassIfNotExists(owner v1.Object, ingressClass *networkingv1.IngressClass, reqLogger logr.Logger) error
func (*ResourceHelper) CreateIngressIfNotExists ¶
func (r *ResourceHelper) CreateIngressIfNotExists(owner v1.Object, ingress *networkingv1.Ingress, reqLogger logr.Logger) error
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 *mysqlv1alpha1.MysqlCluster, reqLogger logr.Logger) error
func (*ResourceHelper) CreateOrUpdateMinioSecret ¶
func (*ResourceHelper) CreatePvcIfNotExists ¶ added in v1.20.0
func (r *ResourceHelper) CreatePvcIfNotExists(owner v1.Object, pvc *corev1.PersistentVolumeClaim, reqLogger logr.Logger) error
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) DeleteIngress ¶ added in v1.16.0
func (r *ResourceHelper) DeleteIngress(key types.NamespacedName, reqLogger logr.Logger) error
func (*ResourceHelper) DeleteIngressClass ¶ added in v1.20.0
func (r *ResourceHelper) DeleteIngressClass(key types.NamespacedName, reqLogger logr.Logger) error
func (*ResourceHelper) DeleteService ¶ added in v1.19.0
func (r *ResourceHelper) DeleteService(key types.NamespacedName, reqLogger logr.Logger) error
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 (*ResourceHelper) RestartMattermostUpdateJob ¶
func (r *ResourceHelper) RestartMattermostUpdateJob( owner metav1.Object, currentJob *batchv1.Job, deployment *appsv1.Deployment, reqLogger logr.Logger, updateJobSpec *mmv1beta.UpdateJob, ) error
RestartMattermostUpdateJob removes existing update job if it exists and creates new one.
Click to show internal directories.
Click to hide internal directories.