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

Dependent Environment Variables doesn't work with config connector. #3072

Open
3 tasks done
fnacarellidev opened this issue Nov 1, 2024 · 1 comment
Open
3 tasks done
Labels
bug Something isn't working

Comments

@fnacarellidev
Copy link

fnacarellidev commented Nov 1, 2024

Checklist

Bug Description

I'm not sure if this is a bug or if it has not been implemented, I was trying to do something like the dependent environment variables from k8s, but using config connector, however it does not seem to work, I tried doing exactly as k8s exemplifies by setting a variable hardcoded and trying using it on the next variable, however the variable is not expanded.

Additional Diagnostic Information

Expected the variable to be expanded, for example:

env:
  - name: VAL1
    value: World
  - name: VAL2
    value: "Hello, $(VAL1)"

Logging that on the application pushed to production gives the following output:
INFO [18:29:56.093] [DefaultDispatcher-worker-1] com.trash.svcs.tracker.TrackerEndpoint - Hello, $(VAL1)

Expected:
INFO [18:29:56.093] [DefaultDispatcher-worker-1] com.trash.svcs.tracker.TrackerEndpoint - Hello, World

Kubernetes Cluster Version

v1.29.1

Config Connector Version

1.123.1

Config Connector Mode

namespaced mode (default)

Log Output

No response

Steps to reproduce the issue

Set 2 variables, the first with some arbitrary text, and try to use its value on the next variable, I think it will be easier to understante looking at the yaml snippet provided ahead.

YAML snippets

apiVersion: run.cnrm.cloud.google.com/v1beta1
kind: RunService
spec:
  ingress: "INGRESS_TRAFFIC_ALL"
  location: "us-central1"
  projectRef:
    external: projects/trash-362115
  template:
    timeout: "600s"
    containers:
      - image: gcr.io/trash-362115/svcs.tracker
        env:
        - name: VAL1
          value: World
        - name: VAL2
          value: "Hello, $(VAL1)"
@fnacarellidev fnacarellidev added the bug Something isn't working label Nov 1, 2024
@fnacarellidev
Copy link
Author

I would be very interested in trying to solve the problem myself, maybe with a little help i'll be able.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant