Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes manifest task expects new input #10957

Closed
feroz-ahmmed opened this issue Jul 20, 2019 · 4 comments
Closed

Kubernetes manifest task expects new input #10957

feroz-ahmmed opened this issue Jul 20, 2019 · 4 comments

Comments

@feroz-ahmmed
Copy link

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Bug

Enter Task Name: KubernetesManifest

list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

Environment

  • Server - Azure Pipelines or TFS on-premises?

  • Agent - Hosted or Private:

    • If using Hosted agent, provide agent queue name: Hosted Ubuntu 16.04

Issue Description

Here is my task description -

- task: KubernetesManifest@0
  displayName: bake
  name: bake
  inputs:
    action: bake
    helmChart: '$(System.ArtifactsDirectory)/charts'
    releaseName: $(Release_Name)
    overrideFiles: |
    $(System.ArtifactsDirectory)/charts/values.$(DeployEnvironmentIdentifier).yaml
    overrides: |
    image.tag:$(Build.BuildId)
    buildID:"1"

The pipeline was fine till task version 0.154.5
Failing with current version 0.154.7

Task logs


##[debug]Evaluating condition for step: 'bake' |  
-- | --
  | ##[debug]Evaluating: SucceededNode() |  
  | ##[debug]Evaluating SucceededNode: |  
  | ##[debug]=> True |  
  | ##[debug]Result: True |  
  | Starting: bake |  
  | ============================================================================== |  
  | Task         : Deploy Kubernetes manifests |  
  | Description  : Use Kubernetes manifest files to deploy to clusters or even bake the manifest files to be used for deployments using Helm charts |  
  | Version      : 0.154.7 |  
  | Author       : Microsoft Corporation |  
  | Help         : https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/kubernetes-manifest |  
  | ============================================================================== |  
  | ##[debug]agent.TempDirectory=/home/vsts/work/_temp |  
  | ##[debug]loading inputs and endpoints |  
  | ##[debug]loading INPUT_ACTION |  
  | ##[debug]loading INPUT_STRATEGY |  
  | ##[debug]loading INPUT_PERCENTAGE |  
  | ##[debug]loading INPUT_MANIFESTS |  
  | ##[debug]loading INPUT_RENDERTYPE |  
  | ##[debug]loading INPUT_HELMCHART |  
  | ##[debug]loading INPUT_RELEASENAME |  
  | ##[debug]loading INPUT_OVERRIDEFILES |  
  | ##[debug]loading INPUT_OVERRIDES |  
  | ##[debug]loading INPUT_RESOURCETOPATCH |  
  | ##[debug]loading INPUT_RESOURCEFILETOPATCH |  
  | ##[debug]loading INPUT_MERGESTRATEGY |  
  | ##[debug]loading INPUT_SECRETTYPE |  
  | ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION |  
  | ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION |  
  | ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN |  
  | ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN |  
  | ##[debug]loaded 17 |  
  | ##[debug]Agent.ProxyUrl=undefined |  
  | ##[debug]Agent.CAInfo=undefined |  
  | ##[debug]Agent.ClientCert=undefined |  
  | ##[debug]Agent.SkipCertValidation=undefined |  
  | ##[debug]namespace=null |  
  | ##[debug]containers=null |  
  | ##[debug]imagePullSecrets=null |  
  | ##[debug]manifests=/home/vsts/work/1/s |  
  | ##[debug]percentage=0 |  
  | ##[debug]strategy=none |  
  | ##[debug]arguments=null |  
  | ##[debug]secretArguments=null |  
  | ##[debug]secretType=dockerRegistry |  
  | ##[debug]secretName=null |  
  | ##[debug]dockerRegistryEndpoint=null |  
  | ##[debug]task result: Failed |  
  | ##[error]Unhandled: Input required: kubernetesServiceConnection |  
  | ##[debug]Processed: ##vso[task.issue type=error;]Unhandled: Input required: kubernetesServiceConnection |  
  | ##[debug]Processed: ##vso[task.complete result=Failed;]Unhandled: Input required: kubernetesServiceConnection |  
  | Finishing: bake


Error logs

##[error]Unhandled: Input required: kubernetesServiceConnection
@feroz-ahmmed
Copy link
Author

Provided the input kubernetesServiceConnection and runs successfully.

@bansalaseem
Copy link
Contributor

If you are not using the task in a deployment job with environment context, then you are expected to pass kubernetesServiceConnection parameter.

@feroz-ahmmed
Copy link
Author

@bansalaseem , I was running the task in a deployment with environment context. Here's my yaml -

jobs:
  - deployment: Deploy
    displayName: Deploy job
    pool:
      vmImage: $(vmImage)
    environment: $(DeployEnvironment)
    strategy:
      runOnce:
        deploy:
          steps:
          - task: DownloadPipelineArtifact@1
            inputs:
              artifactName: 'charts'
              downloadPath: '$(System.ArtifactsDirectory)/charts'

          - task: KubernetesManifest@0
            displayName: bake
            name: bake
            inputs:
              action: bake
              helmChart: '$(System.ArtifactsDirectory)/charts'
              releaseName: $(Release_Name)
              overrideFiles: |
                $(System.ArtifactsDirectory)/charts/values.$(DeployEnvironmentIdentifier).yaml
              overrides: |
                image.tag:$(Build.BuildId)
                buildID:"1"
               
          - task: KubernetesManifest@0
            displayName: deploy
            name: deploy
            inputs:
              kubernetesServiceConnection: $(AKS_Namespace_SC)
              action: deploy
              namespace: $(k8sNamespace)
              manifests: $(bake.manifestsBundle)
              containers: |
                $(containerRegistry)/$(ServiceNameOnContainer):$(Build.BuildId)

Here's the reference pipeline that I was following -
https://github.com/azooinmyluggage/BikeSharingSampleApp/blob/master/Bikes/bikes-azure-pipelines.yml

@chaholl
Copy link

chaholl commented Jul 23, 2019

If you are not using the task in a deployment job with environment context, then you are expected to pass kubernetesServiceConnection parameter.

Why? This isn't described in the documentation and isn't actually used by the code. Furthermore, it breaks existing pipelines. Is this a 'feature not a bug' situation ? :)

@chshrikh chshrikh assigned vithati and unassigned kmkumaran and chshrikh Aug 27, 2019
thesattiraju added a commit that referenced this issue Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants