Comments on: A Deep Dive Into Spring Boot Configuration https://piotrminkowski.com/2022/08/02/a-deep-dive-into-spring-boot-configuration/ Java, Spring, Kotlin, microservices, Kubernetes, containers Wed, 12 Oct 2022 07:44:32 +0000 hourly 1 https://wordpress.org/?v=6.9.1 By: piotr.minkowski https://piotrminkowski.com/2022/08/02/a-deep-dive-into-spring-boot-configuration/#comment-1673 Wed, 12 Oct 2022 07:44:32 +0000 https://piotrminkowski.com/?p=12665#comment-1673 In reply to jacksondaf.

You should just mount a volume, not the file:
“`
volumeMounts:
– mountPath: /config/
“`

]]>
By: jacksondaf https://piotrminkowski.com/2022/08/02/a-deep-dive-into-spring-boot-configuration/#comment-1648 Fri, 16 Sep 2022 05:21:50 +0000 https://piotrminkowski.com/?p=12665#comment-1648 I tried configuring the above configmap setup, below is my deployment file
apiVersion: apps/v1
kind: Deployment
metadata:
name: ext5
spec:
selector:
matchLabels:
app: ext5
template:
metadata:
labels:
app: ext5
spec:
containers:
– name: ext5
image: jacksondaf/externalproperty3
ports:
– containerPort: 8080
volumeMounts:
– mountPath: /config/global1.properties
subPath: global1.properties
name: app-vol
volumes:
– name: app-vol
configMap:
name: extconfig1

——
vi global1.properties
property1 = OVERRIDE
kubectl create configmap extconfig –from-file=global1.properties

———

I already have a global1.properies in my spring boot project, which has the property1 = global

Now the issue is the property file which i am setting it using the kube config map is not getting picked up. Can you help me on this

]]>