<p>We are working on creating a deployment yaml file for our Java spring-boot application to run on AKS.</p>

<p>I need a way to add a boolean variable as env, secret or configmap which I can pass the following application.properties</p>

<p><code>azure.activedirectory.session-stateless=true
</code></p>

<p>to environment variable inside my pod like that </p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: service
spec:
  replicas: 1
  selector:
    matchLabels:
      app: svc-deployment
  template:
    spec:
      containers:
      - name: image
        image: acr/image:tag
        env:
        - name: azure.activedirectory.session-stateless
          value: true
</code></pre>

<p>I read that yaml seems it can't parse the boolean values either with quote - "ture " -  or without. Is there any workaround?  </p>

Helay
<p><code>application.properties</code> can be configured by the <code>SPRING_APPLICATION_JSON</code> env variable</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: service
spec:
  replicas: 1
  selector:
    matchLabels:
      app: svc-deployment
  template:
    spec:
      containers:
      - name: image
        image: acr/image:tag
        env:
        - name: SPRING_APPLICATION_JSON
          value: '{"azure": {"activedirectory": {"session-stateless": true}}}'
</code></pre>

<p>See: <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-external-config" rel="nofollow noreferrer">https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-external-config</a></p>
