From 55e1e7e753f7e783372507d6e312e4a20a85846b Mon Sep 17 00:00:00 2001 From: Justin Lesko Date: Wed, 15 Apr 2026 09:18:10 -0400 Subject: [PATCH] Add RollbackDeployment action type --- kubeactions/jsonschema/KubeAction.json | 19 +- kubeactions/jsonschema/KubeActionsList.json | 18 +- .../jsonschema/RollbackDeploymentParams.json | 18 ++ .../WorkloadRecommendationsReply.json | 114 -------- .../WorkloadRecommendationsRequest.json | 181 ------------- kubeactions/kubeactions.pb.go | 248 ++++++++++++------ proto/kubeactions/kubeactions.proto | 15 +- 7 files changed, 236 insertions(+), 377 deletions(-) create mode 100644 kubeactions/jsonschema/RollbackDeploymentParams.json delete mode 100644 kubeactions/jsonschema/WorkloadRecommendationsReply.json delete mode 100644 kubeactions/jsonschema/WorkloadRecommendationsRequest.json diff --git a/kubeactions/jsonschema/KubeAction.json b/kubeactions/jsonschema/KubeAction.json index 79b76bdd..3a921e81 100644 --- a/kubeactions/jsonschema/KubeAction.json +++ b/kubeactions/jsonschema/KubeAction.json @@ -50,8 +50,11 @@ }, "patch_deployment": { "$ref": "#/definitions/PatchDeploymentParams", - "additionalProperties": false, - "description": "Future actions can be added here: DrainNodeParams drain_node = 13; CordonNodeParams cordon_node = 14;" + "additionalProperties": false + }, + "rollback_deployment": { + "$ref": "#/definitions/RollbackDeploymentParams", + "additionalProperties": false } }, "additionalProperties": false, @@ -134,6 +137,18 @@ "type": "object", "title": "Restart Deployment Params", "description": "RestartDeploymentParams contains parameters for the restart_deployment action. Restarts a deployment by updating the restart annotation on the pod template." + }, + "RollbackDeploymentParams": { + "properties": { + "target_revision": { + "type": "string", + "description": "TargetRevision is the revision number of the ReplicaSet to roll back to. If not specified, rolls back to the previous revision." + } + }, + "additionalProperties": false, + "type": "object", + "title": "Rollback Deployment Params", + "description": "RollbackDeploymentParams contains parameters for the rollback_deployment action. Rolls back a deployment by reverting to a previous replicaset." } } } \ No newline at end of file diff --git a/kubeactions/jsonschema/KubeActionsList.json b/kubeactions/jsonschema/KubeActionsList.json index c16fa7e0..226e31ee 100644 --- a/kubeactions/jsonschema/KubeActionsList.json +++ b/kubeactions/jsonschema/KubeActionsList.json @@ -50,8 +50,12 @@ }, "patch_deployment": { "$ref": "#/definitions/PatchDeploymentParams", + "additionalProperties": false + }, + "rollback_deployment": { + "$ref": "#/definitions/RollbackDeploymentParams", "additionalProperties": false, - "description": "Future actions can be added here: DrainNodeParams drain_node = 13; CordonNodeParams cordon_node = 14;" + "description": "Future actions can be added here: DrainNodeParams drain_node = 14; CordonNodeParams cordon_node = 15;" } }, "additionalProperties": false, @@ -152,6 +156,18 @@ "type": "object", "title": "Restart Deployment Params", "description": "RestartDeploymentParams contains parameters for the restart_deployment action. Restarts a deployment by updating the restart annotation on the pod template." + }, + "RollbackDeploymentParams": { + "properties": { + "target_revision": { + "type": "string", + "description": "TargetRevision is the revision number of the ReplicaSet to roll back to. If not specified, rolls back to the previous revision." + } + }, + "additionalProperties": false, + "type": "object", + "title": "Rollback Deployment Params", + "description": "RollbackDeploymentParams contains parameters for the rollback_deployment action. Rolls back a deployment by reverting to a previous replicaset." } } } \ No newline at end of file diff --git a/kubeactions/jsonschema/RollbackDeploymentParams.json b/kubeactions/jsonschema/RollbackDeploymentParams.json new file mode 100644 index 00000000..eec88ac5 --- /dev/null +++ b/kubeactions/jsonschema/RollbackDeploymentParams.json @@ -0,0 +1,18 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "$ref": "#/definitions/RollbackDeploymentParams", + "definitions": { + "RollbackDeploymentParams": { + "properties": { + "target_revision": { + "type": "string", + "description": "TargetRevision is the revision number of the ReplicaSet to roll back to. If not specified, rolls back to the previous revision." + } + }, + "additionalProperties": false, + "type": "object", + "title": "Rollback Deployment Params", + "description": "RollbackDeploymentParams contains parameters for the rollback_deployment action. Rolls back a deployment by reverting to a previous replicaset." + } + } +} \ No newline at end of file diff --git a/kubeactions/jsonschema/WorkloadRecommendationsReply.json b/kubeactions/jsonschema/WorkloadRecommendationsReply.json deleted file mode 100644 index d7091b28..00000000 --- a/kubeactions/jsonschema/WorkloadRecommendationsReply.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "#/definitions/WorkloadRecommendationsReply", - "definitions": { - "Error": { - "properties": { - "code": { - "type": "integer" - }, - "message": { - "type": "string" - } - }, - "additionalProperties": false, - "type": "object", - "title": "Error", - "description": "Error represents an error message" - }, - "WorkloadRecommendationReply": { - "required": [ - "timestamp", - "targetReplicas" - ], - "properties": { - "error": { - "$ref": "#/definitions/Error", - "additionalProperties": false, - "description": "Error is the error message if new values cannot be calculated" - }, - "timestamp": { - "type": "string", - "description": "Timestamp is the time the values were generated", - "format": "date-time" - }, - "targetReplicas": { - "type": "integer", - "description": "TargetReplicas is the number of replicas the workload should have" - }, - "lowerBoundReplicas": { - "type": "integer", - "description": "LowerBoundReplicas is the number of replicas based on lowerBound input" - }, - "upperBoundReplicas": { - "type": "integer", - "description": "UpperBoundReplicas is the number of replicas based on upperBound input" - }, - "observedTargets": { - "items": { - "$ref": "#/definitions/WorkloadRecommendationTarget" - }, - "additionalProperties": false, - "type": "array", - "description": "ObservedTargets is the list of observed targets (only the targetValue will be set)" - }, - "reason": { - "type": "string", - "description": "Reason explains recommender decision" - } - }, - "additionalProperties": false, - "type": "object", - "title": "Workload Recommendation Reply", - "description": "WorkloadRecommendationReply represents a recommendation reply" - }, - "WorkloadRecommendationTarget": { - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "Type defines the target value type (e.g. CPU, Memory, custom, etc.)" - }, - "targetValue": { - "type": "number", - "description": "TargetValue is the target value of the target" - }, - "lowerBound": { - "type": "number", - "description": "LowerBound is the lower bound of the target" - }, - "upperBound": { - "type": "number", - "description": "UpperBound is the upper bound of the target" - } - }, - "additionalProperties": false, - "type": "object", - "title": "Workload Recommendation Target", - "description": "WorkloadRecommendationTarget represents a target value for a workload" - }, - "WorkloadRecommendationsReply": { - "properties": { - "error": { - "$ref": "#/definitions/Error", - "additionalProperties": false, - "description": "Error is the error message if new values cannot be calculated" - }, - "recommendations": { - "items": { - "$ref": "#/definitions/WorkloadRecommendationReply" - }, - "additionalProperties": false, - "type": "array", - "description": "Recommendations is the list of recommendations" - } - }, - "additionalProperties": false, - "type": "object", - "title": "Workload Recommendations Reply", - "description": "WorkloadRecommendationsReply represents a list of recommendations" - } - } -} \ No newline at end of file diff --git a/kubeactions/jsonschema/WorkloadRecommendationsRequest.json b/kubeactions/jsonschema/WorkloadRecommendationsRequest.json deleted file mode 100644 index 4c3acf64..00000000 --- a/kubeactions/jsonschema/WorkloadRecommendationsRequest.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "#/definitions/WorkloadRecommendationsRequest", - "definitions": { - "WorkloadRecommendationConstraints": { - "required": [ - "minReplicas", - "maxReplicas" - ], - "properties": { - "minReplicas": { - "type": "integer", - "description": "MinReplicas is the minimum number of replicas the workload should have" - }, - "maxReplicas": { - "type": "integer", - "description": "MaxReplicas is the maximum number of replicas the workload should have" - } - }, - "additionalProperties": false, - "type": "object", - "title": "Workload Recommendation Constraints", - "description": "WorkloadRecommendationConstraints represents the constraints for a workload" - }, - "WorkloadRecommendationRequest": { - "required": [ - "targetRef", - "constraints" - ], - "properties": { - "targetRef": { - "$ref": "#/definitions/WorkloadTargetRef", - "additionalProperties": false, - "description": "TargetRef is the target reference of the workload" - }, - "constraints": { - "$ref": "#/definitions/WorkloadRecommendationConstraints", - "additionalProperties": false - }, - "state": { - "$ref": "#/definitions/WorkloadState", - "additionalProperties": false - }, - "targets": { - "items": { - "$ref": "#/definitions/WorkloadRecommendationTarget" - }, - "additionalProperties": false, - "type": "array" - }, - "settings": { - "additionalProperties": { - "oneOf": [ - { - "type": "array" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "object" - }, - { - "type": "string" - } - ], - "title": "Value", - "description": "`Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value." - }, - "type": "object" - } - }, - "additionalProperties": false, - "type": "object", - "title": "Workload Recommendation Request", - "description": "WorkloadRecommendationRequest represents a recommendation request" - }, - "WorkloadRecommendationTarget": { - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "Type defines the target value type (e.g. CPU, Memory, custom, etc.)" - }, - "targetValue": { - "type": "number", - "description": "TargetValue is the target value of the target" - }, - "lowerBound": { - "type": "number", - "description": "LowerBound is the lower bound of the target" - }, - "upperBound": { - "type": "number", - "description": "UpperBound is the upper bound of the target" - } - }, - "additionalProperties": false, - "type": "object", - "title": "Workload Recommendation Target", - "description": "WorkloadRecommendationTarget represents a target value for a workload" - }, - "WorkloadRecommendationsRequest": { - "properties": { - "requests": { - "items": { - "$ref": "#/definitions/WorkloadRecommendationRequest" - }, - "additionalProperties": false, - "type": "array" - } - }, - "additionalProperties": false, - "type": "object", - "title": "Workload Recommendations Request", - "description": "WorkloadValuesList represents a list of workload recommendation requests" - }, - "WorkloadState": { - "required": [ - "desiredReplicas" - ], - "properties": { - "desiredReplicas": { - "type": "integer", - "description": "DesiredReplicas is the current number of desired replicas" - }, - "currentReplicas": { - "type": "integer", - "description": "CurrentReplicas is the number of replicas currently running" - }, - "readyReplicas": { - "type": "integer", - "description": "ReadyReplicas is the number of ready replicas" - } - }, - "additionalProperties": false, - "type": "object", - "title": "Workload State", - "description": "WorkloadState represents the state of a workload" - }, - "WorkloadTargetRef": { - "required": [ - "cluster", - "namespace", - "kind", - "name" - ], - "properties": { - "cluster": { - "type": "string", - "description": "Cluster is the name of the cluster" - }, - "namespace": { - "type": "string", - "description": "Namespace is the namespace of PodAutoscaler object" - }, - "kind": { - "type": "string", - "description": "Kind is K8S object kind" - }, - "name": { - "type": "string", - "description": "Name is the name of the K8S object" - }, - "apiVersion": { - "type": "string", - "description": "APIVersion is the API version of the K8S object" - } - }, - "additionalProperties": false, - "type": "object", - "title": "Workload Target Ref", - "description": "WorkloadTargetRef represents the target reference of a workload" - } - } -} \ No newline at end of file diff --git a/kubeactions/kubeactions.pb.go b/kubeactions/kubeactions.pb.go index cc3ad5d7..804eee1b 100644 --- a/kubeactions/kubeactions.pb.go +++ b/kubeactions/kubeactions.pb.go @@ -98,6 +98,7 @@ type KubeAction struct { // *KubeAction_DeletePod // *KubeAction_RestartDeployment // *KubeAction_PatchDeployment + // *KubeAction_RollbackDeployment Action isKubeAction_Action `protobuf_oneof:"action"` } @@ -189,6 +190,13 @@ func (x *KubeAction) GetPatchDeployment() *PatchDeploymentParams { return nil } +func (x *KubeAction) GetRollbackDeployment() *RollbackDeploymentParams { + if x, ok := x.GetAction().(*KubeAction_RollbackDeployment); ok { + return x.RollbackDeployment + } + return nil +} + type isKubeAction_Action interface { isKubeAction_Action() } @@ -205,12 +213,18 @@ type KubeAction_PatchDeployment struct { PatchDeployment *PatchDeploymentParams `protobuf:"bytes,12,opt,name=patch_deployment,json=patchDeployment,proto3,oneof"` } +type KubeAction_RollbackDeployment struct { + RollbackDeployment *RollbackDeploymentParams `protobuf:"bytes,13,opt,name=rollback_deployment,json=rollbackDeployment,proto3,oneof"` +} + func (*KubeAction_DeletePod) isKubeAction_Action() {} func (*KubeAction_RestartDeployment) isKubeAction_Action() {} func (*KubeAction_PatchDeployment) isKubeAction_Action() {} +func (*KubeAction_RollbackDeployment) isKubeAction_Action() {} + // DeletePodParams contains parameters for the delete_pod action. // Deletes a pod from the cluster with an optional grace period. type DeletePodParams struct { @@ -373,6 +387,57 @@ func (x *PatchDeploymentParams) GetPatchStrategy() string { return "" } +// RollbackDeploymentParams contains parameters for the rollback_deployment action. +// Rolls back a deployment by reverting to a previous replicaset. +type RollbackDeploymentParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // TargetRevision is the revision number of the ReplicaSet to roll back to. + // If not specified, rolls back to the previous revision. + TargetRevision *int64 `protobuf:"varint,1,opt,name=target_revision,json=targetRevision,proto3,oneof" json:"target_revision,omitempty"` +} + +func (x *RollbackDeploymentParams) Reset() { + *x = RollbackDeploymentParams{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RollbackDeploymentParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RollbackDeploymentParams) ProtoMessage() {} + +func (x *RollbackDeploymentParams) ProtoReflect() protoreflect.Message { + mi := &file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RollbackDeploymentParams.ProtoReflect.Descriptor instead. +func (*RollbackDeploymentParams) Descriptor() ([]byte, []int) { + return file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_rawDescGZIP(), []int{5} +} + +func (x *RollbackDeploymentParams) GetTargetRevision() int64 { + if x != nil && x.TargetRevision != nil { + return *x.TargetRevision + } + return 0 +} + // KubeResource represents a Kubernetes resource to act on type KubeResource struct { state protoimpl.MessageState @@ -389,7 +454,7 @@ type KubeResource struct { func (x *KubeResource) Reset() { *x = KubeResource{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[5] + mi := &file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -402,7 +467,7 @@ func (x *KubeResource) String() string { func (*KubeResource) ProtoMessage() {} func (x *KubeResource) ProtoReflect() protoreflect.Message { - mi := &file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[5] + mi := &file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -415,7 +480,7 @@ func (x *KubeResource) ProtoReflect() protoreflect.Message { // Deprecated: Use KubeResource.ProtoReflect.Descriptor instead. func (*KubeResource) Descriptor() ([]byte, []int) { - return file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_rawDescGZIP(), []int{5} + return file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_rawDescGZIP(), []int{6} } func (x *KubeResource) GetApiVersion() string { @@ -471,7 +536,7 @@ type KubeActionResult struct { func (x *KubeActionResult) Reset() { *x = KubeActionResult{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[6] + mi := &file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -484,7 +549,7 @@ func (x *KubeActionResult) String() string { func (*KubeActionResult) ProtoMessage() {} func (x *KubeActionResult) ProtoReflect() protoreflect.Message { - mi := &file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[6] + mi := &file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -497,7 +562,7 @@ func (x *KubeActionResult) ProtoReflect() protoreflect.Message { // Deprecated: Use KubeActionResult.ProtoReflect.Descriptor instead. func (*KubeActionResult) Descriptor() ([]byte, []int) { - return file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_rawDescGZIP(), []int{6} + return file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_rawDescGZIP(), []int{7} } func (x *KubeActionResult) GetActionId() string { @@ -564,7 +629,7 @@ var file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto 0x64, 0x6f, 0x67, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x05, 0xba, 0x46, 0x02, 0x20, - 0x01, 0x22, 0xf1, 0x03, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x01, 0x22, 0xd3, 0x04, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x52, 0x65, 0x73, @@ -594,55 +659,68 @@ var file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto 0x6b, 0x75, 0x62, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x05, 0xba, 0x46, 0x02, 0x20, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x68, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, - 0x6f, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x14, 0x67, 0x72, 0x61, 0x63, - 0x65, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x12, 0x67, 0x72, 0x61, 0x63, 0x65, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, 0x01, 0x3a, - 0x05, 0xba, 0x46, 0x02, 0x20, 0x01, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x67, 0x72, 0x61, 0x63, 0x65, - 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, - 0x20, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x05, 0xba, 0x46, 0x02, 0x20, - 0x01, 0x22, 0x73, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x22, 0xb9, 0x01, 0x0a, 0x0c, 0x4b, 0x75, 0x62, 0x65, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, - 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6b, - 0x69, 0x6e, 0x64, 0x12, 0x23, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, - 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x3a, 0x05, 0xba, 0x46, 0x02, - 0x20, 0x01, 0x22, 0xfe, 0x01, 0x0a, 0x10, 0x4b, 0x75, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x22, 0x0a, 0x09, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, - 0x01, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x05, 0xaa, 0x46, - 0x02, 0x10, 0x01, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0b, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3b, 0x0a, - 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x3a, 0x07, 0xba, 0x46, 0x04, 0x08, - 0x01, 0x20, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x44, 0x6f, 0x67, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2d, - 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x76, 0x35, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x60, 0x0a, 0x13, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, + 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x6b, 0x75, 0x62, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x48, 0x00, 0x52, 0x12, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x05, 0xba, 0x46, 0x02, 0x20, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x68, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x50, 0x6f, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x14, 0x67, 0x72, + 0x61, 0x63, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x12, 0x67, 0x72, 0x61, 0x63, + 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, + 0x01, 0x3a, 0x05, 0xba, 0x46, 0x02, 0x20, 0x01, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x67, 0x72, 0x61, + 0x63, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, + 0x73, 0x22, 0x20, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x05, 0xba, 0x46, + 0x02, 0x20, 0x01, 0x22, 0x73, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x33, 0x0a, 0x05, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x22, 0x63, 0x0a, 0x18, 0x52, 0x6f, 0x6c, 0x6c, + 0x62, 0x61, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2c, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, + 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, + 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x88, + 0x01, 0x01, 0x3a, 0x05, 0xba, 0x46, 0x02, 0x20, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x01, + 0x0a, 0x0c, 0x4b, 0x75, 0x62, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x19, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, + 0x46, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x23, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, + 0x46, 0x02, 0x10, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x19, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, + 0x46, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0b, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x49, 0x64, 0x3a, 0x05, 0xba, 0x46, 0x02, 0x20, 0x01, 0x22, 0xfe, 0x01, 0x0a, 0x10, 0x4b, 0x75, + 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x22, + 0x0a, 0x09, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, 0x46, 0x02, 0x10, 0x01, 0x52, + 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xaa, 0x46, 0x02, + 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x3a, 0x07, 0xba, 0x46, 0x04, 0x08, 0x01, 0x20, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x44, 0x6f, 0x67, + 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x76, + 0x35, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -657,32 +735,34 @@ func file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_prot return file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_rawDescData } -var file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_goTypes = []interface{}{ - (*KubeActionsList)(nil), // 0: datadog.kubeactions.KubeActionsList - (*KubeAction)(nil), // 1: datadog.kubeactions.KubeAction - (*DeletePodParams)(nil), // 2: datadog.kubeactions.DeletePodParams - (*RestartDeploymentParams)(nil), // 3: datadog.kubeactions.RestartDeploymentParams - (*PatchDeploymentParams)(nil), // 4: datadog.kubeactions.PatchDeploymentParams - (*KubeResource)(nil), // 5: datadog.kubeactions.KubeResource - (*KubeActionResult)(nil), // 6: datadog.kubeactions.KubeActionResult - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp - (*structpb.Value)(nil), // 8: google.protobuf.Value + (*KubeActionsList)(nil), // 0: datadog.kubeactions.KubeActionsList + (*KubeAction)(nil), // 1: datadog.kubeactions.KubeAction + (*DeletePodParams)(nil), // 2: datadog.kubeactions.DeletePodParams + (*RestartDeploymentParams)(nil), // 3: datadog.kubeactions.RestartDeploymentParams + (*PatchDeploymentParams)(nil), // 4: datadog.kubeactions.PatchDeploymentParams + (*RollbackDeploymentParams)(nil), // 5: datadog.kubeactions.RollbackDeploymentParams + (*KubeResource)(nil), // 6: datadog.kubeactions.KubeResource + (*KubeActionResult)(nil), // 7: datadog.kubeactions.KubeActionResult + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp + (*structpb.Value)(nil), // 9: google.protobuf.Value } var file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_depIdxs = []int32{ 1, // 0: datadog.kubeactions.KubeActionsList.actions:type_name -> datadog.kubeactions.KubeAction - 5, // 1: datadog.kubeactions.KubeAction.resource:type_name -> datadog.kubeactions.KubeResource - 7, // 2: datadog.kubeactions.KubeAction.timestamp:type_name -> google.protobuf.Timestamp + 6, // 1: datadog.kubeactions.KubeAction.resource:type_name -> datadog.kubeactions.KubeResource + 8, // 2: datadog.kubeactions.KubeAction.timestamp:type_name -> google.protobuf.Timestamp 2, // 3: datadog.kubeactions.KubeAction.delete_pod:type_name -> datadog.kubeactions.DeletePodParams 3, // 4: datadog.kubeactions.KubeAction.restart_deployment:type_name -> datadog.kubeactions.RestartDeploymentParams 4, // 5: datadog.kubeactions.KubeAction.patch_deployment:type_name -> datadog.kubeactions.PatchDeploymentParams - 8, // 6: datadog.kubeactions.PatchDeploymentParams.patch:type_name -> google.protobuf.Value - 7, // 7: datadog.kubeactions.KubeActionResult.executed_at:type_name -> google.protobuf.Timestamp - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 5, // 6: datadog.kubeactions.KubeAction.rollback_deployment:type_name -> datadog.kubeactions.RollbackDeploymentParams + 9, // 7: datadog.kubeactions.PatchDeploymentParams.patch:type_name -> google.protobuf.Value + 8, // 8: datadog.kubeactions.KubeActionResult.executed_at:type_name -> google.protobuf.Timestamp + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_init() } @@ -752,7 +832,7 @@ func file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_prot } } file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KubeResource); i { + switch v := v.(*RollbackDeploymentParams); i { case 0: return &v.state case 1: @@ -764,6 +844,18 @@ func file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_prot } } file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KubeResource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*KubeActionResult); i { case 0: return &v.state @@ -780,15 +872,17 @@ func file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_prot (*KubeAction_DeletePod)(nil), (*KubeAction_RestartDeployment)(nil), (*KubeAction_PatchDeployment)(nil), + (*KubeAction_RollbackDeployment)(nil), } file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[5].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/kubeactions/kubeactions.proto b/proto/kubeactions/kubeactions.proto index 74d5eb21..b4927385 100644 --- a/proto/kubeactions/kubeactions.proto +++ b/proto/kubeactions/kubeactions.proto @@ -42,9 +42,10 @@ message KubeAction { DeletePodParams delete_pod = 10; RestartDeploymentParams restart_deployment = 11; PatchDeploymentParams patch_deployment = 12; + RollbackDeploymentParams rollback_deployment = 13; // Future actions can be added here: - // DrainNodeParams drain_node = 13; - // CordonNodeParams cordon_node = 14; + // DrainNodeParams drain_node = 14; + // CordonNodeParams cordon_node = 15; } } @@ -87,6 +88,16 @@ message PatchDeploymentParams { string patch_strategy = 2; } +// RollbackDeploymentParams contains parameters for the rollback_deployment action. +// Rolls back a deployment by reverting to a previous replicaset. +message RollbackDeploymentParams { + option (protoc.gen.jsonschema.message_options).disallow_additional_properties = true; + + // TargetRevision is the revision number of the ReplicaSet to roll back to. + // If not specified, rolls back to the previous revision. + optional int64 target_revision = 1; +} + // KubeResource represents a Kubernetes resource to act on message KubeResource { option (protoc.gen.jsonschema.message_options).disallow_additional_properties = true;