Skip to content

Commit

Permalink
remove embedded argocd api dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Ng <[email protected]>
  • Loading branch information
mikeshng committed Nov 17, 2024
1 parent 9f1eac3 commit db79e8b
Show file tree
Hide file tree
Showing 21 changed files with 654 additions and 6,221 deletions.
7 changes: 0 additions & 7 deletions cmd/multiclusterstatusaggregation/exec/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
manifestWorkV1 "open-cluster-management.io/api/work/v1"
appsubapi "open-cluster-management.io/multicloud-integrations/pkg/apis"
multiclusterappsetreport "open-cluster-management.io/multicloud-integrations/pkg/apis/appsetreport/v1alpha1"
argov1alpha1 "open-cluster-management.io/multicloud-integrations/pkg/apis/argocd/v1alpha1"
"open-cluster-management.io/multicloud-integrations/pkg/controller"
appsubutils "open-cluster-management.io/multicloud-integrations/pkg/utils"

Expand Down Expand Up @@ -116,12 +115,6 @@ func RunManager() {
os.Exit(1)
}

// Setup ApplicationSet Scheme for manager
if err := argov1alpha1.AddToScheme(mgr.GetScheme()); err != nil {
klog.Error(err, "")
os.Exit(1)
}

// Setup all Controllers
if err := controller.AddMulticlusterStatusAggregationToManager(mgr, options.SyncInterval, options.AppSetResourceDir); err != nil {
klog.Error(err, "")
Expand Down
4 changes: 1 addition & 3 deletions cmd/propagation/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
clusterv1 "open-cluster-management.io/api/cluster/v1"
workv1 "open-cluster-management.io/api/work/v1"
appsetreportV1alpha1 "open-cluster-management.io/multicloud-integrations/pkg/apis/appsetreport/v1alpha1"
argov1alpha1 "open-cluster-management.io/multicloud-integrations/pkg/apis/argocd/v1alpha1"
"open-cluster-management.io/multicloud-integrations/propagation-controller/application"
"sigs.k8s.io/controller-runtime/pkg/client"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
Expand Down Expand Up @@ -71,7 +70,6 @@ var (

func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
utilruntime.Must(argov1alpha1.AddToScheme(scheme))
utilruntime.Must(clusterv1.AddToScheme(scheme))
utilruntime.Must(workv1.AddToScheme(scheme))
utilruntime.Must(appsetreportV1alpha1.AddToScheme(scheme))
Expand Down Expand Up @@ -190,7 +188,7 @@ func main() {
os.Exit(1)
}

setupLog.Info("starting manager")
setupLog.Info("starting manager with unstructured Application")

if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
setupLog.Error(err, "problem running manager")
Expand Down
5 changes: 4 additions & 1 deletion e2e/run_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ if kubectl -n argocd get application cluster1-guestbook-app; then
echo "Propagation: hub application cluster1-guestbook-app created"
else
echo "Propagation FAILED: hub application cluster1-guestbook-app not created"
kubectl -n argocd get applicationset guestbook-app-set -o yaml
kubectl -n argocd get placement -o yaml
kubectl -n argocd get placementdecision -o yaml
exit 1
fi
if kubectl -n cluster1 get manifestwork | grep cluster1-guestbook-app; then
Expand All @@ -124,7 +127,7 @@ fi
if kubectl -n cluster1 get manifestwork -o yaml | grep ed58e4a1479ef2d7fb1a60bc2b7300100f262779; then
echo "Propagation: manifestwork contains appSet hash"
else
echo "Propagation FAILED: manifestwork does not appSet hash"
echo "Propagation FAILED: manifestwork does not contain appSet hash"
exit 1
fi
kubectl config use-context kind-cluster1
Expand Down
36 changes: 0 additions & 36 deletions pkg/apis/argocd/v1alpha1/app_project_types.go

This file was deleted.

26 changes: 0 additions & 26 deletions pkg/apis/argocd/v1alpha1/application_defaults.go

This file was deleted.

Loading

0 comments on commit db79e8b

Please sign in to comment.