# Patch multiple resources not working

**URL:** <https://discuss.kubernetes.io/t/patch-multiple-resources-not-working/20229>\
**Category:** General Discussions\
**Created:** [June 2, 2022, 11:43pm UTC](https://discuss.kubernetes.io/t/patch-multiple-resources-not-working/20229 "2022-06-02T23:43:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiongtx](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/xiongtx/32/10220_2.png) [@xiongtx](https://discuss.kubernetes.io/u/xiongtx)\
**Post date:** [June 2, 2022, 11:43pm UTC](https://discuss.kubernetes.io/t/patch-multiple-resources-not-working/20229/1 "2022-06-02T23:43:29Z")

</div>

I’m trying to apply the same job history limits to a number of CronJobs using a [patch](https://github.com/kubernetes-sigs/kustomize/blob/572d5841c60b9a4db1a75443b8badb7e8334f727/examples/patchMultipleObjects.md) like the following, named `kubeJobHistoryLimit.yml`:

```nohighlight
apiVersion: batch/v1beta1
kind: CronJob
spec:
  successfulJobsHistoryLimit: 1
  failedJobsHistoryLimit: 1

```

My `kustomization.yml` looks like:

```nohighlight
bases:
  - ../base
configMapGenerator:
- name: inductions-config
  env: config.properties
patches:
  - path: kubeJobHistoryLimit.yml
    target:
      kind: CronJob
patchesStrategicMerge:
  - job_specific_patch_1.yml
  - job_specific_patch_2.yml
  ...
resources:
  - secrets-uat.yml

```

And at some point in my CI pipeline I have:

```auto
kubectl --kubeconfig $kubeconfig apply --force -k ./

```

The `kubectl` version is `1.21.9`.

The issue is that the job history limit values don’t seem to be getting picked up. Is there something wrong w/ the configuration or the version of K8s I’m using?
