argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
14.64k stars 3.13k forks source link

Argo CLI tool HTTP client ignores proxy #10794

Open Adam-D-Lewis opened 1 year ago

Adam-D-Lewis commented 1 year ago

Pre-requisites

What happened/what you expected to happen?

Runnning ./argo-linux-amd64 submit -n dev hello-world.yaml --proxy-url http://localhost:8000 --argo-server <my-domain>:443 --argo-http1 --argo-base-href=/argo --token <my-token> --secure=true -v

outputs the curl command that is run which is curl -X POST -H 'Authorization: ******' -d '{"namespace":"dev","workflow":{"kind":"Workflow","apiVersion":"argoproj.io/v1alpha1","metadata":{"generateName":"hello-world-","namespace":"dev","creationTimestamp":null,"labels":{"workflows.argoproj.io/archive-strategy":"false"},"annotations":{"workflows.argoproj.io/description":"This is a simple hello world example.\nYou can also run it in Python: https://couler-proj.github.io/couler/examples/#hello-world\n"}},"spec":{"templates":[{"name":"whalesay","inputs":{},"outputs":{},"metadata":{},"container":{"name":"","image":"docker/whalesay:latest","command":["cowsay"],"args":["hello world"],"resources":{}}}],"entrypoint":"whalesay","arguments":{}},"status":{"startedAt":null,"finishedAt":null}},"createOptions":{}}' 'https://<my-domain>:443/argo/api/v1/workflows/dev?'

As you can see the --proxy-url flag is ignored. I would have expected a -x http://localhost:8000 to be added to the curl command.

Version

v3.4.5 (latest binary I could find)

Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: hello-world-
  labels:
    workflows.argoproj.io/archive-strategy: "false"
  annotations:
    workflows.argoproj.io/description: |
      This is a simple hello world example.
      You can also run it in Python: https://couler-proj.github.io/couler/examples/#hello-world
spec:
  entrypoint: whalesay
  templates:
  - name: whalesay
    container:
      image: docker/whalesay:latest
      command: [cowsay]
      args: ["hello world"]

Logs from the workflow controller

N/A

Logs from in your workflow's wait container

N/A
sarabala1979 commented 1 year ago

@Adam-D-Lewis Argo CLI will not support proxy-url. it might be coming from kubectl option. Do you like to implement it?

Adam-D-Lewis commented 1 year ago

Thanks for the response. Sorry, I can't commit to implement it right now. I've decided to pursue another option.

stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

shimako55 commented 6 months ago

I have implemented the feature, but I am unsure how to write tests for submitting a PR. Could you please give me some advice?

monaka commented 2 months ago

I suppose this has been fixed by #12827 ...?