Merge branch 'main' into feature-1631-add-hpa

This commit is contained in:
jose luis
2024-04-10 13:24:35 +02:00
7 changed files with 346 additions and 1 deletions
+45
View File
@@ -211,6 +211,9 @@ The currently supported options are:
| kompose.cronjob.schedule | kubernetes cronjob schedule (for example: '1 * * * *') |
| kompose.cronjob.concurrency_policy | 'Forbid' / 'Allow' / 'Never' / '' |
| kompose.cronjob.backoff_limit | kubernetes cronjob backoff limit (for example: '6') |
| kompose.init.containers.name | kubernetes init container name |
| kompose.init.containers.image | kubernetes init container image |
| kompose.init.containers.command | kubernetes init container commands |
| kompose.hpa.replicas.min | defines Horizontal Pod Autoscaler minimum number of pod replicas |
| kompose.hpa.replicas.max | defines Horizontal Pod Autoscaler maximum number of pod replicas |
| kompose.hpa.cpu | defines Horizontal Pod Autoscaler cpu utilization trigger |
@@ -472,6 +475,48 @@ services:
kompose.volume.sub-path: pg-data
```
- `kompose.init.containers.name` is used to specify the name of the Init Containers for a Pod [Init Container Name](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/)
For example:
```yaml
version: '3'
services:
example-service:
image: example-image
labels:
kompose.init.containers.name: "initcontainername"
```
- `kompose.init.containers.image` defines image to use for the Init Containers [Init Container Image](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/)
For example:
```yaml
version: '3'
services:
example-service:
image: example-image
labels:
kompose.init.containers.image: perl
```
- `kompose.init.containers.command` defines the command that the Init Containers will run after they are started [Init Container Command](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/)
For example:
```yaml
version: '3'
services:
example-service:
image: example-image
labels:
kompose.init.containers.command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
kompose.init.containers.image: perl
```
- `kompose.hpa.replicas.min` defines the floor for the number of replicas that the HPA can scale down to during a scaling event. Default value is set to 1. This means that, regardless of the load on the system, the HPA will always maintain at least one replica. More info: [HPA Min Replicas](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics).
For example: