4

I have a kustomize base that I'd like to re-use without editing it. Unfortunately, it creates a namespace I don't want to create. I'd like to simply remove that resource from consideration when compiling the manifests and add a resource for mine since I can't patch a namespace to change the name.

How can this be done?

Jonas
  • 1,045
  • 6
  • 9
Josiah
  • 373
  • 1
  • 4
  • 11

1 Answers1

5

You can remove specified manifest using 'patchesStrategicMerge' as following:

patchesStrategicMerge:
- |-
  apiVersion: v1
  kind: Namespace
  metadata:
    name: unwanted-namespace
  $patch: delete
Ahmed AbouZaid
  • 161
  • 1
  • 3