cleaned up comments; added helm3 to readme.md
parent
4400b0d0b4
commit
dce7e3893b
|
@ -60,8 +60,8 @@ import (
|
|||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
// importing to ensure correct dependencies
|
||||
_ "helm.sh/helm/v3/pkg/action"
|
||||
|
||||
)
|
||||
|
||||
// gcloud pubsub related config
|
||||
|
@ -370,7 +370,7 @@ func setupProviders(opts *ProviderOpts) (providers provider.Providers) {
|
|||
if err != nil {
|
||||
log.WithFields(log.Fields{
|
||||
"error": err,
|
||||
}).Fatal("helm provider stopped with an error")
|
||||
}).Fatal("helm3 provider stopped with an error")
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
|
@ -184,8 +184,6 @@ func (p *Provider) TrackedImages() ([]*types.TrackedImage, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// releases := releaseList.GetReleases()
|
||||
|
||||
for _, release := range releases {
|
||||
// getting configuration
|
||||
vals, err := values(release.Chart, release.Config)
|
||||
|
@ -383,11 +381,6 @@ func (p *Provider) applyPlans(plans []*UpdatePlan) error {
|
|||
|
||||
func updateHelmRelease(implementer Implementer, releaseName string, chart *hapi_chart.Chart, overrideValues map[string]string, opts ...bool) error {
|
||||
|
||||
// overrideBts, err := convertToYaml(mapToSlice(overrideValues))
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
|
||||
// set reuse values to false if currentRelease.config is nil
|
||||
emptyConfig := false
|
||||
if len(opts) == 1 && opts[0] {
|
||||
|
|
|
@ -4,10 +4,7 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
// "k8s.io/helm/pkg/helm"
|
||||
// "k8s.io/helm/pkg/proto/hapi/chart"
|
||||
"helm.sh/helm/v3/pkg/chart"
|
||||
// rls "k8s.io/helm/pkg/proto/hapi/services"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
|
@ -71,7 +68,7 @@ func (i *Helm3Implementer) UpdateReleaseFromChart(rlsName string, chart *chart.C
|
|||
client.Timeout = DefaultUpdateTimeout;
|
||||
client.ReuseValues = true
|
||||
|
||||
// set reuse values to false if currentRelease.config is nil
|
||||
// set reuse values to false if currentRelease.config is nil (temp fix for bug in chartutil.coalesce v3.1.2)
|
||||
if len(opts) == 1 && opts[0] {
|
||||
client.ReuseValues = false
|
||||
}
|
||||
|
@ -86,17 +83,14 @@ func (i *Helm3Implementer) UpdateReleaseFromChart(rlsName string, chart *chart.C
|
|||
}).Fatal("helm3: failed to update release from chart")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// neil
|
||||
log.WithFields(log.Fields{
|
||||
"releaseConfig": results.Config,
|
||||
"releaseValues": results.Chart.Values,
|
||||
"vals": vals,
|
||||
"convertedVals": convertedVals,
|
||||
}).Info("provider.helm3: released")
|
||||
return results, err
|
||||
}
|
||||
|
||||
// convert map[string]string to map[string]interface
|
||||
// converts:
|
||||
// map[string]string{"image.tag": "0.1.0"}
|
||||
// to:
|
||||
// map[string]interface{"image": map[string]interface{"tag": "0.1.0"}}
|
||||
func convertToInterface(values map[string]string) (map[string]interface{}) {
|
||||
converted := make(map[string]interface{})
|
||||
for key, value := range values {
|
||||
|
|
|
@ -21,8 +21,6 @@ func checkRelease(repo *types.Repository, namespace, name string, chart *hapi_ch
|
|||
EmptyConfig: config == nil,
|
||||
}
|
||||
|
||||
// if configmap is empty, then set DontReuseValues to true
|
||||
|
||||
eventRepoRef, err := image.Parse(repo.String())
|
||||
if err != nil {
|
||||
log.WithFields(log.Fields{
|
||||
|
|
|
@ -119,6 +119,12 @@ If you work mostly with regular Kubernetes manifests, you can install Keel witho
|
|||
helm upgrade --install keel --namespace=keel keel/keel --set helmProvider.enabled="false"
|
||||
```
|
||||
|
||||
To install for Helm v3, set helmProvider.version="v3" (default is "v2"):
|
||||
|
||||
```bash
|
||||
helm install keel keel/keel --set helmProvider.version="v3"
|
||||
```
|
||||
|
||||
That's it, see [Configuration](https://github.com/keel-hq/keel#configuration) section now.
|
||||
|
||||
### Quick Start
|
||||
|
|
Loading…
Reference in New Issue