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

Migrate prometheus pre 1.14 rules only when prometheus-operator.kubeTargetVersionOverride is set to 1.13.0-0 #1301

Merged

Conversation

pmalek-sumo
Copy link
Contributor

@pmalek-sumo pmalek-sumo commented Jan 7, 2021

Description

Migrate only when prometheus-operator.kubeTargetVersionOverride is set to 1.13.0-0.


Testing performed
  • Redeploy fluentd and fluentd-events pods
  • Confirm events, logs, and metrics are coming in

info "Removing prometheus kubeTargetVersionOverride='1.13.0-0'"
yq d -i "${TEMP_FILE}" "prometheus-operator.kubeTargetVersionOverride"
add_prometheus_pre_1_14_recording_rules "${TEMP_FILE}"
elif [[ -z "${RECORDING_RULES_OVERRIDE}" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

what about this condition? What if kubeTargetVersionOverride is unset?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't want to add pre 1.14 rules then.
As per discussion with @frankreno

@sumo-drosiek
Copy link
Contributor

Also do we have test for cover that?

@pmalek-sumo
Copy link
Contributor Author

Also do we have test for cover that?

All tests that specify "prometheus-operator.kubeTargetVersionOverride"as 1.13.0-0 should have new rules added.
Otherwise it shouldn't be added. This is reflected in tests.

@pmalek-sumo pmalek-sumo merged commit de155a5 into main Jan 8, 2021
@pmalek-sumo pmalek-sumo deleted the v2-migration-script-pre-1.14-prometheus-rules-map branch January 8, 2021 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants