Skip to content

kompose up fails to parse yml that kompose convert generated #1082

Closed
@selfup

Description

OS

Ubuntu 18.04.1 LTS

Kompose version

1.17.0 (a74acad)

Stacktrace

ERRO Could not parse config for project kompose : yaml: unmarshal errors:
  line 1: cannot unmarshal !!str `extensi...` into config.RawService
  line 2: cannot unmarshal !!str `Deployment` into config.RawService
FATA composeObject.Parse() failed, Failed to load compose file: yaml: unmarshal errors:
  line 1: cannot unmarshal !!str `extensi...` into config.RawService
  line 2: cannot unmarshal !!str `Deployment` into config.RawService

Why ERRO is not ERROR or FATA not FATAL I have no idea 😂

Kompose file

This is just one of the two files, the other one is the same other than the name of the container

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.17.0 (a74acad)
  creationTimestamp: null
  labels:
    io.kompose.service: downlink
  name: downlink
spec:
  replicas: 1
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        io.kompose.service: downlink
    spec:
      containers:
      - args:
        - ./rel/boot.sh
        env:
        - name: UPLINK_NODE
          value: uplink
        image: registry.gitlab.com/selfup/smache:latest
        name: downlink
        resources: {}
      restartPolicy: Always
status: {}

Script

#!/usr/bin/env bash

kompose up -f kompose/uplink-deployment.yaml -f kompose/downlink-deployment.yaml \
  && kubectl get deployment,svc,pods

Docker Compose File

version: '3.1'

services:
  uplink:
    environment:
      - UPLINK_NODE=uplink
    image: registry.gitlab.com/selfup/smache:latest
    command: ['./rel/boot.sh']
  downlink:
    depends_on:
      - uplink
    links:
      - uplink
    environment:
      - UPLINK_NODE=uplink
    image: registry.gitlab.com/selfup/smache:latest
    command: ['./rel/boot.sh']

Repo(s)

GitHub remote origin: https://github.com/selfup/smache
GitLab remote release: https://gitlab.com/selfup/smache

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions