kbrew-dev / kbrew

kbrew is homebrew for Kubernetes
Apache License 2.0
191 stars 19 forks source link

Enable kbrew installations with versioning support for the recipes #58

Open suramya-shah opened 3 years ago

suramya-shah commented 3 years ago

Currently, our kbrew recipe installation has support for a particular version of the operator based on what is written on the recipe YAML. example current installation process kbrew install kafka-operator It would be nice if we can have something like: kbrew install kafka-operator version

vishal-biyani commented 3 years ago

Apart from the base chart/operators' version, there are other things that will need versioning that are tied to a specific version of the chart. Some of the following examples will illustrate with use case:

1) Configurations specific to a version: For example, Version 1.2 of an application can be installed and works where as version 1.3 needs the creation of configmap as a pre-step before you actually install the app.

So the chart will have the following versions listed in the version field:

version: [1.2, 1.3]

And pre-steps will be blank for 1.2 but there will be a pre-step for version 1.3, something similar to (Don't go by exact syntax - I am just demonstrating concept here):

pre_install:
  - steps: 
      version_compatibility: 1.3
      # Create a configmap
      - |

2) Similarly for the apps which will need pre install:

pre_install:
  - apps:
    - cert-manager@1.3.4
        version_compatibility: 1.3

We need to think of some mechanism so that the above is easy and clean and allows composing things for various versions seamlessly!

This also might help in solving https://github.com/kbrew-dev/kbrew/issues/54 but not 100% sure.