Skip to content

Commit cb1bec8

Browse files
authored
Add Cloud Deploy API name and IAM reference doc (#111)
* Add Cloud Deploy API name and IAM reference doc * Include permissions required for the automation service account
1 parent 1e0fed7 commit cb1bec8

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

skills/cloud-deploy-pipelines/SKILL.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ version: "0.1.0"
1111

1212
This skill encompasses the entire lifecycle of Cloud Deploy for a user, from designing and creating delivery pipelines to managing releases and debugging release failures.
1313

14+
**All** Workflows require the `clouddeploy.googleapis.com` API to be enabled.
15+
1416
## Workflow: Designing a Pipeline
1517

1618
This workflow provides steps for designing a Cloud Deploy `DeliveryPipeline`.
@@ -78,6 +80,12 @@ gcloud deploy apply --file=clouddeploy.yaml --region=<REGION> --project=<PROJECT
7880
2. Create a `skaffold.yaml` file required to create a Cloud Deploy `Release` for the `DeliveryPipeline`.
7981
- Use `references/configure-skaffold.md` as a reference when generating the `skaffold.yaml` file.
8082

83+
84+
### Step 7: Setup IAM permissions
85+
86+
Use `references/iam-permissions.md` as a reference to set up the necessary IAM permissions based on the `DeliveryPipeline` defined.
87+
88+
8189
## Workflow: Add Google Observability Alert Policy Analysis to a Pipeline
8290

8391
Cloud Deploy integrates with Google Cloud Observability to provide metrics analysis when deploying an application. When the application is deployed, Cloud Deploy will monitor alert policies defined in Google Cloud Observability for any incidents that were triggered after the application was deployed.
@@ -117,6 +125,10 @@ Run the following command to update the Cloud Deploy `DeliveryPipeline`:
117125
gcloud deploy apply --file=clouddeploy.yaml --region=<REGION> --project=<PROJECT_ID>
118126
```
119127

128+
### Step 4: Setup IAM permissions
129+
130+
Use `references/iam-permissions.md` as a reference to set up the necessary IAM permissions for analysis.
131+
120132
## Release Management
121133

122134
This section covers the various aspects of managing Cloud Deploy `Release` resources.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# IAM Permissions
2+
3+
This document provides insights into the IAM permissions required for Cloud Deploy to operate based on the features enabled for the `DeliveryPipeline`.
4+
5+
## Execution Service Account
6+
7+
**MUST KNOW**: The execution service account used by Cloud Deploy. This is either the default Compute Engine service account or a user-provided service account that was defined in the `Target`.
8+
9+
The execution service account **must always** have the following roles:
10+
* `roles/clouddeploy.jobRunner`
11+
* `roles/iam.serviceAccountUser`
12+
13+
### Runtime Permissions
14+
15+
If deploying to Cloud Run then `roles/run.developer` is **required**.
16+
17+
If deploying to GKE then `roles/container.developer` is **required**.
18+
19+
### Analysis Permissions (Google Cloud Observability)
20+
21+
The following roles are **required**:
22+
* `roles/monitoring.alertViewer`
23+
* `roles/serviceusage.serviceUsageConsumer`
24+
25+
## Automation Service Account
26+
27+
**MUST KNOW**: The service account defined in the `Automation` resources.
28+
29+
The `Automation` service account **requires** the `roles/clouddeploy.operator` role.
30+
31+
## Release Creator
32+
33+
The user or service account that creates a `Release` and `Rollout` **must** have:
34+
* `roles/clouddeploy.releaser`
35+
* `roles/iam.serviceAccountUser`

0 commit comments

Comments
 (0)