Skip to content

Commit 55e8033

Browse files
GITOPS-7334: Introduce new label on operator managed configmap (#934)
Signed-off-by: Alka Kumari <[email protected]>
1 parent e8f5a9a commit 55e8033

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

controllers/argocd_metrics_controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"strings"
2626

2727
argoapp "github.com/argoproj-labs/argocd-operator/api/v1beta1"
28+
argocdutil "github.com/argoproj-labs/argocd-operator/controllers/argoutil"
2829
"github.com/go-logr/logr"
2930
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
3031
corev1 "k8s.io/api/core/v1"
@@ -509,6 +510,7 @@ func newDashboardConfigMap(filename string, namespace string) (*corev1.ConfigMap
509510
"console.openshift.io/dashboard": "true",
510511
},
511512
}
513+
argocdutil.AddTrackedByOperatorLabel(&objectMeta)
512514

513515
content, err := dashboards.ReadFile(dashboardFolder + "/" + filename)
514516
if err != nil {

controllers/consoleplugin.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ ServerRoot "/etc/httpd"
250250
</VirtualHost>`, servicePort, servicePort)
251251

252252
func pluginConfigMap() *corev1.ConfigMap {
253-
return &corev1.ConfigMap{
253+
cm := &corev1.ConfigMap{
254254
ObjectMeta: metav1.ObjectMeta{
255255
Name: httpdConfigMapName,
256256
Namespace: serviceNamespace,
@@ -263,6 +263,8 @@ func pluginConfigMap() *corev1.ConfigMap {
263263
"httpd.conf": httpdConfig,
264264
},
265265
}
266+
argocdutil.AddTrackedByOperatorLabel(&cm.ObjectMeta)
267+
return cm
266268
}
267269

268270
func (r *ReconcileGitopsService) reconcileDeployment(cr *pipelinesv1alpha1.GitopsService, request reconcile.Request) (reconcile.Result, error) {

0 commit comments

Comments
 (0)