argoproj / argoproj/argo-workflows
Implement get resource manifest output as an artifact
- Dominant language
- Go
- Stars
- 17k
- Forks
- 3.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 138
Description
# Summary
Currently when you try to get a manifest, you can only output it as a variable. When you can a complex data structure, it would be more easy to output it as an artifact.
This is what you can do:
```
- name: get-workflow-object
outputs:
parameters:
- name: workflow-object
valueFrom:
jsonPath: '{}'
resource:
action: get
manifest: |
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: {{workflow.name}}
namespace: YOUR-NAMESPACE
```
This is what you should be able to do:
```
- name: get-workflow-object
outputs:
artifacts:
- name: workflow-object
valueFrom:
jsonPath: '{}'
resource:
action: get
manifest: |
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: {{workflow.name}}
namespace: YOUR-NAMESPACE
```
# Use Cases
See the related use case : https://github.com/argoproj/argo-workflows/issues/6431
---
**Message from the maintainers**:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
Contributor guide
Research direction
Search the resource action `get` handling and the existing `valueFrom.jsonPath` parameter-output path. Trace how the manifest is serialized, then verify that the same JSON can be emitted as an artifact and that the workflow example behaves as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100