This repository offers an operator and relevant packages to perform installation, update and uninstallation of helm charts. The packages could be used independent of the operator.
Disclaimer: This repository is still in development and implementation details can change quickly.
- Spin up a k3d cluster (other types like kind are also supported)
- From the api folder run:
make install - From the operator folder run
make buildfollowed bymake runto run the operator - Config your own kubeconfig by setting the r.Config variable inside /operator/controllers/manifest_controller.go
- Import package
"github.com/kyma-project/module-manager/operator/pkg/manifest" - Package Specifications
- Package usage example:
manifestOperations := manifest.NewOperations(logger, r.RestConfig, cli.New())
if create {
if err := manifestOperations.Install("chart/path", releaseName, "repoName/chartName", repoName, url, args); err != nil {
return err
}
} else {
if err := manifestOperations.Uninstall("chart/path", "repoName/chartName", releaseName, args); err != nil {
return err
}
}
chartPathtakes priority over the url parameter. If the chart should be downloaded fromurlpasschartPathas empty stringargsonly supports--setand action flags, with variable names and values, comma-seperated. Example:
args = map[string]string{
"set": "xyz=abc",
"flags": "CreateNamespace=true,Namespace=new-space",
}