GithubHelp home page GithubHelp logo

metal3d / katenary Goto Github PK

View Code? Open in Web Editor NEW
147.0 8.0 11.0 1.01 MB

Convert docker and podamn compose to a configurable helm chart

License: MIT License

Makefile 4.64% Go 93.60% Shell 1.76%
kubernetes docker docker-compose helm compose podman helmcha

katenary's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

katenary's Issues

Be able to specify compose.yml files and its override

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

Be able to ignore ports to expose in a katenary.io/ports list

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

"yaml: did not find expected key" with basic example

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

Bug: Persistent volume creation

Version

3, develop branch

Reproduce

Create a docker-compose file with multiple services mounting the same volume. Convert it.

Expected behavior

Only one persistent volume claim should be created with ReadWriteMany attribute set.

Faulty behavior

One persistent volume claim is created for each service. Services don't share the same data as the docker setup would expect.

Comparison / contrast with Kompose

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.

When adding a secret katenary.io/secret-vars, read from an env file

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

Feature: Network policies

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 }}

Manage unnamed build

If there is no image name (for "build"), find a way to name it with a default name

katenary.io/configmap-volumes interprets "./" for its 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

Bug: Underscores in docker-compose services names

Version

3, develop branch

Reproduce

Create a docker-compose file with service names containing underscores and convert it. Same problem with volume names.

Expected behavior

Valid Helm-Chart with underscores converted to dashes in K8s resource names.

Faulty behavior

  • Syntax-Errors in chart templates (e.g. volume claims)
  • Helm-Chart cannot be applied, because of not k8s compatible names

Note

  • As long as this causes errors a mention in readme would help
  • Converting underscores to dashes in docker-compose file also results in a broken chart

Manage not mapped volumes

Some docker-compose can declare volumes with no mount path:

volumes:
   - ./data

We can ignore theses volumes as they are only made for Docker

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.