Skip to content

Commit 92c556d

Browse files
author
Suraj Banakar
committed
add configMapGenerator to kustomize yaml
1 parent b3bb2a8 commit 92c556d

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

k8s/configmap.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ kind: ConfigMap
22
apiVersion: v1
33
metadata:
44
name: pema-settings
5-
namespace: pema
5+
# Not specifying namespace here is intentional
6+
# Check Kustomization.yaml for more info
7+
# namespace: pema
68
data:
79
# Your config goes here
810
settings: |

k8s/kustomization.yaml

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
3+
# This is to set namespace on the empty
4+
# configmap generated by configMapGenerator in memory
35
namespace: pema
4-
metadata:
5-
name: pema
6-
6+
patchesStrategicMerge:
7+
- configmap.yaml
78
resources:
8-
- deployment.yaml
9-
- configmap.yaml
10-
- service.yaml
11-
- secret.yaml
12-
- namespace.yaml
9+
- deployment.yaml
10+
- service.yaml
11+
- secret.yaml
12+
- namespace.yaml
13+
14+
15+
configMapGenerator:
16+
- name: pema-settings

0 commit comments

Comments
 (0)