Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Feature
Enter Task Name: Kubernetes
list here (V# not needed):
https://github.com/microsoft/azure-pipelines-tasks/blob/866830aecf96e48e2610c8876ec1d27b0767644f/Tasks/KubernetesV1/src/kubernetescommand.ts
Azure Pipelines
The Kubernetes task will per default add -o json
to the command unless outputFormat
input variable is used to change it to yaml.
My issue is that, at times, you do not wish to see the output so verbose at all. For example, applying configmaps with JSON in them used for dashboards by Grafana, these becomes massive and pollutes the output.
It would be nice to have the option to choose not to use any -o
at all so all that remains is just the "applied" message.
As a side note, with this kind of usage, since the output steam becomes so big, we get warnings:
[warning]Output variable not set as kubectl command output exceeded the maximum supported length. Output length: 290661, Maximum supported length: 32766
Agreed.
This is necessary for us to avoid leaking secrets. See https://github.com/microsoft/azure-pipelines-tasks/issues/8885 too.
Our task looks like this:
- task: Kubernetes@1
inputs:
connectionType: Azure Resource Manager
azureSubscriptionEndpoint: $(serviceConnectionName)
azureResourceGroup: $(deployResourceGroupName)
kubernetesCluster: $(deployKubernetesName)
command: apply
arguments: -f $(Agent.TempDirectory)/kubernetes.json
outputFormat: name
It works. It complains that outputFormat
is an invalid value, but the pipeline runs anyway. We have secrets in our kubernetes.json, so yaml
/json
output actually spits out those secrets for some silly reason. We avoid it by setting output to name
.
Any update for this?
If you set outputFormat: ''
like this.. it won't add -o
to the commands!
Most helpful comment
Agreed.
This is necessary for us to avoid leaking secrets. See https://github.com/microsoft/azure-pipelines-tasks/issues/8885 too.
Our task looks like this:
It works. It complains that
outputFormat
is an invalid value, but the pipeline runs anyway. We have secrets in our kubernetes.json, soyaml
/json
output actually spits out those secrets for some silly reason. We avoid it by setting output toname
.