@@ -19,7 +19,7 @@ and Helm Chart creation.
19
19
💡 Effortless Efficiency: You only need to add labels when it's necessary to precise things.
20
20
Then call ` katenary convert ` and let the magic happen.
21
21
22
- # What ?
22
+ ## What ?
23
23
24
24
Katenary is a tool to help to transform ` docker-compose ` files to a working Helm Chart for Kubernetes.
25
25
@@ -33,7 +33,7 @@ share it with the community.
33
33
34
34
The main developer is [ Patrice FERLET] ( https://github.com/metal3d ) .
35
35
36
- # Install
36
+ ## Install
37
37
38
38
You can download the binaries from the [ Release] ( https://github.com/metal3d/katenary/releases ) section. Copy the binary
39
39
and rename it to ` katenary ` . Place the binary inside your ` PATH ` . You should now be able to call the ` katenary ` command.
@@ -47,7 +47,7 @@ You can use this commands on Linux:
47
47
sh <( curl -sSL https://raw.githubusercontent.com/metal3d/katenary/master/install.sh)
48
48
```
49
49
50
- # Or, build yourself
50
+ ## Or, build yourself
51
51
52
52
If you've got ` podman ` or ` docker ` , you can build ` katenary ` by using:
53
53
@@ -79,7 +79,7 @@ make build GO=local GOOS=linux GOARCH=arm64
79
79
80
80
Then place the ` katenary ` binary file inside your PATH.
81
81
82
- # Tips
82
+ ## Tips
83
83
84
84
We strongly recommend adding the completion call to you SHELL using the common ` bashrc ` , or whatever the profile file
85
85
you use.
@@ -102,30 +102,31 @@ katenary completion fish | source
102
102
# powershell (as we don't provide any support on Windows yet, please avoid this...)
103
103
```
104
104
105
- # Usage
105
+ ## Usage
106
106
107
107
``` text
108
108
Katenary is a tool to convert compose files to Helm Charts.
109
109
110
110
Each [command] and subcommand has got an "help" and "--help" flag to show more information.
111
111
112
112
Usage:
113
- katenary [command]
113
+ katenary [command]
114
114
115
115
Examples:
116
- katenary convert -c docker-compose.yml -o ./charts
116
+ katenary convert -c docker-compose.yml -o ./charts
117
117
118
118
Available Commands:
119
- completion Generates completion scripts
120
- convert Converts a docker-compose file to a Helm Chart
121
- hash-composefiles Print the hash of the composefiles
122
- help Help about any command
123
- help-labels Print the labels help for all or a specific label
124
- version Print the version number of Katenary
119
+ completion Generates completion scripts
120
+ convert Converts a docker-compose file to a Helm Chart
121
+ hash-composefiles Print the hash of the composefiles
122
+ help Help about any command
123
+ help-labels Print the labels help for all or a specific label
124
+ schema Print the schema of the katenary file
125
+ version Print the version number of Katenary
125
126
126
127
Flags:
127
- -h, --help help for katenary
128
- -v, --version version for katenary
128
+ -h, --help help for katenary
129
+ -v, --version version for katenary
129
130
130
131
Use "katenary [command] --help" for more information about a command.
131
132
```
@@ -185,7 +186,7 @@ services:
185
186
- MARIADB_PASSWORD
186
187
` ` `
187
188
188
- # Labels
189
+ ## Labels
189
190
190
191
These labels could be found by ` katenary help-labels`, and can be placed as labels inside your docker-compose file:
191
192
@@ -198,6 +199,7 @@ katenary.v3/cronjob: object Create a cronjob from the service.
198
199
katenary.v3/dependencies : list of objects Add Helm dependencies to the service.
199
200
katenary.v3/description : string Description of the service
200
201
katenary.v3/env-from : list of strings Add environment variables from antoher service.
202
+ katenary.v3/exchange-volumes : list of objects Add exchange volumes (empty directory on the node) to share data
201
203
katenary.v3/health-check : object Health check to be added to the deployment.
202
204
katenary.v3/ignore : bool Ignore the service
203
205
katenary.v3/ingress : object Ingress rules to be added to the service.
@@ -207,9 +209,76 @@ katenary.v3/ports: list of uint32 Ports to be added to the service.
207
209
katenary.v3/same-pod : string Move the same-pod deployment to the target deployment.
208
210
katenary.v3/secrets : list of string Env vars to be set as secrets.
209
211
katenary.v3/values : list of string or map Environment variables to be added to the values.yaml
212
+ katenary.v3/values-from : map[string]string Add values from another service.
210
213
` ` `
211
214
212
- # What a name…
215
+ ## Katenary.yaml file and schema validation
216
+
217
+ Instead of using labels inside the docker-compose file, you can use a ` katenary.yaml` file to define the labels. This
218
+ file is simpler to read and maintain, but you need to keep it up-to-date with the docker-compose file.
219
+
220
+ For example, instead of using this :
221
+
222
+ ` ` ` yaml
223
+ services:
224
+ web:
225
+ image: nginx:latest
226
+ katenary.v3/ingress: |-
227
+ hostname: myapp.example.com
228
+ port: 80
229
+ ` ` `
230
+
231
+ You can remove the labels, and use a kanetary.yaml file :
232
+
233
+ ` ` ` yaml
234
+ web:
235
+ ingress:
236
+ hostname: myapp.example.com
237
+ port: 80
238
+ ` ` `
239
+
240
+ To validate the `katenary.yaml` file, you can use the JSON schema using the "master" raw content :
241
+
242
+ ` https://raw.githubusercontent.com/metal3d/katenary/refs/heads/master/katenary.json`
243
+
244
+ It's easy to configure in LazyVim, create a Lua file in your plugins directory :
245
+
246
+ ` ` ` lua
247
+ -- yaml.lua
248
+
249
+ return {
250
+ {
251
+ "neovim/nvim-lspconfig",
252
+ opts = {
253
+ servers = {
254
+ yamlls = {
255
+ settings = {
256
+ yaml = {
257
+ schemas = {
258
+ ["https://raw.githubusercontent.com/metal3d/katenary/refs/heads/master/katenary.json"] = "katenary.yaml",
259
+ },
260
+ },
261
+ },
262
+ },
263
+ },
264
+ },
265
+ },
266
+ }
267
+ ` ` `
268
+
269
+ Use this address to validate the `katenary.yaml` file in VSCode :
270
+
271
+ ` ` ` json
272
+ {
273
+ "yaml.schemas": {
274
+ "https://raw.githubusercontent.com/metal3d/katenary/refs/heads/master/katenary.json": "katenary.yaml"
275
+ }
276
+ }
277
+ ` ` `
278
+
279
+ You can, of course, replace the `refs/heads/master` with a specific tag or branch.
280
+
281
+ # # What a name…
213
282
214
283
Katenary is the stylized name of the project that comes from the "catenary" word.
215
284
0 commit comments