Skip to content

Commit 80460eb

Browse files
Google APIscopybara-github
authored andcommitted
feat!: added new fields for the Automation Repair rule
feat: added route destination related fields to Gateway service mesh message PiperOrigin-RevId: 690680962
1 parent 8949e17 commit 80460eb

1 file changed

Lines changed: 109 additions & 0 deletions

File tree

google/cloud/deploy/v1/cloud_deploy.proto

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,23 @@ message CustomCanaryDeployment {
785785
message KubernetesConfig {
786786
// Information about the Kubernetes Gateway API service mesh configuration.
787787
message GatewayServiceMesh {
788+
// Information about route destinations for the Gateway API service mesh.
789+
message RouteDestinations {
790+
// Required. The clusters where the Gateway API HTTPRoute resource will be
791+
// deployed to. Valid entries include the associated entities IDs
792+
// configured in the Target resource and "@self" to include the Target
793+
// cluster.
794+
repeated string destination_ids = 1
795+
[(google.api.field_behavior) = REQUIRED];
796+
797+
// Optional. Whether to propagate the Kubernetes Service to the route
798+
// destination clusters. The Service will always be deployed to the Target
799+
// cluster even if the HTTPRoute is not. This option may be used to
800+
// facilitiate successful DNS lookup in the route destination clusters.
801+
// Can only be set to true if destinations are specified.
802+
bool propagate_service = 2 [(google.api.field_behavior) = OPTIONAL];
803+
}
804+
788805
// Required. Name of the Gateway API HTTPRoute.
789806
string http_route = 1 [(google.api.field_behavior) = REQUIRED];
790807

@@ -811,6 +828,14 @@ message KubernetesConfig {
811828
// Optional. The label to use when selecting Pods for the Deployment and
812829
// Service resources. This label must already be present in both resources.
813830
string pod_selector_label = 6 [(google.api.field_behavior) = OPTIONAL];
831+
832+
// Optional. Route destinations allow configuring the Gateway API HTTPRoute
833+
// to be deployed to additional clusters. This option is available for
834+
// multi-cluster service mesh set ups that require the route to exist in the
835+
// clusters that call the service. If unspecified, the HTTPRoute will only
836+
// be deployed to the Target cluster.
837+
RouteDestinations route_destinations = 8
838+
[(google.api.field_behavior) = OPTIONAL];
814839
}
815840

816841
// Information about the Kubernetes Service networking configuration.
@@ -1247,6 +1272,17 @@ message Target {
12471272
CustomTarget custom_target = 21 [(google.api.field_behavior) = OPTIONAL];
12481273
}
12491274

1275+
// Optional. Map of entity IDs to their associated entities. Associated
1276+
// entities allows specifying places other than the deployment target for
1277+
// specific features. For example, the Gateway API canary can be configured to
1278+
// deploy the HTTPRoute to a different cluster(s) than the deployment cluster
1279+
// using associated entities. An entity ID must consist of lower-case letters,
1280+
// numbers, and hyphens, start with a letter and end with a letter or a
1281+
// number, and have a max length of 63 characters. In other words, it must
1282+
// match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
1283+
map<string, AssociatedEntities> associated_entities = 23
1284+
[(google.api.field_behavior) = OPTIONAL];
1285+
12501286
// Optional. This checksum is computed by the server based on the value of
12511287
// other fields, and may be sent on update and delete requests to ensure the
12521288
// client has an up-to-date value before proceeding.
@@ -1442,6 +1478,16 @@ message CustomTarget {
14421478
];
14431479
}
14441480

1481+
// Information about entities associated with a `Target`.
1482+
message AssociatedEntities {
1483+
// Optional. Information specifying GKE clusters as associated entities.
1484+
repeated GkeCluster gke_clusters = 2 [(google.api.field_behavior) = OPTIONAL];
1485+
1486+
// Optional. Information specifying Anthos clusters as associated entities.
1487+
repeated AnthosCluster anthos_clusters = 3
1488+
[(google.api.field_behavior) = OPTIONAL];
1489+
}
1490+
14451491
// The request object for `ListTargets`.
14461492
message ListTargetsRequest {
14471493
// Required. The parent, which owns this collection of targets. Format must be
@@ -3000,6 +3046,10 @@ message Rollout {
30003046
// Output only. Names of `Rollouts` that rolled back this `Rollout`.
30013047
repeated string rolled_back_by_rollouts = 27
30023048
[(google.api.field_behavior) = OUTPUT_ONLY];
3049+
3050+
// Output only. The AutomationRun actively repairing the rollout.
3051+
string active_repair_automation_run = 28
3052+
[(google.api.field_behavior) = OUTPUT_ONLY];
30033053
}
30043054

30053055
// Metadata includes information associated with a `Rollout`.
@@ -4163,6 +4213,14 @@ message RepairRolloutRule {
41634213
// `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
41644214
string id = 1 [(google.api.field_behavior) = REQUIRED];
41654215

4216+
// Optional. Phases within which jobs are subject to automatic repair actions
4217+
// on failure. Proceeds only after phase name matched any one in the list, or
4218+
// for all phases if unspecified. This value must consist of lower-case
4219+
// letters, numbers, and hyphens, start with a letter and end with a letter or
4220+
// a number, and have a max length of 63 characters. In other words, it must
4221+
// match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
4222+
repeated string phases = 7 [(google.api.field_behavior) = OPTIONAL];
4223+
41664224
// Optional. Jobs to repair. Proceeds only after job name matched any one in
41674225
// the list, or for all jobs if unspecified or empty. The phase that includes
41684226
// the job must match the phase ID specified in `source_phase`. This value
@@ -4175,6 +4233,49 @@ message RepairRolloutRule {
41754233
// Output only. Information around the state of the 'Automation' rule.
41764234
AutomationRuleCondition condition = 6
41774235
[(google.api.field_behavior) = OUTPUT_ONLY];
4236+
4237+
// Required. Defines the types of automatic repair phases for failed jobs.
4238+
repeated RepairPhaseConfig repair_phases = 8
4239+
[(google.api.field_behavior) = REQUIRED];
4240+
}
4241+
4242+
// Configuration of the repair phase.
4243+
message RepairPhaseConfig {
4244+
// The repair phase to perform.
4245+
oneof repair_phase {
4246+
// Optional. Retries a failed job.
4247+
Retry retry = 1 [(google.api.field_behavior) = OPTIONAL];
4248+
4249+
// Optional. Rolls back a `Rollout`.
4250+
Rollback rollback = 2 [(google.api.field_behavior) = OPTIONAL];
4251+
}
4252+
}
4253+
4254+
// Retries the failed job.
4255+
message Retry {
4256+
// Required. Total number of retries. Retry is skipped if set to 0; The
4257+
// minimum value is 1, and the maximum value is 10.
4258+
int64 attempts = 1 [(google.api.field_behavior) = REQUIRED];
4259+
4260+
// Optional. How long to wait for the first retry. Default is 0, and the
4261+
// maximum value is 14d.
4262+
google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL];
4263+
4264+
// Optional. The pattern of how wait time will be increased. Default is
4265+
// linear. Backoff mode will be ignored if `wait` is 0.
4266+
BackoffMode backoff_mode = 3 [(google.api.field_behavior) = OPTIONAL];
4267+
}
4268+
4269+
// Rolls back a `Rollout`.
4270+
message Rollback {
4271+
// Optional. The starting phase ID for the `Rollout`. If unspecified, the
4272+
// `Rollout` will start in the stable phase.
4273+
string destination_phase = 1 [(google.api.field_behavior) = OPTIONAL];
4274+
4275+
// Optional. If pending rollout exists on the target, the rollback operation
4276+
// will be aborted.
4277+
bool disable_rollback_if_rollout_pending = 2
4278+
[(google.api.field_behavior) = OPTIONAL];
41784279
}
41794280

41804281
// `AutomationRuleCondition` contains conditions relevant to an
@@ -4506,6 +4607,10 @@ message RepairRolloutOperation {
45064607
// Output only. The name of the rollout that initiates the `AutomationRun`.
45074608
string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
45084609

4610+
// Output only. The index of the current repair action in the repair sequence.
4611+
int64 current_repair_phase_index = 6
4612+
[(google.api.field_behavior) = OUTPUT_ONLY];
4613+
45094614
// Output only. Records of the repair attempts. Each repair phase may have
45104615
// multiple retry attempts or single rollback attempt.
45114616
repeated RepairPhase repair_phases = 3
@@ -4575,6 +4680,10 @@ message RollbackAttempt {
45754680

45764681
// Output only. Description of the state of the Rollback.
45774682
string state_desc = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
4683+
4684+
// Output only. If active rollout exists on the target, abort this rollback.
4685+
bool disable_rollback_if_rollout_pending = 5
4686+
[(google.api.field_behavior) = OUTPUT_ONLY];
45784687
}
45794688

45804689
// The request object for `ListAutomationRuns`.

0 commit comments

Comments
 (0)