Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions kubeactions/jsonschema/KubeAction.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,19 @@
"properties": {
"patch": {
"type": "string",
"description": "Patch is the raw JSON strategic merge patch to apply to the deployment. The patch is applied as-is using the Kubernetes strategic merge patch strategy. Example: {\"spec\": {\"replicas\": 3}} to scale, or {\"spec\": {\"template\": {\"spec\": {\"containers\": [{\"name\": \"app\", \"image\": \"app:v2\"}]}}}} to update an image.",
"description": "Patch is the raw JSON patch to apply to the deployment. Example: {\"spec\": {\"replicas\": 3}} to scale, or {\"spec\": {\"template\": {\"spec\": {\"containers\": [{\"name\": \"app\", \"image\": \"app:v2\"}]}}}} to update an image.",
"format": "binary",
"binaryEncoding": "base64"
},
"patch_strategy": {
"type": "string",
"description": "PatchStrategy specifies the Kubernetes patch strategy to use. Supported values: \"strategic-merge\" (default) - Strategic merge patch, understands K8s resource structure (e.g. merges lists by key) \"merge\" - RFC 7386 JSON merge patch, simple merge that replaces arrays entirely \"json\" - RFC 6902 JSON patch, explicit add/remove/replace operations at specific paths If not specified, defaults to \"strategic-merge\"."
}
},
"additionalProperties": true,
"type": "object",
"title": "Patch Deployment Params",
"description": "PatchDeploymentParams contains parameters for the patch_deployment action. Applies a strategic merge patch to a deployment."
"description": "PatchDeploymentParams contains parameters for the patch_deployment action. Applies a patch to a deployment using the specified strategy."
},
"RestartDeploymentParams": {
"additionalProperties": false,
Expand Down
8 changes: 6 additions & 2 deletions kubeactions/jsonschema/KubeActionsList.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,19 @@
"properties": {
"patch": {
"type": "string",
"description": "Patch is the raw JSON strategic merge patch to apply to the deployment. The patch is applied as-is using the Kubernetes strategic merge patch strategy. Example: {\"spec\": {\"replicas\": 3}} to scale, or {\"spec\": {\"template\": {\"spec\": {\"containers\": [{\"name\": \"app\", \"image\": \"app:v2\"}]}}}} to update an image.",
"description": "Patch is the raw JSON patch to apply to the deployment. Example: {\"spec\": {\"replicas\": 3}} to scale, or {\"spec\": {\"template\": {\"spec\": {\"containers\": [{\"name\": \"app\", \"image\": \"app:v2\"}]}}}} to update an image.",
"format": "binary",
"binaryEncoding": "base64"
},
"patch_strategy": {
"type": "string",
"description": "PatchStrategy specifies the Kubernetes patch strategy to use. Supported values: \"strategic-merge\" (default) - Strategic merge patch, understands K8s resource structure (e.g. merges lists by key) \"merge\" - RFC 7386 JSON merge patch, simple merge that replaces arrays entirely \"json\" - RFC 6902 JSON patch, explicit add/remove/replace operations at specific paths If not specified, defaults to \"strategic-merge\"."
}
},
"additionalProperties": true,
"type": "object",
"title": "Patch Deployment Params",
"description": "PatchDeploymentParams contains parameters for the patch_deployment action. Applies a strategic merge patch to a deployment."
"description": "PatchDeploymentParams contains parameters for the patch_deployment action. Applies a patch to a deployment using the specified strategy."
},
"RestartDeploymentParams": {
"additionalProperties": false,
Expand Down
8 changes: 6 additions & 2 deletions kubeactions/jsonschema/PatchDeploymentParams.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@
"properties": {
"patch": {
"type": "string",
"description": "Patch is the raw JSON strategic merge patch to apply to the deployment. The patch is applied as-is using the Kubernetes strategic merge patch strategy. Example: {\"spec\": {\"replicas\": 3}} to scale, or {\"spec\": {\"template\": {\"spec\": {\"containers\": [{\"name\": \"app\", \"image\": \"app:v2\"}]}}}} to update an image.",
"description": "Patch is the raw JSON patch to apply to the deployment. Example: {\"spec\": {\"replicas\": 3}} to scale, or {\"spec\": {\"template\": {\"spec\": {\"containers\": [{\"name\": \"app\", \"image\": \"app:v2\"}]}}}} to update an image.",
"format": "binary",
"binaryEncoding": "base64"
},
"patch_strategy": {
"type": "string",
"description": "PatchStrategy specifies the Kubernetes patch strategy to use. Supported values: \"strategic-merge\" (default) - Strategic merge patch, understands K8s resource structure (e.g. merges lists by key) \"merge\" - RFC 7386 JSON merge patch, simple merge that replaces arrays entirely \"json\" - RFC 6902 JSON patch, explicit add/remove/replace operations at specific paths If not specified, defaults to \"strategic-merge\"."
}
},
"additionalProperties": true,
"type": "object",
"title": "Patch Deployment Params",
"description": "PatchDeploymentParams contains parameters for the patch_deployment action. Applies a strategic merge patch to a deployment."
"description": "PatchDeploymentParams contains parameters for the patch_deployment action. Applies a patch to a deployment using the specified strategy."
}
}
}
91 changes: 54 additions & 37 deletions kubeactions/kubeactions.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions proto/kubeactions/kubeactions.proto
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,20 @@ message RestartDeploymentParams {
}

// PatchDeploymentParams contains parameters for the patch_deployment action.
// Applies a strategic merge patch to a deployment.
// Applies a patch to a deployment using the specified strategy.
message PatchDeploymentParams {
// Patch is the raw JSON strategic merge patch to apply to the deployment.
// The patch is applied as-is using the Kubernetes strategic merge patch strategy.
// Patch is the raw JSON patch to apply to the deployment.
// Example: {"spec": {"replicas": 3}} to scale, or
// {"spec": {"template": {"spec": {"containers": [{"name": "app", "image": "app:v2"}]}}}} to update an image.
bytes patch = 1 [(protoc.gen.jsonschema.field_options).required = true];

// PatchStrategy specifies the Kubernetes patch strategy to use.
// Supported values:
// "strategic-merge" (default) - Strategic merge patch, understands K8s resource structure (e.g. merges lists by key)
// "merge" - RFC 7386 JSON merge patch, simple merge that replaces arrays entirely
// "json" - RFC 6902 JSON patch, explicit add/remove/replace operations at specific paths
// If not specified, defaults to "strategic-merge".
string patch_strategy = 2;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Regenerate checked-in artifacts for new proto field

Adding patch_strategy here updates the IDL but the commit does not update the checked-in generated outputs (kubeactions/kubeactions.pb.go still exposes only Patch []byte, and kubeactions/jsonschema/PatchDeploymentParams.json still describes only strategic merge semantics). Because this repository ships generated bindings, downstream users of the committed Go/JSON artifacts cannot use the new field, so the API change is effectively incomplete until codegen outputs are regenerated and committed together.

Useful? React with 👍 / 👎.

}

// KubeResource represents a Kubernetes resource to act on
Expand Down
Loading