[bitnami/contour] Expose NodePort for the metrics port in the Envoy service (#29818)

* Contour: Expose NodePort for the metrics port

When deploying Contour behind an existing load balancer, such as an AWS ALB, health checks are often required for the target group.

Currently, the Envoy health check endpoint is not exposed, making it unavailable for such checks. This change adds the option to expose the metrics port as a NodePort, enabling health checks to be performed.

Signed-off-by: Mario de Frutos <mario@defrutos.org>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Address required changes from the code review

Signed-off-by: Mario de Frutos <mario@defrutos.org>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

---------

Signed-off-by: Mario de Frutos <mario@defrutos.org>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Mario de Frutos Dieguez
2024-10-10 11:59:12 +02:00
committed by GitHub
parent aabab2ab6a
commit 1b98ba2878
5 changed files with 24 additions and 3 deletions

View File

@@ -1,8 +1,12 @@
# Changelog
## 19.0.5 (2024-10-08)
## 19.1.0 (2024-10-10)
* [bitnami/contour]: Fix invalid extraVolumeMounts ([#29817](https://github.com/bitnami/charts/pull/29817))
* [bitnami/contour] Expose NodePort for the metrics port in the Envoy service ([#29818](https://github.com/bitnami/charts/pull/29818))
## <small>19.0.5 (2024-10-09)</small>
* [bitnami/contour]: Fix invalid extraVolumeMounts (#29817) ([b445bd3](https://github.com/bitnami/charts/commit/b445bd37a6c255363ba790ea37cc380a55f6c49b)), closes [#29817](https://github.com/bitnami/charts/issues/29817)
## <small>19.0.4 (2024-10-04)</small>

View File

@@ -32,4 +32,4 @@ maintainers:
name: contour
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/contour
version: 19.0.5
version: 19.1.0

View File

@@ -486,9 +486,11 @@ As an alternative, you can use of the preset configurations for pod affinity, po
| `envoy.service.ports.metrics` | Sets service metrics port | `8002` |
| `envoy.service.nodePorts.http` | HTTP Port. If `envoy.service.type` is NodePort and this is non-empty | `""` |
| `envoy.service.nodePorts.https` | HTTPS Port. If `envoy.service.type` is NodePort and this is non-empty | `""` |
| `envoy.service.nodePorts.metrics` | Metrics Port. If `envoy.service.type` is NodePort and this is non-empty | `""` |
| `envoy.service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` |
| `envoy.service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` |
| `envoy.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
| `envoy.service.exposeMetrics` | Setting to expose the metrics port in the service | `false` |
| `envoy.networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
| `envoy.networkPolicy.allowExternal` | Don't require server label for connections | `true` |
| `envoy.networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |

View File

@@ -131,6 +131,17 @@ The default envoy service spec
{{- else if eq .Values.envoy.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- if .Values.envoy.service.exposeMetrics }}
- name: metrics
port: {{ .Values.envoy.service.ports.metrics }}
protocol: TCP
targetPort: {{ .Values.envoy.service.targetPorts.metrics }}
{{- if and (or (eq .Values.envoy.service.type "NodePort") (eq .Values.envoy.service.type "LoadBalancer")) (not (empty .Values.envoy.service.nodePorts.metrics)) }}
nodePort: {{ .Values.envoy.service.nodePorts.metrics }}
{{- else if eq .Values.envoy.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- end }}
{{- if .Values.envoy.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.envoy.service.extraPorts "context" $) | nindent 4 }}
{{- end }}

View File

@@ -1153,10 +1153,12 @@ envoy:
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
## @param envoy.service.nodePorts.http HTTP Port. If `envoy.service.type` is NodePort and this is non-empty
## @param envoy.service.nodePorts.https HTTPS Port. If `envoy.service.type` is NodePort and this is non-empty
## @param envoy.service.nodePorts.metrics Metrics Port. If `envoy.service.type` is NodePort and this is non-empty
##
nodePorts:
http: ""
https: ""
metrics: ""
## @param envoy.service.extraPorts [array] Extra ports to expose (normally used with the `sidecar` value)
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services
##
@@ -1172,6 +1174,8 @@ envoy:
## timeoutSeconds: 300
##
sessionAffinityConfig: {}
## @param envoy.service.exposeMetrics Setting to expose the metrics port in the service
exposeMetrics: false
## Network Policies
## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
##