metal3d / katenary Goto Github PK
View Code? Open in Web Editor NEWConvert docker and podamn compose to a configurable helm chart
License: MIT License
Convert docker and podamn compose to a configurable helm chart
License: MIT License
Hi !
I would be useful to be able to have a new argument to specify override files, so we can have :
-c compose.yml
-<overrideFlag> compose.override.yml
(or multiple files?)That way we can have a base compose file, and the override one where we have labels and so one
Sometimes when declaring multiple ports with the katenary.io/ports label, all of the list might not need to be exposed.
eg
We declare the following ports
katenary.io/ports: 80,443,8080,9000
In a PHP-Nginx configuration, the 9000 port shouldn't b exposed as it is only used internally.
We could ave a second label that is used to "declare" the internal ports, so it is not exposed
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
3, develop branch
Create a docker-compose file with multiple services mounting the same volume. Convert it.
Only one persistent volume claim should be created with ReadWriteMany attribute set.
One persistent volume claim is created for each service. Services don't share the same data as the docker setup would expect.
Helm provides dependencies. While docker-compose is OK to launch a simple service, it could be nice to make it possible to declare that one service is actually a "helm dependency".
The branch feat-dependencies is in progress to propose this.
Can I use this with mac and if so, can it be added to homebrew?
Allow configuring a volume sourced by a secret similar how it's done with "katenary.io/configmap-volumes" --> but without providing the actual secret file (or maybe optionally)
At this time, Katernary only manages array format for command, env_file, and probably others...
I've just now learned of both this tool, and also learned of Kompose (from this kubernetes.io page).
Could the contributors/maintainers help clarify benefits or difference that might help me appreciate if Katenary might be a better tool for my use case, when compared to Kompose?
At first glance, there appear to be many similarities. The fact that Kompose is part of the 'Kubernetes' organization (in GitHub as well as being referenced from the aforementioned Kubernetes.io docs) seems to suggest it may be a more active/useful tool to consider.
Perhaps an acknowledgement of the Kompose tool and a brief explanation of when/why/how Katenary might be a beneficial choice would help the larger container user community understand the value proposition.
katernary convert -c other.docker.compose.yaml
continues to use "docker-compose.yaml" file if it exists
Hello,
When using a label katenary.io/secret-vars: RABBITMQ_DEFAULT_PASS
RABBITMQ_DEFAULT_PASS is declared in an env file such as:
rabbitmq:
env_file:
- docker/env/rabbitmq.env
The secret map is wirrten correctly.
However, RABBITMQ_DEFAULT_PASS is removed from from values.yaml
It would be great to have an option to also generate network policies automatically. A plausible default would be to limit access to exposed ports to all pods/services only to ressources of the same application via the existent labels. This restricts all foreign traffic to use the ingress if configured.
It could be an extra label to provide a network policy for the given service.
Something like this:
{{- if .Values.db.networkPolicy.enabled -}}
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
annotations:
katenary.v3/compose-hash: f7e37491abe3220deeb5961e7dd0075983ee7cb0
katenary.v3/version: develop-4367a01
labels:
{{- include "mosparo.labels" . | nindent 4 }}
katenary.v3/component: db
name: '{{ include "mosparo.fullname" . }}-db'
spec:
podSelector:
matchLabels:
{{- include "mosparo.selectorLabels" . | nindent 6 }}
katenary.v3/component: db
ingress:
- from:
- podSelector:
matchLabels:
{{- include "mosparo.selectorLabels" . | nindent 10 }}
ports:
- protocol: TCP
port: 3306
policyTypes:
- Ingress
# vim: ft=helm.gotmpl.yaml
{{- end }}
Hello,
After using the following label:
katenary.io/healthcheck: tcp://localhost:3306
The generated output is the following:
livenessProbe:
tcp:
port: 3306
...
However the syntax is: tcpSocket
(https://kubernetes.io/fr/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#d%C3%A9finir-une-tcp-liveness-probe)
If we decide to use a local subdirectory, the "/" in name are not replaced and:
Resolution in progress
Using comment like #This is a comment
are interpreted by Katenery
If there is no image name (for "build"), find a way to name it with a default name
When using the label katenary.io/configmap-volumes, if the path used contains a . in its path, is it interpreted and results in an icorrect namein the deployments.
e.g:
Label used in the docker-compose.yml
katenary.io/configmap-volumes: ./docker/conf/varnish/default.vcl
Results in:
name: /home/adsal/Workspace/boilerplate/docker-boilerplate/docker/conf/varnish
Thanks
Using katenary.io/ports: 80, 443, 8080
The space makes the generation fail
We only manage object format and not:
environment:
- FOO=BAR
Using empty-dirs label, the volumeMounts
is not set in generated helm chart.
Resolution in progress
3, develop branch
Create a docker-compose file with service names containing underscores and convert it. Same problem with volume names.
Valid Helm-Chart with underscores converted to dashes in K8s resource names.
Some docker-compose can declare volumes with no mount path:
volumes:
- ./data
We can ignore theses volumes as they are only made for Docker
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.