Open
Description
openedon Sep 20, 2024
Task name
Kubernetes@1
Task version
1
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
Question
I am trying to use the `Kubernetes@1` Azure Devops Task to `patch` a single name-vaue pair in an already existing `ConfigMap`
## YAML snippet
```yaml
- task: Kubernetes@1
displayName: 'update configmap with version'
inputs:
connectionType: 'Azure Resource Manager'
azureSubscriptionEndpoint: ${{ parameters.azserviceconnection }} # name of the Azure Service connection
azureResourceGroup: ${{ parameters.aksresourcegroup }} # the resource group which has the AKS cluster
kubernetesCluster: aks001-dev
namespace: powertrading-dev
configMapName: shared-configmap
useConfigMapFile: false
configMapArguments: --from-literal=key1=some_value_from_yaml
continueOnError: false
My intent is to replicate the following command:
kubectl --namespace powertrading-dev patch configmap shared-configmap -p "{ \"data\" : { \"key1\" : \"some_value_from_yaml\" }}"
I can't get the Devops task to update a single key-value pair. Any suggestions ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment