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

[kube-prometheus-stack] Add prometheus.thanosService.omitClusterIP #864

Conversation

yurrriq
Copy link
Contributor

@yurrriq yurrriq commented Apr 19, 2021

What this PR does / why we need it:

Support omission of the Thanos service clusterIP.

Which issue this PR fixes

Special notes for your reviewer:

Similar to helm/charts#13646

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

@yurrriq yurrriq force-pushed the thanos-service-omit-cluster-ip branch 2 times, most recently from 4d9ff1e to 839d63f Compare April 21, 2021 21:20
@yurrriq
Copy link
Contributor Author

yurrriq commented Apr 21, 2021

rebased. need anything else from me here? this is pretty much a blocker for us

@yurrriq yurrriq force-pushed the thanos-service-omit-cluster-ip branch from 839d63f to 411ee39 Compare April 23, 2021 17:33
@yurrriq
Copy link
Contributor Author

yurrriq commented Apr 23, 2021

rebased again.

@@ -1597,6 +1597,7 @@ prometheus:
portName: grpc
port: 10901
targetPort: "grpc"
omitClusterIP: false
Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed?
Imho you could just set clusterIP: "" to get rid of the error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll try that and report back.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same result.

UPGRADE FAILED: cannot patch "prometheus-operator-thanos-discovery" with kind Service: Service "prometheus-operator-thanos-discovery" is invalid: spec.clusterIP: Invalid value: "": field is immutable

@@ -16,7 +16,9 @@ metadata:
{{- end }}
spec:
type: {{ .Values.prometheus.thanosService.type }}
{{- if not .Values.prometheus.thanosService.omitClusterIP }}
clusterIP: {{ .Values.prometheus.thanosService.clusterIP }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed in the linked tickets (see links in #863) regarding the nginx chart, the ideal solution here would be something like this, but if we want to maintain backward compatibility, we'll probably need something like omitClusterIP.

Suggested change
clusterIP: {{ .Values.prometheus.thanosService.clusterIP }}
{{- with .Values.prometheus.thanosService.clusterIP }}
clusterIP: {{ . }}
{{- end }}

@doug-ba
Copy link
Contributor

doug-ba commented Apr 29, 2021

I don't know that this is the correct solution for #863 . This service is intended as a headless service for service discovery. I've made an alternate PR in #916 which creates a new service for external access and does not set ClusterIP.

@yurrriq
Copy link
Contributor Author

yurrriq commented May 5, 2021

Superseded by #916

@yurrriq yurrriq closed this May 5, 2021
@yurrriq yurrriq deleted the thanos-service-omit-cluster-ip branch May 5, 2021 17:18
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.

[kube-prometheus-stack] prometheus.thanosService.clusterIP should not be required
3 participants