Skip to content

Commit

Permalink
Use argocd typed consts for secret type labels
Browse files Browse the repository at this point in the history
  • Loading branch information
sibucan committed Dec 4, 2024
1 parent 7fa9e3a commit 85fcc7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

argocdcommon "github.com/argoproj/argo-cd/v2/common"
argocdv1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -123,8 +124,8 @@ func (c *ClusterKubeconfigReconciler) createOrUpdateArgoCluster(ctx context.Cont
Name: cluster.Name,
Namespace: c.ArgoNamespace,
Labels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
types.ControllerNameLabel: "capargo",
argocdcommon.LabelKeySecretType: argocdcommon.LabelValueSecretTypeCluster,
types.ControllerNameLabel: "capargo",
},
Annotations: map[string]string{
types.SecretNameAnnotation: cluster.Name,
Expand Down

0 comments on commit 85fcc7a

Please sign in to comment.