Skip to content
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

RolloutManager should create a ServiceMonitor for users with ServiceMonitor support #29

Open
jgwest opened this issue Jan 24, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jgwest
Copy link
Member

jgwest commented Jan 24, 2024

RolloutManager controller needs to create a ServiceMonitor so that metrics from Rollouts will automatically included in Prometheus gathered metrics, including in OpenShift monitoring (for OpenShift users)

  • A service, argo-rollouts-metrics, is already created to provide access to metrics, it just needs to be connected to monitoring via a ServiceMonitor CR.

Why is this important?

  • Customers need to monitor components of the system including the Argo Rollouts which is deployed by the GitOps Operator

Scenarios

  • Deploy Rollouts into a namespace with RolloutManager and be able to monitor Argo Rollouts

(Originally a feature request from https://issues.redhat.com/browse/GITOPS-3271)

Work Criteria

  • When a RolloutsManager CR is reconciled, it should create the corresponding ServiceMonitor CR
    • Should we always create it, or should we add a new parameter to the CR which a user can set to true to enable this?
    • Investigate how this works in argocd-operator and/or gitops-operator, and follow their lead
  • This should only occur when we detect that the cluster is an OpenShift cluster
  • This should only occur when the user is using the Prometheus operator, which includes the ServiceMonitor CR.
    • Probably the easiest way to do this is check for CustomResourceDefinition for ServiceMonitor
    • For example, by checking the API version or looking for an OpenShift-only CR (e.g. Routes)
  • Manually verify the functionality works as expected
  • Unit/E2E tests
@jgwest
Copy link
Member Author

jgwest commented Jan 24, 2024

Gerald notes that the following ServiceMonitor worked for him:

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: argo-rollouts-metrics
spec:
  endpoints:
    - port: metrics
  selector:
    matchLabels:
      app.kubernetes.io/name: argo-rollouts-metrics 

Siddhesh notes that this can be used for reference:
Use https://github.com/redhat-developer/gitops-operator/blob/master/controllers/argocd_metrics_controller.go#L252 as reference.

@jgwest jgwest added the enhancement New feature or request label Jan 24, 2024
@jgwest jgwest changed the title RolloutManager should create a ServiceMonitor for users on OpenShift RolloutManager should create a ServiceMonitor for users with ServiceMonitor support Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants