Skip to content

Commit 4ad9c63

Browse files
authored
Merge pull request #45998 from jeana-redhat/BZ2061567-vsphere-cred-rotation
[BZ2061567]: Add vSphere cred rotation procedure
2 parents 6c67036 + 200feeb commit 4ad9c63

File tree

3 files changed

+57
-12
lines changed

3 files changed

+57
-12
lines changed

authentication/managing_cloud_provider_credentials/cco-mode-passthrough.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ If `CredentialsRequest` CRs change over time as the cluster is upgraded, you mus
9797
//Rotating cloud provider credentials manually
9898
include::modules/manually-rotating-cloud-creds.adoc[leveloffset=+2]
9999

100+
[role="_additional-resources"]
101+
.Additional resources
102+
* xref:../../storage/container_storage_interface/persistent-storage-csi-vsphere.adoc[vSphere CSI Driver Operator]
103+
100104
[id="passthrough-mode-reduce-permissions"]
101105
== Reducing permissions after installation
102106
When using passthrough mode, each component has the same permissions used by all other components. If you do not reduce the permissions after installing, all components have the broad permissions that are required to run the installer.

modules/manually-rotating-cloud-creds.adoc

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// * authentication/managing_cloud_provider_credentials/cco-mode-mint.adoc
55
// * authentication/managing_cloud_provider_credentials/cco-mode-passthrough.adoc
66

7+
ifeval::["{context}" == "post-install-cluster-tasks"]
8+
:post-install:
9+
endif::[]
710
ifeval::["{context}" == "cco-mode-mint"]
811
:mint:
912
endif::[]
@@ -71,9 +74,10 @@ ifndef::mint[]
7174
|{rh-virtualization}
7275
|`ovirt-credentials`
7376

74-
|vSphere
77+
|VMware vSphere
7578
|`vsphere-creds`
7679
endif::mint[]
80+
7781
|===
7882

7983
. Click the *Options* menu {kebab} in the same row as the secret and select *Edit Secret*.
@@ -82,8 +86,39 @@ endif::mint[]
8286

8387
. Update the text in the *Value* field or fields with the new authentication information for your cloud provider, and then click *Save*.
8488

89+
ifndef::mint[]
90+
. If you are updating the credentials for a vSphere cluster that does not have the vSphere CSI Driver Operator enabled, you must force a rollout of the Kubernetes controller manager to apply the updated credentials.
91+
+
92+
[NOTE]
93+
====
94+
If the vSphere CSI Driver Operator is enabled, this step is not required.
95+
====
96+
+
97+
To apply the updated vSphere credentials, log in to the {product-title} CLI as a user with the `cluster-admin` role and run the following command:
98+
+
99+
[source,terminal]
100+
----
101+
$ oc patch kubecontrollermanager cluster \
102+
-p='{"spec": {"forceRedeploymentReason": "recovery-'"$( date )"'"}}' \
103+
--type=merge
104+
----
105+
+
106+
While the credentials are rolling out, the status of the Kubernetes Controller Manager Operator reports `Progressing=true`. To view the status, run the following command:
107+
+
108+
[source,terminal]
109+
----
110+
$ oc get co kube-controller-manager
111+
----
112+
endif::mint[]
113+
114+
ifdef::post-install[]
85115
. If the CCO for your cluster is configured to use mint mode, delete each component secret that is referenced by the individual `CredentialsRequest` objects.
116+
endif::post-install[]
117+
ifdef::mint[]
118+
. Delete each component secret that is referenced by the individual `CredentialsRequest` objects.
119+
endif::mint[]
86120

121+
ifndef::passthrough[]
87122
.. Log in to the {product-title} CLI as a user with the `cluster-admin` role.
88123

