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

CLOUDP-227413: AKO templates #348

Merged
merged 10 commits into from
Oct 11, 2024
Merged

Conversation

igor-karpukhin
Copy link
Collaborator

All Submissions:

Added two new helm charts showcasing basic and advanced configurations

  • Have you opened an Issue before filing this PR?
  • Have you signed our CLA?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).

@s-urbaniak
Copy link
Collaborator

Is there any way helm supports some form of unit testing? Was this tested manually?

@josvazg
Copy link
Collaborator

josvazg commented Oct 7, 2024

Is there any way helm supports some form of unit testing? Was this tested manually?

https://helm.sh/docs/topics/chart_tests/ maybe? but that is not a unit test per se.

Other than that, when working manually you can tell helm to spit out the YAMl without applying with helm template, so that you can inspect it is producing what you expected.

@igor-karpukhin
Copy link
Collaborator Author

Is there any way helm supports some form of unit testing? Was this tested manually?

Yes, there is a way to add basic "template generating" tests and compare the result to the expected values. Our charts do not have tests for now. So I tested both manually.

@s-urbaniak
Copy link
Collaborator

Our charts do not have tests for now. So I tested both manually.

I think this is worth a ticket and something we'd want to tackle as part of product quality maturity, would you mind creating one?

@igor-karpukhin Besides: couldn't we add an integration test in AKO at least, similar to what we do now? This would require this PR to merge first.

Copy link
Collaborator

@josvazg josvazg left a comment

Choose a reason for hiding this comment

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

Do not have extra comments on top of @s-urbaniak
The code and the expanded default templates look good.
Have these been tested in Cloud QA?

@igor-karpukhin
Copy link
Collaborator Author

Do not have extra comments on top of @s-urbaniak The code and the expanded default templates look good. Have these been tested in Cloud QA?

Yes, as I said, both charts were tested on cloudqa


keywords:
- mongodb
- database
- nosql
home: https://github.com/mongodb/mongodb-atlas-kubernetes
icon: https://webimages.mongodb.com/_com_assets/cms/kuyjf3vea2hg34taa-horizontal_default_slate_blue.svg
appVersion: "1.0.0"
appVersion: "2.4.1"
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think my question still applies: how do we make sure that this does not introduce skew when we move forward with new AKO versions?

Copy link
Collaborator

Choose a reason for hiding this comment

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

In general, the helm chart version does not need to match the version of the image.

These examples are even less tied to the Operator releases, they should just keep working after most releases, unless some breaking changes are released.

I see two ways about this:

  1. Every Operator and Helm release requires a release in these example charts.
  2. These example charts are exercised in a test in the CI and will only get updated as needed, when actual changes makes them somewhat obsolete.

If we do not automate on auto testing these, we will be forced to option 1, at least until we make such investment.

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 changed it to the latest AKO version just in case. As we do the same thing for the AKO chart and the AKO CRDs

Copy link
Collaborator

@s-urbaniak s-urbaniak Oct 11, 2024

Choose a reason for hiding this comment

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

With respect to the appVersion field: https://helm.sh/docs/topics/charts/#the-appversion-field

Note that the appVersion field is not related to the version field. It is a way of specifying the version of the application. For example, the drupal chart may have an appVersion: "8.2.1", indicating that the version of Drupal included in the chart (by default) is 8.2.1. This field is informational, and has no impact on chart version calculations.

With respect to the version field: https://helm.sh/docs/topics/charts/#charts-and-versioning

Every chart must have a version number. A version must follow the SemVer 2 standard. Unlike Helm Classic, Helm v2 and later uses version numbers as release markers. Packages in repositories are identified by name plus version.

My conclusions from the above are the following:

  1. Given appVersion is purely informational I vote for making it clear (as a comment) that this is the version of AKO this helm was created with.

  2. Given version is a semver version of this chart specifically I vote to set it to "1.0" since this is the very first version of this chart

@josvazg @igor-karpukhin thoughts?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds reasonable to me.
Also I would avoid having to re-release this with all released of AKO. Releasing only when new versions might force it due to breaking changes or features than need to be showcased.

@igor-karpukhin igor-karpukhin merged commit 8ca3642 into main Oct 11, 2024
5 checks passed
@igor-karpukhin igor-karpukhin deleted the CLOUDP-227413/ako-helm-templates branch October 11, 2024 12:51
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.

3 participants