-
Notifications
You must be signed in to change notification settings - Fork 45
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
RHIDP-5592:Wrong definition of Service Monitor for an RHDH instance by the Operator #873
base: main
Are you sure you want to change the base?
Conversation
Updated preview: https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-873/ @ 01/30/25 07:41:12 |
@JessicaJHee , I went exactly by the code that is provided in the JIRA. For that, I removed the custom variable and the pointers which explained what it needed to be replaced with. Is that the expected way or would you suggest anything else? |
@JessicaJHee can you please drop a deep link to the preview of this changed module in the PR (that used be a stnd practice for this repo)? I can't find it in the list of titles provided by the auto-generated preview link. There are multiple approaches here so I'll take a look and help determine which is best for the user. Edit: @JessicaJHee forgive me, I meant to tag the PR owner but thank you so much for responding and dropping that link anyway! :) |
@pabel-rh Thank you for raising the PR, I'm testing atm with a cluster to confirm the correct configs 👍 @linfraze Here is the link: https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-873/monitoring-and-logging/#proc-admin-enabling-metrics-ocp-operator_assembly-rhdh-observability |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be really nice to make clear what each field is used for. I don't think we should statically set the matchNames
or metadata.name
because that would change depending on the user's set up.
I've tested on a cluster and confirmed that these configs will work:
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: developer-hub-service-monitor #name of your ServiceMonitor resource
namespace: rhdh-operator #namespace where your ServiceMonitor will live
labels: # Set the labels of your ServiceMonitor resource
app.kubernetes.io/instance: developer-hub-service-monitor
app.kubernetes.io/name: backstage
spec:
namespaceSelector:
matchNames:
- rhdh-operator #namespace where your RHDH instance is installed in
selector:
matchLabels:
app.kubernetes.io/instance: developer-hub
app.kubernetes.io/name: backstage
endpoints:
- port: http-metrics
path: /metrics
Helpful information for the set up: the spec.selector.matchLabels
configs need to match the labels of your RHDH installation. You can find the label by navigating from Project > Services
then get the labels for backstage-developer-hub
(in the Developer View of the OpenShift Console)
Here is an example of how the OCP docs use variables and definitions in their code samples and we strive to create a consistent docs experience. So we can do this in one of two ways... Option 1 And the definitions below the code sample look like this: Option 2 And the definitions below the code sample look like this: @JessicaJHee as a dev, what do you prefer? |
@linfraze Imo option 1 is better since it makes it obvious that those values need to be replaced while still having the example names in the description 👍 |
@JessicaJHee , thank you so much for adding the preview link! |
@JessicaJHee @linfraze , as per #858, I have changed to the attribute we've derived for all namespaces - "my-rhdh-project", with the attribute {my-product-namespace}. So, right now, <1> vs <2> & <3> are slightly inconsistent as I've mentioned a variable in <1> and a definitive value for <2>. Do let me know if this is okay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JessicaJHee , I've made some changes to the descriptions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for addressing the comments, just had a few more nitpicks and I think it's good to go :)
Incorporated the required nitpicks. :) @JessicaJHee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking beautiful - thank you for the updates.
We can use this as an example for similar content going forward.
@linfraze , Thank you so much for your valuable suggestions! I've incorporated them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just one small thing about one of the descriptions
<3> The label name identifying the `ServiceMonitor` CR instance, for example, `{my-product-cr-name}`. | ||
<4> The namespace where your {product-very-short} instance is installed, for example, `{my-product-namespace}`. | ||
<5> The name of your {product-very-short} deployment, for example, `developer-hub`. | ||
<6> The type of custom resource that you want to use, for example, `{product-custom-resource-type}`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<6> The type of custom resource that you want to use, for example, `{product-custom-resource-type}`. | |
<6> The name of your {product-very-short} application, for example, `backstage`. |
IMPORTANT: Do Not Merge - To be merged by Docs Team Only
Version(s): main, 1.4.x
Issue: RHIDP-5592