<p>I got APP whitch use config in yaml format
Config is:</p>
<pre><code>application:
    web-server:
      init-timeout: 2m
      shutdown-timeout: 1m
      sites-сonfig: ./app/sites/prod
kerberos:
  principal: APP_USER@DOMAIN.LOCAL
  keytab: /kerberos/keytab/test.keytab

</code></pre>
<p>I want to change settings of this config via Kustomize</p>
<p>Now I create in ./base catalog kustomization.yaml contains:</p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - deployment.yaml

configMapGenerator:
- name: config-app
  files:
  - config.yml

</code></pre>
<p>Next I create in ./base catalog config.yml contains my application config:</p>
<pre><code>application:
    web-server:
      init-timeout: 2m
      shutdown-timeout: 1m
      sites-сonfig: ./app/sites/prod
kerberos:
  principal: APP_USER@DOMAIN.LOCAL
  keytab: /kerberos/keytab/test.keytab
</code></pre>
<p>And I create env catalog for my stage &amp; test environment</p>
<p>for example catalog ./env/test contains kustomization.yaml:</p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base



patches:
- replica_count.yml

configMapGenerator:
  - name: config-app
    behavior: merge
    files:
      - config.yml
    options:
        disableNameSuffixHash: true      

</code></pre>
<p>File config.yml in directory ./env/test contains:</p>
<pre><code>application:
kerberos:
  principal: TEST_USER@DOMAIN.LOCAL
  keytab: /kerberos/keytab/test_user.keytab
</code></pre>
<p>When I run kustomize build | kubectl apply --prune -f , I see this config-app in configMaps:</p>
<pre><code>application:
    web-server:
      init-timeout: 2m
      shutdown-timeout: 1m
      sites-сonfig: ./app/sites/prod
kerberos:
  principal: APP_USER@DOMAIN.LOCAL
  keytab: /kerberos/keytab/test.keytab
</code></pre>
<p>How I can merge some settings from yaml in ./env/test to main config in ./base ?
I don't want to duplicate full yaml config to ./env/test</p>

Darkwind
<p>The ConfigMapGenerator is not planned to support this type of merging functionality. He is overriding files with same names. Same user issue <a href="https://github.com/kubernetes-sigs/kustomize/issues/370" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/kustomize/issues/370</a>. Its sad) I think to solve this problem you may use profiles:</p>
<p>config.yml common config<br />
config-test.yml additional test env config.</p>
<p>And your application reading files in right order</p>
