kompose icon indicating copy to clipboard operation
kompose copied to clipboard

strings containing env vars are not converted and fail

Open toxeus opened this issue 3 years ago • 3 comments

Here's a (contrived for simplicity) docker-compose.yml which works properly using docker-compose but fails on Kubernetes after converting it with Kompose:

version: '3.5'

services:
    myservice:
        image: alpine
        environment:
            PROTOCOL: 'https'
            DOMAIN: 'google.com'
        command:
            [
                'curl',
                '$PROTOCOL://$DOMAIN/',
            ]

When the command argument is manually adjusted to '$(PROTOCOL)://$(DOMAIN)/' then it works as expected on Kubernetes.

I would expect that Kompose should be able to handle such a case.

toxeus avatar Apr 11 '22 12:04 toxeus

I also had this issue. to workaround this, i used docker-compose config which extracted my compose file using all env vars and later kompose was able to convert properly.

sivanbecker avatar Apr 13 '22 06:04 sivanbecker

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jul 12 '22 06:07 k8s-triage-robot

/remove-lifecycle stale

toxeus avatar Jul 12 '22 07:07 toxeus

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Oct 10 '22 07:10 k8s-triage-robot

/remove-lifecycle stale

toxeus avatar Oct 10 '22 20:10 toxeus

/assign

AhmedGrati avatar Oct 16 '22 21:10 AhmedGrati

close by #1524

hangyan avatar Nov 19 '22 02:11 hangyan