// WithMySQLCluster create secret and cluster and sets on the database
WithMySQLCluster create secret and cluster and sets on the database
// WithMySQLCluster create secret and cluster and sets on the database
func WithMySQLCluster(ctx context.Context, cl client.Client, name string) MysqlDBOption {
	cluster := NewMySQLCluster(func(cluster *mysqlv1alpha1.MysqlCluster) error {
		cluster.Name = name
		return nil
	}, CreateMySQLClusterSecret(cl, &corev1.Secret{}), CreateMySQLClusterInK8s(cl))
	return func(db *mysqldatabase.Database) error {
		db.Spec.ClusterRef.Name = cluster.Name
		return nil
	}
}
func WithMySQLCluster ( ctx context . Context , cl client . Client , name string ) MysqlDBOption { cluster := NewMySQLCluster ( func ( cluster * mysqlv1alpha1 . MysqlCluster ) error { cluster . Name = name return nil } , CreateMySQLClusterSecret ( cl , & corev1 . Secret { } ) , CreateMySQLClusterInK8s ( cl ) ) return func ( db * mysqldatabase . Database ) error { db . Spec . ClusterRef . Name = cluster . Name return nil } }
WithMySQLCluster create secret and cluster and sets on the database
WithMySQLCluster create secret and cluster and sets on the database
// create a cluster