Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
Synchronize documentation against website
  • Loading branch information
cdrage committed Apr 25, 2024
1 parent 9966d3f commit 6fe9738
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 6 deletions.
12 changes: 6 additions & 6 deletions installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@ 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
```

**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

Expand All @@ -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.
Expand Down
98 changes: 98 additions & 0 deletions user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 6fe9738

Please sign in to comment.