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

Unable to connect cluster when specified executor serviceAccountName #10937

Closed
3 tasks done
maxsxu opened this issue Apr 18, 2023 · 4 comments · Fixed by #10945
Closed
3 tasks done

Unable to connect cluster when specified executor serviceAccountName #10937

maxsxu opened this issue Apr 18, 2023 · 4 comments · Fixed by #10945
Assignees
Labels
P3 Low priority type/bug

Comments

@maxsxu
Copy link
Contributor

maxsxu commented Apr 18, 2023

Pre-requisites

  • I have double-checked my configuration
  • I can confirm the issues exists when I tested with :latest
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what you expected to happen?

What happened

Occurred below errors while creating resource via container/script template

create-resources-via-container-template: error: failed to create serviceaccount: Post "http://localhost:8080/api/v1/namespaces/default/serviceaccounts?fieldManager=kubectl-create&fieldValidation=Strict": dia
l tcp 127.0.0.1:8080: connect: connection refused

what you expected to happen?

Able to create resource via container/script template successfully.

Version

latest

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.

metadata:
  name: create-resources-via-container-template
  namespace: argo
spec:
  executor:
    serviceAccountName: sa-writer
  serviceAccountName: sa-writer
  automountServiceAccountToken: false
  entrypoint: main
  templates:
    - name: main
      container:
        name: main
        image: bitnami/kubectl
        command:
          - sh
        args:
          - -c
          - |
           kubectl create sa test

Logs from the workflow controller

healthy

Logs from in your workflow's wait container

healthy
@maxsxu
Copy link
Contributor Author

maxsxu commented Apr 18, 2023

Related Discussion: #10885

@maxsxu
Copy link
Contributor Author

maxsxu commented Apr 18, 2023

I think I've figured out why: The main container didn't mount the exec-sa-token volume.

@terrytangyuan
Copy link
Member

Would you like to submit a PR to fix it?

@maxsxu
Copy link
Contributor Author

maxsxu commented Apr 18, 2023

Would you like to submit a PR to fix it?

@terrytangyuan 👍 Please assign this issue to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Low priority type/bug
Projects
None yet
3 participants