diff --git a/kubeactions/jsonschema/KubeAction.json b/kubeactions/jsonschema/KubeAction.json index 2f7497ab..456046a1 100644 --- a/kubeactions/jsonschema/KubeAction.json +++ b/kubeactions/jsonschema/KubeAction.json @@ -66,8 +66,11 @@ }, "get_resource": { "$ref": "#/definitions/GetResourceParams", - "additionalProperties": false, - "description": "Future actions can be added here: DrainNodeParams drain_node = 14; CordonNodeParams cordon_node = 15;" + "additionalProperties": false + }, + "rollback_deployment": { + "$ref": "#/definitions/RollbackDeploymentParams", + "additionalProperties": false } }, "additionalProperties": false, @@ -150,6 +153,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 261e6ef3..fa09b4d0 100644 --- a/kubeactions/jsonschema/KubeActionsList.json +++ b/kubeactions/jsonschema/KubeActionsList.json @@ -66,8 +66,11 @@ }, "get_resource": { "$ref": "#/definitions/GetResourceParams", - "additionalProperties": false, - "description": "Future actions can be added here: DrainNodeParams drain_node = 14; CordonNodeParams cordon_node = 15;" + "additionalProperties": false + }, + "rollback_deployment": { + "$ref": "#/definitions/RollbackDeploymentParams", + "additionalProperties": false } }, "additionalProperties": false, @@ -168,6 +171,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 7e9499c4..f14bdcf3 100644 --- a/kubeactions/kubeactions.pb.go +++ b/kubeactions/kubeactions.pb.go @@ -99,6 +99,7 @@ type KubeAction struct { // *KubeAction_RestartDeployment // *KubeAction_PatchDeployment // *KubeAction_GetResource_ + // *KubeAction_RollbackDeployment Action isKubeAction_Action `protobuf_oneof:"action"` } @@ -197,6 +198,13 @@ func (x *KubeAction) GetGetResource_() *GetResourceParams { 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() } @@ -217,6 +225,10 @@ type KubeAction_GetResource_ struct { GetResource_ *GetResourceParams `protobuf:"bytes,13,opt,name=get_resource,json=getResource,proto3,oneof"` } +type KubeAction_RollbackDeployment struct { + RollbackDeployment *RollbackDeploymentParams `protobuf:"bytes,14,opt,name=rollback_deployment,json=rollbackDeployment,proto3,oneof"` +} + func (*KubeAction_DeletePod) isKubeAction_Action() {} func (*KubeAction_RestartDeployment) isKubeAction_Action() {} @@ -225,6 +237,8 @@ func (*KubeAction_PatchDeployment) isKubeAction_Action() {} func (*KubeAction_GetResource_) 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 { @@ -442,6 +456,57 @@ func (x *GetResourceParams) GetOutputFormat() 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[6] + 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[6] + 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{6} +} + +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 @@ -458,7 +523,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[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) } @@ -471,7 +536,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[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 { @@ -484,7 +549,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{6} + return file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_rawDescGZIP(), []int{7} } func (x *KubeResource) GetApiVersion() string { @@ -540,7 +605,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[7] + mi := &file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -553,7 +618,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[7] + mi := &file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -566,7 +631,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{7} + return file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_rawDescGZIP(), []int{8} } func (x *KubeActionResult) GetActionId() string { @@ -633,7 +698,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, 0xbe, 0x04, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x01, 0x22, 0xa0, 0x05, 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, @@ -668,59 +733,72 @@ var file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 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, 0x3f, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x3a, 0x05, 0xba, - 0x46, 0x02, 0x20, 0x01, 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, + 0x65, 0x12, 0x60, 0x0a, 0x13, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0e, 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, 0x3f, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x3a, + 0x05, 0xba, 0x46, 0x02, 0x20, 0x01, 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 ( @@ -735,34 +813,36 @@ 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, 8) +var file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_msgTypes = make([]protoimpl.MessageInfo, 9) 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 - (*GetResourceParams)(nil), // 5: datadog.kubeactions.GetResourceParams - (*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 + (*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 + (*GetResourceParams)(nil), // 5: datadog.kubeactions.GetResourceParams + (*RollbackDeploymentParams)(nil), // 6: datadog.kubeactions.RollbackDeploymentParams + (*KubeResource)(nil), // 7: datadog.kubeactions.KubeResource + (*KubeActionResult)(nil), // 8: datadog.kubeactions.KubeActionResult + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*structpb.Value)(nil), // 10: 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 - 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 - 5, // 6: datadog.kubeactions.KubeAction.get_resource:type_name -> datadog.kubeactions.GetResourceParams - 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 + 1, // 0: datadog.kubeactions.KubeActionsList.actions:type_name -> datadog.kubeactions.KubeAction + 7, // 1: datadog.kubeactions.KubeAction.resource:type_name -> datadog.kubeactions.KubeResource + 9, // 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 + 5, // 6: datadog.kubeactions.KubeAction.get_resource:type_name -> datadog.kubeactions.GetResourceParams + 6, // 7: datadog.kubeactions.KubeAction.rollback_deployment:type_name -> datadog.kubeactions.RollbackDeploymentParams + 10, // 8: datadog.kubeactions.PatchDeploymentParams.patch:type_name -> google.protobuf.Value + 9, // 9: datadog.kubeactions.KubeActionResult.executed_at:type_name -> google.protobuf.Timestamp + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_proto_init() } @@ -844,7 +924,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[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KubeResource); i { + switch v := v.(*RollbackDeploymentParams); i { case 0: return &v.state case 1: @@ -856,6 +936,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[7].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[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*KubeActionResult); i { case 0: return &v.state @@ -873,15 +965,17 @@ func file_github_com_DataDog_agent_payload_v5_proto_kubeactions_kubeactions_prot (*KubeAction_RestartDeployment)(nil), (*KubeAction_PatchDeployment)(nil), (*KubeAction_GetResource_)(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[6].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: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/kubeactions/kubeactions.proto b/proto/kubeactions/kubeactions.proto index e995c16a..ff1c5ac9 100644 --- a/proto/kubeactions/kubeactions.proto +++ b/proto/kubeactions/kubeactions.proto @@ -43,9 +43,7 @@ message KubeAction { RestartDeploymentParams restart_deployment = 11; PatchDeploymentParams patch_deployment = 12; GetResourceParams get_resource = 13; - // Future actions can be added here: - // DrainNodeParams drain_node = 14; - // CordonNodeParams cordon_node = 15; + RollbackDeploymentParams rollback_deployment = 14; } } @@ -100,6 +98,16 @@ message GetResourceParams { string output_format = 1; } +// 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;