79274881

Date: 2024-12-12 11:14:20
Score: 1
Natty:
Report link

I found a better way to solve this. Here is my Value.yaml

test:
  cors:
    allowedOrigins: 'https://www.test.com'

And this is was in my microservice which I needed to override.

spring:
  application:
    name: something
  cloud:
    gateway:
      globalcors:
        corsConfigurations:
          '[/**]':
            allowedOrigins: ${GATEWAY_CORS_ALLOWED_ORIGINS:*}

And this is the value mapping in deployment yaml.

- name: GATEWAY_CORS_ALLOWED_ORIGINS
  value: {{ default "*" (.Values.test.cors.allowedOrigins) | quote }} 

To do this, it helped me the comments I received for this question. So Thanks for the comments.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Jonny