You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: charts/base/README.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -725,11 +725,22 @@ rolloutStrategy:
725
725
namespace: ingress-nginx
726
726
```
727
727
728
-
## Deprecations and incompatible changes
728
+
## Deprecations and incompatible changes and release important notes
729
729
730
730
### Deprecations
731
731
- 0.3.0: `deployment` option is deprecated and all underlying fields are now available as top level variables, so that `deployment.volumes` moved to `volumes`, `deployment.additionalvolumeMounts` to `additionalVolumeMounts` and `deployment.lifecycle` to `lifecycle`
732
732
- 0.3.0: for mounting volume to extra container use `container: <extra-container-name>` or `container: [<extra-container-name>]` instead of `container: extra` config in new `volumes` listing.
733
733
734
734
### incompatible changes
735
735
- 0.3.0: the `extraContainer.deployment.volumes` field have been removed, use `volumes` field with `container: <extra-container-name>` for having volume mounted to extra container
736
+
737
+
### release important notes
738
+
- Version 0.3.8:
739
+
This release introduces a new feature that enhances the robustness of pod termination by implementing a default preStop lifecycle hook.
740
+
- Default preStop Hook: Version 0.3.8 introduces the `defaultLifecycle` variable, which, by default, automatically configures a preStop hook with a `sleep 5` command.
741
+
- Graceful Pod Termination: This 5-second delay before container shutdown provides sufficient time for the pod's IP address to be unregistered from service target lists. This proactive measure minimizes the occurrence of failed HTTP requests during pod termination, leading to improved application stability and user experience.
742
+
- sleep Command Dependency: While the absence of the sleep command within a container's operating system will prevent the 5-second delay from functioning, but will not produce any additional issues, it is strongly recommended to include or install the sleep utility in your container images to ensure the intended graceful termination behavior.
743
+
- Custom preStop Configurations: If your containers already have custom `preStop` lifecycle configurations defined, these existing configurations will take precedence, effectively overriding the default configuration introduced in this release. However, to benefit from the graceful termination feature, it is advisable to incorporate a sleep 5 command within your custom `preStop` configurations.
744
+
- Scope of Default Configuration: The default `preStop` configuration is applied uniformly to all containers within a pod, including the main application container and all extra containers.
745
+
- Default Timeout Considerations: The default 5-second sleep duration has been determined through testing on standard web applications within an EKS cluster and is generally sufficient for facilitating a graceful shutdown. However, applications with longer request processing times (exceeding 2 seconds) may require an increased timeout value. You can adjust this by defining custom `preStop` configurations with a longer sleep duration.
746
+
- Disabling the Default Configuration: The default `preStop` hook can be easily disabled by setting the Helm chart value `defaultLifecycle.enabled=false`.
Copy file name to clipboardExpand all lines: charts/base/values.yaml
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -318,6 +318,16 @@ pdb:
318
318
minAvailable: 1
319
319
pdbName:
320
320
321
+
# the default lifecycle rule to apply which allows to have some kind of graceful shutdown by waiting/sleep for 5 seconds, even if there is no sleep command in os this will not produce issues and container will get shuted down
322
+
defaultLifecycle:
323
+
enabled: true # whether this default is enabled, by default it is enabled but can be disabled if needed by setting this to false
324
+
preStop:
325
+
exec:
326
+
command:
327
+
- sh
328
+
- -c
329
+
- sleep 5 # the sleep interval can vary for app, if you still get issues at pod termination consider increasing it little by little to get optimal one for you, based on tests the 5 seconds seems suitable for standard web app on eks to get the pod IP removed from service targets and to finish active client requests/connections to not have failed request at pod termination
Copy file name to clipboardExpand all lines: examples/base/with-canary-deployment/canary-with-manual-approval.yaml
+30-24Lines changed: 30 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -98,46 +98,52 @@ rolloutStrategy:
98
98
# const cookieVersion = "canaryNewWebsite"; // the cookie name which defines the version of website that user should see
99
99
# const cookieSwitchSource = "canarySwitchSource"; // this cookie allows to keep in browser if user have been switched automatically to new/old website version or manually(by button click)
100
100
# const cookieAutoSwitchPercent = "canaryAutoSwitchPercent"; // we store this data in cookie to have the data in user/client browser that this were been proceeded by this percent of auto switch
101
-
# const cookieDefaultExpire = "expires=Mon, 14 Jul 2025 07:58:08 GMT"; // by default this expire date will be set on cookies, it is about 3 months, this is for auto cleanup of above 3 used cookies after this period
101
+
# const cookieDefaultExpire = "expires=Mon, 14 Jul 2025 07:58:08 UTC"; // by default this expire date will be set on cookies, it is about 3 months, this is for auto cleanup of above 3 used cookies after this period
102
102
# const removeCookieExpire = "expires=Thu, 01 Jan 1970 00:00:00 UTC"; // this back-day expire date for cookies is just for cleanup/remove of cookies
103
103
# let cookies = [];
104
104
# switch(action) {
105
105
# case "switch-auto":
106
106
# if ( !document.cookie.includes(`${cookieSwitchSource}=manual`) // we do auto switch for ones who do not change to new/old manually
107
107
# && (!document.cookie.includes(`${cookieVersion}=`) // if this is first load
108
-
# || !document.cookie.includes(`${cookieAutoSwitchPercent}=${newVersionAutoSwitchUsersPercent}`)) // or if percent changed
108
+
# || (!document.cookie.includes(`${cookieAutoSwitchPercent}=${newVersionAutoSwitchUsersPercent}`) && !document.cookie.includes(`${cookieVersion}=always`))) // or if percent changed and user is not using new version of website
# switchButton.innerHTML = isWebsiteNewVersion() ? "Switch to old UI" : "Switch to New UI";
160
166
# switchButton.onclick = function () {
161
167
# if (isWebsiteNewVersion()) {
@@ -167,6 +173,6 @@ rolloutStrategy:
167
173
168
174
# document.body.appendChild(switchButton);
169
175
# }
170
-
# canaryAction("switch-auto"); // possible values "switch-auto", "reset", "switch-to-new-manual" and "switch-to-old-manual"
171
-
# createSwitchButton(); // place/crate a switch button in UI for manual switching(should be seen bottom left corner)
176
+
#document.location.href.includes("staging-canary") && canaryAction("switch-auto"); // possible values "switch-auto", "reset", "switch-to-new-manual" and "switch-to-old-manual"
177
+
#document.location.href.includes("staging-canary") && createSwitchButton(); // place/crate a switch button in UI for manual switching(should be seen bottom left corner)
0 commit comments