feat: harmony now defaults to using local k3d cluster. Also created OCICompliant: Application trait to make building images cleaner #76

Merged
johnride merged 8 commits from feat/oci into master 2025-07-03 19:37:51 +00:00
Owner
No description provided.
johnride added 1 commit 2025-07-02 21:43:55 +00:00
johnride added 1 commit 2025-07-02 21:48:42 +00:00
letian reviewed 2025-07-02 23:42:38 +00:00
@ -14,0 +19,4 @@
features: vec![Box::new(ContinuousDelivery {
application: Arc::new(application.clone()),
})],
application,
Owner

First impressions: this seems a bit redundant (and heavy) to have to pass the application around like this + having to "duplicate" the name between the score and the app. The clone seems a bit awkward as well.

Just a thought, don't have any better suggestions for now (I saw the previous PR that introduced it and the reasoning).

First impressions: this seems a bit redundant (and heavy) to have to pass the application around like this + having to "duplicate" the name between the score and the app. The clone seems a bit awkward as well. Just a thought, don't have any better suggestions for now (I saw the previous PR that introduced it and the reasoning).
letian reviewed 2025-07-02 23:44:56 +00:00
@ -23,0 +22,4 @@
/// Creates a bare maestro without initialization.
///
/// This should rarely be used. Most of the time Maestro::initialize should be used instead.
pub fn new_without_initialization(inventory: Inventory, topology: T) -> Self {
Owner

usually we see ::empty to initialize something as naked as possible, would that make more sense here?

usually we see `::empty` to initialize something as naked as possible, would that make more sense here?
Author
Owner

makes more sense than ::new for sure. new_without_initialization I agree is a bit uncanny. But technically the Maestro is not anymore "empty" when created via new than initialize, the only difference is a side-effect happening in initialize where the topology is initialized.

I'm very much open to better ideas, but I don't feel like empty is much better... Maestro is not a collection, it's more of an "engine". Maybe something along the idea of "idle" or "stale" but both those options feel less obvious to me than new_without_initialization. But that may be because I know the internals.

makes more sense than `::new` for sure. `new_without_initialization` I agree is a bit uncanny. But technically the Maestro is not anymore "empty" when created via new than initialize, the only difference is a side-effect happening in initialize where the topology is initialized. I'm very much open to better ideas, but I don't feel like `empty` is much better... Maestro is not a collection, it's more of an "engine". Maybe something along the idea of "idle" or "stale" but both those options feel less obvious to me than new_without_initialization. But that may be because I know the internals.
johnride added 1 commit 2025-07-03 05:20:14 +00:00
johnride force-pushed feat/oci from 1d90c3308d to bd337d1cb9 2025-07-03 05:21:23 +00:00 Compare
Author
Owner

Looooooootttts of stuff in the last commit that is just stuffed there. Will need some refactoring but basic functionality works right now.

Looooooootttts of stuff in the last commit that is just stuffed there. Will need some refactoring but basic functionality works right now.
johnride force-pushed feat/oci from bd337d1cb9 to 5a89495c61 2025-07-03 11:23:20 +00:00 Compare
letian reviewed 2025-07-03 13:39:40 +00:00
@ -42,0 +65,4 @@
// 1. Create the Helm chart files on disk.
let chart_dir = self
.create_helm_chart_files(image_url)
Owner

For OCI, we get the (local) image name from the trait directly (self.image_name() & self.local_image_name()). Why is it different here?

Also, could (should?) it be generated automatically from the application name instead? It doesn't seem like we actually need it from outside.

For OCI, we get the (local) image name from the trait directly (`self.image_name()` & `self.local_image_name()`). Why is it different here? Also, could (should?) it be generated automatically from the application name instead? It doesn't seem like we actually need it from outside.
Author
Owner

This is actually the container image url. The chart uses it to reference the image correctly.

But yes, this is a common pain with image urls, helm chart names, application names, etc. Perhaps we could easily create an ApplicationIdentifier or ApplicationLocator concept that is used instead of a String that provides a robust way to get container image location, helm chart location, app name, etc, etc.

This is actually the container image url. The chart uses it to reference the image correctly. But yes, this is a common pain with image urls, helm chart names, application names, etc. Perhaps we could easily create an ApplicationIdentifier or ApplicationLocator concept that is used instead of a String that provides a robust way to get container image location, helm chart location, app name, etc, etc.
johnride added 3 commits 2025-07-03 19:34:35 +00:00
johnride added 1 commit 2025-07-03 19:37:12 +00:00
Merge remote-tracking branch 'origin/master' into feat/oci
All checks were successful
Run Check Script / check (pull_request) Successful in -8s
7b0f3b79b1
johnride merged commit d9935e20cb into master 2025-07-03 19:37:51 +00:00
johnride deleted branch feat/oci 2025-07-03 19:37:55 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: NationTech/harmony#76
No description provided.