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
176 stars 236 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 3 months ago

kappa8219 commented 3 months 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 3 months 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 3 months ago

Thanks @eyenx

VILJkid commented 3 months 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 3 months ago

Got it thanks @VILJkid.

peterzhuamazon commented 3 months ago

Close this issue as the related PR is merged:

Thanks.