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

[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 opened this issue Aug 23, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@kappa8219
Copy link

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):

  • Helm Version: ghcr.io/fluxcd/helm-controller:v1.0.1
  • Kubernetes Version: AWS EKS 1.30
@kappa8219 kappa8219 added bug Something isn't working untriaged Issues that have not yet been triaged labels Aug 23, 2024
@eyenx
Copy link
Contributor

eyenx commented Aug 23, 2024

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
Copy link
Collaborator

Thanks @eyenx

@VILJkid
Copy link
Contributor

VILJkid commented Aug 26, 2024

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,

  • port in ServiceMonitor means the name of the Service port. It's of type string.
  • port in Service means the port number of the Service. It's of type int.

Thus, the confusion and bug was created in #537

I'll shortly raise a PR with the fix.

@prudhvigodithi
Copy link
Collaborator

Got it thanks @VILJkid.

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Aug 28, 2024

Close this issue as the related PR is merged:

Thanks.

@peterzhuamazon peterzhuamazon removed the untriaged Issues that have not yet been triaged label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

No branches or pull requests

5 participants