Skip to content

New type of command to apply a component #56

Closed
@davidfestal

Description

@davidfestal

For now the only type of command that allows running code in a container is the exec command.
Its semantic is really:

execute a command line in a already-running container.

That doesn't seem to fit with the case when we want to just start a terminating container (as defined in a container component), with its default entry-point, possibly before the start of the Main workspace POD.
Similarly, we could need to apply a Job defined in a kubernetes component at some point in the workspace lifecycle (workspace stop for example)

So we should probably introduce a new type of command, for example, named apply, that would allow applying a component at some point in the workspace history.

  commands:
    - apply:
        id: aCommandToStartAnInitContainer
        component: someContainerComponent
    - apply:
        id: cleanupJobCommand
        component: AKubernetesComponentWithAJob
  events:
    preStart:
      - "aCommandToStartAnInitContainer" # <== Start of the workspace happens
                        #     after this terminating container is completed  
    postStop:
      - "cleanupJobCommand"  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions