Skip to content

Commit 936018e

Browse files
enxebremuraee
authored andcommitted
Add ROSAControlPlaneReadyCondition, ocmclient and WorkerRoleARN field
This commit introduces several improvements to the rosa control plane: - Add ROSAControlPlaneReadyCondition - Add helpers for ocmclient - Add WorkerRoleARN field to the API to satisfy latest ocm API requirements
1 parent 988d136 commit 936018e

File tree

5 files changed

+180
-76
lines changed

5 files changed

+180
-76
lines changed

config/crd/bases/controlplane.cluster.x-k8s.io_rosacontrolplanes.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ spec:
249249
version:
250250
description: Openshift version, for example "openshift-v4.12.15".
251251
type: string
252+
workerRoleARN:
253+
type: string
252254
required:
253255
- accountID
254256
- availabilityZones
@@ -261,6 +263,7 @@ spec:
261263
- subnets
262264
- supportRoleARN
263265
- version
266+
- workerRoleARN
264267
type: object
265268
status:
266269
properties:
@@ -320,6 +323,9 @@ spec:
320323
description: ErrorMessage indicates that there is a terminal problem
321324
reconciling the state, and will be set to a descriptive error message.
322325
type: string
326+
id:
327+
description: ID is the cluster ID given by ROSA.
328+
type: string
323329
initialized:
324330
description: Initialized denotes whether or not the control plane
325331
has the uploaded kubernetes config-map.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
Copyright 2022 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1beta2
18+
19+
import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
20+
21+
const (
22+
// ROSAControlPlaneReadyCondition condition reports on the successful reconciliation of ROSAControlPlane.
23+
ROSAControlPlaneReadyCondition clusterv1.ConditionType = "ROSAControlPlaneReady"
24+
)

controlplane/rosa/api/v1beta2/rosacontrolplane_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ type RosaControlPlaneSpec struct { //nolint: maligned
5555
CreatorARN *string `json:"creatorARN"`
5656
InstallerRoleARN *string `json:"installerRoleARN"`
5757
SupportRoleARN *string `json:"supportRoleARN"`
58+
WorkerRoleARN *string `json:"workerRoleARN"`
5859
}
5960

6061
// AWSRolesRef contains references to various AWS IAM roles required for operators to make calls against the AWS API.
@@ -454,6 +455,9 @@ type RosaControlPlaneStatus struct {
454455
FailureMessage *string `json:"failureMessage,omitempty"`
455456
// Conditions specifies the cpnditions for the managed control plane
456457
Conditions clusterv1.Conditions `json:"conditions,omitempty"`
458+
459+
// ID is the cluster ID given by ROSA.
460+
ID *string `json:"id,omitempty"`
457461
}
458462

459463
// +kubebuilder:object:root=true

controlplane/rosa/api/v1beta2/zz_generated.deepcopy.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)