Skip to content

Commit 7cf34e4

Browse files
authored
docs(crd): update community documentation (#1236)
Signed-off-by: Denis Karpelevich <[email protected]>
1 parent 41ad8af commit 7cf34e4

22 files changed

+1348
-564
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The following things are on the roadmap until the `v1.0` release
7575

7676
* [x] Extend Argo CD functionality to write back to Git
7777

78-
* [ ] Provide web hook support to trigger update check for a given image
78+
* [x] Provide web hook support to trigger update check for a given image
7979

8080
* [x] Use concurrency for updating multiple applications at once
8181

cmd/webhook.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func NewWebhookCommand() *cobra.Command {
2828
var webhookCfg *WebhookConfig = &WebhookConfig{}
2929
var kubeConfig string
3030
var commitMessagePath string
31-
var MaxConcurrentReconciles int
31+
var MaxConcurrentUpdaters int
3232
var webhookCmd = &cobra.Command{
3333
Use: "webhook",
3434
Short: "Start webhook server to receive registry events",
@@ -63,7 +63,7 @@ Supported registries:
6363
return err
6464
}
6565

66-
err = runWebhook(ctx, cfg, webhookCfg, MaxConcurrentReconciles)
66+
err = runWebhook(ctx, cfg, webhookCfg, MaxConcurrentUpdaters)
6767
return err
6868
},
6969
}
@@ -73,7 +73,7 @@ Supported registries:
7373
webhookCmd.Flags().StringVar(&kubeConfig, "kubeconfig", "", "full path to kubernetes client configuration, i.e. ~/.kube/config")
7474
webhookCmd.Flags().StringVar(&cfg.RegistriesConf, "registries-conf-path", common.DefaultRegistriesConfPath, "path to registries configuration file")
7575
webhookCmd.Flags().IntVar(&cfg.MaxConcurrentApps, "max-concurrent-apps", env.ParseNumFromEnv("MAX_CONCURRENT_APPS", 10, 1, 100), "maximum number of ArgoCD applications that can be updated concurrently (must be >= 1)")
76-
webhookCmd.Flags().IntVar(&MaxConcurrentReconciles, "max-concurrent-reconciles", env.ParseNumFromEnv("MAX_CONCURRENT_RECONCILES", 1, 1, 10), "maximum number of concurrent Reconciles which can be run (must be >= 1)")
76+
webhookCmd.Flags().IntVar(&MaxConcurrentUpdaters, "max-concurrent-updaters", env.ParseNumFromEnv("MAX_CONCURRENT_UPDATERS", 1, 1, 10), "maximum number of concurrent ImageUpdater CRs that can be processed (must be >= 1)")
7777
webhookCmd.Flags().StringVar(&cfg.ArgocdNamespace, "argocd-namespace", "", "namespace where ArgoCD runs in (current namespace by default)")
7878

7979
webhookCmd.Flags().StringVar(&cfg.GitCommitUser, "git-commit-user", env.GetStringVal("GIT_COMMIT_USER", "argocd-image-updater"), "Username to use for Git commits")
@@ -95,7 +95,7 @@ Supported registries:
9595
}
9696

9797
// runWebhook starts the webhook server
98-
func runWebhook(ctx context.Context, cfg *controller.ImageUpdaterConfig, webhookCfg *WebhookConfig, maxConcurrentReconciles int) error {
98+
func runWebhook(ctx context.Context, cfg *controller.ImageUpdaterConfig, webhookCfg *WebhookConfig, maxConcurrentUpdaters int) error {
9999
webhookLogger := log.Log().WithFields(logrus.Fields{
100100
"logger": "webhook-command",
101101
})
@@ -117,7 +117,7 @@ func runWebhook(ctx context.Context, cfg *controller.ImageUpdaterConfig, webhook
117117
Client: k8sClient,
118118
Scheme: scheme,
119119
Config: cfg,
120-
MaxConcurrentReconciles: maxConcurrentReconciles,
120+
MaxConcurrentReconciles: maxConcurrentUpdaters,
121121
}
122122

123123
server := SetupWebhookServer(webhookCfg, reconciler)

cmd/webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestNewWebhookCommand(t *testing.T) {
3131
asser.Equal("", controllerCommand.Flag("kubeconfig").Value.String())
3232
asser.Equal(common.DefaultRegistriesConfPath, controllerCommand.Flag("registries-conf-path").Value.String())
3333
asser.Equal(strconv.Itoa(env.ParseNumFromEnv("MAX_CONCURRENT_APPS", 10, 1, 100)), controllerCommand.Flag("max-concurrent-apps").Value.String())
34-
asser.Equal(strconv.Itoa(env.ParseNumFromEnv("MAX_CONCURRENT_RECONCILES", 1, 1, 10)), controllerCommand.Flag("max-concurrent-reconciles").Value.String())
34+
asser.Equal(strconv.Itoa(env.ParseNumFromEnv("MAX_CONCURRENT_UPDATERS", 1, 1, 10)), controllerCommand.Flag("max-concurrent-updaters").Value.String())
3535
asser.Equal("", controllerCommand.Flag("argocd-namespace").Value.String())
3636
asser.Equal(env.GetStringVal("GIT_COMMIT_USER", "argocd-image-updater"), controllerCommand.Flag("git-commit-user").Value.String())
3737
asser.Equal(env.GetStringVal("GIT_COMMIT_EMAIL", "[email protected]"), controllerCommand.Flag("git-commit-email").Value.String())

docs/basics/authentication.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ to external systems in order to fulfill its duties.
55

66
## <a name="auth-kubernetes"></a>Authentication to Kubernetes
77

8-
If you are running Argo CD Image Updater as a Kubernetes workload in the
9-
`kubernetes` API access mode (which is the default), it uses the token of a
10-
ServiceAccount mounted to its pod to authenticate at the Kubernetes API.
8+
If you are running Argo CD Image Updater as a Kubernetes workload, it uses the
9+
token of a ServiceAccount mounted to its pod to authenticate at the Kubernetes
10+
API.
1111

1212
The name of this ServiceAccount is `argocd-image-updater`, and it gets
1313
created through the installation manifests in the installation namespace.
@@ -22,24 +22,6 @@ installation is in a different namespace than `argocd`, you would have
2222
to adapt the RoleBinding to bind to the ServiceAccount in the correct
2323
namespace.
2424

25-
## <a name="auth-argocd"></a>Authentication to Argo CD
26-
27-
If you are using Argo CD Image Updater to connect to Argo CD via its API,
28-
you will need to create credentials in Argo CD and provide them to the
29-
Image Updater.
30-
31-
This usually involves the following steps:
32-
33-
1. Create a local user with `apiKey` capabilities in Argo CD
34-
1. Generate an authentication token for that user
35-
1. Create appropriate RBAC permissions for that user in Argo CD
36-
1. Configure Argo CD Image Updater to connect to the Argo CD API endpoint
37-
instead of the Kubernetes API
38-
1. Configure Argo CD Image Updater to use the credentials created in steps 1
39-
and 2 for authenticating at the Argo CD API
40-
41-
A complete walk-through can be found in the installation guide.
42-
4325
## <a name="auth-registries"></a>Authentication to container registries
4426

4527
If you are using private registries, or private repositories on public

0 commit comments

Comments
 (0)