Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strings containing env vars are not converted and fail #1497

Closed
toxeus opened this issue Apr 11, 2022 · 7 comments
Closed

strings containing env vars are not converted and fail #1497

toxeus opened this issue Apr 11, 2022 · 7 comments
Assignees

Comments

@toxeus
Copy link

toxeus commented Apr 11, 2022

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 toxeus changed the title environment variables in command section are not properly translated strings containing env vars are not converted and fail Apr 12, 2022
@sivanbecker
Copy link

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.

@k8s-triage-robot
Copy link

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-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 12, 2022
@toxeus
Copy link
Author

toxeus commented Jul 12, 2022

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 12, 2022
@k8s-triage-robot
Copy link

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-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 10, 2022
@toxeus
Copy link
Author

toxeus commented Oct 10, 2022

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 10, 2022
@AhmedGrati
Copy link
Contributor

/assign

@hangyan
Copy link
Contributor

hangyan commented Nov 19, 2022

close by #1524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants