As part of the pipeline I want to check the kubernetes deployment scripts for syntax errors. I am adding the --dry-run=client (or just --dry-run) to the deploy command. But that seems to be ignored and the script gets executed as it were called without --dry-run.
The pipeline is defined as below:
- pipe: atlassian/aws-eks-kubectl-run:1.4.1
How can I achieve that behavior?
Hi @Brad Vrabete ,
Thank you for your question!
According to the kubectl v1.17 documentation apply command supports the next flags only:
If true, only print the object that would be sent, without sending it.
--dry-run cannot accurately output the result of merging the local manifest and the server-side data.
Use --server-dry-run to get the merged result instead.
so, recommended way is "--server-dry-run".
Also, we are investigating bump version of the kubectl.
Thanks for the answer. The strange thig is that it works if I put all the parameters in the KUBECTL_COMMAND parameter and remove the rest; that's why I thought there must be something in the pipe that prevents it from running. I di not try --server-dry-run.
Are you filtering the parameters passed to the pipe? That would not be a good idea as it is hard to know what went wrong (hence my question); I would rather get the error message from kubectl and let people handle that.
In any case I'll try with --server-dry-run.
Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their Jira Cloud instance. ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events