fix kustomize replace
This commit is contained in:
parent
73596fbb49
commit
fdb61f492a
3 changed files with 12 additions and 19 deletions
|
@ -9,5 +9,17 @@ configMapGenerator:
|
||||||
- name: emqx-conf
|
- name: emqx-conf
|
||||||
files:
|
files:
|
||||||
- emqx.conf=./resources/emqx.conf
|
- 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:
|
generatorOptions:
|
||||||
disableNameSuffixHash: true
|
disableNameSuffixHash: true
|
||||||
|
|
|
@ -8,8 +8,6 @@ spec:
|
||||||
image: public.ecr.aws/emqx/emqx:5.8.0
|
image: public.ecr.aws/emqx/emqx:5.8.0
|
||||||
config:
|
config:
|
||||||
mode: Merge
|
mode: Merge
|
||||||
data: |
|
|
||||||
$(emqx-conf)
|
|
||||||
coreTemplate:
|
coreTemplate:
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
---
|
|
||||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
|
@ -6,21 +5,5 @@ resources:
|
||||||
- ./cluster.yaml
|
- ./cluster.yaml
|
||||||
- ./ingress.yaml
|
- ./ingress.yaml
|
||||||
- ./podmonitor.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:
|
generatorOptions:
|
||||||
disableNameSuffixHash: true
|
disableNameSuffixHash: true
|
||||||
|
|
Loading…
Reference in a new issue