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

support app set #266

Merged
merged 2 commits into from
Jun 6, 2024
Merged

support app set #266

merged 2 commits into from
Jun 6, 2024

Conversation

nabuskey
Copy link
Collaborator

@nabuskey nabuskey commented May 29, 2024

This adds support for application sets.

Example application sets are located in pkg/controllers/custompackage/test/resources/customPackages/applicationSet/

Need:

@nabuskey nabuskey mentioned this pull request May 29, 2024
@cmoulliard
Copy link
Contributor

README documentation should clearly mention that a package can include Application CR and/or ApplicationSet CR

@nabuskey nabuskey force-pushed the appset branch 2 times, most recently from e02b8e5 to 2bb1618 Compare May 31, 2024 02:16
@nabuskey nabuskey marked this pull request as ready for review May 31, 2024 02:17
nabuskey added 2 commits June 4, 2024 15:44
Signed-off-by: Manabu McCloskey <[email protected]>
Copy link
Contributor

@omrishiv omrishiv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good. I think there's an opportunity to clean up the code a bit if possible

return ctrl.Result{}, fmt.Errorf("getting argocd application set object: %w", err)
}

foundAppSetObj.Spec = appSet.Spec
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reconcilliation logic is duplicated here with the above case. Is it possible to dedupe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered it but I don't think we'd save any lines of code or performance because we'd have to type cast in the new function then branch out anyways. I figured a bit of duplication here is acceptable.

@@ -38,7 +44,7 @@ func TestReconcileCustomPkg(t *testing.T) {
ErrorIfCRDPathMissing: true,
Scheme: s,
BinaryAssetsDirectory: filepath.Join("..", "..", "..", "bin", "k8s",
fmt.Sprintf("1.27.1-%s-%s", runtime.GOOS, runtime.GOARCH)),
fmt.Sprintf("1.29.1-%s-%s", runtime.GOOS, runtime.GOARCH)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to pull this out as a constant? It's used again below

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to make this more dynamic and define it at a project level. We need this in make file too. Probably better to just pull from a file or something similar. But I think it's out side scope for this PR.

Copy link
Contributor

@nimakaviani nimakaviani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. thanks for this!

@nimakaviani nimakaviani merged commit 087a9ad into cnoe-io:main Jun 6, 2024
2 checks passed
@nabuskey nabuskey deleted the appset branch June 6, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants