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

[BUG] Can't escape interpolation #1906

Open
slaskis opened this issue Jul 15, 2024 · 2 comments
Open

[BUG] Can't escape interpolation #1906

slaskis opened this issue Jul 15, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@slaskis
Copy link

slaskis commented Jul 15, 2024

Expected Behavior

Expect $$REDIS_PASSWORD to be interpolated according to the compose spec so into $REDIS_PASSWORD.

Actual Behavior

It interpolated it into $(REDIS)_PASSWORD.

Steps To Reproduce

  1. Run kompose convert
  2. Look into the "redis-deployment.yaml" file and see $$REDIS_PASSWORD being interpolated as $(REDIS)_PASSWORD

Kompose Version

1.34.0 (HEAD)

Docker-Compose file

services:
  redis:
    image: redis
    command: redis-server --requirepass $$REDIS_PASSWORD
    ports:
      - 6379

Anything else?

No response

@slaskis slaskis added the kind/bug Categorizes issue or PR as related to a bug. label Jul 15, 2024
@slaskis
Copy link
Author

slaskis commented Jul 15, 2024

An interesting observation is that the healthcheck test seems to interpolate it correctly:

services:
  redis:
    image: redis
    command: redis-server --requirepass $$REDIS_PASSWORD
    healthcheck:
      test: redis-cli -a $$REDIS_PASSWORD --raw incr ping
    ports:
      - 6379
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.34.0 (HEAD)
  labels:
    io.kompose.service: redis
  name: redis
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: redis
  template:
    metadata:
      annotations:
        kompose.cmd: kompose convert
        kompose.version: 1.34.0 (HEAD)
      labels:
        io.kompose.service: redis
    spec:
      containers:
        - args:
            - redis-server
            - --requirepass
            - $(){REDIS_PASSWORD}
          image: redis
          livenessProbe:
            exec:
              command:
                - redis-cli -a $REDIS_PASSWORD --raw incr ping
            failureThreshold: 120
            periodSeconds: 3
            timeoutSeconds: 10
          name: redis
          ports:
            - containerPort: 6379
              protocol: TCP
      restartPolicy: Always

@k8s-triage-robot
Copy link

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

This bot triages un-triaged issues 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 as fresh with /remove-lifecycle stale
  • Close this issue 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 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

3 participants