Skip to content

Commit 2c12ceb

Browse files
committed
Use constant.
1 parent b575014 commit 2c12ceb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/deployment/resources/servicemonitor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ package resources
2525
import (
2626
"github.com/arangodb/kube-arangodb/pkg/util/k8sutil"
2727

28+
"github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1alpha"
2829
coreosv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1"
2930
clientv1 "github.com/coreos/prometheus-operator/pkg/client/versioned/typed/monitoring/v1"
3031
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -150,7 +151,7 @@ func (r *Resources) EnsureServiceMonitor() error {
150151
// Check if the service monitor is ours, otherwise we do not touch it:
151152
found := false
152153
for _, owner := range servMon.ObjectMeta.OwnerReferences {
153-
if owner.Kind == "ArangoDeployment" &&
154+
if owner.Kind == v1alpha.ArangoDeploymentResourceKind &&
154155
owner.Name == deploymentName {
155156
found = true
156157
break

0 commit comments

Comments
 (0)