feat(hydrator): making configurable authorName/Email used for hydration commit (#22847) (#25746)

Signed-off-by: Aditya Raj <adityaraj10600@gmail.com>
This commit is contained in:
Aditya Raj
2026-01-21 19:14:32 +05:30
committed by GitHub
parent fc6379b90e
commit 507289925b
11 changed files with 416 additions and 39 deletions

View File

@@ -445,6 +445,16 @@ data:
# We highly recommend that this be set to `true`. The next major release will set the default to be `true`.
application.sync.requireOverridePrivilegeForRevisionSync: "true"
### SourceHydrator commit author name (optional).
# Configures the author name for commits created by the Source Hydrator.
# If not specified, defaults to "Argo CD".
commit.author.name: "Argo CD"
### SourceHydrator commit author email (optional).
# Configures the author email for commits created by the Source Hydrator.
# If not specified, defaults to "argo-cd@example.com".
commit.author.email: "argo-cd@example.com"
### SourceHydrator commit message template.
# This template iterates through the fields in the `.metadata` object,
# and formats them based on their type (map, array, or primitive values).

View File

@@ -416,6 +416,27 @@ data:
{{- end }}
```
## Commit Author Configuration
You can customize the git commit author name and email used by the source hydrator when committing hydrated manifests. This is configured via the `argocd-cm` ConfigMap.
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
namespace: argocd
data:
commit.author.name: "GitOps Bot"
commit.author.email: "gitops@company.com"
```
**Configuration Keys:**
- `commit.author.name`: The git commit author name (defaults to `"Argo CD"` if not set)
- `commit.author.email`: The git commit author email (defaults to `"argo-cd@example.com"` if not set)
Both values are optional. If only one is configured, the configured value will be used and the other will use its default.
### Credential Templates
Credential templates allow a single credential to be used for multiple repositories. The source hydrator supports credential templates. For example, if you setup credential templates for the URL prefix `https://github.com/argoproj`, these credentials will be used for all repositories with this URL as prefix (e.g. `https://github.com/argoproj/argocd-example-apps`) that do not have their own credentials configured.