Skip to content

No Resource List in Multiclusterapplicationsetreports of pull model i… #127

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

Merged
merged 1 commit into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@ build-images: build
@docker build -t ${IMAGE_NAME_AND_VERSION} -f build/Dockerfile .

# build local linux/amd64 images on non-amd64 hosts such as Apple M3
# need to create the buildx builder as a fixed name and clean it up after usage
# Or a new builder is created everytime and it will fail docker buildx image build eventually.
build-images-non-amd64-docker:
docker buildx create --use
docker buildx inspect --bootstrap
@docker buildx build --platform linux/amd64 -t ${IMAGE_NAME_AND_VERSION} -f build/Dockerfile --load .
docker buildx create --name local-builder --use
docker buildx inspect local-builder --bootstrap
docker buildx build --platform linux/amd64 -t ${IMAGE_NAME_AND_VERSION} -f build/Dockerfile --load .
docker buildx rm local-builder


build-images-non-amd64-podman:
podman build --platform linux/amd64 -t ${IMAGE_NAME_AND_VERSION} -f build/Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion common/scripts/gobuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ shift
set -e

BUILD_GOOS=${GOOS:-linux}
BUILD_GOARCH=${GOARCH:-$(go env GOARCH)}
BUILD_GOARCH=${GOARCH:-amd64}
GOBINARY=${GOBINARY:-go}
BUILDINFO=${BUILDINFO:-""}
STATIC=${STATIC:-1}
Expand Down
11 changes: 6 additions & 5 deletions pkg/controller/gitopssyncresc/gitopssyncresc_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ func (r *GitOpsSyncResource) syncResources() error {

apps, related, err := r.getArgoAppsFromSearch(queryManagedClustersStr, "", "")
if err != nil {
return err
klog.Info(err.Error())
continue
}

for _, app := range apps {
Expand All @@ -190,16 +191,16 @@ func (r *GitOpsSyncResource) syncResources() error {

// Skip application that don't belong to an appset
if hostingAppsetName == nil {
klog.V(1).Infof("skip application %v/%v on cluster %v, it does not belong to an appset", itemmap["namespace"], itemmap["name"], managedClusterName)
return nil
klog.Infof("skip application %v/%v on cluster %v, it does not belong to an appset", itemmap["namespace"], itemmap["name"], managedClusterName)
continue
}

appsetNsn := strings.Split(hostingAppsetName.(string), "/")
if len(appsetNsn) != 3 {
err := fmt.Errorf("_hostingResource is not in the correct format: %v", hostingAppsetName)
klog.Info(err.Error())

return err
continue
}

reportKey := appsetNsn[1] + "_" + appsetNsn[2]
Expand Down Expand Up @@ -230,7 +231,7 @@ func (r *GitOpsSyncResource) syncResources() error {
report.Statuses.Resources = append(relatedResources, unhealthyResources...)
}

klog.V(1).Infof("resources for app (%v/%v): %v", itemmap["namespace"], itemmap["name"], report.Statuses.Resources)
klog.Infof("resources for app (%v/%v): %v", itemmap["namespace"], itemmap["name"], report.Statuses.Resources)
}
}
}
Expand Down