Replies: 2 comments
-
Hello there, @mcdolding! 👋🏻 Currently, it's possible to add YAML file contents to a Kustomization using the
where your server:
port: 8080 you could use apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
configMapGenerator:
- files:
- application.yaml
name: test-cm
namespace: test-ns which would then generate the following structure on apiVersion: v1
data:
application.yaml: |
server:
port: 8080
kind: ConfigMap
metadata:
name: test-cm-bd9fg9hb5h
namespace: test-ns It's also possible to override the YAML key when using apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
configMapGenerator:
- files:
- test.yaml=application.yaml
name: test-cm
namespace: test-ns which then results in: apiVersion: v1
data:
test.yaml: |
server:
port: 8080
kind: ConfigMap
metadata:
name: test-cm-d76c2hh757
namespace: test-ns Does that address your use case? |
Beta Was this translation helpful? Give feedback.
-
Thanks for your detailed response. This is exactly what I need. |
Beta Was this translation helpful? Give feedback.
-
The configMapGenerator will manage a configmap using properties of the form myproperty=myvalue.
However I have springboot and quarkus applications which are configured using application.yml files (in place of application.properties files). At runtime we provide configmaps of the form:
Would it be possible to extend configMapGenerator to handle yml properties?
Beta Was this translation helpful? Give feedback.
All reactions