diff --git a/operations/helm/charts/grafana-agent/CHANGELOG.md b/operations/helm/charts/grafana-agent/CHANGELOG.md index e2e99fb42c74..e2a0258b0aa7 100644 --- a/operations/helm/charts/grafana-agent/CHANGELOG.md +++ b/operations/helm/charts/grafana-agent/CHANGELOG.md @@ -10,6 +10,9 @@ internal API changes are not present. Unreleased ---------- +### Enhancements + +- Add a toggle for enabling/disabling the Service. (@tpaschalis) 0.13.0 (2023-05-01) ------------------- diff --git a/operations/helm/charts/grafana-agent/README.md b/operations/helm/charts/grafana-agent/README.md index 4e4412b7fd95..21f14e8b7cf9 100644 --- a/operations/helm/charts/grafana-agent/README.md +++ b/operations/helm/charts/grafana-agent/README.md @@ -98,6 +98,7 @@ use the older mode (called "static mode"), set the `agent.mode` value to | rbac.create | bool | `true` | Whether to create RBAC resources for the agent. | | service.annotations | object | `{}` | | | service.clusterIP | string | `""` | Cluster IP, can be set to None, empty "" or an IP address | +| service.enabled | bool | `true` | Creates a Service for the controller's pods. | | service.type | string | `"ClusterIP"` | Service type | | serviceAccount.annotations | object | `{}` | Annotations to add to the created service account. | | serviceAccount.create | bool | `true` | Whether to create a service account for the Grafana Agent deployment. | diff --git a/operations/helm/charts/grafana-agent/templates/service.yaml b/operations/helm/charts/grafana-agent/templates/service.yaml index e6000791ead5..30932f02a09a 100644 --- a/operations/helm/charts/grafana-agent/templates/service.yaml +++ b/operations/helm/charts/grafana-agent/templates/service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.service.enabled -}} apiVersion: v1 kind: Service metadata: @@ -30,3 +31,4 @@ spec: targetPort: {{ $portMap.targetPort }} protocol: {{ coalesce $portMap.protocol "TCP" }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/grafana-agent/values.yaml b/operations/helm/charts/grafana-agent/values.yaml index 6515a407d14f..99176283cee4 100644 --- a/operations/helm/charts/grafana-agent/values.yaml +++ b/operations/helm/charts/grafana-agent/values.yaml @@ -154,6 +154,8 @@ controller: volumeClaimTemplates: [] service: + # -- Creates a Service for the controller's pods. + enabled: true # -- Service type type: ClusterIP # -- Cluster IP, can be set to None, empty "" or an IP address