patch-operator icon indicating copy to clipboard operation
patch-operator copied to clipboard

Use Yaml syntax for a patch in field patchTemplate

Open mfilotto opened this issue 1 year ago • 0 comments

Hi, I try to use yaml for a patch in field patchTemplate with no luck

kind: Patch
metadata:
  name: helm-controller-patch
  namespace: flux-system
spec:
  serviceAccountRef:
    name: helm-controller
  patches:
    helm-controller-patch:
      targetObjectRef:
        apiVersion: apps/v1
        kind: Deployment
        name: helm-controller
        namespace: flux-system
      patchTemplate: |
      - op: add
        path: /spec/template/spec/containers/0/args/-
        value: --feature-gates=DetectDrift=true
      patchType: application/json-patch+json```

mfilotto avatar Apr 21 '23 07:04 mfilotto