89124
.. Get the names and namespaces of all referenced component secrets:
@@ -98,15 +133,7 @@ where `<provider_spec>` is the corresponding value for your cloud provider:
98133
+
99134
--
100135
* AWS: `AWSProviderSpec`
101-
ifndef::mint[]
102-
* Azure: `AzureProviderSpec`
103-
endif::mint[]
104136
* GCP: `GCPProviderSpec`
105-
ifndef::mint[]
106-
* {rh-openstack}: `OpenStackProviderSpec`
107-
* {rh-virtualization}: `OvirtProviderSpec`
108-
* vSphere: `VSphereProviderSpec`
109-
endif::mint[]
110137
--
111138
+
112139
.Partial example output for AWS
@@ -127,7 +154,7 @@ endif::mint[]
127154
+
128155
[source,terminal]
129156
----
130-
$ oc delete secret <secret_name> \ <1>
157+
$ oc delete secret <secret_name> \//<1>
131158
-n <secret_namespace> <2>
132159
----
133160
+
@@ -142,6 +169,7 @@ $ oc delete secret ebs-cloud-credentials -n openshift-cluster-csi-drivers
142169
----
143170
+
144171
You do not need to manually delete the credentials from your provider console. Deleting the referenced component secrets will cause the CCO to delete the existing credentials from the platform and create new ones.
172+
endif::passthrough[]
145173

146174
.Verification
147175

@@ -201,9 +229,12 @@ Where `<example-iam-username>` is the name of an IAM user on the cloud provider.
201229
.. For each IAM username, view the details for the user on the cloud provider. The credentials should show that they were created after being rotated on the cluster.
202230
////
203231

232+
ifeval::["{context}" == "post-install-cluster-tasks"]
233+
:!post-install:
234+
endif::[]
204235
ifeval::["{context}" == "cco-mode-mint"]
205236
:!mint:
206237
endif::[]
207238
ifeval::["{context}" == "cco-mode-passthrough"]
208239
:!passthrough:
209-
endif::[]
240+
endif::[]

post_installation_configuration/cluster-tasks.adoc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,16 +675,26 @@ To allow the cluster to use the new credentials, you must update the secrets tha
675675
// Right now only IBM can do this, but it makes sense to set this up so that other clouds can be added.
676676
The Cloud Credential Operator (CCO) utility `ccoctl` supports updating secrets for clusters installed on IBM Cloud.
677677

678+
//Rotating IBM Cloud credentials with ccoctl
678679
include::modules/refreshing-service-ids-ibm-cloud.adoc[leveloffset=+3]
679680

681+
//Rotating cloud provider credentials manually
680682
include::modules/manually-rotating-cloud-creds.adoc[leveloffset=+2]
681683

684+
[role="_additional-resources"]
685+
.Additional resources
686+
* xref:../storage/container_storage_interface/persistent-storage-csi-vsphere.adoc[vSphere CSI Driver Operator]
687+
688+
//Removing cloud provider credentials manually
682689
include::modules/manually-removing-cloud-creds.adoc[leveloffset=+2]
683690

691+
//These additional resources are for the "Rotating or removing cloud provider credentials" section, do not separate them from that content.
684692
[role="_additional-resources"]
685693
.Additional resources
686-
687694
* xref:../authentication/managing_cloud_provider_credentials/about-cloud-credential-operator.adoc#about-cloud-credential-operator[About the Cloud Credential Operator]
695+
* xref:../installing/installing_aws/manually-creating-iam.adoc#admin-credentials-root-secret-formats_manually-creating-iam-aws[Amazon Web Services (AWS) secret format]
696+
* xref:../installing/installing_azure/manually-creating-iam-azure.adoc#admin-credentials-root-secret-formats_manually-creating-iam-azure[Microsoft Azure secret format]
697+
* xref:../installing/installing_gcp/manually-creating-iam-gcp.adoc#admin-credentials-root-secret-formats_manually-creating-iam-gcp[Google Cloud Platform (GCP) secret format]
688698

689699
[id="post-install-must-gather-disconnected"]
690700
== Configuring image streams for a disconnected cluster

0 commit comments

Comments
 (0)