Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(agent): missing path for pod without labels (#2518)
## Description identify when a pod has no labels (and thus has no `/metadata/labels` for jsonpatch replace operations. use the `add` jsonpath operation to add the labels path with the map[string]string value of `{"zarf-agent": "patched"}` ## Related Issue Fixes #2517 ## Testing Deploy a pod without labels to test: ``` apiVersion: v1 kind: Pod metadata: creationTimestamp: null name: test namespace: test spec: containers: - image: nginx name: test resources: {} dnsPolicy: ClusterFirst restartPolicy: Always status: {} ``` ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/.github/CONTRIBUTING.md#developer-workflow) followed
- Loading branch information