argoproj / argoproj/argo-workflows
Bucket-only artifacts
- Dominant language
- Go
- Stars
- 17k
- Forks
- 3.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 138
Description
Hello.
I am configuring an artifact repository following the documentation [here](https://argoproj.github.io/argo-workflows/artifact-repository-ref/) as follows:
```
apiVersion: v1
kind: ConfigMap
metadata:
annotations:
workflows.argoproj.io/default-artifact-repository: default-artifact-repository
name: argo-workflows-artifacts-repository
data:
default-artifact-repository: |
s3:
bucket: default
keyFormat: common/{{ workflow.name }}
endpoint: argo-workflows-artifacts.infra.svc.cluster.local:9000
insecure: true
accessKeySecret:
key: accesskey
name: argo-workflows-artifacts
secretKeySecret:
key: secretkey
name: argo-workflows-artifacts
```
Whenever I overwrite the key `bucket` as described [here](https://argoproj.github.io/argo-workflows/key-only-artifacts/), the artifacts are still uploaded in bucket `default`.
```
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: hello-world
spec:
artifactRepositoryRef:
configMap: argo-workflows-artifacts-repository
entrypoint: main
templates:
- name: main
container:
image: docker/whalesay:latest
command: [sh, -c]
args: ["cowsay hello world | tee /tmp/hello_world.txt"]
volumeMounts:
- name: tmp
mountPath: /tmp
volumes:
- name: tmp
emptyDir: {}
outputs:
artifacts:
- name: hello_world
path: /tmp/hello_world.txt
s3:
bucket: dev
```
I order to further debug it, I removed the key `s3.bucket` from my configMap and set it through the WorkFlowTemplate exclusively. This, however, return me the following error:
```
Error (exit code 1): failed to put file: Bucket name cannot be empty
```
How can I configure the bucket per WorkFlow or WorkFlowTemplate?
Contributor guide
Research direction
Start with the artifactRepositoryRef and the S3 bucket settings shown in the issue, then compare the linked artifact repository and key-only artifact documentation. Reproduce both ConfigMap and WorkflowTemplate configurations and trace how bucket values are selected; done means a per-Workflow or WorkflowTemplate bucket overrides the default, or the documentation clearly states the limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100