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

[enhancement]: Allow configure Kubernetes@x task output as secret #20022

Open
coy2k opened this issue Jun 17, 2024 · 0 comments
Open

[enhancement]: Allow configure Kubernetes@x task output as secret #20022

coy2k opened this issue Jun 17, 2024 · 0 comments

Comments

@coy2k
Copy link

coy2k commented Jun 17, 2024

Task name

Kubernetes@x

Describe your feature request here

It would be nice to have the possibility of configuring Kubernetes task output as a secret.

suggested example:

- task: Kubernetes@1
  inputs:
    connectionType: None
    namespace: $(namespace)
    command: get
    outputFormat: go-template
    outputIsSecret: true
    arguments: >-
      secret
      $(secretName)
      --template="{{.data.password|base64decode}}"
      --ignore-not-found
#azure pipelines logs
...
/agent/_work/_tool/kubectl/1.27.9/x64/kubectl get -n namespace secret secret-name --template={{.data.password|base64decode}} --ignore-not-found -o go-template
##[debug]Called Toolrunner exec() method asynchronously. Returning the promise.
***
##[debug]Exit code 0 received from tool '/agent/_work/_tool/kubectl/1.27.9/x64/kubectl'
##[debug]STDIO streams have closed for tool '/agent/_work/_tool/kubectl/1.27.9/x64/kubectl'
##[debug]Toolrunner exec() method returned successfully for the kubectl command.
commandOutput***
##[debug]set KubectlOutput=***
##[debug]Processed: ##vso[task.setvariable variable=KubectlOutput;isOutput=false;issecret=true;]***
##[debug]outputFormat=go-template
##[debug]task result: Succeeded
##[debug]Processed: ##vso[task.complete result=Succeeded;]
##[debug]connectionType=None
...
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

2 participants