Skip to content

Commit

Permalink
Put binary in prefixPath within container (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
aiyengar2 authored May 4, 2021
1 parent 7dfa09a commit 3edd5dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 8 additions & 3 deletions charts/rancher-wins-upgrader/scripts/upgrade.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ function Transfer-File
$null = Copy-Item -Force -Path $Src -Destination $Dst
}

$prefixPath = 'C:\'
if ($env:CATTLE_PREFIX_PATH) {
$prefixPath = $env:CATTLE_PREFIX_PATH
}
$winsUpgradePath = $('{0}etc\rancher\wins\wins-upgrade.exe' -f $prefixPath)
if ($env:WINS_UPGRADE_PATH) {
$winsUpgradePath = $env:WINS_UPGRADE_PATH
} else {
$winsUpgradePath = "C:\etc\rancher\wins\wins-upgrade.exe"
$winsUpgradePath = $('{0}{1}' -f $prefixPath -f $env:WINS_UPGRADE_PATH)
}


$winsUpgradeDir = Split-Path -Path $winsUpgradePath
$winsUpgradeFilename = Split-Path -Path $winsUpgradePath -Leaf

Expand Down
2 changes: 2 additions & 0 deletions charts/rancher-wins-upgrader/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ spec:
env:
- name: HELM_REVISION_NUMBER
value: {{ $.Release.Revision | quote }}
- name: CATTLE_PREFIX_PATH
value: {{ default "C:\\" $.Values.global.cattle.rkeWindowsPathPrefix | replace "/" "\\" }}
{{- if $.Values.masquerade.enabled }}
- name: WINS_UPGRADE_PATH
value: {{ include "winsUpgrader.winsMasqueradePath" $ }}
Expand Down

0 comments on commit 3edd5dd

Please sign in to comment.