2

I have a very strange scenario playing out right now with my configs where environment vars don't seem to be honored by the container.

I'm trying to set the active spring profile via the deployment.xml file like this:

...
containers:
- env:
  - name: SPRING_PROFILES_ACTIVE
    value: {{ .Values.springProfile }}
...

This seems to work properly as on my pod I see the following:

enter image description here

However, when I check my logs I can see that it is clearly using the wrong profile, likely the default profile.

Some environment details:

  • AWS EKS
  • Base docker image is amazoncorretto
  • Helm is being used

Any help would be greatly appreciated.

user1170235
  • 189
  • 3
  • 9

1 Answers1

3

OK, so I figured it out... everything is working fine. I was misinterpretting my logs and thought that what I was seeing indicated the profile wasn't being picked up.

Everything works fine :)

user1170235
  • 189
  • 3
  • 9