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

[Bug]: Chart metadata is incomplete #47

Open
thekoma opened this issue Mar 29, 2024 · 6 comments
Open

[Bug]: Chart metadata is incomplete #47

thekoma opened this issue Mar 29, 2024 · 6 comments
Assignees
Labels
bug Something isn't working triage Needs to be triaged

Comments

@thekoma
Copy link

thekoma commented Mar 29, 2024

Affected Chart

icinga-stack

Which version of the app contains the bug?

No response

Please describe your problem

Hi! The icinga-stack Chart.yaml must contain the dependencies metadata, which does not.

@thekoma thekoma added bug Something isn't working triage Needs to be triaged labels Mar 29, 2024
@martialblog
Copy link
Member

Hi, thanks for the hint. Go ahead if you want to open a PR to fix it.

@thekoma
Copy link
Author

thekoma commented Mar 30, 2024

Hi @martialblog is a little more complex than a simple PR as it involve publishing the various packages instead of using direct submodules.
Which makes sense as if you want to build the stack as a stack AKA every component could be installed by itself.
To do so we would need to move/copy the submodules in the chart folder and release all of them first.
Using a same level structure for your charts: New structure

Then we need to update the dependency of the icinga-stack Chart.yaml expliciting the dependency on the repo itself:
Chart.yaml

The Workflow also needs to be updated slightly (but has to be done after moving around the directories):
The lint test wasn't testing all the charts as a chart but only the first module with the submodules, this is not a good idea as you wouldn't be able to check the singles modules for faults.
Linting Workflow

The release workflow if you remove the path (which by default is $root/charts) will iterate on every chart and release every one of them for you.
Release Workflow

After that I would suggest to also add an OCI release and a signature to keep the enterprise grade quality of the project.

If you want I can gladly land an hand but I would like to discuss how to move the things around before pushing.

Uh, also the gh-pages branch needs cleanup.

@thekoma
Copy link
Author

thekoma commented Apr 3, 2024

Just to be safe, is it ok for you if I create a PR with all the changes? Because seems a lot for a "non official contributor" to change the architecture in that way. And time is valuable for everyone so I'd rather not spend your investing mine.

@lippserd
Copy link
Member

lippserd commented Apr 3, 2024

Hi @thekoma,

I've only briefly looked at the structure you suggested, but it sounds appealing that you can install Icinga 2, Icinga Web, Icinga DB, Icinga for Kubernetes each on their own or install the entire Icinga stack.

Since I don't really know much about Helm 😆, why do have we to release individual components first if we have a dependency on our own repo? Wouldn't that also mean that we have to release our charts in a certain order afterwards? I would also change the structure a bit so that you can install everything related to monitoring Kubernetes without having to install Icinga 2, Icinga DB and the other things like Director etc that would come from the Icinga stack:

  • Icinga 2
  • Icinga Web
  • Icinga DB
  • Icinga for Kubernetes Daemon
  • Icinga for Kubernetes (Daemon, Web, Database)
  • Icinga Stack (everything from the above plus modules)

@mocdaniel If I'm not mistaken, that's something on our roadmap anyway, isn't it?

Best regards,
Eric

@thekoma
Copy link
Author

thekoma commented Apr 3, 2024

As far as I've seen in your structure each componenti can be installed separately and receive the information of the other components in the form of services or secrets.

In that way substantially the dependency is not strong or even present.

The idea of dependency topically comes from a tight bound of two components or as a commodity.

For example you can build an app that requires redis to work and you can add a dependency as:
Strong: The chart won't work without the redis chart

Modular: The chart has a boolean flag declaring the dependency that will provide a set of default values, or in case of false accept the information of where to find the resources provided from the needed dependency (address of redis name of db username password etc)

In your case everything seems modular enough for the single components but not enough for the stack.

So in the stack I would have put a strong dependency on the underlining modules and no dependency on the modules themself.

Anyway releasing the stack as is right now will throw errors in various linters as the charts under it are not versioned in the metadata of the stack itself.

As said before I would like to take half an hour discussing the "plan" to land an hand in a way that makes the most of everyone times.

@thekoma
Copy link
Author

thekoma commented Apr 4, 2024

Uh almost forgot:

why do have we to release individual components first if we have a dependency on our own repo?

Each chart could be used separately (for example the db part could be used as a central component while the api part can be used in frontend nodes/clusters.

Wouldn't that also mean that we have to release our charts in a certain order afterwards?
You will need to create the dependency first and then the other components the first time only. As releasing the stack with the subparts as dependency would fail (duh).
But after that you would be able to declare the dependency and the release in a much more resilient way.

For example using the typical semver v1.0.0 you can set the boundaries for the stack to accept for the version v1.0.x of your stack helm any chart ~v1.0.* of the subcharts.
At the same time releasing the v1.1.0 of the chart for, let's say icinga-Kubernetes would be automatically excluded from who has 1.0 stack installed thus providing a more conservative/stable deploy.

As an additional added value the helm charts have a double versioning. One for the chart itself and one for the app providing.
In that way you will be able to provide a simple matrix knowing that the chart >=1.1.* will include the version of the app X.Y.Z that is compatible only from that version up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Needs to be triaged
Projects
None yet
Development

No branches or pull requests

4 participants