|
| 1 | +# Copyright 2025 Google Inc. |
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | +# you may not use this file except in compliance with the License. |
| 4 | +# You may obtain a copy of the License at |
| 5 | +# |
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | + |
| 14 | +--- |
| 15 | +name: RolloutKind |
| 16 | +description: A RolloutKind is a reusable configuration resource that defines the policies, strategies, and targeting for Rollout operations. It acts as a template for repeatable Rollouts, providing guardrails and ensuring that updates are executed in a consistent manner across a fleet of Units. |
| 17 | +base_url: projects/{{project}}/locations/{{location}}/rolloutKinds |
| 18 | +update_mask: true |
| 19 | +self_link: projects/{{project}}/locations/{{location}}/rolloutKinds/{{rollout_kind_id}} |
| 20 | +create_url: projects/{{project}}/locations/{{location}}/rolloutKinds?rolloutKindId={{rollout_kind_id}} |
| 21 | +update_verb: PATCH |
| 22 | +id_format: projects/{{project}}/locations/{{location}}/rolloutKinds/{{rollout_kind_id}} |
| 23 | +import_format: |
| 24 | + - projects/{{project}}/locations/{{location}}/rolloutKinds/{{rollout_kind_id}} |
| 25 | +min_version: beta |
| 26 | +examples: |
| 27 | + - name: saas_runtime_rollout_kind_basic |
| 28 | + primary_resource_id: "example" |
| 29 | + min_version: "beta" |
| 30 | + vars: |
| 31 | + saas_name: example-saas |
| 32 | + unitkind_name: example-unitkind |
| 33 | + rolloutkind_name: example-rolloutkind |
| 34 | + bootstrap_iam: |
| 35 | + - member: "serviceAccount:service-{project_number}@gcp-sa-saasservicemgmt.iam.gserviceaccount.com" |
| 36 | + role: "roles/saasservicemgmt.serviceAgent" |
| 37 | +autogen_async: false |
| 38 | +autogen_status: Um9sbG91dEtpbmQ= |
| 39 | +parameters: |
| 40 | + - name: location |
| 41 | + type: String |
| 42 | + description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. |
| 43 | + immutable: true |
| 44 | + url_param_only: true |
| 45 | + required: true |
| 46 | + - name: rolloutKindId |
| 47 | + type: String |
| 48 | + description: The ID value for the new rollout kind. |
| 49 | + immutable: true |
| 50 | + url_param_only: true |
| 51 | + required: true |
| 52 | +properties: |
| 53 | + - name: annotations |
| 54 | + type: KeyValueAnnotations |
| 55 | + description: |- |
| 56 | + Annotations is an unstructured key-value map stored with a resource that |
| 57 | + may be set by external tools to store and retrieve arbitrary metadata. |
| 58 | + They are not queryable and should be preserved when modifying objects. |
| 59 | +
|
| 60 | + More info: https://kubernetes.io/docs/user-guide/annotations |
| 61 | + - name: createTime |
| 62 | + type: String |
| 63 | + description: The timestamp when the resource was created. |
| 64 | + output: true |
| 65 | + - name: errorBudget |
| 66 | + type: NestedObject |
| 67 | + description: |- |
| 68 | + The configuration for error budget. If the number of failed units exceeds |
| 69 | + max(allowed_count, allowed_ratio * total_units), the rollout will be paused. |
| 70 | + properties: |
| 71 | + - name: allowedCount |
| 72 | + type: Integer |
| 73 | + description: |- |
| 74 | + The maximum number of failed units allowed in a location without pausing |
| 75 | + the rollout. |
| 76 | + - name: allowedPercentage |
| 77 | + type: Integer |
| 78 | + description: |- |
| 79 | + The maximum percentage of units allowed to fail (0, 100] within a location |
| 80 | + without pausing the rollout. |
| 81 | + - name: labels |
| 82 | + type: KeyValueLabels |
| 83 | + description: |- |
| 84 | + The labels on the resource, which can be used for categorization. |
| 85 | + similar to Kubernetes resource labels. |
| 86 | + - name: name |
| 87 | + type: String |
| 88 | + description: |- |
| 89 | + Identifier. The resource name (full URI of the resource) following the standard naming |
| 90 | + scheme: |
| 91 | +
|
| 92 | + "projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}" |
| 93 | + output: true |
| 94 | + - name: rolloutOrchestrationStrategy |
| 95 | + type: String |
| 96 | + description: |- |
| 97 | + The strategy used for executing a Rollout. This is a required field. |
| 98 | +
|
| 99 | + There are two supported values strategies which are used to control a rollout. |
| 100 | + - "Google.Cloud.Simple.AllAtOnce" |
| 101 | + - "Google.Cloud.Simple.OneLocationAtATime" |
| 102 | +
|
| 103 | + A rollout with one of these simple strategies will rollout across |
| 104 | + all locations defined in the associated UnitKind's Saas Locations. |
| 105 | + - name: uid |
| 106 | + type: String |
| 107 | + description: |- |
| 108 | + The unique identifier of the resource. UID is unique in the time |
| 109 | + and space for this resource within the scope of the service. It is |
| 110 | + typically generated by the server on successful creation of a resource |
| 111 | + and must not be changed. UID is used to uniquely identify resources |
| 112 | + with resource name reuses. This should be a UUID4. |
| 113 | + output: true |
| 114 | + - name: unitFilter |
| 115 | + type: String |
| 116 | + description: |- |
| 117 | + CEL(https://github.com/google/cel-spec) formatted filter string against |
| 118 | + Unit. The filter will be applied to determine the eligible unit population. |
| 119 | + This filter can only reduce, but not expand the scope of the rollout. |
| 120 | + - name: unitKind |
| 121 | + type: String |
| 122 | + description: |- |
| 123 | + UnitKind that this rollout kind corresponds to. Rollouts stemming from this |
| 124 | + rollout kind will target the units of this unit kind. In other words, this |
| 125 | + defines the population of target units to be upgraded by rollouts. |
| 126 | + immutable: true |
| 127 | + required: true |
| 128 | + - name: updateTime |
| 129 | + type: String |
| 130 | + description: |- |
| 131 | + The timestamp when the resource was last updated. Any |
| 132 | + change to the resource made by users must refresh this value. |
| 133 | + Changes to a resource made by the service should refresh this value. |
| 134 | + output: true |
| 135 | + - name: updateUnitKindStrategy |
| 136 | + type: Enum |
| 137 | + description: |- |
| 138 | + The config for updating the unit kind. By default, the unit kind will be |
| 139 | + updated on the rollout start. |
| 140 | + Possible values: |
| 141 | + UPDATE_UNIT_KIND_STRATEGY_ON_START |
| 142 | + UPDATE_UNIT_KIND_STRATEGY_NEVER |
| 143 | + enum_values: |
| 144 | + - "UPDATE_UNIT_KIND_STRATEGY_ON_START" |
| 145 | + - "UPDATE_UNIT_KIND_STRATEGY_NEVER" |
0 commit comments