-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
devfile/library
#108Labels
area/libraryCommon devfile library for interacting with devfilesCommon devfile library for interacting with devfileskind/bugSomething isn't workingSomething isn't working
Description
/kind bug
Which area this bug is related to?
/area library
Bug Summary
Describe the bug:
given the devfile like this
schemaVersion: 2.1.0
metadata:
name: test
commands:
- id: build
exec:
commandLine: "true"
component: cmp
group:
isDefault: true
kind: build
- id: run
exec:
commandLine: "sleep infinity"
component: cmp
group:
isDefault: true
kind: run
- id: test-apply
apply:
component: cmp-apply
components:
- name: cmp-apply
container:
image: quay.io/prometheus/busybox:latest
command:
- "echo 'preStart'"
- name: cmp
container:
image: quay.io/prometheus/busybox:latest
events:
preStart:
- test-applygenerator.GetContainers return only cmp and cmp-apply container.
Expected behavior
generator.GetContainers should return only cmp container.
Devfile spec says:
when an apply command is bound to a preStart event, and references a container component, it will start the container as a K8S initContainer, unless the component has its dedicatedPod field set to true.
When no apply command exist for a given component, it is assumed the component will be applied at devworkspace start by default.
It is impossible to filter out initContainers from GetContainers output because when calling GetInitContainers containers have autogenerated names that don't match containers from GetInitContainers
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/libraryCommon devfile library for interacting with devfilesCommon devfile library for interacting with devfileskind/bugSomething isn't workingSomething isn't working