Ensure response consist no matter having ports or not. (#70)
* Ensure responseconsist no matter having ports or not. * Update packages/k8s/src/hooks/prepare-job.ts Co-authored-by: Nikola Jokic <[email protected]> --------- Co-authored-by: Nikola Jokic <[email protected]>
This commit is contained in:
co-authored by
Nikola Jokic
parent
c92bb5544e
commit
6dbb0b61b7
@@ -125,12 +125,11 @@ function generateResponseFile(
|
|||||||
)
|
)
|
||||||
if (serviceContainers?.length) {
|
if (serviceContainers?.length) {
|
||||||
response.context['services'] = serviceContainers.map(c => {
|
response.context['services'] = serviceContainers.map(c => {
|
||||||
if (!c.ports?.length) {
|
|
||||||
return { image: c.image }
|
|
||||||
}
|
|
||||||
const ctxPorts: ContextPorts = {}
|
const ctxPorts: ContextPorts = {}
|
||||||
for (const port of c.ports) {
|
if (c.ports?.length) {
|
||||||
ctxPorts[port.containerPort] = port.hostPort
|
for (const port of c.ports) {
|
||||||
|
ctxPorts[port.containerPort] = port.hostPort
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user