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

Remove "Enable" functionality from autoscaling #238

Conversation

vyzigold
Copy link
Contributor

This removes the enable/disable functionality from autoscaling. This functionality fill be added to the telemetry resource in a future PR.

Jira: OSPRH-1350

@vyzigold
Copy link
Contributor Author

/retest

@vyzigold vyzigold force-pushed the remove_enable_autoscaling branch from d3f2f21 to 2b86343 Compare November 16, 2023 13:18
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://review.rdoproject.org/zuul/buildset/38259d9e64f1420ba7d2b52f7186f1df

✔️ openstack-k8s-operators-content-provider SUCCESS in 29m 16s
podified-multinode-edpm-deployment-crc RETRY_LIMIT in 5s

@vyzigold
Copy link
Contributor Author

/retest

@vyzigold
Copy link
Contributor Author

recheck

@@ -34,33 +34,6 @@ import (
autoscaling "github.com/openstack-k8s-operators/telemetry-operator/pkg/autoscaling"
)

func (r *AutoscalingReconciler) reconcileDisabledPrometheus(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be kept as we can disable prometheus independently using the deployPrometheus: false switch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch. I believe I deleted the function, because I determined, that it's called only from the now deleted reconcileDisabled. This was the original intent of the naming of the function, that reconcileDisabled would call <prometheus/aodh/...>Disabled. I'll take a further look later today and test how the deployPrometheus: false behaves with this change and I'll get to you later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The deployPrometheus switch is handled in the reconcileNormalPrometheus:

if instance.Spec.Prometheus.DeployPrometheus {

Each time the autoscaling runs through the reconciling loop, it checks the switch and it either creates the prometheus or deletes it (the deleting code is a few lines further in the "else" part). This code stays without change. The reconcileDisabledPrometheus was there to handle only the autoscaling switch enabled: false

Copy link
Contributor

openshift-ci bot commented Nov 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jlarriba, vyzigold

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 5fdafd0 into openstack-k8s-operators:main Nov 20, 2023
yazug added a commit to yazug/telemetry-operator that referenced this pull request Dec 14, 2023
First introduced with
Merge pull request openstack-k8s-operators#238 from vyzigold/remove_enable_autoscaling

The changes to the telemetry-operator.clusterserviceversion.yaml were
left in the repo after running make bundle.

This commit updated the repo with the changes so that after make bundle
there are not leftover changes left in local repo.

Signed-off-by: Jon Schlueter <[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.

2 participants