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

Task KubernetesManifest Deploy fails first time running. Succeeds every time after. #10575

Closed
Greenie0506 opened this issue Jun 4, 2019 · 5 comments · Fixed by #10682
Closed
Assignees

Comments

@Greenie0506
Copy link

Setting up a pipeline for the first time with an existing YAML results in an error the first time the build runs.

The below task fails the first time saving the pipeline and running. Every time after the build will succeed.

  • task: KubernetesManifest@0
    displayName: deploy
    name: deploy
    inputs:
    kubernetesServiceConnection: $(k8sServiceConnection)
    action: deploy
    namespace: $(k8sNamespace)
    manifests: $(bake.manifestsBundle)
    imagePullSecrets: $(imagePullSecret)

Results in this error:
Deploy to Dev:Deploy job: "Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply"

@Greenie0506
Copy link
Author

Just wondering what the outcome of this was? Was this an issue? Thanks

@thesattiraju
Copy link
Contributor

The kubectl tool throws this warning when the applied object on your cluster and the manifest which you're trying to apply don't match.
The warning was thrown in your first run because of that, but on the later runs, it doesn't throw that warning because you have applied the same manifest file.

Also, given that this is a warning, the task shouldn't have failed.
@Greenie0506 is the task failing? If it is, I'll have to check where the warning logs are being piped to, i.e. stderr or stdout.

@Greenie0506
Copy link
Author

Hi @DS-MS

Yes the task is failing and the entire build is marked as failed

@thesattiraju
Copy link
Contributor

@Greenie0506 the issue was with how we were parsing the errors. I've raised a PR to fix it.

@Greenie0506
Copy link
Author

@DS-MS Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants