diff --git a/installation.md b/installation.md index 4d70b230d..b8e6c698e 100644 --- a/installation.md +++ b/installation.md @@ -24,16 +24,16 @@ This is the **recommended** way of installing Kompose. ```sh # Linux -curl -L https://github.com/kubernetes/kompose/releases/download/v1.32.0/kompose-linux-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.33.0/kompose-linux-amd64 -o kompose # Linux ARM64 -curl -L https://github.com/kubernetes/kompose/releases/download/v1.32.0/kompose-linux-arm64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.33.0/kompose-linux-arm64 -o kompose # macOS -curl -L https://github.com/kubernetes/kompose/releases/download/v1.32.0/kompose-darwin-amd64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.33.0/kompose-darwin-amd64 -o kompose # macOS ARM64 -curl -L https://github.com/kubernetes/kompose/releases/download/v1.32.0/kompose-darwin-arm64 -o kompose +curl -L https://github.com/kubernetes/kompose/releases/download/v1.33.0/kompose-darwin-arm64 -o kompose chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose @@ -41,7 +41,7 @@ sudo mv ./kompose /usr/local/bin/kompose **Windows:** -Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v1.32.0/kompose-windows-amd64.exe) and add the binary to your PATH. +Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v1.33.0/kompose-windows-amd64.exe) and add the binary to your PATH. ## Go @@ -53,7 +53,7 @@ go install github.com/kubernetes/kompose@latest ## CentOS -Kompose is in [EPEL](https://fedoraproject.org/wiki/EPEL) CentOS repository. +Kompose is in [EPEL](https://fedoraproject.org/wiki/EPEL) (Available in EPEL 7 package repository) CentOS repository. If you don't have [EPEL](https://fedoraproject.org/wiki/EPEL) repository already installed and enabled you can do it by running `sudo yum install epel-release` If you have [EPEL](https://fedoraproject.org/wiki/EPEL) enabled in your system, you can install Kompose like any other package. diff --git a/user-guide.md b/user-guide.md index 1b8e9ac20..4b97baa5d 100644 --- a/user-guide.md +++ b/user-guide.md @@ -211,6 +211,13 @@ 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 | +| kompose.hpa.memory | defines Horizontal Pod Autoscaler memory utilization trigger | **Note**: `kompose.service.type` label should be defined with `ports` only (except for headless service), otherwise `kompose` will fail. @@ -467,6 +474,97 @@ services: labels: 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: + +```yaml +services: + pgadmin: + image: postgres + labels: + kompose.hpa.replicas.min: 1 +``` + +- `kompose.hpa.replicas.max` defines the upper limit for the number of replicas that the HPA can create during a scaling event. Default value is set to 3. This default value serves as a safeguard, providing a conservative starting point for your HPA configuration. More info: [HPA Max Replicas](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics). + +For example: + +```yaml +services: + pgadmin: + image: postgres + labels: + kompose.hpa.replicas.max: 10 +``` + +- `kompose.hpa.cpu` defines % cpu utilization that triggers to scale the number of pods. It is represented as a percentage of a resource. Default value is set to 50. This default value serves as a safeguard, providing a conservative starting point for your HPA configuration. More info: [HPA CPU Utilization](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics). + +For example: + +```yaml +services: + pgadmin: + image: postgres + labels: + kompose.hpa.cpu: 50 +``` + +- `kompose.hpa.memory` defines memory utilization that triggers to scale the number of pods. It is represented as a percentage of a resource. Default value is set to 70. This default value serves as a safeguard, providing a conservative starting point for your HPA configuration. More info: [HPA Memory Utilization](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics). + +For example: + +```yaml +services: + pgadmin: + image: postgres + labels: + kompose.hpa.memory: 50 +``` + ## Restart If you want to create normal pods without controller you can use `restart` construct of compose to define that. Follow table below to see what happens on the `restart` value.