Skip to content

Commit 4637126

Browse files
committed
Add docs for ROSA
- add new cluster template for ROSA clusters
1 parent 4699264 commit 4637126

File tree

7 files changed

+1653
-315
lines changed

7 files changed

+1653
-315
lines changed

controlplane/rosa/controllers/rosacontrolplane_controller.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ import (
4646
)
4747

4848
const (
49-
ocmAPIUrl = "https://api.stage.openshift.com"
5049
rosaCreatorArnProperty = "rosa_creator_arn"
5150

5251
rosaControlPlaneKind = "ROSAControlPlane"
@@ -293,6 +292,10 @@ func (r *ROSAControlPlaneReconciler) reconcileNormal(ctx context.Context, rosaSc
293292

294293
// Create the connection, and remember to close it:
295294
token := os.Getenv("OCM_TOKEN")
295+
ocmAPIUrl := os.Getenv("OCM_API_URL")
296+
if ocmAPIUrl == "" {
297+
ocmAPIUrl = "https://api.openshift.com"
298+
}
296299
connection, err := sdk.NewConnectionBuilder().
297300
Logger(ocmLogger).
298301
Tokens(token).
@@ -340,6 +343,10 @@ func (r *ROSAControlPlaneReconciler) reconcileDelete(_ context.Context, rosaScop
340343
// Create the connection, and remember to close it:
341344
// TODO: token should be read from a secret: https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/4460
342345
token := os.Getenv("OCM_TOKEN")
346+
ocmAPIUrl := os.Getenv("OCM_API_URL")
347+
if ocmAPIUrl == "" {
348+
ocmAPIUrl = "https://api.openshift.com"
349+
}
343350
connection, err := sdk.NewConnectionBuilder().
344351
Logger(ocmLogger).
345352
Tokens(token).

docs/book/src/SUMMARY_PREFIX.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
- [Using EKS Addons](./topics/eks/addons.md)
2222
- [Enabling Encryption](./topics/eks/encryption.md)
2323
- [Cluster Upgrades](./topics/eks/cluster-upgrades.md)
24+
- [ROSA Support](./topics/rosa/index.md)
25+
- [Enabling ROSA Support](./topics/rosa/enabling.md)
26+
- [Creating a cluster](./topics/rosa/creating-a-cluster.md)
2427
- [Bring Your Own AWS Infrastructure](./topics/bring-your-own-aws-infrastructure.md)
2528
- [Specifying the IAM Role to use for Management Components](./topics/specify-management-iam-role.md)
2629
- [Using external cloud provider with EBS CSI driver](./topics/external-cloud-provider-with-ebs-csi-driver.md)

0 commit comments

Comments
 (0)