-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ServiceMonitor is created with invalid serverName value #33
Comments
if you are installing with OLM, you need to install in the
recommended namespace or else you incur in this problem.
This is an OLM problem and so far at least we have not found a solution to
it.
…On Wed, Jul 20, 2022 at 5:30 AM Cedric Girard ***@***.***> wrote:
Hi,
I have installed patch-operator version 0.1.4 through OperatorHub in a
namespace named scale-patch-operator.
I can see that the serverName in the serviceMonitor is created with an
invalid namespace name:
apiVersion: monitoring.coreos.com/v1kind: ServiceMonitormetadata:
resourceVersion: '57137052'
name: patch-operator-controller-manager-metrics-monitor[...]
namespace: scale-patch-operator
ownerReferences:
- apiVersion: operators.coreos.com/v1alpha1
blockOwnerDeletion: false
controller: false
kind: ClusterServiceVersion
name: patch-operator.v0.1.4
uid: 31655a3d-0f41-4612-a0a0-428236ffa20f[...]spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token[...]
tlsConfig:
ca:[...]
serverName: patch-operator-controller-manager-metrics-service.patch-operator.svc[...]
I would expect to see
patch-operator-controller-manager-metrics-service.scale-patch-operator.svc
there.
Looking at the code I do not understand the root cause as I see the value
should come from METRICS_SERVICE_NAMESPACE variable:
https://github.com/redhat-cop/patch-operator/blob/2766ff49f382fd81a53f557a1461bb28d410d642/config/prometheus/monitor.yaml#L22
which is initialized at metadata.namespace value:
https://github.com/redhat-cop/patch-operator/blob/9ee4218d96ccc0e383eba7fc9a17fec7245712e8/config/default/kustomization.yaml#L59
.
Or am I looking at the wrong location?
—
Reply to this email directly, view it on GitHub
<#33>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPERXBDNAWVP45PIP4NWGLVU7BKVANCNFSM54C5KTOA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
ciao/bye
Raffaele
|
OK, understood. Is this already tracked in another issue? |
@davgordo where are we tracking this? |
@raffaelespazzoli any updates or workaround on this? What is the recommended namespace? |
the only namespace that works when installing via OLM is |
We discussed in depth and determined that the path forward would be to move the service monitor configuration out of the operator manifest and use the operator to create a service monitor instead. |
Hi,
I have installed patch-operator version 0.1.4 through OperatorHub in a namespace named
scale-patch-operator
.I can see that the
serverName
in theserviceMonitor
is created with an invalid namespace name:I would expect to see
patch-operator-controller-manager-metrics-service.scale-patch-operator.svc
there.Looking at the code I do not understand the root cause as I see the value should come from
METRICS_SERVICE_NAMESPACE
variable:patch-operator/config/prometheus/monitor.yaml
Line 22 in 2766ff4
metadata.namespace
value:patch-operator/config/default/kustomization.yaml
Line 59 in 9ee4218
Or am I looking at the wrong location?
The text was updated successfully, but these errors were encountered: