title: How to make ConfigMapGenerator based config more intelligent
body: <p>I like <a href="https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/configmapgenerator/" rel="nofollow noreferrer">configMapGenerator</a> with suffix hashes because it forces redeployment of pod that are consuming particular config. But the diff output after changing config is just delete and create, which is less than ideal. Is there a way to get more intelligent diff config maps produces by configMapGenerator with suffix hashes?</p>
  <h2>Edit:</h2>
  <p>For example if I have kustomization.yaml:</p>
  <pre class="lang-yaml prettyprint-override"><code>generatorOptions:
    disableNameSuffixHash: false
  
   configMapGenerator:
    - name: nginx-conf
      files:
      - nginx.conf=config/nginx.conf
  </code></pre>
  <ol>
  <li><p>Lets assume that for first time <code>kubectl apply -k</code> generates <code>nginx-conf-aaaa</code> config map.</p>
  </li>
  <li><p>Edit <code>config/nginx.conf</code>.</p>
  </li>
  <li><p>Lets assume that <code>kubectl apply -k</code> will generate <code>nginx-config-bbbb</code>.</p>
  </li>
  </ol>
  <p>Is there a way to diff <code>nginx-config-aaaa</code> and <code>nginx-config-bbbb</code> before applying changes?</p>