compose-cli icon indicating copy to clipboard operation
compose-cli copied to clipboard

Add support for manually-defined k8s deployment

Open mikesir87 opened this issue 4 years ago • 0 comments
trafficstars

What I did

I updated the kube backend to find projects using two different methods:

  • Listing all Helm releases (which it currently does)
  • Looking for ConfigMaps with a com.docker.compose.manual label on it

The idea here being that I can use my platform-preferred method to deploy the app itself (Flux/Argo, Kompose, other Compose tools, pipelines that push manifests, etc.), yet still allow the app teams to use the Compose tooling to view their application, access logs, exec into pods, etc.

As a note, for these "manual" deployments, I set the Stack status to unknown, as the Compose tooling has no indications of its health.

Questions before merging

I recognize that this PR might open up quite a few different ways to use Compose, so deserves adequate criticism/feedback. Some of the immediate questions I've already identified are:

  • I created the com.docker.compose.manual label and inlined it in the code. I see all other locations where labels are being used are referencing the name from the main compose project (eg api.ProjectLabel). Should this label be psuedo-standardized there? What should the label name actually be?
  • Does it makes sense to generalize the idea of "who launched this stack?" I could see this feature being useful for the ECS and ACI backends as well. So, does it make sense to simply have a property on the Stack itself to indicate whether it's Compose-managed or not? That way, if I try to "down" a stack that's not Compose-managed, appropriate errors can be provided (right now, it just says "release not found").

Related issue

PoC implementation for #2040.

(not mandatory) A picture of a cute animal, if possible in relation with what you did

A sloth... just because we like sloths...

image

mikesir87 avatar Sep 15 '21 18:09 mikesir87