You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 19, 2026. It is now read-only.
Services defined in OpenCompose should be extendable by Kubernetes YAML snippets #120
We should make the OpenCompose spec in a way that it can be made extensible by valid Kubernetes object definitions which are not supported by OpenCompose.
The spec should be able to merge Kubernetes objects in some way.
Let's discuss more on this issue.
Writing out loud here, does something like this make sense -
More and more I'm thinking about this one thing worries me a bit.
We will merge something that gets generated from opencompose with something that user created.
Creating patches for this will be hard, as a user will have to understand what primitives are generated and how they look like.
But can't think of better solution right now :-(
Why do you need field? What it does?
Shouldn't be file just enough?
@kadel - field should help when we simply want to change one field, so we can easily refer to it using how we refer to as YAML fields, and change it without writing a full blown indented YAML.
Kubernetes also allows you to extend pod spec on the fly now using something called PodPreset.
You can use a podpreset object to inject certain information into pods at creation time. This information can include secrets, volumes, volume mounts, and environment variables.
OpenCompose tool should be able to combine multiple opencompose files.
Example:
I have OpenCompose file for some service (like db) with secrets defined.
I have another OpenCompose file with my application that is using that service and needs secrets that are defined with that service.
OpenCompose tool should be able to combine those two opencompose files and generate valid output.
changed the title [-]Handle extensibility in the spec[/-][+]Services defined in OpenCompose should be extendable by Kubernetes YAML snippets[/+]on Jun 2, 2017
Activity
kadel commentedon May 23, 2017
@containscafeine
Why do you need
field? What it does?Shouldn't be file just enough?
kadel commentedon May 23, 2017
More and more I'm thinking about this one thing worries me a bit.
We will merge something that gets generated from opencompose with something that user created.
Creating patches for this will be hard, as a user will have to understand what primitives are generated and how they look like.
But can't think of better solution right now :-(
concaf commentedon May 23, 2017
@kadel -
fieldshould help when we simply want to change one field, so we can easily refer to it using how we refer to as YAML fields, and change it without writing a full blown indented YAML.kadel commentedon May 25, 2017
OpenCompose extensions
This is the way how to extend OpenCompose format to something that is not implemented in base OpenCompose language.
Extensions (files describing how to extend generated objects) describing
which object should be extended/patched and how.
For describing how to patch object we can use Kubernetes Strategic Merge Patch
Example:
opencompose.yaml
extensions.yaml
The first line in patch file is defining what object should be patched (Kind/name)
Extensions are passed to command-line tool.
All this is just theory, I've been having some issues to actually test Strategic merge patching with
kubectl patch:-(surajssd commentedon May 27, 2017
Kubernetes also allows you to extend pod spec on the fly now using something called
PodPreset.Injecting Information into Pods Using a PodPreset
kadel commentedon May 30, 2017
OpenCompose tool should be able to combine multiple opencompose files.
Example:
I have OpenCompose file for some service (like db) with secrets defined.
I have another OpenCompose file with my application that is using that service and needs secrets that are defined with that service.
OpenCompose tool should be able to combine those two opencompose files and generate valid output.
[-]Handle extensibility in the spec[/-][+]Services defined in OpenCompose should be extendable by Kubernetes YAML snippets[/+]