Open tooptoop4 opened 2 years ago
Can you check if the env/volume has been added to the pod?
@tooptoop4 Can you try with a simple POD resource that can access the AWS using IRSA?
I don't know a lot about the various ways of configuring IRSA but what what we tried to provide was two methods of access in S3:
eks.amazonaws.com/role-arn
should have been transferred to the Artifact GC Pod ServiceAccount
for Artifact GC in the Workflow specThis is enhancement. MVP version supports metadata
. we can enhance to support env too.
@tooptoop4 Do you like to submit PR for this enhancement?
For anybody working on this, the idea would be to take the ArtifactGC struct - which can be used both on the WorkflowSpec level and the Artifact level - and add the capability to specify environment variables there.
The way ArtifactGC Pods get created currently, for each unique GC strategy, we need to create one unique Pod per unique set of annotations and labels defined in ArtifactGC struct.
So, the functionality in artifact_gc.go is taking all the artifacts defined and grouping them by annotations/labels. What we need to do is add environment variables to this.
I guess need volumeMounts/volumes too
I guess need volumeMounts/volumes too
yes, you're right
Hi @terrytangyuan, @sarabala1979, @juliev0, I would like to work on this issue.
Hi @terrytangyuan, @sarabala1979, @juliev0, I would like to work on this issue.
thanks!
By the way, maybe you already found it but the current logic for grouping artifacts by pod access is here.
Unfortunately, there is this issue related to the ArtifactGC test. It seems to be an issue of artifacts often not getting saved to minio. I believe if each Workflow is run manually one at a time it doesn't happen.
Unfortunately, there is this issue related to the ArtifactGC test. It seems to be an issue of artifacts often not getting saved to minio. I believe if each Workflow is run manually one at a time it doesn't happen.
@AnshulAngaria I'm putting together a PR in which if the Workflow fails, I don't verify the artifacts. Hopefully, this should take care of it.
Something else: If you start up Argo Workflows by running locally, it creates a deployment for minio and port forwards ports 9000 and 9001 to the local machine, so you should be able to open up localhost:9001 in a browser. However, with the latest minio Docker image being pulled, I wasn't able to log in. I think something changed. I found I had to use an old version here (minio/minio:RELEASE.2022-08-13T21-54-44Z) to be able to successfully log in to localhost:9001. I will try to investigate further and/or submit a PR to fix the image tag.
@juliev0 I am able to login to minio
@juliev0 I am able to login to minio
That's interesting! Thanks for checking. Maybe I'll ask around to see if it's happening to anyone else then.
Unfortunately, there is this issue related to the ArtifactGC test. It seems to be an issue of artifacts often not getting saved to minio. I believe if each Workflow is run manually one at a time it doesn't happen.
@AnshulAngaria I'm putting together a PR in which if the Workflow fails, I don't verify the artifacts. Hopefully, this should take care of it.
I have a PR for this here.
@juliev0 I am able to login to minio
I did notice that by default the ImagePullPolicy is not set here, and I believe by default it's "IfNotPresent", so if it was on your machine already you may not have grabbed the latest and greatest. So, I'm not sure if you were actually running the newest one or not. I am asking a colleague to try it out on his end.
For anybody working on this, the idea would be to take the ArtifactGC struct - which can be used both on the WorkflowSpec level and the Artifact level - and add the capability to specify environment variables there.
The way ArtifactGC Pods get created currently, for each unique GC strategy, we need to create one unique Pod per unique set of annotations and labels defined in ArtifactGC struct.
So, the functionality in artifact_gc.go is taking all the artifacts defined and grouping them by annotations/labels. What we need to do is add environment variables to this.
Is there anywhere else I need to make change to add support for a new variable in ArtifactGC struct. After adding a new variable and running make codegen, I am not able to reference it if I add an ArtifactGC at artifact level. However, I am able to reference it if I add ArtifactGC at workflow level.
@AnshulAngaria Hmm, do you mean you're not able to compile if you try to reference the variable? (and I assume it's in capitals) Or do you mean if you try to test with a Workflow it's not parsing the yaml successfully?
Pre-requisites
:latest
What happened/what you expected to happen?
what happened? artifactgc step failed, object still on s3 and workflow did not get archived
what expected? artifactgc step succeed, object removed off s3 and workflow gets archived
Version
v3.4.1
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.
logs from the artgc pod:
note: for other AWS things to work i set volume/volumemounts/env variables as in https://github.com/argoproj/argo-workflows/discussions/7461 but artifactgc pod doesn't seem to accept that?
Logs from the workflow controller
kubectl logs -n argo deploy/workflow-controller | grep ${workflow}
Logs from in your workflow's wait container
kubectl logs -n argo -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded