Kustomize: apply patch results in error "add operation does not apply: doc is missing path" #5695
Labels
kind/support
Categorizes issue or PR as a support question.
triage/needs-information
Indicates an issue needs more information in order to work on it.
I am trying to do a kustomize patch to an existing Helm deployment via a CI/CD pipeline. The CI pipeline is failing kustomize checks with error:
`error: accumulating components: accumulateDirectory: "recursed accumulation of path '/runner/_work/ops-infra/ops-infra/current/components/mimir-prod/alertmanager/ops': add operation does not apply: doc is missing path: "/spec/values/alertmanager/fallbackConfig/receivers/-": missing value``
The patch is defined in receivers-patch.yaml as follows:
- op: add path: /spec/chart/spec/values/alertmanager/fallbackConfig/receivers/- value: name: 'slack_receiver' slack_configs: - channel: "#ops" send_resolved: true slack_api_url: "https://hooks.slack.com/services/Txxxxx"
This patch adds a new "receiver" entry to the Mimir AlertManager Helm deployment. The patch is applied in kustomization.yaml file as:
The deployment on which the patch is being applied is defined as below:
I have looked at other questions here of similar nature but I cant quite find a match to my issue.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: