mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 16:37:04 +02:00
feat: Bump common library to v3.4.0 (#349)
This commit is contained in:
parent
a78c21ab00
commit
86062681a9
45 changed files with 1023 additions and 149 deletions
83
docs/common-library/howto/default-container-options.md
Normal file
83
docs/common-library/howto/default-container-options.md
Normal file
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
hide:
|
||||
- toc
|
||||
---
|
||||
|
||||
# Setting default container options
|
||||
|
||||
It is possible to configure default container options under the `controllers.*.defaultContainerOptions` key. These options will be applied to all containers within the controller.
|
||||
|
||||
## Only applying to regular containers
|
||||
|
||||
By default the `defaultContainerOptions` will be applied to both `initContainers` and regular `containers`.
|
||||
If you wish to only apply the default options to regular containers, set `controllers.*.applyDefaultContainerOptionsToInitContainers` to `false`.
|
||||
|
||||
## Default value strategies
|
||||
|
||||
### Overwrite
|
||||
|
||||
The default strategy for configuring default container options is `overwrite`. This means that if a container has an entry for a default container option it will be overwritten entirely by the container-specific configuration.
|
||||
|
||||
This behavior can be set explicitly by setting `controllers.*.defaultContainerOptionsStrategy` to `overwrite`.
|
||||
|
||||
An (abbreviated) example of the `overwrite` strategy:
|
||||
|
||||
```yaml
|
||||
controllers:
|
||||
main:
|
||||
defaultContainerOptions:
|
||||
resources:
|
||||
requests:
|
||||
memory: 1Gi
|
||||
cpu: 150m
|
||||
|
||||
containers:
|
||||
main:
|
||||
...
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
```
|
||||
|
||||
The expected `resources` field on the `main` container is expected to look like this:
|
||||
|
||||
```yaml
|
||||
resources:
|
||||
requests:
|
||||
cpu: 150m
|
||||
```
|
||||
|
||||
### Merge
|
||||
|
||||
An alternative strategy for configuring default container options is `merge`. This means that if a container has an entry for a default container option it will be merged with the container-specific configuration.
|
||||
|
||||
This behavior can be set explicitly by setting `defaultContainerOptionsStrategy` to `merge`.
|
||||
|
||||
An (abbreviated) example of the `merge` strategy:
|
||||
|
||||
```yaml
|
||||
controllers:
|
||||
main:
|
||||
defaultContainerOptionsStrategy: merge
|
||||
defaultContainerOptions:
|
||||
resources:
|
||||
requests:
|
||||
memory: 1Gi
|
||||
cpu: 150m
|
||||
|
||||
containers:
|
||||
main:
|
||||
...
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
```
|
||||
|
||||
The expected `resources` field on the `main` container is expected to look like this:
|
||||
|
||||
```yaml
|
||||
resources:
|
||||
requests:
|
||||
memory: 1Gi
|
||||
cpu: 150m
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue