Skip to content

support app set#266

Merged
nimakaviani merged 2 commits intocnoe-io:mainfrom
nabuskey:appset
Jun 6, 2024
Merged

support app set#266
nimakaviani merged 2 commits intocnoe-io:mainfrom
nabuskey:appset

Conversation

@nabuskey
Copy link
Copy Markdown
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
Copy Markdown
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 <manabu.mccloskey@gmail.com>
Signed-off-by: Manabu McCloskey <manabu.mccloskey@gmail.com>
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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