Friday, June 12, 2020

Kustomize Error: trouble configuring builtin PatchTransformer with config

Symptom:

When we run kustomize build , we got below:
Error: trouble configuring builtin PatchTransformer with config: `
patch: users_namespace_label_required_tp_patch.yaml
target:
  kind: K8sRequiredLabelsPodtemplate
`: unable to parse SM or JSON patch from [users_namespace_label_required_tp_patch.yaml]

Solution:

In the kustomization.yaml, there is patch section like below
resources:
- ../../new-namespace-base/

patches:
- patch: users_namespace_label_required_tp_patch.yaml
  target:
    kind: K8sRequiredLabelsPodtemplate

patch is the typo, it should be path.

patches:
path: users_namespace_label_required_tp_patch.yaml
  target:
    kind: K8sRequiredLabelsPodtemplate


No comments: