Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy labels current module #569

Merged
merged 5 commits into from
Sep 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove owner ref
petar-cvit committed Sep 12, 2024
commit 951f94bf0494292e125ad4eff86dffebbffd79ce
14 changes: 0 additions & 14 deletions cyclops-ctrl/internal/modulecontroller/module_controller.go
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ import (
"github.com/go-logr/logr"
"helm.sh/helm/v3/pkg/chart"
apierrors "k8s.io/apimachinery/pkg/api/errors"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
@@ -216,10 +215,6 @@ func (r *ModuleReconciler) generateResources(
return nil, nil, err
}

fmt.Println()
fmt.Println("labels", module.ObjectMeta.Labels)
fmt.Println()

installErrors := make([]string, 0)
childrenGVRs := make([]cyclopsv1alpha1.GroupVersionResource, 0)

@@ -267,15 +262,6 @@ func (r *ModuleReconciler) generateResources(
labels["cyclops.module"] = module.Name
obj.SetLabels(labels)

obj.SetOwnerReferences([]v1.OwnerReference{
{
APIVersion: "cyclops-ui.com/v1alpha1",
Kind: "Module",
Name: module.Name,
UID: module.UID,
},
})

resourceName, err := kClient.GVKtoAPIResourceName(obj.GroupVersionKind().GroupVersion(), obj.GroupVersionKind().Kind)
if err != nil {
installErrors = append(installErrors, fmt.Sprintf(