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

fix documentation for helm extraPorts #1998

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion operations/helm/charts/alloy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

> _Contributors should read our [contributors guide][] for instructions on how
> _Contributors should read our [contributors guide](../../../../docs/developer/contributing.md#updating-the-changelog
) for instructions on how
> to update the changelog._

This document contains a historical list of changes between releases. Only
Expand All @@ -9,9 +10,19 @@ internal API changes are not present.

Unreleased
----------

0.9.3 (2024-10-29)
------------------

### Enhancements

- Add support for adding hostAliases to the Helm chart. (@duncan485)

### Bugfixes

- Fix alloy container template and documentation for `alloy.extraPorts` to contain `port`
instead of unsupported `hostPort` (@jkruke)

0.9.2 (2024-10-18)
------------------

Expand Down
2 changes: 1 addition & 1 deletion operations/helm/charts/alloy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: alloy
description: 'Grafana Alloy'
type: application
version: 0.9.2
version: 0.9.3
appVersion: 'v1.4.3'
icon: https://raw.githubusercontent.com/grafana/alloy/main/docs/sources/assets/alloy_icon_orange.svg

Expand Down
12 changes: 7 additions & 5 deletions operations/helm/charts/alloy/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Grafana Alloy Helm chart

![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.9.2](https://img.shields.io/badge/Version-0.9.2-informational?style=flat-square) ![AppVersion: v1.4.3](https://img.shields.io/badge/AppVersion-v1.4.3-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.9.3](https://img.shields.io/badge/Version-0.9.3-informational?style=flat-square) ![AppVersion: v1.4.3](https://img.shields.io/badge/AppVersion-v1.4.3-informational?style=flat-square)

Helm chart for deploying [Grafana Alloy][] to Kubernetes.

Expand Down Expand Up @@ -44,7 +44,7 @@ useful if just using the default DaemonSet isn't sufficient.
| alloy.envFrom | list | `[]` | Maps all the keys on a ConfigMap or Secret as environment variables. https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#envfromsource-v1-core |
| alloy.extraArgs | list | `[]` | Extra args to pass to `alloy run`: https://grafana.com/docs/alloy/latest/reference/cli/run/ |
| alloy.extraEnv | list | `[]` | Extra environment variables to pass to the Alloy container. |
| alloy.extraPorts | list | `[]` | Extra ports to expose on the Alloy container. |
| alloy.extraPorts | list | `[]` | Extra ports to expose on the Alloy container. See [alloy.extraPorts][#alloy.extraPorts] |
| alloy.hostAliases | list | `[]` | Host aliases to add to the Alloy container. |
| alloy.lifecycle | object | `{}` | Set lifecycle hooks for the Grafana Alloy container. |
| alloy.listenAddr | string | `"0.0.0.0"` | Address to listen for traffic on. 0.0.0.0 exposes the UI to other containers. |
Expand Down Expand Up @@ -176,14 +176,16 @@ container. The list of available arguments is documented on [alloy run][].

`alloy.extraPorts` allows for configuring specific open ports.

The detained specification of ports can be found at the [Kubernetes Pod documents](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#ports).
The detained specification of ports for pods and services can be found at the
[Kubernetes Pod documents](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#ports) and
[Kubernetes Service documents](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec)

Port numbers specified must be 0 < x < 65535.

| ChartPort | KubePort | Description |
|-----------|----------|-------------|
| targetPort | containerPort | Number of port to expose on the pod's IP address. |
| hostPort | hostPort | (Optional) Number of port to expose on the host. Daemonsets taking traffic might find this useful. |
| hostPort | hostPort | Number of port to expose on the host and by the service. This is optional if not using a service. Daemonsets taking traffic might find this useful. |
| name | name | If specified, this must be an `IANA_SVC_NAME` and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.
| protocol | protocol | Must be UDP, TCP, or SCTP. Defaults to "TCP". |
| appProtocol | appProtocol | Hint on application protocol. This is used to expose Alloy externally on OpenShift clusters using "h2c". Optional. No default value. |
Expand Down Expand Up @@ -313,4 +315,4 @@ spec:
wildcardPolicy: None
```

Once this Ingress/Route is exposed it would then allow gRPC communication for (for example) traces. This allow an Alloy instance on a VM or another Kubernetes/OpenShift cluster to be able to communicate over gRPC via the exposed Ingress or Route.
Once this Ingress/Route is exposed it would then allow gRPC communication for (for example) traces. This allow an Alloy instance on a VM or another Kubernetes/OpenShift cluster to be able to communicate over gRPC via the exposed Ingress or Route.
8 changes: 5 additions & 3 deletions operations/helm/charts/alloy/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,16 @@ container. The list of available arguments is documented on [alloy run][].

`alloy.extraPorts` allows for configuring specific open ports.

The detained specification of ports can be found at the [Kubernetes Pod documents](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#ports).
The detained specification of ports for pods and services can be found at the
[Kubernetes Pod documents](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#ports) and
[Kubernetes Service documents](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec)

Port numbers specified must be 0 < x < 65535.

| ChartPort | KubePort | Description |
|-----------|----------|-------------|
| targetPort | containerPort | Number of port to expose on the pod's IP address. |
| hostPort | hostPort | (Optional) Number of port to expose on the host. Daemonsets taking traffic might find this useful. |
| hostPort | hostPort | Number of port to expose on the host and by the service. This is optional if not using a service. Daemonsets taking traffic might find this useful. |
| name | name | If specified, this must be an `IANA_SVC_NAME` and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.
| protocol | protocol | Must be UDP, TCP, or SCTP. Defaults to "TCP". |
| appProtocol | appProtocol | Hint on application protocol. This is used to expose Alloy externally on OpenShift clusters using "h2c". Optional. No default value. |
Expand Down Expand Up @@ -204,4 +206,4 @@ spec:
```


Once this Ingress/Route is exposed it would then allow gRPC communication for (for example) traces. This allow an Alloy instance on a VM or another Kubernetes/OpenShift cluster to be able to communicate over gRPC via the exposed Ingress or Route.
Once this Ingress/Route is exposed it would then allow gRPC communication for (for example) traces. This allow an Alloy instance on a VM or another Kubernetes/OpenShift cluster to be able to communicate over gRPC via the exposed Ingress or Route.
2 changes: 1 addition & 1 deletion operations/helm/charts/alloy/ci/extra-ports-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
alloy:
extraPorts:
- name: jaeger-thrift
port: 14268
hostPort: 14268
targetPort: 14268
protocol: TCP
2 changes: 1 addition & 1 deletion operations/helm/charts/alloy/ci/faro-ingress-values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
alloy:
extraPorts:
- name: "faro"
port: 12347
hostPort: 12347
targetPort: 12347
protocol: "TCP"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
protocol: "TCP"
{{- range $portMap := $values.extraPorts }}
- name: {{ $portMap.name }}
port: {{ $portMap.port }}
port: {{ $portMap.hostPort }}
targetPort: {{ $portMap.targetPort }}
protocol: {{ coalesce $portMap.protocol "TCP" }}
{{- if not (empty $portMap.appProtocol) }}
Expand Down
2 changes: 1 addition & 1 deletion operations/helm/charts/alloy/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
protocol: "TCP"
{{- range $portMap := $values.extraPorts }}
- name: {{ $portMap.name }}
port: {{ $portMap.port }}
port: {{ $portMap.hostPort }}
targetPort: {{ $portMap.targetPort }}
protocol: {{ coalesce $portMap.protocol "TCP" }}
{{- if not (empty $portMap.appProtocol) }}
Expand Down
4 changes: 2 additions & 2 deletions operations/helm/charts/alloy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ alloy:
# -- Extra args to pass to `alloy run`: https://grafana.com/docs/alloy/latest/reference/cli/run/
extraArgs: []

# -- Extra ports to expose on the Alloy container.
# -- Extra ports to expose on the Alloy container. See [alloy.extraPorts][#alloy.extraPorts]
extraPorts: []
# - name: "faro"
# port: 12347
# hostPort: 12347
# targetPort: 12347
# protocol: "TCP"
# appProtocol: "h2c"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ spec:
- containerPort: 12345
name: http-metrics
- containerPort: 14268
hostPort: 14268
name: jaeger-thrift
protocol: TCP
readinessProbe:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ spec:
- containerPort: 12345
name: http-metrics
- containerPort: 12347
hostPort: 12347
name: faro
protocol: TCP
readinessProbe:
Expand Down