Skip to content

Commit

Permalink
remove embedded argocd api dependency (#106)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Ng <[email protected]>
  • Loading branch information
mikeshng authored Nov 18, 2024
1 parent 9f1eac3 commit 30ca210
Show file tree
Hide file tree
Showing 26 changed files with 27,759 additions and 10,495 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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
labelSelector:
matchLabels:
cluster.open-cluster-management.io/placement: guestbook-app-placement
requeueAfterSeconds: 30
requeueAfterSeconds: 10
template:
metadata:
name: '{{name}}-guestbook-app'
Expand Down
6 changes: 5 additions & 1 deletion e2e/run_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,15 @@ kubectl config use-context kind-cluster1
kubectl apply -f e2e/managed/
kubectl config use-context kind-hub
kubectl apply -f e2e/hub/
kubectl apply -f e2e/hub_app/
sleep 30s
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 placementdecision guestbook-app-placement-decision-1 -o yaml
kubectl -n argocd logs $(kubectl -n argocd get pods -l app.kubernetes.io/name=argocd-applicationset-controller -o jsonpath="{.items[0].metadata.name}")
exit 1
fi
if kubectl -n cluster1 get manifestwork | grep cluster1-guestbook-app; then
Expand All @@ -124,7 +128,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
4,546 changes: 3,873 additions & 673 deletions hack/crds/application-crd.yaml

Large diffs are not rendered by default.

4,546 changes: 3,873 additions & 673 deletions hack/test/crds/application-crd.yaml

Large diffs are not rendered by default.

11,433 changes: 10,188 additions & 1,245 deletions hack/test/crds/applicationset-crd.yaml

Large diffs are not rendered by default.

10,853 changes: 9,170 additions & 1,683 deletions hack/test/e2e/argo-cd-install.yaml

Large diffs are not rendered by default.

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 30ca210

Please sign in to comment.