Skip to content

Commit

Permalink
feat: using patches instead of patchesStrategicMerge
Browse files Browse the repository at this point in the history
  • Loading branch information
jfavellar90 committed Nov 24, 2023
1 parent 7dbdb46 commit 2f492d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/reference/patches.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ File: ``kustomization.yml``

File: ``kustomization.yml``

.. patch:: kustomization-patches-strategic-merge
.. patch:: kustomization-patches

``kustomization-patches-strategic-merge``
``kustomization-patches``
=========================================

File: ``kustomization.yml``

This can be used to add more Kustomization patches that make use of the `strategic merge mechanism <https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/#customizing>`__.
This can be used to add more Kustomization patches. See more details `here <https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/>`__.

.. patch:: kustomization-resources

Expand Down
8 changes: 4 additions & 4 deletions tutor/templates/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ configMapGenerator:
app.kubernetes.io/name: redis
{{ patch("kustomization-configmapgenerator") }}

{%- if patch("k8s-override") or patch("kustomization-patches-strategic-merge") %}
patchesStrategicMerge:
{%- if patch("k8s-override") or patch("kustomization-patches") %}
patches:
{%- if patch("k8s-override") %}
- k8s/override.yml
- path: k8s/override.yml
{%- endif %}
{{ patch("kustomization-patches-strategic-merge") }}
{{ patch("kustomization-patches") }}
{%- endif %}

{{ patch("kustomization") }}

0 comments on commit 2f492d6

Please sign in to comment.