Change doc, icon and logo
This commit is contained in:
@@ -58,9 +58,7 @@ For more complete label usage, see [the labels page](labels.md).
|
||||
|
||||
After having installed `katenary`, the standard usage is to call:
|
||||
|
||||
```bash
|
||||
katenary convert
|
||||
```
|
||||
|
||||
It will search standard compose files in the current directory and try to create a helm chart in "chart" directory.
|
||||
|
||||
@@ -71,9 +69,7 @@ It will search standard compose files in the current directory and try to create
|
||||
|
||||
Of course, you can provide others files than the default with (cummulative) `-c` options:
|
||||
|
||||
```bash
|
||||
katenary convert -c file1.yaml -c file2.yaml
|
||||
```
|
||||
|
||||
## Some common labels to use
|
||||
|
||||
@@ -90,7 +86,6 @@ to make you able to wait for a service to respond. But you'll probably need to a
|
||||
|
||||
See this compose file:
|
||||
|
||||
```yaml
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
@@ -103,14 +98,12 @@ services:
|
||||
image: mariadb
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: foobar
|
||||
```
|
||||
|
||||
In this case, `webapp` needs to know the `database` port because the `depends_on` points on it and Kubernetes has not
|
||||
(yet) solution to check the database startup. Katenary wants to create a `initContainer` to hit on the related service.
|
||||
So, instead of exposing the port in the compose definition, let's declare this to katenary with labels:
|
||||
|
||||
|
||||
```yaml
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
@@ -126,14 +119,12 @@ services:
|
||||
labels:
|
||||
katenary.v3/ports: |-
|
||||
- 3306
|
||||
```
|
||||
|
||||
### Declare ingresses
|
||||
|
||||
It's very common to have an `Ingress` on web application to deploy on Kuberenetes. The `katenary.io/ingress` declare the
|
||||
port to bind.
|
||||
|
||||
```yaml
|
||||
# ...
|
||||
services:
|
||||
webapp:
|
||||
@@ -143,7 +134,6 @@ services:
|
||||
katenary.v3/ingress: |-
|
||||
port: 5050
|
||||
hostname: myapp.example.com
|
||||
```
|
||||
|
||||
Note that the port to bind is the one used by the container, not the used locally. This is because Katenary create a
|
||||
service to bind the container itself.
|
||||
@@ -156,7 +146,6 @@ example, to connect a PHP application to a database.
|
||||
|
||||
With a compose file, there is no problem as Docker/Podman allows to resolve the name by container name:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
webapp:
|
||||
image: php:7-apache
|
||||
@@ -165,13 +154,11 @@ services:
|
||||
|
||||
database:
|
||||
image: mariadb
|
||||
```
|
||||
|
||||
Katenary prefixes the services with `{{ .Release.Name }}` (to make it possible to install the application several times
|
||||
in a namespace), so you need to "remap" the environment variable to the right one.
|
||||
|
||||
|
||||
```yaml
|
||||
services:
|
||||
webapp:
|
||||
image: php:7-apache
|
||||
@@ -183,13 +170,11 @@ services:
|
||||
|
||||
database:
|
||||
image: mariadb
|
||||
```
|
||||
|
||||
|
||||
This label can be used to map others environment for any others reason. E.g. to change an informational environment
|
||||
variable.
|
||||
|
||||
```yaml
|
||||
|
||||
services:
|
||||
webapp:
|
||||
@@ -199,7 +184,6 @@ services:
|
||||
labels:
|
||||
katenary.v3/mapenv: |-
|
||||
RUNNING: kubernetes
|
||||
```
|
||||
|
||||
In the above example, `RUNNING` will be set to `kubernetes` when you'll deploy the application with helm, and it's
|
||||
`docker` for "podman" and "docker" executions.
|
||||
|
Reference in New Issue
Block a user