argoproj / argoproj/argo-workflows

Support read RDS secret from file

Open
#9,376 0 comments 12 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 20h
Merged PRs (30d)
138

Description

# Summary

Argo workflow read [MYSQL secret ](https://github.com/argoproj/argo-workflows/blob/master/manifests/quick-start/mysql/argo-mysql-config-secret.yaml) through [k8s API call](https://github.com/argoproj/argo-workflows/blob/master/persist/sqldb/sqldb.go#L43) instead of a file, which can be mounted to the pod through secret volume or emptyDir volume(injected by vault).

What change needs making?

1. Add a secretFilePath filed in the [workflow-controller-configmap.yaml](https://github.com/argoproj/argo-workflows/blob/master/manifests/quick-start/mysql/overlays/workflow-controller-configmap.yaml#L16-L21)
2. Use the secret from the file to create DBSession if the filePath is not empty, otherwise read it from secret objects.

# Use Cases

Our RDS password is stored in the vault and we use [vault + k8s](https://github.com/hashicorp/vault-k8s) which mounts the secret file to the emptyDir volume of the argo-workflow pod. https://www.vaultproject.io/docs/platform/k8s/injector

When would you use this?

We would expect to support this feature in the next release.

---

**Message from the maintainers**:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

Contributor guide

Open the contributing guide

Research direction

Start with persist/sqldb/sqldb.go and the MySQL configuration in manifests/quick-start/mysql/overlays/workflow-controller-configmap.yaml, then inspect how the workflow-controller configuration creates the DBSession. Verify the existing Kubernetes secret path and the mounted-file use case described in the issue. Done means a non-empty secretFilePath reads the RDS password from that file, while an empty path preserves Kubernetes secret-object behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, mysql
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.