argoproj / argoproj/argo-workflows

Support `list` verb in `resource` templates

Open
#3,003 1 comment 2 reactions 0 assignees View on GitHub
area/templates/resource type/support
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 15h
Merged PRs (30d)
138

Description

# Summary

Currently resource templates only support `get, create, apply, delete, replace, patch`. Listing is something that very commonly required as well. There should be a default way to list by label selectors without specifying name or optionally even namespace.

# Motivation

I find it fairly self-explanatory when a list is required over a Get :). But namely, anytime you need more than one resource that matches a set of labels, or more broadly, any time you know a label a resource has, but not necessarily it's name or namespace.

# Proposal

I would like to see this implemented in a manner that mimics the `action: get` interface, but name and namespace, and lables are optional. If name is supplied, then it can behave like a Get. Basically I would like it work similar to how kubectl works.

---

**Message from the maintainers**:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

Contributor guide

Open the contributing guide

Research direction

Start by locating the resource template handling for the existing get action and review how resource names, namespaces, and label selectors are represented. Done means a list verb is supported with label selectors, optional name and namespace, and behavior consistent with the proposal and kubectl-style listing.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.