fix kustomize replace

This commit is contained in:
Joseph Hanson 2024-09-23 01:05:05 -05:00
parent 73596fbb49
commit fdb61f492a
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
3 changed files with 12 additions and 19 deletions

View file

@ -9,5 +9,17 @@ configMapGenerator:
- name: emqx-conf
files:
- emqx.conf=./resources/emqx.conf
replacements:
- source:
kind: ConfigMap
name: emqx-conf
targets:
- fieldPaths:
- spec.config.data
options:
create: true
select:
kind: EMQX
name: emqx
generatorOptions:
disableNameSuffixHash: true

View file

@ -8,8 +8,6 @@ spec:
image: public.ecr.aws/emqx/emqx:5.8.0
config:
mode: Merge
data: |
$(emqx-conf)
coreTemplate:
metadata:
annotations:

View file

@ -1,4 +1,3 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
@ -6,21 +5,5 @@ resources:
- ./cluster.yaml
- ./ingress.yaml
- ./podmonitor.yaml
patchesStrategicMerge:
- cluster.yaml
replacements:
- source:
kind: ConfigMap
name: emqx-conf
namespace: database
fieldPath: data.emqx.conf
targets:
- select:
kind: EMQX
name: emqx
fieldPaths:
- spec.config.data
options:
delimiter: |
generatorOptions:
disableNameSuffixHash: true