azure-pipelines-tasks: [BUG]: HelmDeploy@0 Task Deletes the KUBECONFIG file when connectionType = 'None'
Task name
HelmDeploy
Task version
0
Environment type (Please select at least one enviroment where you face this issue)
- Self-Hosted
- Microsoft Hosted
- VMSS Pool
- Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Ubuntu 22.04
Task log
### First Deployment
2023-07-19T00:16:29.2243816Z ##[debug]Evaluating condition for step: 'Install MSSQL'
2023-07-19T00:16:29.2244602Z ##[debug]Evaluating: SucceededNode()
2023-07-19T00:16:29.2244948Z ##[debug]Evaluating SucceededNode:
2023-07-19T00:16:29.2245480Z ##[debug]=> True
2023-07-19T00:16:29.2245881Z ##[debug]Result: True
2023-07-19T00:16:29.2246219Z ##[section]Starting: Install MSSQL
2023-07-19T00:16:29.2253686Z ==============================================================================
2023-07-19T00:16:29.2253876Z Task : Package and deploy Helm charts
2023-07-19T00:16:29.2253982Z Description : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running helm commands
2023-07-19T00:16:29.2254150Z Version : 0.225.0
2023-07-19T00:16:29.2254241Z Author : Microsoft Corporation
2023-07-19T00:16:29.2254341Z Help : https://aka.ms/azpipes-helm-tsg
2023-07-19T00:16:29.2254451Z ==============================================================================
2023-07-19T00:16:29.2744421Z ##[debug]Using node path: /agent/externals/node10/bin/node
2023-07-19T00:16:29.3547754Z ##[debug]agent.TempDirectory=/agent/_work/_temp
2023-07-19T00:16:29.3555428Z ##[debug]loading inputs and endpoints
2023-07-19T00:16:29.3560131Z ##[debug]loading INPUT_CONNECTIONTYPE
2023-07-19T00:16:29.3571663Z ##[debug]loading INPUT_USECLUSTERADMIN
2023-07-19T00:16:29.3573208Z ##[debug]loading INPUT_NAMESPACE
2023-07-19T00:16:29.3574870Z ##[debug]loading INPUT_COMMAND
2023-07-19T00:16:29.3576458Z ##[debug]loading INPUT_CHARTTYPE
2023-07-19T00:16:29.3577834Z ##[debug]loading INPUT_CHARTPATH
2023-07-19T00:16:29.3579608Z ##[debug]loading INPUT_RELEASENAME
2023-07-19T00:16:29.3581315Z ##[debug]loading INPUT_OVERRIDEVALUES
2023-07-19T00:16:29.3582405Z ##[debug]loading INPUT_VALUEFILE
2023-07-19T00:16:29.3583790Z ##[debug]loading INPUT_DESTINATION
2023-07-19T00:16:29.3585201Z ##[debug]loading INPUT_CANARYIMAGE
2023-07-19T00:16:29.3586621Z ##[debug]loading INPUT_UPGRADETILLER
2023-07-19T00:16:29.3587690Z ##[debug]loading INPUT_UPDATEDEPENDENCY
2023-07-19T00:16:29.3589141Z ##[debug]loading INPUT_SAVE
2023-07-19T00:16:29.3590515Z ##[debug]loading INPUT_INSTALL
2023-07-19T00:16:29.3591897Z ##[debug]loading INPUT_RECREATE
2023-07-19T00:16:29.3593269Z ##[debug]loading INPUT_RESETVALUES
2023-07-19T00:16:29.3594722Z ##[debug]loading INPUT_FORCE
2023-07-19T00:16:29.3596118Z ##[debug]loading INPUT_WAITFOREXECUTION
2023-07-19T00:16:29.3597547Z ##[debug]loading INPUT_ARGUMENTS
2023-07-19T00:16:29.3598937Z ##[debug]loading INPUT_ENABLETLS
2023-07-19T00:16:29.3600514Z ##[debug]loading INPUT_FAILONSTDERR
2023-07-19T00:16:29.3601650Z ##[debug]loading INPUT_PUBLISHPIPELINEMETADATA
2023-07-19T00:16:29.3602976Z ##[debug]loading INPUT_CHARTPATHFORACR
2023-07-19T00:16:29.3604449Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2023-07-19T00:16:29.3605913Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2023-07-19T00:16:29.3607252Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2023-07-19T00:16:29.3610986Z ##[debug]loading SECRET_AAD_SERVICE_PRINCIPAL_CLIENT_SECRET
2023-07-19T00:16:29.3612840Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2023-07-19T00:16:29.3614242Z ##[debug]loading SECRET_AAD_SERVICE_PRINCIPAL_CLIENT_ID
2023-07-19T00:16:29.3615320Z ##[debug]loaded 30
2023-07-19T00:16:29.3619259Z ##[debug]Agent.ProxyUrl=undefined
2023-07-19T00:16:29.3620292Z ##[debug]Agent.CAInfo=undefined
2023-07-19T00:16:29.3620786Z ##[debug]Agent.ClientCert=undefined
2023-07-19T00:16:29.3621377Z ##[debug]Agent.SkipCertValidation=undefined
2023-07-19T00:16:29.3870919Z ##[debug]namespace=***
2023-07-19T00:16:29.4047603Z ##[debug]agent.proxyurl=undefined
2023-07-19T00:16:29.4048116Z ##[debug]VSTS_ARM_REST_IGNORE_SSL_ERRORS=undefined
2023-07-19T00:16:29.4048661Z ##[debug]AZURE_HTTP_USER_AGENT=VSTS_b5a1444b-9c78-4550-a625-dfe370d73fbe_build_298_0
2023-07-19T00:16:29.4058048Z ##[debug]System.TeamFoundationCollectionUri=https://dev.azure.com/alcidion/
2023-07-19T00:16:29.4058597Z ##[debug]System.HostType=build
2023-07-19T00:16:29.4059133Z ##[debug]System.DefaultWorkingDirectory=/agent/_work/1/***
2023-07-19T00:16:29.4059903Z ##[debug]Build.SourceBranchName=fix-kubeconfig-var-name
2023-07-19T00:16:29.4060921Z ##[debug]Build.Repository.Provider=TfsGit
2023-07-19T00:16:29.4061476Z ##[debug]Build.Repository.Uri=https://alcidion@dev.azure.com/alcidion/***/_git/***
2023-07-19T00:16:29.4960852Z ##[debug]namespace=***
2023-07-19T00:16:29.4962446Z ##[debug]check path : /agent/_work/_tasks/HelmDeploy_afa7d54d-537b-4dc8-b60a-e0eeea2c9a87/0.225.0/task.json
2023-07-19T00:16:29.4965418Z ##[debug]adding resource file: /agent/_work/_tasks/HelmDeploy_afa7d54d-537b-4dc8-b60a-e0eeea2c9a87/0.225.0/task.json
2023-07-19T00:16:29.4966031Z ##[debug]system.culture=en-US
2023-07-19T00:16:29.4978001Z ##[debug]check path : /agent/_work/_tasks/HelmDeploy_afa7d54d-537b-4dc8-b60a-e0eeea2c9a87/0.225.0/node_modules/azure-pipelines-tasks-azure-arm-rest-v2/module.json
2023-07-19T00:16:29.4978824Z ##[debug]adding resource file: /agent/_work/_tasks/HelmDeploy_afa7d54d-537b-4dc8-b60a-e0eeea2c9a87/0.225.0/node_modules/azure-pipelines-tasks-azure-arm-rest-v2/module.json
2023-07-19T00:16:29.4979428Z ##[debug]system.culture=en-US
2023-07-19T00:16:29.4994750Z ##[debug]command=upgrade
2023-07-19T00:16:29.4996143Z ##[debug]connectionType=None
2023-07-19T00:16:29.4997179Z ##[debug]connectionType=None
2023-07-19T00:16:29.4997662Z ##[debug]KUBECONFIG=/home/AzDevOps/.kube/config
2023-07-19T00:16:29.4998158Z ##[debug]KUBECONFIG=/home/AzDevOps/.kube/config
2023-07-19T00:16:29.4999832Z ##[debug]which 'kubectl'
2023-07-19T00:16:29.5003695Z ##[debug]found: '/opt/hostedtoolcache/kubectl/1.25.6/x64/kubectl'
2023-07-19T00:16:29.5005530Z ##[debug]agent.tempDirectory=/agent/_work/_temp
2023-07-19T00:16:29.5009440Z ##[debug]which 'kubelogin'
2023-07-19T00:16:29.5012923Z ##[debug]found: '/usr/local/bin/kubelogin'
2023-07-19T00:16:29.5013471Z ##[debug]Kubelogin is installed. Converting kubeconfig.
2023-07-19T00:16:29.5013985Z ##[debug]azureSubscriptionEndpoint=undefined
2023-07-19T00:16:29.5017124Z ##[debug]undefined auth scheme = undefined
2023-07-19T00:16:29.5017657Z ##[debug]Kubelogin authentication scheme undefined
2023-07-19T00:16:29.5031040Z ##[debug]Kubelogin authentication failed. Exception: TypeError: Cannot read property 'toLowerCase' of undefined
2023-07-19T00:16:29.5032065Z ##[debug]which 'helm'
2023-07-19T00:16:29.5033762Z ##[debug]found: '/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm'
2023-07-19T00:16:29.5034393Z ##[debug]SYSTEM_JOBID=542db71b-e6b7-5991-7a6e-2f13ec8f5d4a
2023-07-19T00:16:29.5035417Z ##[debug]failOnStderr=false
2023-07-19T00:16:29.5336951Z ##[debug]Processed: ##vso[telemetry.publish area=TaskEndpointId;feature=HelmDeployV0]{"connectionType":"None","command":"upgrade","jobId":"542db71b-e6b7-5991-7a6e-2f13ec8f5d4a"}
2023-07-19T00:16:29.5342572Z ##[debug]tillernamespace=undefined
2023-07-19T00:16:29.5372522Z ##[debug]system.debug=True
2023-07-19T00:16:29.5373202Z ##[debug]chartType=FilePath
2023-07-19T00:16:29.5373816Z ##[debug]releaseName=mssql
2023-07-19T00:16:29.5374586Z ##[debug]overrideValues=***
2023-07-19T00:16:29.5375388Z ##[debug]namespace=***
2023-07-19T00:16:29.5376059Z ##[debug]waitForExecution=true
2023-07-19T00:16:29.5376688Z ##[debug]arguments=--atomic --cleanup-on-fail --timeout 5m
2023-07-19T00:16:29.5377448Z ##[debug]valueFile=/agent/_work/1/***
2023-07-19T00:16:29.5378134Z ##[debug]install=true
2023-07-19T00:16:29.5378746Z ##[debug]recreate=false
2023-07-19T00:16:29.5379383Z ##[debug]resetValues=false
2023-07-19T00:16:29.5379955Z ##[debug]force=false
2023-07-19T00:16:29.5380837Z ##[debug]enableTls=false
2023-07-19T00:16:29.5381535Z ##[debug]System.DefaultWorkingDirectory=/agent/_work/1/***
2023-07-19T00:16:29.5382193Z ##[debug]version=undefined
2023-07-19T00:16:29.5382787Z ##[debug]chartPath=/agent/_work/1/mssql-2.1.3.tgz
2023-07-19T00:16:29.5383721Z ##[debug]Pattern not found in file path /agent/_work/1/mssql-2.1.3.tgz.
2023-07-19T00:16:29.5384377Z ##[debug]which '/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm'
2023-07-19T00:16:29.5385038Z ##[debug]found: '/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm'
2023-07-19T00:16:29.5385671Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: upgrade
2023-07-19T00:16:29.5386390Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: --namespace ***
2023-07-19T00:16:29.5387091Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: --install
2023-07-19T00:16:29.5387873Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: --set ***
2023-07-19T00:16:29.5388661Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: --wait
2023-07-19T00:16:29.5389353Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: --atomic --cleanup-on-fail --timeout 5m
2023-07-19T00:16:29.5390061Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: mssql
2023-07-19T00:16:29.5390770Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: "/agent/_work/1/mssql-2.1.3.tgz"
2023-07-19T00:16:29.5391470Z ##[debug]exec tool: /opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm
2023-07-19T00:16:29.5392488Z ##[debug]arguments:
2023-07-19T00:16:29.5393113Z ##[debug] upgrade
2023-07-19T00:16:29.5442305Z ##[debug] --namespace
2023-07-19T00:16:29.5442975Z ##[debug] ***
2023-07-19T00:16:29.5443615Z ##[debug] --install
2023-07-19T00:16:29.5444237Z ##[debug] --set
2023-07-19T00:16:29.5444978Z ##[debug] ***
2023-07-19T00:16:29.5445764Z ##[debug] --wait
2023-07-19T00:16:29.5446354Z ##[debug] --atomic
2023-07-19T00:16:29.5446987Z ##[debug] --cleanup-on-fail
2023-07-19T00:16:29.5447587Z ##[debug] --timeout
2023-07-19T00:16:29.5448151Z ##[debug] 5m
2023-07-19T00:16:29.5448702Z ##[debug] mssql
2023-07-19T00:16:29.5449283Z ##[debug] /agent/_work/1/mssql-2.1.3.tgz
2023-07-19T00:16:29.5450856Z [command]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm upgrade --namespace *** --install --set *** --wait --atomic --cleanup-on-fail --timeout 5m mssql /agent/_work/1/mssql-2.1.3.tgz
2023-07-19T00:16:31.7176567Z Release "mssql" has been upgraded. Happy Helming!
2023-07-19T00:16:31.7177205Z NAME: mssql
2023-07-19T00:16:31.7177590Z LAST DEPLOYED: Wed Jul 19 00:16:30 2023
2023-07-19T00:16:31.7178366Z NAMESPACE: ***
2023-07-19T00:16:31.7178832Z STATUS: deployed
2023-07-19T00:16:31.7179730Z REVISION: 1301
2023-07-19T00:16:31.7180121Z TEST SUITE: None
2023-07-19T00:16:31.7180965Z ##[debug]set helmExitCode=0
2023-07-19T00:16:31.7183011Z ##[debug]Processed: ##vso[task.setvariable variable=helmExitCode;isOutput=false;issecret=false;]0
2023-07-19T00:16:31.7184692Z ##[debug]set helmOutput=Release "mssql" has been upgraded. Happy Helming!
NAME: mssql
LAST DEPLOYED: Wed Jul 19 00:16:30 2023
NAMESPACE: ***
STATUS: deployed
REVISION: 1301
TEST SUITE: None
2023-07-19T00:16:31.7186366Z ##[debug]Processed: ##vso[task.setvariable variable=helmOutput;isOutput=false;issecret=false;]Release "mssql" has been upgraded. Happy Helming!
NAME: mssql
LAST DEPLOYED: Wed Jul 19 00:16:30 2023
NAMESPACE: ***
STATUS: deployed
REVISION: 1301
TEST SUITE: None
2023-07-19T00:16:31.7187394Z ##[debug]publishPipelineMetadata=false
2023-07-19T00:16:31.7188083Z ##[debug]connectionType=None
2023-07-19T00:16:31.7219564Z ##[section]Finishing: Install MSSQL
### Second Deployment
2023-07-19T00:16:31.7234705Z ##[debug]Evaluating condition for step: 'Install ***'
2023-07-19T00:16:31.7235520Z ##[debug]Evaluating: SucceededNode()
2023-07-19T00:16:31.7235865Z ##[debug]Evaluating SucceededNode:
2023-07-19T00:16:31.7236362Z ##[debug]=> True
2023-07-19T00:16:31.7236733Z ##[debug]Result: True
2023-07-19T00:16:31.7237068Z ##[section]Starting: Install ***
2023-07-19T00:16:31.7243971Z ==============================================================================
2023-07-19T00:16:31.7244095Z Task : Package and deploy Helm charts
2023-07-19T00:16:31.7244160Z Description : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running helm commands
2023-07-19T00:16:31.7244258Z Version : 0.225.0
2023-07-19T00:16:31.7244313Z Author : Microsoft Corporation
2023-07-19T00:16:31.7244372Z Help : https://aka.ms/azpipes-helm-tsg
2023-07-19T00:16:31.7244439Z ==============================================================================
2023-07-19T00:16:31.7497476Z ##[debug]Using node path: /agent/externals/node10/bin/node
2023-07-19T00:16:31.8315414Z ##[debug]agent.TempDirectory=/agent/_work/_temp
2023-07-19T00:16:31.8333045Z ##[debug]loading inputs and endpoints
2023-07-19T00:16:31.8338074Z ##[debug]loading INPUT_CONNECTIONTYPE
2023-07-19T00:16:31.8349252Z ##[debug]loading INPUT_USECLUSTERADMIN
2023-07-19T00:16:31.8350476Z ##[debug]loading INPUT_NAMESPACE
2023-07-19T00:16:31.8351612Z ##[debug]loading INPUT_COMMAND
2023-07-19T00:16:31.8352604Z ##[debug]loading INPUT_CHARTTYPE
2023-07-19T00:16:31.8353723Z ##[debug]loading INPUT_CHARTPATH
2023-07-19T00:16:31.8354720Z ##[debug]loading INPUT_RELEASENAME
2023-07-19T00:16:31.8355756Z ##[debug]loading INPUT_OVERRIDEVALUES
2023-07-19T00:16:31.8356752Z ##[debug]loading INPUT_VALUEFILE
2023-07-19T00:16:31.8357798Z ##[debug]loading INPUT_DESTINATION
2023-07-19T00:16:31.8358817Z ##[debug]loading INPUT_CANARYIMAGE
2023-07-19T00:16:31.8359831Z ##[debug]loading INPUT_UPGRADETILLER
2023-07-19T00:16:31.8360767Z ##[debug]loading INPUT_UPDATEDEPENDENCY
2023-07-19T00:16:31.8361684Z ##[debug]loading INPUT_SAVE
2023-07-19T00:16:31.8362699Z ##[debug]loading INPUT_INSTALL
2023-07-19T00:16:31.8363660Z ##[debug]loading INPUT_RECREATE
2023-07-19T00:16:31.8364581Z ##[debug]loading INPUT_RESETVALUES
2023-07-19T00:16:31.8365618Z ##[debug]loading INPUT_FORCE
2023-07-19T00:16:31.8366540Z ##[debug]loading INPUT_WAITFOREXECUTION
2023-07-19T00:16:31.8367472Z ##[debug]loading INPUT_ARGUMENTS
2023-07-19T00:16:31.8368425Z ##[debug]loading INPUT_ENABLETLS
2023-07-19T00:16:31.8369544Z ##[debug]loading INPUT_FAILONSTDERR
2023-07-19T00:16:31.8371341Z ##[debug]loading INPUT_PUBLISHPIPELINEMETADATA
2023-07-19T00:16:31.8376803Z ##[debug]loading INPUT_CHARTPATHFORACR
2023-07-19T00:16:31.8377284Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2023-07-19T00:16:31.8377773Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2023-07-19T00:16:31.8380906Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2023-07-19T00:16:31.8383372Z ##[debug]loading SECRET_AAD_SERVICE_PRINCIPAL_CLIENT_ID
2023-07-19T00:16:31.8384053Z ##[debug]loading SECRET_AAD_SERVICE_PRINCIPAL_CLIENT_SECRET
2023-07-19T00:16:31.8384593Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2023-07-19T00:16:31.8385122Z ##[debug]loaded 30
2023-07-19T00:16:31.8387445Z ##[debug]Agent.ProxyUrl=undefined
2023-07-19T00:16:31.8392920Z ##[debug]Agent.CAInfo=undefined
2023-07-19T00:16:31.8393394Z ##[debug]Agent.ClientCert=undefined
2023-07-19T00:16:31.8393865Z ##[debug]Agent.SkipCertValidation=undefined
2023-07-19T00:16:31.8633391Z ##[debug]namespace=***
2023-07-19T00:16:31.8810301Z ##[debug]agent.proxyurl=undefined
2023-07-19T00:16:31.8811165Z ##[debug]VSTS_ARM_REST_IGNORE_SSL_ERRORS=undefined
2023-07-19T00:16:31.8811981Z ##[debug]AZURE_HTTP_USER_AGENT=VSTS_b5a1444b-9c78-4550-a625-dfe370d73fbe_build_298_0
2023-07-19T00:16:31.8821024Z ##[debug]System.TeamFoundationCollectionUri=https://dev.azure.com/alcidion/
2023-07-19T00:16:31.8821851Z ##[debug]System.HostType=build
2023-07-19T00:16:31.8822901Z ##[debug]System.DefaultWorkingDirectory=/agent/_work/1/***
2023-07-19T00:16:31.8823842Z ##[debug]Build.SourceBranchName=fix-kubeconfig-var-name
2023-07-19T00:16:31.8824576Z ##[debug]Build.Repository.Provider=TfsGit
2023-07-19T00:16:31.8825328Z ##[debug]Build.Repository.Uri=https://alcidion@dev.azure.com/alcidion/***/_git/***
2023-07-19T00:16:31.9713822Z ##[debug]namespace=***
2023-07-19T00:16:31.9714952Z ##[debug]check path : /agent/_work/_tasks/HelmDeploy_afa7d54d-537b-4dc8-b60a-e0eeea2c9a87/0.225.0/task.json
2023-07-19T00:16:31.9717717Z ##[debug]adding resource file: /agent/_work/_tasks/HelmDeploy_afa7d54d-537b-4dc8-b60a-e0eeea2c9a87/0.225.0/task.json
2023-07-19T00:16:31.9718575Z ##[debug]system.culture=en-US
2023-07-19T00:16:31.9732311Z ##[debug]check path : /agent/_work/_tasks/HelmDeploy_afa7d54d-537b-4dc8-b60a-e0eeea2c9a87/0.225.0/node_modules/azure-pipelines-tasks-azure-arm-rest-v2/module.json
2023-07-19T00:16:31.9733429Z ##[debug]adding resource file: /agent/_work/_tasks/HelmDeploy_afa7d54d-537b-4dc8-b60a-e0eeea2c9a87/0.225.0/node_modules/azure-pipelines-tasks-azure-arm-rest-v2/module.json
2023-07-19T00:16:31.9734301Z ##[debug]system.culture=en-US
2023-07-19T00:16:31.9750318Z ##[debug]command=upgrade
2023-07-19T00:16:31.9751200Z ##[debug]connectionType=None
2023-07-19T00:16:31.9752332Z ##[debug]connectionType=None
2023-07-19T00:16:31.9753152Z ##[debug]KUBECONFIG=/home/AzDevOps/.kube/config
2023-07-19T00:16:31.9753861Z ##[debug]KUBECONFIG=/home/AzDevOps/.kube/config
2023-07-19T00:16:31.9755302Z ##[debug]which 'kubectl'
2023-07-19T00:16:31.9759809Z ##[debug]found: '/opt/hostedtoolcache/kubectl/1.25.6/x64/kubectl'
2023-07-19T00:16:31.9761477Z ##[debug]agent.tempDirectory=/agent/_work/_temp
2023-07-19T00:16:31.9765445Z ##[debug]which 'kubelogin'
2023-07-19T00:16:31.9769134Z ##[debug]found: '/usr/local/bin/kubelogin'
2023-07-19T00:16:31.9771825Z ##[debug]Kubelogin is installed. Converting kubeconfig.
2023-07-19T00:16:31.9772405Z ##[debug]azureSubscriptionEndpoint=undefined
2023-07-19T00:16:31.9773850Z ##[debug]undefined auth scheme = undefined
2023-07-19T00:16:31.9774548Z ##[debug]Kubelogin authentication scheme undefined
2023-07-19T00:16:31.9788907Z ##[debug]Kubelogin authentication failed. Exception: TypeError: Cannot read property 'toLowerCase' of undefined
2023-07-19T00:16:31.9789851Z ##[debug]which 'helm'
2023-07-19T00:16:31.9790665Z ##[debug]found: '/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm'
2023-07-19T00:16:31.9791767Z ##[debug]SYSTEM_JOBID=542db71b-e6b7-5991-7a6e-2f13ec8f5d4a
2023-07-19T00:16:31.9792564Z ##[debug]failOnStderr=false
2023-07-19T00:16:32.0207679Z ##[debug]Processed: ##vso[telemetry.publish area=TaskEndpointId;feature=HelmDeployV0]{"connectionType":"None","command":"upgrade","jobId":"542db71b-e6b7-5991-7a6e-2f13ec8f5d4a"}
2023-07-19T00:16:32.0210583Z ##[debug]tillernamespace=undefined
2023-07-19T00:16:32.0211067Z ##[debug]system.debug=True
2023-07-19T00:16:32.0211528Z ##[debug]chartType=FilePath
2023-07-19T00:16:32.0211955Z ##[debug]releaseName=miya
2023-07-19T00:16:32.0212707Z ##[debug]overrideValues=***
2023-07-19T00:16:32.0213462Z ##[debug]namespace=***
2023-07-19T00:16:32.0213919Z ##[debug]waitForExecution=true
2023-07-19T00:16:32.0214637Z ##[debug]arguments=--atomic --cleanup-on-fail --timeout 15m --values /agent/_work/1/***/devtest/devtest01/common.miya.values.yaml --values /agent/_work/1/***/devtest/devtest01/canary/miya.values.yaml --values /agent/_work/1/***/devtest/devtest01/canary/miya.develop.values.yaml
2023-07-19T00:16:32.0215425Z ##[debug]valueFile=/agent/_work/1/***/devtest/common.miya.values.yaml
2023-07-19T00:16:32.0216089Z ##[debug]install=true
2023-07-19T00:16:32.0216501Z ##[debug]recreate=false
2023-07-19T00:16:32.0216911Z ##[debug]resetValues=false
2023-07-19T00:16:32.0217325Z ##[debug]force=false
2023-07-19T00:16:32.0217718Z ##[debug]enableTls=false
2023-07-19T00:16:32.0218189Z ##[debug]System.DefaultWorkingDirectory=/agent/_work/1/***
2023-07-19T00:16:32.0218663Z ##[debug]version=undefined
2023-07-19T00:16:32.0219166Z ##[debug]Pattern not found in file path /agent/_work/1/***/devtest/common.miya.values.yaml.
2023-07-19T00:16:32.0219688Z ##[debug]chartPath=/agent/_work/1/***/helm/miya.tgz
2023-07-19T00:16:32.0220181Z ##[debug]Pattern not found in file path /agent/_work/1/***/helm/miya.tgz.
2023-07-19T00:16:32.0220671Z ##[debug]which '/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm'
2023-07-19T00:16:32.0221175Z ##[debug]found: '/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm'
2023-07-19T00:16:32.0221677Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: upgrade
2023-07-19T00:16:32.0222206Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: --namespace ***
2023-07-19T00:16:32.0223032Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: --install
2023-07-19T00:16:32.0223559Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: --values
2023-07-19T00:16:32.0224126Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: "/agent/_work/1/***/devtest/common.miya.values.yaml"
2023-07-19T00:16:32.0225013Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: --set ***
2023-07-19T00:16:32.0225842Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: --wait
2023-07-19T00:16:32.0226636Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: --atomic --cleanup-on-fail --timeout 15m --values /agent/_work/1/***/devtest/devtest01/common.miya.values.yaml --values /agent/_work/1/***/devtest/devtest01/canary/miya.values.yaml --values /agent/_work/1/***/devtest/devtest01/canary/miya.develop.values.yaml
2023-07-19T00:16:32.0227590Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: miya
2023-07-19T00:16:32.0228126Z ##[debug]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm arg: "/agent/_work/1/***/helm/miya.tgz"
2023-07-19T00:16:32.0228661Z ##[debug]exec tool: /opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm
2023-07-19T00:16:32.0229111Z ##[debug]arguments:
2023-07-19T00:16:32.0229506Z ##[debug] upgrade
2023-07-19T00:16:32.0229901Z ##[debug] --namespace
2023-07-19T00:16:32.0230313Z ##[debug] ***
2023-07-19T00:16:32.0230725Z ##[debug] --install
2023-07-19T00:16:32.0231121Z ##[debug] --values
2023-07-19T00:16:32.0231578Z ##[debug] /agent/_work/1/***/devtest/common.miya.values.yaml
2023-07-19T00:16:32.0232027Z ##[debug] --set
2023-07-19T00:16:32.0232702Z ##[debug] ***
2023-07-19T00:16:32.0233419Z ##[debug] --wait
2023-07-19T00:16:32.0233819Z ##[debug] --atomic
2023-07-19T00:16:32.0234218Z ##[debug] --cleanup-on-fail
2023-07-19T00:16:32.0234625Z ##[debug] --timeout
2023-07-19T00:16:32.0234981Z ##[debug] 15m
2023-07-19T00:16:32.0235351Z ##[debug] --values
2023-07-19T00:16:32.0235909Z ##[debug] /agent/_work/1/***/devtest/devtest01/common.miya.values.yaml
2023-07-19T00:16:32.0236380Z ##[debug] --values
2023-07-19T00:16:32.0236845Z ##[debug] /agent/_work/1/***/devtest/devtest01/canary/miya.values.yaml
2023-07-19T00:16:32.0237320Z ##[debug] --values
2023-07-19T00:16:32.0237804Z ##[debug] /agent/_work/1/***/devtest/devtest01/canary/miya.develop.values.yaml
2023-07-19T00:16:32.0238308Z ##[debug] miya
2023-07-19T00:16:32.0238734Z ##[debug] /agent/_work/1/***/helm/miya.tgz
2023-07-19T00:16:32.0240901Z [command]/opt/hostedtoolcache/helm/3.11.1/x64/linux-amd64/helm upgrade --namespace *** --install --values /agent/_work/1/***/devtest/common.miya.values.yaml --set *** --wait --atomic --cleanup-on-fail --timeout 15m --values /agent/_work/1/***/devtest/devtest01/common.miya.values.yaml --values /agent/_work/1/***/devtest/devtest01/canary/miya.values.yaml --values /agent/_work/1/***/devtest/devtest01/canary/miya.develop.values.yaml miya /agent/_work/1/***/helm/miya.tgz
2023-07-19T00:16:32.0373031Z W0719 00:16:32.031520 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
2023-07-19T00:16:32.0373574Z ##[debug]set helmExitCode=1
2023-07-19T00:16:32.0374722Z W0719 00:16:32.031728 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
2023-07-19T00:16:32.0375676Z ##[debug]Processed: ##vso[task.setvariable variable=helmExitCode;isOutput=false;issecret=false;]1
2023-07-19T00:16:32.0378453Z W0719 00:16:32.031772 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
2023-07-19T00:16:32.0379027Z ##[debug]publishPipelineMetadata=false
2023-07-19T00:16:32.0380458Z Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp [::1]:8080: connect: connection refused
2023-07-19T00:16:32.0381419Z ##[debug]execResult: {"code":1,"stdout":"","stderr":"W0719 00:16:32.031520 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config\nW0719 00:16:32.031728 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config\nW0719 00:16:32.031772 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config\nError: Kubernetes cluster unreachable: Get \"http://localhost:8080/version\": dial tcp [::1]:8080: connect: connection refused\n"}
2023-07-19T00:16:32.0382723Z ##[debug]task result: Failed
2023-07-19T00:16:32.0408712Z ##[error]W0719 00:16:32.031520 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
W0719 00:16:32.031728 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
W0719 00:16:32.031772 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp [::1]:8080: connect: connection refused
2023-07-19T00:16:32.0415655Z ##[debug]Processed: ##vso[task.issue type=error;]W0719 00:16:32.031520 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
W0719 00:16:32.031728 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
W0719 00:16:32.031772 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp [::1]:8080: connect: connection refused
2023-07-19T00:16:32.0419035Z ##[debug]Processed: ##vso[task.complete result=Failed;]W0719 00:16:32.031520 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
W0719 00:16:32.031728 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
W0719 00:16:32.031772 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp [::1]:8080: connect: connection refused
2023-07-19T00:16:32.0420053Z ##[debug]connectionType=None
2023-07-19T00:16:32.0421244Z ##[section]Finishing: Install ***
Relevant log output
2023-07-19T00:16:32.0381419Z ##[debug]execResult: {"code":1,"stdout":"","stderr":"W0719 00:16:32.031520 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config\nW0719 00:16:32.031728 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config\nW0719 00:16:32.031772 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config\nError: Kubernetes cluster unreachable: Get \"http://localhost:8080/version\": dial tcp [::1]:8080: connect: connection refused\n"}
2023-07-19T00:16:32.0382723Z ##[debug]task result: Failed
2023-07-19T00:16:32.0408712Z ##[error]W0719 00:16:32.031520 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
W0719 00:16:32.031728 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
W0719 00:16:32.031772 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp [::1]:8080: connect: connection refused
2023-07-19T00:16:32.0415655Z ##[debug]Processed: ##vso[task.issue type=error;]W0719 00:16:32.031520 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
W0719 00:16:32.031728 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
W0719 00:16:32.031772 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp [::1]:8080: connect: connection refused
2023-07-19T00:16:32.0419035Z ##[debug]Processed: ##vso[task.complete result=Failed;]W0719 00:16:32.031520 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
W0719 00:16:32.031728 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
W0719 00:16:32.031772 3559 loader.go:222] Config not found: /home/AzDevOps/.kube/config
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp [::1]:8080: connect: connection refused
Aditional info
I have a task created that is for working arround the (previous?) lack of kubelogin support for ASK clusters with only AAD auth
# exit with failure if any of the executed items return non-zero
set -e
set -o pipefail
# install kubectl and kubelogin
sudo az aks install-cli --client-version latest --kubelogin-version latest --only-show-errors
# download ~/.kube/config file
az aks get-credentials --resource-group "${resourceGroup}" --name "${cluster}" --only-show-errors
# convert ~/.kube/config to a format compatible with kubelogin
kubelogin convert-kubeconfig --login spn
# create secure azure devops variables for later steps
echo "##vso[task.setvariable variable=AAD_SERVICE_PRINCIPAL_CLIENT_ID;isSecret=true;isreadonly=true]$servicePrincipalId"
echo "##vso[task.setvariable variable=AAD_SERVICE_PRINCIPAL_CLIENT_SECRET;isSecret=true;isreadonly=true]$servicePrincipalKey"
echo "##vso[task.setvariable variable=KUBECONFIG;isSecret=false]$HOME/.kube/config"```
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 10
- Comments: 37 (16 by maintainers)
Note that you can lock your version to the last working version (0.223.1).
E.g.:
Any idea when 0.226.2 or later will become avalaible? I had updated our pipelines to use the builtin kubelogin behavior and this is now broken due to the forced revert to 0.223.1
Update: Release pipelines will now also redirect to 0.223.1.
Wow thats great… All of our pipeline broke now because we made adjustments for the 0.225.0 task. How about not adding breaking changes to minor versions?
We updated the configuration to properly redirect 0.225 to 0.223.1 for classic and Yaml pipelines. Release pipelines will be updated with the redirect tomorrow. I’ll keep this issue updated.
0.226.2 and higher will contain the fix when becomes available.
Thank you for the report and we apologize for the inconvenience this issue has caused. We rolled the task to 0.223.1. We will follow up with a fix for this issue.
Thanks for following up with feedbacks. We’ll update docs and make this path $HOME/.kube/config by default when file path not setup.
This is still happening. “KUBECONFIG kube configuration file path must be set when connectionType is none and command is install or upgrade” Nowhere in the documentation this is said but also on how to set the path:
Specifies the connection type.
Kubernetes Service Connection - Specify Kubernetes Service Connection to connect to any Kubernetes cluster by using kubeconfig or the Azure Service Account. Allows you to provide a KubeConfig file, specify a Service Account, or import an AKS instance with the Azure Subscription option. Importing an AKS instance with the Azure Subscription option requires Kubernetes cluster access at Service Connection configuration time. Azure Resource Manager - Specify Azure Resource Manager to connect to an Azure Kubernetes Service by using Azure Service Connection. Does not access Kubernetes cluster at Service Connection configuration time. None - Use a pre-created Kubernetes configuration stored locally.
Only the workaround provided on this issue when the connection type is set to “None”.
Feedbacks were addressed and thanks all for the following up. Closing the issue, please feel free to reopen if there’s any follow up concerns/questions. Thank you.
My opinion, 2 cents, breaking change should have been a new major version release, an 1.x version and leave the 0.x version alone.
Indeed, after passing the KUBECONFIG environment variable in a pws before running helmdeploy, as described by @nicholass-alcidion , everything works fine, thanks :
Write-Host "##vso[task.setvariable variable=KUBECONFIG]$HOME/.kube/config"It would be a good idea to update your documentation, as this is a real breaking change. It might also be a good idea for the task to use this path by default when the connexion type is None.
Our pipelines that have been updated to work with the native
kubeloginare all functioanl again now that we have the0.226tasks.I have also validated this bug as I orginally reported it has been resolved. To verify this I checked out my pipeline before any of the recent changes to support natvie
kubeloginand then updated all of theHelmDeploy@0tasks to pass aKUBECONFIGenvironment variable with the value of$HOME/.kube/configI am still facing the same issue when ConnectionType is None, can you please give it a permanent fix as our pipelines are not working
After setup kube config file path correctly, I was able to reproduce the case where first deployment succeeded and second one failed. I removed externalAuth from https://github.com/microsoft/azure-pipelines-tasks/blob/d52ec3f8ad11b8c4b593407d24307bc6ab315dcf/Tasks/HelmDeployV0/src/helm.ts#L139C18-L139C18 in https://github.com/microsoft/azure-pipelines-tasks/pull/18679. And then multiple HelmDeployV0 tasks are supported.