You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// No Upgrade in 4.10 but this should work exactly the same as AWS STS does.
122
120
[id="gcp-workload-identity-mode-upgrading"]
123
121
== Upgrading an {product-title} cluster configured for manual mode with GCP Workload Identity
124
122
125
123
The release image for the version of {product-title} that you are upgrading to contains a version of the `ccoctl` binary and list of `CredentialsRequest` objects specific to that release.
Copy file name to clipboardExpand all lines: modules/cco-ccoctl-creating-individually.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ where:
75
75
2021/04/13 11:16:18 Identity Provider created with ARN: arn:aws:iam::<aws_account_id>:oidc-provider/<name>-oidc.s3.<aws_region>.amazonaws.com
76
76
----
77
77
+
78
-
where `02-openid-configuration` is a discovery document and `03-keys.json` is a JSON web key set file.
78
+
where `openid-configuration` is a discovery document and `keys.json` is a JSON web key set file.
79
79
+
80
80
This command also creates a YAML configuration file in `/<path_to_ccoctl_output_dir>/manifests/cluster-authentication-02-config.yaml`. This file sets the issuer URL field for the service account tokens that the cluster generates, so that the AWS IAM identity provider trusts the tokens.
= Updating AWS resources with the Cloud Credential Operator utility
15
+
= Updating cloud provider resources with the Cloud Credential Operator utility
17
16
18
-
The process for upgrading an {product-title} cluster configured for manual mode with AWS Secure Token Service (STS) is similar to installing on a cluster for which you create the AWS resources individually.
17
+
The process for upgrading an {product-title} cluster configured for
18
+
ifdef::aws-sts[manual mode with STS]
19
+
ifdef::google-cloud-platform[manual mode with GCP Workload Identity]
20
+
is similar to creating the cloud provider resources during installation.
19
21
20
22
[NOTE]
21
23
====
22
24
By default, `ccoctl` creates objects in the directory in which the commands are run. To create the objects in a different directory, use the `--output-dir` flag. This procedure uses `<path_to_ccoctl_output_dir>` to refer to this directory.
25
+
ifdef::aws-sts[]
23
26
24
27
Some `ccoctl` commands make AWS API calls to create or modify AWS resources. You can use the `--dry-run` flag to avoid making API calls. Using this flag creates JSON files on the local file system instead. You can review and modify the JSON files and then apply them with the AWS CLI tool using the `--cli-input-json` parameters.
25
-
====
26
28
endif::aws-sts[]
27
-
ifdef::google-cloud-platform[]
28
-
= Updating GCP resources with the Cloud Credential Operator utility
29
-
30
-
The process for upgrading an {product-title} cluster configured for manual mode with GCP Workload Identity is similar to installing on a cluster for which you create the GCP resources individually.
31
-
32
-
[NOTE]
33
29
====
34
-
By default, `ccoctl` creates objects in the directory in which the commands are run. To create the objects in a different directory, use the `--output-dir` flag. This procedure uses `<path_to_ccoctl_output_dir>` to refer to this directory.
35
-
36
-
Some `ccoctl` commands make GCP API calls to create or modify GCP resources. You can use the `--dry-run` flag to avoid making API calls. Using this flag creates bash scripts with Google Cloud CLI commands on the local file system instead. You can review and modify the bash scripts and then run them to create the required GCP resources.
. For each `CredentialsRequest` CR in the release image, ensure that a namespace that matches the text in the `spec.secretRef.namespace` field exists in the cluster. This field is where the generated secrets that hold the credentials configuration are stored.
<1> This field indicates the namespace which needs to exist to hold the generated secret.
87
108
88
-
. For any `CredentialsRequest` CR for which the cluster does not already have a namespace with the name specified in `spec.secretRef.namespace`, create the namespace:
109
+
. For any `CredentialsRequest` CR for which the cluster does not already have a namespace with the name specified in `spec.secretRef.namespace`, create the namespace by running the following command:
89
110
+
90
-
[source,terminal,subs="+quotes"]
111
+
[source,terminal]
91
112
----
92
113
$ oc create namespace <component_namespace>
93
114
----
94
115
95
-
. Use the `ccoctl` tool to process all `CredentialsRequest` objects in the `credrequests` directory:
116
+
. Use the `ccoctl` tool to process all `CredentialsRequest` objects in the `credrequests` directory by running the following command:
**`<name>` is the name used to tag any cloud resources that are created for tracking. For upgrades, use the same value that was used for the initial installation.
110
132
**`<aws_account_id>` is the AWS account ID.
111
133
**`<aws_region>` is the AWS region in which cloud resources will be created.
134
+
**`<aws_account_id>`, `<cluster_name>`, and `<aws_region>` are standard elements of the Amazon Resource Name (ARN) for your cluster, provided here to illustrate the format of an ARN. You can obtain the ARN for your cluster's identity provider from the *Identity Providers* menu in the link:https://console.aws.amazon.com/iam/[AWS IAM console].
112
135
--
113
136
+
114
137
[NOTE]
@@ -117,10 +140,38 @@ For AWS environments that use alternative IAM API endpoints, such as GovCloud, y
117
140
118
141
If your cluster uses Technology Preview features that are enabled by the `TechPreviewNoUpgrade` feature set, you must include the `--enable-tech-preview` parameter.
**`<path_to_directory_with_list_of_credentials_requests>/credrequests` is the directory containing the files of `CredentialsRequest` manifests to create GCP service accounts.
159
+
**`<name>` is the user-defined name for all created GCP resources used for tracking.
160
+
**`<gcp_project_id>` is the GCP project ID in which cloud resources will be created.
161
+
--
162
+
+
163
+
[NOTE]
164
+
====
165
+
If your cluster uses Technology Preview features that are enabled by the `TechPreviewNoUpgrade` feature set, you must include the `--enable-tech-preview` parameter.
166
+
====
167
+
endif::google-cloud-platform[]
120
168
+
121
-
For each `CredentialsRequest` object, `ccoctl` creates an IAM role with a trust policy that is tied to the specified OIDC identity provider, and a permissions policy as defined in each `CredentialsRequest` object from the {product-title} release image.
169
+
For each `CredentialsRequest` object, `ccoctl` creates
170
+
ifdef::aws-sts[an IAM role with a trust policy that is tied to the specified OIDC identity provider,]
171
+
ifdef::google-cloud-platform[a service account]
172
+
and a permissions policy as defined in each `CredentialsRequest` object from the {product-title} release image.
122
173
123
-
. Apply the secrets to your cluster:
174
+
. Apply the secrets to your cluster by running the following command:
124
175
+
125
176
[source,terminal]
126
177
----
@@ -129,11 +180,22 @@ $ ls <path_to_ccoctl_output_dir>/manifests/*-credentials.yaml | xargs -I{} oc ap
129
180
130
181
.Verification
131
182
132
-
You can verify that the IAM roles are created by querying AWS. For more information, refer to AWS documentation on listing IAM roles.
0 commit comments