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

pkg/manifests: Allow users to configure EnforcedSampleLimit for user #865

Merged
merged 2 commits into from Jul 22, 2020

Conversation

lilic
Copy link
Contributor

@lilic lilic commented Jul 20, 2020

  • I added CHANGELOG entry for this change.

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jul 20, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 20, 2020
@lilic
Copy link
Contributor Author

lilic commented Jul 20, 2020

This also needs bump of prometheus operator dep, which another PR introduces, hence the failed tests.

@lilic lilic changed the title WIP: pkg/manifests: Allow users to configure EnforcedSampleLimit for user pkg/manifests: Allow users to configure EnforcedSampleLimit for user Jul 22, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 22, 2020
@lilic
Copy link
Contributor Author

lilic commented Jul 22, 2020

@openshift/openshift-team-monitoring ready for review! I tested this on a cluster and checked the limit was applied to the scrape config, but will be a bit harder to add an e2e test for this as the data ends up in a Secret gzipped.

Side note tests passed on first try :O 🎉

@lilic
Copy link
Contributor Author

lilic commented Jul 22, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 22, 2020
@@ -1441,6 +1441,10 @@ func (f *Factory) PrometheusUserWorkload(grpcTLS *v1.Secret) (*monv1.Prometheus,
p.Spec.RemoteWrite = f.config.UserWorkloadConfiguration.Prometheus.RemoteWrite
}

if f.config.UserWorkloadConfiguration.Prometheus.EnforcedSampleLimit != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a new configuration field so we do not want to add this to the old ConfigMap as a way to encourage users to migrate away from the old configmap as it will be deprecated in 4.7.

Copy link
Contributor

Choose a reason for hiding this comment

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

precisely why having separate structs for configs is a really good idea 👍 💯

very nice!

@brancz
Copy link
Contributor

brancz commented Jul 22, 2020

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brancz, lilic

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-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 22, 2020
@openshift-merge-robot openshift-merge-robot merged commit 8c521c4 into openshift:master Jul 22, 2020
@lilic lilic deleted the add-sample-limit branch July 22, 2020 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants