opencompose icon indicating copy to clipboard operation
opencompose copied to clipboard

add a root level application identifier field

Open concaf opened this issue 8 years ago • 0 comments

So right now, passing in multiple files does not work (#167), and we will be implementing merging of OpenCompose files https://github.com/redhat-developer/opencompose/issues/167#issuecomment-308050943 as a default behavior, but I think it would be cool to have a root level optional identifier like app or application or namespace, which allows defining the name of the larger application.

An example use case would be when we do a -

opencompose convert -f wordpress.yaml -f nginx.yaml

  • nginx.yaml -
version: 0.1-dev
app: nginx                      # note: the root level application identifier is nginx
services:
- name: web                     # note: the name of the service is web
  containers:
  - image: nginx
    name: nginx
    ports:
    - port: 80
  • wordpress.yaml -
version: '0.1-dev'
app: wordpress                  # note: the root level application identifier is wordpress
services:
- name: database
  containers:
  - image: mariadb:10
    name: mariadb
    ports:
    - port: 3306

- name: web                     # note: the name of the service is web
  containers:
  - image: wordpress:4
    name: wordpress
    ports:
    - port: 80
      type: external

So, when we pass these 2 files to opencompose convert, then the service web from app: nginx and app: wordpress does NOT get merged because of different root level app identifier.

This is more for namespacing the applications in the spec itself.

Thoughts?

CC: @kadel

concaf avatar Jun 13 '17 09:06 concaf