Skip to content

add a root level application identifier field #170

@concaf

Description

@concaf

So right now, passing in multiple files does not work (#167), and we will be implementing merging of OpenCompose files #167 (comment) 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions