Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1712 from yinzara/feature/skip-dep-up
Browse files Browse the repository at this point in the history
add "skipDepUpdate" config parameter to HelmRelease
  • Loading branch information
stefanprodan committed Feb 8, 2019
2 parents 116e2c9 + a57b3a4 commit 09757f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions deploy-helm/flux-helm-release-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ spec:
format: int64
resetValues:
type: boolean
skipDepUpdate:
type: boolean
valueFileSecrets:
type: array
properties:
Expand Down
3 changes: 3 additions & 0 deletions integrations/apis/flux.weave.works/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ type HelmReleaseSpec struct {
// Reset values on helm upgrade
// +optional
ResetValues bool `json:"resetValues,omitempty"`
// Do not run 'dep' update (assume requirements.yaml is already fulfilled)
// +optional
SkipDepUpdate bool `json:"skipDepUpdate,omitempty"`
}

// GetTimeout returns the install or upgrade timeout (defaults to 300s)
Expand Down
2 changes: 1 addition & 1 deletion integrations/helm/chartsync/chartsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func (chs *ChartChangeSync) reconcileReleaseDef(fhr fluxv1beta1.HelmRelease) {
chs.setCondition(&fhr, fluxv1beta1.HelmReleaseChartFetched, v1.ConditionTrue, ReasonCloned, "successfully cloned git repo")
chartPath = filepath.Join(chartClone.export.Dir(), chartSource.Path)

if chs.config.UpdateDeps {
if chs.config.UpdateDeps && !fhr.Spec.SkipDepUpdate {
if err := updateDependencies(chartPath, ""); err != nil {
chs.setCondition(&fhr, fluxv1beta1.HelmReleaseReleased, v1.ConditionFalse, ReasonDependencyFailed, err.Error())
chs.logger.Log("warning", "Failed to update chart dependencies", "namespace", fhr.Namespace, "name", fhr.Name, "error", err)
Expand Down

0 comments on commit 09757f9

Please sign in to comment.