forked from kubernetes-client/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch.ts
More file actions
20 lines (19 loc) · 869 Bytes
/
patch.ts
File metadata and controls
20 lines (19 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
* Valid Content-Type header values for patch operations. See
* https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/
* for details.
*
* Additionally for Server-Side Apply https://kubernetes.io/docs/reference/using-api/server-side-apply/
* and https://kubernetes.io/docs/reference/using-api/server-side-apply/#api-implementation
*/
export const PatchStrategy = {
/** Diff-like JSON format. */
JsonPatch: 'application/json-patch+json',
/** Simple merge. */
MergePatch: 'application/merge-patch+json',
/** Merge with different strategies depending on field metadata. */
StrategicMergePatch: 'application/strategic-merge-patch+json',
/** Server-Side Apply */
ServerSideApply: 'application/apply-patch+yaml',
} as const;
export type PatchStrategy = (typeof PatchStrategy)[keyof typeof PatchStrategy];