@@ -49,7 +49,7 @@ func (c *ControlPlaneContract) MachineTemplate() *ControlPlaneMachineTemplate {
49
49
return & ControlPlaneMachineTemplate {}
50
50
}
51
51
52
- // Version provide access to version field in a ControlPlane object, if any.
52
+ // Version provide access to version field in a ControlPlane object, if any.
53
53
// NOTE: When working with unstructured there is no way to understand if the ControlPlane provider
54
54
// do support a field in the type definition from the fact that a field is not set in a given instance.
55
55
// This is why in we are deriving if version is required from the ClusterClass in the topology reconciler code.
@@ -59,14 +59,28 @@ func (c *ControlPlaneContract) Version() *String {
59
59
}
60
60
}
61
61
62
- // StatusVersion provide access to version field in a ControlPlane object status, if any.
62
+ // StatusVersion provide access to the version field in a ControlPlane object status, if any.
63
63
func (c * ControlPlaneContract ) StatusVersion () * String {
64
64
return & String {
65
65
path : []string {"status" , "version" },
66
66
}
67
67
}
68
68
69
- // Replicas provide access to replicas field in a ControlPlane object, if any.
69
+ // Ready provide access to the status.ready field in a ControlPlane object.
70
+ func (c * ControlPlaneContract ) Ready () * Bool {
71
+ return & Bool {
72
+ path : []string {"status" , "ready" },
73
+ }
74
+ }
75
+
76
+ // Initialized provide access to status.initialized field in a ControlPlane object.
77
+ func (c * ControlPlaneContract ) Initialized () * Bool {
78
+ return & Bool {
79
+ path : []string {"status" , "initialized" },
80
+ }
81
+ }
82
+
83
+ // Replicas provide access to replicas field in a ControlPlane object, if any.
70
84
// NOTE: When working with unstructured there is no way to understand if the ControlPlane provider
71
85
// do support a field in the type definition from the fact that a field is not set in a given instance.
72
86
// This is why in we are deriving if replicas is required from the ClusterClass in the topology reconciler code.
@@ -76,27 +90,63 @@ func (c *ControlPlaneContract) Replicas() *Int64 {
76
90
}
77
91
}
78
92
79
- // StatusReplicas provide access to status.replicas field in a ControlPlane object, if any.
93
+ // StatusReplicas provide access to the status.replicas field in a ControlPlane object, if any. Applies to implementations using replicas .
80
94
func (c * ControlPlaneContract ) StatusReplicas () * Int64 {
81
95
return & Int64 {
82
96
path : []string {"status" , "replicas" },
83
97
}
84
98
}
85
99
86
- // UpdatedReplicas provide access to status.updatedReplicas field in a ControlPlane object, if any.
100
+ // UpdatedReplicas provide access to the status.updatedReplicas field in a ControlPlane object, if any. Applies to implementations using replicas .
87
101
func (c * ControlPlaneContract ) UpdatedReplicas () * Int64 {
88
102
return & Int64 {
89
103
path : []string {"status" , "updatedReplicas" },
90
104
}
91
105
}
92
106
93
- // ReadyReplicas provide access to status.readyReplicas field in a ControlPlane object, if any.
107
+ // ReadyReplicas provide access to the status.readyReplicas field in a ControlPlane object, if any. Applies to implementations using replicas .
94
108
func (c * ControlPlaneContract ) ReadyReplicas () * Int64 {
95
109
return & Int64 {
96
110
path : []string {"status" , "readyReplicas" },
97
111
}
98
112
}
99
113
114
+ // UnavailableReplicas provide access to the status.unavailableReplicas field in a ControlPlane object, if any. Applies to implementations using replicas.
115
+ func (c * ControlPlaneContract ) UnavailableReplicas () * Int64 {
116
+ return & Int64 {
117
+ path : []string {"status" , "unavailableReplicas" },
118
+ }
119
+ }
120
+
121
+ // Selector provide access to the status.selector field in a ControlPlane object, if any. Applies to implementations using replicas.
122
+ func (c * ControlPlaneContract ) Selector () * String {
123
+ return & String {
124
+ path : []string {"status" , "selector" },
125
+ }
126
+ }
127
+
128
+ // FailureReason provides access to the status.failureReason field in an ControlPlane object. Note that this field is optional.
129
+ func (c * ControlPlaneContract ) FailureReason () * String {
130
+ return & String {
131
+ path : []string {"status" , "failureReason" },
132
+ }
133
+ }
134
+
135
+ // FailureMessage provides access to the status.failureMessage field in an ControlPlane object. Note that this field is optional.
136
+ func (c * ControlPlaneContract ) FailureMessage () * String {
137
+ return & String {
138
+ path : []string {"status" , "failureMessage" },
139
+ }
140
+ }
141
+
142
+ // ExternalManagedControlPlane provides access to the status.externalManagedControlPlane field in an ControlPlane object.
143
+ // Note that this field is optional.
144
+ func (c * ControlPlaneContract ) ExternalManagedControlPlane () * Bool {
145
+ return & Bool {
146
+ path : []string {"status" , "externalManagedControlPlane" },
147
+ }
148
+ }
149
+
100
150
// IsProvisioning returns true if the control plane is being created for the first time.
101
151
// Returns false, if the control plane was already previously provisioned.
102
152
func (c * ControlPlaneContract ) IsProvisioning (obj * unstructured.Unstructured ) (bool , error ) {
0 commit comments