Skip to content

Conversation

saumeya
Copy link
Member

@saumeya saumeya commented May 14, 2024

What type of PR is this?
/kind enhancement

What does this PR do / why we need it:
To make metrics scraping optional in GitOps Operator

Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:

Fixes #?

Test acceptance criteria:

  • Unit Test
  • E2E Test

How to test changes / Special notes to the reviewer:

Edit the spec.monitoring field to false to disable scraping of metrics, like so

apiVersion: argoproj.io/v1beta1
kind: ArgoCD
metadata:
name: argocd-sample
namespace: default
spec:
monitoring:
disableMetrics: true

OR patch the resource using cli, like so

oc patch argocd argocd-sample -n default --type='json' -p='[{"op": "replace", "path": "/spec/monitoring/disableMetrics", "value": true}]'

To enable metrics for your instance, just change the spec.monitoring field to false, this will create the required role, rolebindings and service monitors and add the cluster-monitoring label to the namespace resource.
Disabling it will delete these resources and will also remove the cluster-monitoring label from the namespace resource.

@saumeya saumeya requested review from jaideepr97 and svghadi May 14, 2024 06:35
@openshift-ci openshift-ci bot requested review from iam-veeramalla and wtam2018 May 14, 2024 06:36
@saumeya saumeya removed request for jaideepr97 and wtam2018 May 14, 2024 07:22
@saumeya saumeya force-pushed the make-metrics-optional branch from 91d3b15 to 2a46272 Compare May 16, 2024 11:51
@saumeya
Copy link
Member Author

saumeya commented May 17, 2024

/test v4.14-kuttl-parallel

@saumeya
Copy link
Member Author

saumeya commented May 17, 2024

/test v4.13-kuttl-parallel

@svghadi
Copy link
Member

svghadi commented May 20, 2024

/test v4.14-kuttl-parallel

Copy link
Member

@svghadi svghadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @saumeya. I tested out the change. Just a small suggestion, rest all looks good.

@saumeya
Copy link
Member Author

saumeya commented May 20, 2024

Thanks for reviewing @svghadi

@saumeya
Copy link
Member Author

saumeya commented May 20, 2024

/test v4.14-kuttl-parallel

@saumeya
Copy link
Member Author

saumeya commented May 20, 2024

/test v4.13-kuttl-parallel

@saumeya saumeya requested a review from svghadi May 23, 2024 06:18
@saumeya saumeya force-pushed the make-metrics-optional branch 2 times, most recently from b583b25 to 4979b5f Compare May 27, 2024 15:50
@saumeya saumeya force-pushed the make-metrics-optional branch from 4979b5f to 8332813 Compare May 27, 2024 15:53
@saumeya saumeya requested a review from svghadi May 28, 2024 09:43
svghadi
svghadi previously approved these changes May 28, 2024
Copy link
Member

@svghadi svghadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@saumeya
Copy link
Member Author

saumeya commented May 28, 2024

/test v4.14-kuttl-parallel

@saumeya
Copy link
Member Author

saumeya commented May 28, 2024

/test v4.12-kuttl-parallel

@saumeya
Copy link
Member Author

saumeya commented May 29, 2024

/test v4.12-images
/test v4.14-e2e

@saumeya
Copy link
Member Author

saumeya commented May 29, 2024

/test v4.12-images

@varshab1210
Copy link
Member

/test v4.14-e2e
/test v4.13-kuttl-parallel

@saumeya
Copy link
Member Author

saumeya commented May 29, 2024

/retest

saumeya added 7 commits May 29, 2024 16:12
Signed-off-by: saumeya <[email protected]>

fixes

Signed-off-by: saumeya <[email protected]>

fix tests and add monitoring by default

Signed-off-by: saumeya <[email protected]>

add test case

Signed-off-by: saumeya <[email protected]>

review comments

Signed-off-by: saumeya <[email protected]>

review comments

Signed-off-by: saumeya <[email protected]>

review comments

Signed-off-by: saumeya <[email protected]>

review comments

Signed-off-by: saumeya <[email protected]>

add e2e for the feature

Signed-off-by: saumeya <[email protected]>

uncommenting

Signed-off-by: saumeya <[email protected]>

rebase

Signed-off-by: saumeya <[email protected]>

changes:

Signed-off-by: saumeya <[email protected]>

changes

Signed-off-by: saumeya <[email protected]>
Signed-off-by: saumeya <[email protected]>
Signed-off-by: saumeya <[email protected]>
Signed-off-by: saumeya <[email protected]>
Signed-off-by: saumeya <[email protected]>
Signed-off-by: saumeya <[email protected]>
Signed-off-by: saumeya <[email protected]>
@saumeya saumeya force-pushed the make-metrics-optional branch from bdfc4c4 to 454d858 Compare May 29, 2024 10:42
@svghadi
Copy link
Member

svghadi commented May 29, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label May 29, 2024
@saumeya
Copy link
Member Author

saumeya commented May 29, 2024

/approve

@iam-veeramalla
Copy link
Contributor

/lgtm
/approve

@openshift-ci openshift-ci bot removed the lgtm label May 29, 2024
@iam-veeramalla
Copy link
Contributor

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm label May 29, 2024
Copy link

openshift-ci bot commented May 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iam-veeramalla, saumeya

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit a603100 into redhat-developer:master May 29, 2024
trdoyle81 pushed a commit to trdoyle81/gitops-operator that referenced this pull request Aug 13, 2024
* feat: make metrics scraping optional

Signed-off-by: saumeya <[email protected]>

fixes

Signed-off-by: saumeya <[email protected]>

fix tests and add monitoring by default

Signed-off-by: saumeya <[email protected]>

add test case

Signed-off-by: saumeya <[email protected]>

review comments

Signed-off-by: saumeya <[email protected]>

review comments

Signed-off-by: saumeya <[email protected]>

review comments

Signed-off-by: saumeya <[email protected]>

review comments

Signed-off-by: saumeya <[email protected]>

add e2e for the feature

Signed-off-by: saumeya <[email protected]>

uncommenting

Signed-off-by: saumeya <[email protected]>

rebase

Signed-off-by: saumeya <[email protected]>

changes:

Signed-off-by: saumeya <[email protected]>

changes

Signed-off-by: saumeya <[email protected]>

* bundle changes

Signed-off-by: saumeya <[email protected]>

* changes

Signed-off-by: saumeya <[email protected]>

* change

Signed-off-by: saumeya <[email protected]>

* change

Signed-off-by: saumeya <[email protected]>

* change

Signed-off-by: saumeya <[email protected]>

* changes

Signed-off-by: saumeya <[email protected]>

---------

Signed-off-by: saumeya <[email protected]>
Co-authored-by: Abhishek Veeramalla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants