Skip to content

Commit

Permalink
Used "kubectl config view" instead of printing raw config (#404)
Browse files Browse the repository at this point in the history
* Used "kubectl config view" instead of printing raw config

* Removed the variable guard, as we now rely on kubectl to mask for us

* Restored the variable guard, because config view can still leak details
  • Loading branch information
mcasperson committed Jun 10, 2019
1 parent 41fc3fa commit b0772a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/Calamari/Kubernetes/Scripts/KubectlBashContext.sh
Expand Up @@ -165,7 +165,7 @@ configure_kubectl_path
setup_context
create_namespace
if [[ "$Octopus_K8S_OutputKubeConfig" = true ]]; then
cat $KUBECONFIG
kubectl config view
fi
echo "Invoking target script \"$(get_octopusvariable "OctopusKubernetesTargetScript")\" with $(get_octopusvariable "OctopusKubernetesTargetScriptParameters") parameters"
echo "##octopus[stdout-default]"
Expand Down
Expand Up @@ -189,7 +189,7 @@ ConfigureKubeCtlPath
SetupContext
CreateNamespace
if ($K8S_OutputKubeConfig -eq $true) {
Get-Content $env:KUBECONFIG
& $Kubectl_Exe config view
}
Write-Verbose "Invoking target script $OctopusKubernetesTargetScript with $OctopusKubernetesTargetScriptParameters parameters"
Write-Host "##octopus[stdout-default]"
Expand Down

0 comments on commit b0772a9

Please sign in to comment.