Develop #131
@@ -1,19 +1,28 @@
|
|||||||
# Labels documentation
|
# Labels documentation
|
||||||
|
|
||||||
Katenary proposes labels to set in `compose.yaml` files (or override files) to configure the Helm Chart generation. Because it is sometimes needed to have structured values, it is necessary to use the Yaml syntax. While compose labels are string, we can use `|` to use Yaml multilines as value.
|
Katenary proposes labels to set in `compose.yaml` files (or override files) to configure the Helm Chart generation.
|
||||||
|
Because it is sometimes needed to have structured values, it is necessary to use the YAML syntax.
|
||||||
|
While compose labels are string, we can use _here-doc_ syntax using `|` to use YAML multiline as value.
|
||||||
|
|
||||||
Katenary will try to Unmarshal these labels.
|
```yaml
|
||||||
|
label-name: |-
|
||||||
|
# this is actually a multiline string here
|
||||||
|
key1: value1
|
||||||
|
key2: value2
|
||||||
|
```
|
||||||
|
|
||||||
|
Katenary will try to _Unmarshal_ these labels.
|
||||||
|
|
||||||
## Label list and types
|
## Label list and types
|
||||||
|
|
||||||
<!-- START_LABEL_DOC : do not remove this tag !-->
|
<!-- START_LABEL_DOC : do not remove this tag !-->
|
||||||
| Label name | Description | Type |
|
| Label name | Description | Type |
|
||||||
| ------------------------------ | ---------------------------------------------------------------- | -------------------------------- |
|
| ------------------------------ | ---------------------------------------------------------------- | -------------------------------- |
|
||||||
| `katenary.v3/configmap-files` | Add files to the configmap. | `[]string` |
|
| `katenary.v3/configmap-files` | Inject files as Configmap. | `[]string` |
|
||||||
| `katenary.v3/cronjob` | Create a cronjob from the service. | `object` |
|
| `katenary.v3/cronjob` | Create a cronjob from the service. | `object` |
|
||||||
| `katenary.v3/dependencies` | Add Helm dependencies to the service. | `[]object` |
|
| `katenary.v3/dependencies` | Add Helm dependencies to the service. | `[]object` |
|
||||||
| `katenary.v3/description` | Description of the service | `string` |
|
| `katenary.v3/description` | Description of the service | `string` |
|
||||||
| `katenary.v3/env-from` | Add environment variables from antoher service. | `[]string` |
|
| `katenary.v3/env-from` | Add environment variables from another service. | `[]string` |
|
||||||
| `katenary.v3/exchange-volumes` | Add exchange volumes (empty directory on the node) to share data | `[]object` |
|
| `katenary.v3/exchange-volumes` | Add exchange volumes (empty directory on the node) to share data | `[]object` |
|
||||||
| `katenary.v3/health-check` | Health check to be added to the deployment. | `object` |
|
| `katenary.v3/health-check` | Health check to be added to the deployment. | `object` |
|
||||||
| `katenary.v3/ignore` | Ignore the service | `bool` |
|
| `katenary.v3/ignore` | Ignore the service | `bool` |
|
||||||
@@ -33,7 +42,7 @@ Katenary will try to Unmarshal these labels.
|
|||||||
<!-- START_DETAILED_DOC : do not remove this tag !-->
|
<!-- START_DETAILED_DOC : do not remove this tag !-->
|
||||||
### katenary.v3/configmap-files
|
### katenary.v3/configmap-files
|
||||||
|
|
||||||
Add files to the configmap.
|
Inject files as Configmap.
|
||||||
|
|
||||||
**Type**: `[]string`
|
**Type**: `[]string`
|
||||||
|
|
||||||
@@ -157,7 +166,7 @@ labels:
|
|||||||
|
|
||||||
### katenary.v3/env-from
|
### katenary.v3/env-from
|
||||||
|
|
||||||
Add environment variables from antoher service.
|
Add environment variables from another service.
|
||||||
|
|
||||||
**Type**: `[]string`
|
**Type**: `[]string`
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ katenary convert
|
|||||||
|
|
||||||
This will create a `chart` directory with the helm chart inside.
|
This will create a `chart` directory with the helm chart inside.
|
||||||
|
|
||||||
But, in general, you will need to add a few configuration to help Katenary to transpose the compose file to a working
|
But, in general, you will need to add a few configurations to help Katenary to transpose the compose file to a working
|
||||||
helm chart.
|
helm chart.
|
||||||
|
|
||||||
There are two ways to configure Katenary:
|
There are two ways to configure Katenary:
|
||||||
@@ -25,7 +25,7 @@ The Katenary file `katenary.yaml` has benefits over the labels in the compose fi
|
|||||||
|
|
||||||
- you can validate the configuration with a schema, and use completion in your editor
|
- you can validate the configuration with a schema, and use completion in your editor
|
||||||
- you separate the configuration and leave the compose file "intact"
|
- you separate the configuration and leave the compose file "intact"
|
||||||
- the syntax is a bit simpler, instead of using `katenary.v3/xxx: |-" you can use`xxx: ...`
|
- the syntax is a bit simpler, instead of using `katenary.v3/xxx: |-` you can use `xxx: ...`
|
||||||
|
|
||||||
But: **this implies that you have to maintain two files if the compose file changes.**
|
But: **this implies that you have to maintain two files if the compose file changes.**
|
||||||
|
|
||||||
@@ -46,7 +46,6 @@ services:
|
|||||||
port: 8080
|
port: 8080
|
||||||
katenary.v3/map-env: |-
|
katenary.v3/map-env: |-
|
||||||
DB_HOST: "{{ .Release.Name }}-database"
|
DB_HOST: "{{ .Release.Name }}-database"
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Using a Katenary file, you can do:
|
Using a Katenary file, you can do:
|
||||||
|
@@ -224,7 +224,7 @@
|
|||||||
type: "[]object"
|
type: "[]object"
|
||||||
|
|
||||||
"configmap-files":
|
"configmap-files":
|
||||||
short: "Add files to the configmap."
|
short: "Inject files as Configmap."
|
||||||
long: |-
|
long: |-
|
||||||
It makes a file or directory to be converted to one or more ConfigMaps
|
It makes a file or directory to be converted to one or more ConfigMaps
|
||||||
and mounted in the pod. The file or directory is relative to the
|
and mounted in the pod. The file or directory is relative to the
|
||||||
@@ -266,7 +266,7 @@
|
|||||||
type: "object"
|
type: "object"
|
||||||
|
|
||||||
"env-from":
|
"env-from":
|
||||||
short: "Add environment variables from antoher service."
|
short: "Add environment variables from another service."
|
||||||
type: "[]string"
|
type: "[]string"
|
||||||
long: |-
|
long: |-
|
||||||
It adds environment variables from another service to the current service.
|
It adds environment variables from another service to the current service.
|
||||||
|
Reference in New Issue
Block a user