Skip to content

Commit

Permalink
feat(helm): do not use a headless Service by default
Browse files Browse the repository at this point in the history
fixes #50
  • Loading branch information
npdgm committed Jul 12, 2023
1 parent e73c27c commit a5d2bf8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion deploy/charts/x509-certificate-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ in the container namespace.
| hostNetwork | bool | `false` | Enable hostNetwork mode. Useful when Prometheus is deployed outside of the Kubernetes cluster |
| webConfiguration | string | `""` | HTTP server configuration for enabling TLS and authentication (password, mTLS) ; see [documentation at Exporter Toolkit](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md) |
| webConfigurationExistingSecret | string | `""` | Load the HTTP server configuration from an existing Secret instead of `webConfiguration`. Key must `webconfig.yaml`. |
| service.create | bool | `true` | Should a headless Service be installed, targets all instances Deployment and DaemonSets (required for ServiceMonitor) |
| service.create | bool | `true` | Should a Service be installed, targets all instances Deployment and DaemonSets (required for ServiceMonitor) |
| service.headless | bool | `false` | Should the Service be headless |
| service.port | int | `9793` | TCP port to expose the Service on |
| service.annotations | object | `{}` | Annotations to add to the Service |
| service.extraLabels | object | `{}` | Additional labels to add to the Service |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "x509-certificate-exporter.fullname" . }}-headless
name: {{ include "x509-certificate-exporter.fullname" . }}
labels:
{{- include "x509-certificate-exporter.labels" . | nindent 4 }}
{{- with .Values.service.extraLabels }}
Expand All @@ -14,7 +14,9 @@ metadata:
{{- end }}
spec:
type: ClusterIP
{{- if .Values.service.headless }}
clusterIP: None
{{- end }}
ports:
- name: metrics
port: {{ .Values.service.port }}
Expand Down
4 changes: 3 additions & 1 deletion deploy/charts/x509-certificate-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ webConfiguration: ""
webConfigurationExistingSecret: ""

service:
# -- Should a headless Service be installed, targets all instances Deployment and DaemonSets (required for ServiceMonitor)
# -- Should a Service be installed, targets all instances Deployment and DaemonSets (required for ServiceMonitor)
create: true
# -- Should the Service be headless
headless: false
# -- TCP port to expose the Service on
port: 9793
# -- Annotations to add to the Service
Expand Down

0 comments on commit a5d2bf8

Please sign in to comment.