Hello,
When I try to convert basic example from https://github.com/metal3d/katenary/blob/master/examples/basic/docker-compose.yaml, I obtain "yaml: did not find expected key" even if the chart is generated.
I guess the pb comes from these lines
katenary.io/mapenv: |
DB_HOST: {{ .Release.Name }}-database
I saw that indentation matters but I tried the example out of the box
My katenary version : 2.0.0-beta2
My kompose version : 1.25.0 (a70f80cc)
BR
Vincent
Hello,
When I try to convert basic example from https://github.com/metal3d/katenary/blob/master/examples/basic/docker-compose.yaml, I obtain "yaml: did not find expected key" even if the chart is generated.
I guess the pb comes from these lines
katenary.io/mapenv: |
DB_HOST: {{ .Release.Name }}-database
I saw that indentation matters but I tried the example out of the box
My katenary version : 2.0.0-beta2
My kompose version : 1.25.0 (a70f80cc)
BR
Vincent
The problem is simply that you didn't encaplusate "{{ .Release.Name }}-database" with quotes. Brackets are valid JSON objects, and Katernary tries to load the "mapenv" label as YAML.
Try with:
version:"3"# this example is absolutely not working, it's an example to see how it is converted# by Katenaryservices:webapp:image:php:7-apacheenvironment:DB_HOST:databaseports:- "8080:80"labels:# expose an ingresskatenary.io/ingress:80# DB_HOST is actually a service namekatenary.io/mapenv:| DB_HOST: "{{ .Release.Name }}-database"depends_on:- databasedatabase:image:mariadb:10environment:MARIADB_ROOT_PASSWORD:foobarMARIADB_USER:fooMARIADB_PASSWORD:fooMARIADB_DATABASE:myapplabels:# because we don't provide "ports" or "expose", alert katenary# to use the mysql port for service declarationkatenary.io/ports:3306
The problem is simply that you didn't encaplusate `"{{ .Release.Name }}-database"` with quotes. Brackets are valid JSON objects, and Katernary tries to load the "mapenv" label as YAML.
Try with:
```yaml
version: "3"
# this example is absolutely not working, it's an example to see how it is converted
# by Katenary
services:
webapp:
image: php:7-apache
environment:
DB_HOST: database
ports:
- "8080:80"
labels:
# expose an ingress
katenary.io/ingress: 80
# DB_HOST is actually a service name
katenary.io/mapenv: |
DB_HOST: "{{ .Release.Name }}-database"
depends_on:
- database
database:
image: mariadb:10
environment:
MARIADB_ROOT_PASSWORD: foobar
MARIADB_USER: foo
MARIADB_PASSWORD: foo
MARIADB_DATABASE: myapp
labels:
# because we don't provide "ports" or "expose", alert katenary
# to use the mysql port for service declaration
katenary.io/ports: 3306
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hello,
When I try to convert basic example from https://github.com/metal3d/katenary/blob/master/examples/basic/docker-compose.yaml, I obtain "yaml: did not find expected key" even if the chart is generated.
I guess the pb comes from these lines
katenary.io/mapenv: |
DB_HOST: {{ .Release.Name }}-database
I saw that indentation matters but I tried the example out of the box
My katenary version : 2.0.0-beta2
My kompose version : 1.25.0 (a70f80cc)
BR
Vincent
The problem is simply that you didn't encaplusate
"{{ .Release.Name }}-database"with quotes. Brackets are valid JSON objects, and Katernary tries to load the "mapenv" label as YAML.Try with:
I just see that it's my example which is wrong... I will fix!
Thank you for your quick answer !