Skip to content

Commit

Permalink
helm: allow service to be disabled (grafana#3831)
Browse files Browse the repository at this point in the history
Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
  • Loading branch information
tpaschalis authored May 11, 2023
1 parent d355d51 commit 30fc025
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions operations/helm/charts/grafana-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
-------------------
Expand Down
1 change: 1 addition & 0 deletions operations/helm/charts/grafana-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
2 changes: 2 additions & 0 deletions operations/helm/charts/grafana-agent/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.service.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -30,3 +31,4 @@ spec:
targetPort: {{ $portMap.targetPort }}
protocol: {{ coalesce $portMap.protocol "TCP" }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions operations/helm/charts/grafana-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 30fc025

Please sign in to comment.