argoproj / argoproj/argo-workflows

Custom db schema for persistence tables

Open
#2,452 9 comments 11 reactions 0 assignees View on GitHub
area/workflow-archive solution/workaround
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 15h
Merged PRs (30d)
138

Description

# Summary

In the latest release of argo (v2.6.2 at the time of writting) it is not possible to define a schema when enabling persistence. I would like to have persistence stored in a schema different that `public`.

# Motivation

Many applications or organizations use a database for multiple purposes. Having the ability to choose the schema where to store the information about argo would be useful.

# Proposal

An extra parameter in the **workflow-controller-configmap** when persistence is enabled:
```yaml
postgresql:
host: localhost
port: 5432
database: postgres
tableName: argo_workflows
schema: argo # new attribute
userNameSecret:
name: argo-postgres-config
key: username
passwordSecret:
name: argo-postgres-config
key: password
```

---

**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 with the workflow-controller-configmap persistence configuration and trace how the PostgreSQL settings are used to create or access persistence tables. Verify the schema value is honored for the proposed configuration, and confirm persistence works when the schema is different from public.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, postgresql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.