Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions cmd/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type diffCmd struct {
enableDNS bool
SkipSchemaValidation bool
namespace string // namespace to assume the release to be installed into. Defaults to the current kube config namespace.
storageNamespace string // namespace where helm release metadata is stored, when different from the deployment namespace.
valueFiles valueFiles
values []string
stringValues []string
Expand Down Expand Up @@ -115,7 +116,11 @@ perform.

func newChartCommand() *cobra.Command {
diff := diffCmd{
namespace: os.Getenv("HELM_NAMESPACE"),
namespace: os.Getenv("HELM_NAMESPACE"),
storageNamespace: os.Getenv("HELM_STORAGE_NAMESPACE"),
}
if len(diff.storageNamespace) == 0 {
diff.storageNamespace = diff.namespace
}
unknownFlags := os.Getenv("HELM_DIFF_IGNORE_UNKNOWN_FLAGS") == envTrue

Expand Down Expand Up @@ -271,7 +276,7 @@ func (d *diffCmd) runHelm3() error {
}

if d.clusterAccessAllowed() {
releaseManifest, err = getRelease(d.release, d.namespace, d.kubeContext)
releaseManifest, err = getRelease(d.release, d.storageNamespace, d.kubeContext)
}

var newInstall bool
Expand All @@ -297,7 +302,7 @@ func (d *diffCmd) runHelm3() error {
if d.threeWayMerge || d.takeOwnership {
actionConfig = new(action.Configuration)
localEnv := prepareEnvSettings(d.kubeContext)
if err := actionConfig.Init(localEnv.RESTClientGetter(), localEnv.Namespace(), os.Getenv("HELM_DRIVER")); err != nil {
if err := actionConfig.Init(localEnv.RESTClientGetter(), d.storageNamespace, os.Getenv("HELM_DRIVER")); err != nil {
log.Fatalf("%+v", err)
}
if err := actionConfig.KubeClient.IsReachable(); err != nil {
Expand All @@ -315,7 +320,7 @@ func (d *diffCmd) runHelm3() error {
currentSpecs := make(map[string]*manifest.MappingResult)
if !newInstall && d.clusterAccessAllowed() {
if !d.noHooks && !d.threeWayMerge {
hooks, err := getHooks(d.release, d.namespace, d.kubeContext)
hooks, err := getHooks(d.release, d.storageNamespace, d.kubeContext)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions install-binary.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ function New-TemporaryDirectory {
function Get-Url {
param ([Parameter(Mandatory=$true)][string] $Version, [Parameter(Mandatory=$true)][string] $Architecture)
if ($Version -eq "latest") {
return "https://github.com/databus23/helm-diff/releases/latest/download/helm-diff-windows-${Architecture}.tgz"
return "https://github.com/topfreegames/helm-diff/releases/latest/download/helm-diff-windows-${Architecture}.tgz"
}
return "https://github.com/databus23/helm-diff/releases/download/${Version}/helm-diff-windows-${Architecture}.tgz"
return "https://github.com/topfreegames/helm-diff/releases/download/${Version}/helm-diff-windows-${Architecture}.tgz"
}

function Download-Plugin {
Expand Down
2 changes: 1 addition & 1 deletion install-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Shamelessly copied from https://github.com/technosophos/helm-template

PROJECT_NAME="helm-diff"
PROJECT_GH="databus23/$PROJECT_NAME"
PROJECT_GH="topfreegames/$PROJECT_NAME"
export GREP_COLOR="never"

# Convert HELM_BIN and HELM_PLUGIN_DIR to unix if cygpath is
Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: diff
# Version is the version of Helm plus the number of official builds for this
# plugin
version: "3.15.6"
version: "3.15.6-1"
usage: "Preview helm upgrade changes as a diff"
description: "Preview helm upgrade changes as a diff"
useTunnel: true
Expand Down