opensearch-project / helm-charts

:wheel_of_dharma: A community repository for Helm Charts of OpenSearch Project.
https://opensearch.org/docs/latest/opensearch/install/helm/
Apache License 2.0
170 stars 228 forks source link

[BUG][opensearch-dashboards, opensearch] Upgrade "opensearch" failed: failed to create resource: ServiceMonitor.monitoring.coreos.com: spec.endpoints[0].port in body must be of type string: "integer" #579

Closed kappa8219 closed 1 month ago

kappa8219 commented 1 month ago

Describe the bug Upgrade "opensearch" failed: failed to create resource: ServiceMonitor.monitoring.coreos.com "opensearch-cluster-master-service-monitor" is invalid: spec.endpoints[0].port: Invalid value: "integer": spec.endpoints[0].port in body must be of type string: "integer"

To Reproduce Steps to reproduce the behavior:

  1. Upgrade opensearch over helm from 2.22.0 to 2.23.0, dashboards 2.20.0 => 2.21.0 setting value "serviceMonitor: enabled: true"
  2. Helm upgrade failed with error in description

Expected behavior Upgrade successfull

Chart Name Both opensearch-dashboards, opensearch.

Host/Environment (please complete the following information):

eyenx commented 1 month ago

Looks like this issue was introduced with #537

I'm looking into it and will try to fix it with a PR this afternoon!

prudhvigodithi commented 1 month ago

Thanks @eyenx

VILJkid commented 1 month ago

Thanks @kappa8219, @eyenx, @prudhvigodithi for pointing this one out!

After going through the prometheus-operator, it was found that the template port definition in ServiceMonitor template is different from Service template.

In short,

Thus, the confusion and bug was created in #537

I'll shortly raise a PR with the fix.

prudhvigodithi commented 1 month ago

Got it thanks @VILJkid.

peterzhuamazon commented 1 month ago

Close this issue as the related PR is merged:

Thanks.