Skip to content

Support RFC6902 json patches for manifestsΒ #792

@simplysoft

Description

@simplysoft

User Story

As a user I would like to patch the manifest using RFC6902 in addition to json merge patch support introduced with #280 so that I can e.g. easily add command arguments to conainers

Detailed Description

json merge patch (RFC 7396) has the limitation that is not possible to extend lists (without having to duplicate existing elements in the patch itself) or do some more advanced patches.

The underlying evanphx/json-patch library used would already support this, but operator currently does not.
It would be great to extend support, ideally in similar way than kustomize supports different patch types, e.g.

- patch: |
    - op: add
      path: /spec/template/spec/containers/0/args/-
      value: --additional-sync-machine-labels=topology.kubernetes.io/.*
  target:
    kind: Deployment

/kind feature

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions