-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support for signing commits with gpg and ssh (#710)
Signed-off-by: Dustin Lactin <[email protected]>
- Loading branch information
Showing
10 changed files
with
212 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,6 +240,9 @@ func newRunCommand() *cobra.Command { | |
runCmd.Flags().BoolVar(&warmUpCache, "warmup-cache", true, "whether to perform a cache warm-up on startup") | ||
runCmd.Flags().StringVar(&cfg.GitCommitUser, "git-commit-user", env.GetStringVal("GIT_COMMIT_USER", "argocd-image-updater"), "Username to use for Git commits") | ||
runCmd.Flags().StringVar(&cfg.GitCommitMail, "git-commit-email", env.GetStringVal("GIT_COMMIT_EMAIL", "[email protected]"), "E-Mail address to use for Git commits") | ||
runCmd.Flags().StringVar(&cfg.GitCommitSigningKey, "git-commit-signing-key", env.GetStringVal("GIT_COMMIT_SIGNING_KEY", ""), "GnuPG key ID or path to Private SSH Key used to sign the commits") | ||
runCmd.Flags().StringVar(&cfg.GitCommitSigningMethod, "git-commit-signing-method", env.GetStringVal("GIT_COMMIT_SIGNING_METHOD", "openpgp"), "Method used to sign Git commits ('openpgp' or 'ssh')") | ||
runCmd.Flags().BoolVar(&cfg.GitCommitSignOff, "git-commit-sign-off", env.GetBoolVal("GIT_COMMIT_SIGN_OFF", false), "Whether to sign-off git commits") | ||
runCmd.Flags().StringVar(&commitMessagePath, "git-commit-message-path", defaultCommitTemplatePath, "Path to a template to use for Git commit messages") | ||
runCmd.Flags().BoolVar(&cfg.DisableKubeEvents, "disable-kube-events", env.GetBoolVal("IMAGE_UPDATER_KUBE_EVENTS", false), "Disable kubernetes events") | ||
|
||
|
@@ -319,16 +322,19 @@ func runImageUpdater(cfg *ImageUpdaterConfig, warmUp bool) (argocd.ImageUpdaterR | |
defer sem.Release(1) | ||
log.Debugf("Processing application %s", app) | ||
upconf := &argocd.UpdateConfiguration{ | ||
NewRegFN: registry.NewClient, | ||
ArgoClient: cfg.ArgoClient, | ||
KubeClient: cfg.KubeClient, | ||
UpdateApp: &curApplication, | ||
DryRun: dryRun, | ||
GitCommitUser: cfg.GitCommitUser, | ||
GitCommitEmail: cfg.GitCommitMail, | ||
GitCommitMessage: cfg.GitCommitMessage, | ||
DisableKubeEvents: cfg.DisableKubeEvents, | ||
GitCreds: cfg.GitCreds, | ||
NewRegFN: registry.NewClient, | ||
ArgoClient: cfg.ArgoClient, | ||
KubeClient: cfg.KubeClient, | ||
UpdateApp: &curApplication, | ||
DryRun: dryRun, | ||
GitCommitUser: cfg.GitCommitUser, | ||
GitCommitEmail: cfg.GitCommitMail, | ||
GitCommitMessage: cfg.GitCommitMessage, | ||
GitCommitSigningKey: cfg.GitCommitSigningKey, | ||
GitCommitSigningMethod: cfg.GitCommitSigningMethod, | ||
GitCommitSignOff: cfg.GitCommitSignOff, | ||
DisableKubeEvents: cfg.DisableKubeEvents, | ||
GitCreds: cfg.GitCreds, | ||
} | ||
res := argocd.UpdateApplication(upconf, syncState) | ||
result.NumApplicationsProcessed += 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.