cnti-testcatalog / testsuite

📞📱☎️📡🌐 Cloud Native Telecom Initiative (CNTI) Test Catalog is a tool to check for and provide feedback on the use of K8s + cloud native best practices in networking applications and platforms
https://wiki.lfnetworking.org/display/LN/Test+Catalog
Apache License 2.0
173 stars 71 forks source link

[Feature] Redesign manifest generation for helm charts #2124

Open kosstennbl opened 1 month ago

kosstennbl commented 1 month ago

Currently, for generation of manifests from helm charts, we use Helm.generate_manifest_from_templates function, which creates temp_template.yml file with all resources.

There are two problems with this:

  1. Helm template creates unneeded information: notes, helm-specific resources. That makes it harder to parse created manifest and requires additional code to handle removal of this info.
  2. temp_template.yml is a confusing name for a file with manifests for resources in Kubernetes. Additionally, that file is being created multiple times: in cnfs/<release_name>/temp_template.yml (seems intended and logical), and in cnfs/temp_template.yml, which doesn't make much sense. That seems to be happening due to call of export_manifest in generate_config.cr during setup process.

Proposed solution:

  1. Create function for gathering manifest from helm deployment based on helm get manifest.
  2. Replace Helm.generate_manifest_from_templates function, remove or rename of all template-related functionality and code.
  3. Rename of temp_template.yml to something reasonable and less confusing (i.e. - generated_manifest.yml)
  4. Fix export_manifest usage (no manifest file should be created in cnfs directory)