Skip to content

Commit

Permalink
Merge pull request fluxcd#76 from ibrokethecloud/uninstall
Browse files Browse the repository at this point in the history
Minor tweak to pass targetNamespace to klipper-helm job
  • Loading branch information
dweomer authored Dec 4, 2020
2 parents 277de81 + d5ece73 commit 8c2fd2a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/helm/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ func job(chart *helmv1.HelmChart) (*batch.Job, *core.ConfigMap, *core.ConfigMap)
action = "delete"
}

targetNamespace := chart.Namespace
if len(chart.Spec.TargetNamespace) != 0 {
targetNamespace = chart.Spec.TargetNamespace
}

job := &batch.Job{
TypeMeta: meta.TypeMeta{
APIVersion: "batch/v1",
Expand Down Expand Up @@ -252,6 +257,10 @@ func job(chart *helmv1.HelmChart) (*batch.Job, *core.ConfigMap, *core.ConfigMap)
Name: "HELM_VERSION",
Value: chart.Spec.HelmVersion,
},
{
Name: "TARGET_NAMESPACE",
Value: targetNamespace,
},
},
},
},
Expand Down

0 comments on commit 8c2fd2a

Please sign in to comment.