[bitnami/contour] allow customizing lifecycle hooks for envoy containers (#27506)

* allow customizing lifecycle hooks for envoy containers

Signed-off-by: Ahmad Karimi <ak12hastam@gmail.com>

* Update CHANGELOG.md

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

---------

Signed-off-by: Ahmad Karimi <ak12hastam@gmail.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Ahmad Karimi
2024-07-02 12:56:08 +03:30
committed by GitHub
parent e9e69354de
commit 08e8c5859d
5 changed files with 18 additions and 3 deletions

View File

@@ -1,8 +1,12 @@
# Changelog
## 18.2.6 (2024-06-18)
## 18.2.7 (2024-06-27)
* [bitnami/contour] Release 18.2.6 ([#27335](https://github.com/bitnami/charts/pull/27335))
* [bitnami/contour] allow customizing lifecycle hooks for envoy containers ([#27506](https://github.com/bitnami/charts/pull/27506))
## <small>18.2.6 (2024-06-18)</small>
* [bitnami/contour] Release 18.2.6 (#27335) ([c28d442](https://github.com/bitnami/charts/commit/c28d442b0762f714a6279ff1bf204eac218105fc)), closes [#27335](https://github.com/bitnami/charts/issues/27335)
## <small>18.2.5 (2024-06-17)</small>

View File

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

View File

@@ -353,6 +353,7 @@ As an alternative, you can use of the preset configurations for pod affinity, po
| `envoy.shutdownManager.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if envoy.shutdownManager.resources is set (envoy.shutdownManager.resources is recommended for production). | `nano` |
| `envoy.shutdownManager.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `envoy.shutdownManager.containerPorts.http` | Specify Port for shutdown container | `8090` |
| `envoy.shutdownManager.lifecycleHooks` | lifecycleHooks for the container to automate configuration before or after startup. | `{}` |
| `envoy.shutdownManager.containerSecurityContext.enabled` | Enabled envoy shutdownManager containers' Security Context | `true` |
| `envoy.shutdownManager.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
| `envoy.shutdownManager.containerSecurityContext.runAsUser` | Set envoy shutdownManager containers' Security Context runAsUser | `1001` |

View File

@@ -146,6 +146,9 @@ spec:
successThreshold: {{ .Values.envoy.shutdownManager.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.envoy.shutdownManager.readinessProbe.failureThreshold }}
{{- end }}
{{- if .Values.envoy.shutdownManager.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.shutdownManager.lifecycleHooks "context" $) | nindent 12 }}
{{- else }}
lifecycle:
preStop:
exec:
@@ -153,6 +156,7 @@ spec:
- contour
- envoy
- shutdown
{{- end }}
name: shutdown-manager
{{- if .Values.envoy.shutdownManager.resources }}
resources: {{- toYaml .Values.envoy.shutdownManager.resources | nindent 12 }}
@@ -303,6 +307,9 @@ spec:
{{- if .Values.envoy.extraVolumeMounts }}
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.extraVolumeMounts "context" $ ) | nindent 12 }}
{{- end }}
{{- if .Values.envoy.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.envoy.lifecycleHooks "context" $) | nindent 12 }}
{{- else }}
lifecycle:
preStop:
{{- if .Values.envoy.shutdownManager.enabled }}
@@ -317,6 +324,7 @@ spec:
- '-c'
- sleep {{ .Values.envoy.terminationGracePeriodSeconds }}; kill 1
{{- end }}
{{- end }}
{{- if .Values.envoy.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.envoy.sidecars "context" $ ) | nindent 8 }}
{{- end }}

View File

@@ -733,8 +733,10 @@ envoy:
## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
## @param envoy.shutdownManager.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
## @param envoy.shutdownManager.containerPorts.http Specify Port for shutdown container
## @param envoy.shutdownManager.lifecycleHooks lifecycleHooks for the container to automate configuration before or after startup.
##
shutdownManager:
lifecycleHooks: {}
extraArgs: []
enabled: true
resourcesPreset: "nano"