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: .golangci.yml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,9 @@ linters:
18
18
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: false, auto-fix: false]
19
19
- errchkjson # Checks types passed to the json encoding functions. Reports unsupported types and optionally reports occasions, where the check for the returned error can be omitted. [fast: false, auto-fix: false]
20
20
- errname # Checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error`. [fast: false, auto-fix: false]
21
+
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13. [fast: false, auto-fix: false]
21
22
- exptostd # Detects functions from golang.org/x/exp/ that can be replaced by std functions. [auto-fix]
23
+
- fatcontext # Detects nested contexts in loops and function literals. [auto-fix]
- gci # Gci controls golang package import order and makes it always deterministic. [fast: true, auto-fix: false]
24
26
- gocheckcompilerdirectives # Checks that go compiler directive comments (//go:) are valid. [fast: true, auto-fix: false]
@@ -38,6 +40,7 @@ linters:
38
40
- gosmopolitan # Report certain i18n/l10n anti-patterns in your Go codebase [fast: false, auto-fix: false]
39
41
- govet #(vet, vetshadow): Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string [fast: false, auto-fix: false]
40
42
- grouper # An analyzer to analyze expression groups. [fast: true, auto-fix: false]
43
+
- iface # Detect the incorrect use of interfaces, helping developers avoid interface pollution. [auto-fix]
- err113 # Golang linter to check the errors handling expressions [fast: false, auto-fix: false]
89
-
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13. [fast: false, auto-fix: false]
Copy file name to clipboardExpand all lines: docs/resources/container.md
+64-1Lines changed: 64 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,17 @@ The following arguments are supported:
84
84
85
85
-`sandbox` - (Optional) Execution environment of the container.
86
86
87
+
-`heath_check` - (Optional) Health check configuration block of the container.
88
+
-`http` - HTTP health check configuration.
89
+
- `path` - Path to use for the HTTP health check.
90
+
-`failure_threshold` - Number of consecutive health check failures before considering the container unhealthy.
91
+
-`interval`- Period between health checks (in seconds).
92
+
93
+
-`scaling_option` - (Optional) Configuration block used to decide when to scale up or down. Possible values:
94
+
-`concurrent_requests_threshold` - Scale depending on the number of concurrent requests being processed per container instance.
95
+
-`cpu_usage_threshold` - Scale depending on the CPU usage of a container instance.
96
+
-`memory_usage_threshold`- Scale depending on the memory usage of a container instance.
97
+
87
98
-`port` - (Optional) The port to expose the container.
88
99
89
100
-`deploy` - (Optional) Boolean indicating whether the container is in a production environment.
@@ -152,4 +163,56 @@ The `memory_limit` (in MB) must correspond with the right amount of vCPU. Refer
152
163
| 4096 | 2240 |
153
164
154
165
~>**Important:** Make sure to select the right resources, as you will be billed based on compute usage over time and the number of Containers executions.
155
-
Refer to the [Serverless Containers pricing](https://www.scaleway.com/en/docs/faq/serverless-containers/#prices) for more information.
166
+
Refer to the [Serverless Containers pricing](https://www.scaleway.com/en/docs/faq/serverless-containers/#prices) for more information.
167
+
168
+
## Health check configuration
169
+
170
+
Custom health checks can be configured on the container.
171
+
172
+
It's possible to specify the HTTP path that the probe will listen to and the number of failures before considering the container as unhealthy.
173
+
During a deployment, if a newly created container fails to pass the health check, the deployment is aborted.
174
+
As a result, lowering this value can help to reduce the time it takes to detect a failed deployment.
175
+
The period between health checks is also configurable.
~>**Important**: A maximum of one of these parameters may be set. Also, when `cpu_usage_threshold` or `memory_usage_threshold` are used, `min_scale` can't be set to 0.
218
+
Refer to the [API Reference](https://www.scaleway.com/en/developers/api/serverless-containers/#path-containers-create-a-new-container) for more information.
0 commit comments