feat: Enhance ArgoCD CLI: Dynamic Repo Server Retrieval with --core and --refresh Flags (#17613)

* add const key value for ComponentRepoServer

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* update NewRepoServerClient() to look for service with  ComponentRepoServer labels , if the label exist construct label selector PortForward

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* add comment for the new constants

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* instead of passing nil which leads to  nil ptr referance error, pass empty ClusterSharding{}

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* check for operator install repo server name

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* handle empty nil ptr dereference error

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* handle  nil prt dereference

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* typo correction

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* run clidocsgen

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

---------

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>
This commit is contained in:
Mangaal
2024-03-30 00:19:16 +05:30
committed by GitHub
parent b711c5b7d7
commit 766a6da2cd
5 changed files with 39 additions and 7 deletions

View File

@@ -188,6 +188,10 @@ const (
// AnnotationKeyAppSkipReconcile tells the Application to skip the Application controller reconcile.
// Skip reconcile when the value is "true" or any other string values that can be strconv.ParseBool() to be true.
AnnotationKeyAppSkipReconcile = "argocd.argoproj.io/skip-reconcile"
// LabelKeyComponentRepoServer is the label key to identify the component as repo-server
LabelKeyComponentRepoServer = "app.kubernetes.io/component"
// LabelValueComponentRepoServer is the label value for the repo-server component
LabelValueComponentRepoServer = "repo-server"
)
// Environment variables for tuning and debugging Argo CD