syntasso / kratix-cli

CLI-based tool to build Promises
Apache License 2.0
2 stars 2 forks source link

kratix init from helm #9

Closed ChunyiLyu closed 4 months ago

ChunyiLyu commented 5 months ago

Context

kratix init from helm. Output of the command will be a working promise with api (inferred from values file passed in by users), dependencies (empty), and resource configure workflow image generated based on the input helm that people can kubectl apply without any further customization.

Design

## from OCI chart
kratix init helm-promise PROMISENAME --url oci://registry-1.docker.io/bitnamicharts/redis --group GROUP --kind KIND

## from repo chart
kratix init helm-promise PROMISENAME --url  https://dapr.github.io/helm-charts/ --chart-name dapr --group GROUP --kind KIND

The pipeline for a helm promise could be something as simple as:

yq '.spec' /kratix/input/object.yaml) > values.yaml

helm template <chart> --values-from values.yaml

Tasks