Skip to content

Commit d58fd2b

Browse files
committed
upgrade to capi v1.11.0 and its v1beta2 api
1 parent 3356920 commit d58fd2b

28 files changed

+5018
-2111
lines changed

api/v1alpha1/condition_consts.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ limitations under the License.
1717
package v1alpha1
1818

1919
const (
20+
// ReadyReason is a generic Reason for the Ready condition to be true.
21+
ReadyReason = "Ready"
22+
23+
// PoolNotReadyReason indicates that the InfobloxIPPool referenced by a claim is not ready.
24+
PoolNotReadyReason = "PoolNotReady"
25+
// AddressAllocatedReason indicates that an IP address has been successfully allocated from the InfobloxIPPool.
26+
AddressAllocatedReason = "AddressAllocated"
27+
// AllocationFailedReason indicates that the allocation of an IP address from the InfobloxIPPool has failed.
28+
AllocationFailedReason = "AllocationFailed"
29+
2030
// AuthenticationFailedReason indicates that the credentials provided to Infoblox were invalid.
2131
AuthenticationFailedReason = "AuthenticationFailed"
2232
// NetworkViewNotFoundReason indicates that the specified network view could not be found on the Infoblox instance.
@@ -25,4 +35,6 @@ const (
2535
DNSViewNotFoundReason = "DNSViewNotFound"
2636
// NetworkNotFoundReason indicates that the specified network could not be found on the Infoblox instance.
2737
NetworkNotFoundReason = "NetworkNotFound"
38+
// ConfigurationValidReason indicates that the configuration of the InfobloxInstance has been validated successfully.
39+
ConfigurationValidReason = "ConfigurationValid"
2840
)

api/v1alpha1/infobloxinstance_types.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package v1alpha1
1919
import (
2020
corev1 "k8s.io/api/core/v1"
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22-
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
2322
)
2423

2524
// InfobloxInstanceSpec defines the desired state of InfobloxInstance.
@@ -53,7 +52,7 @@ type InfobloxInstanceSpec struct {
5352

5453
// InfobloxInstanceStatus defines the observed state of InfobloxInstance.
5554
type InfobloxInstanceStatus struct {
56-
Conditions clusterv1.Conditions `json:"conditions"`
55+
Conditions []metav1.Condition `json:"conditions"`
5756
}
5857

5958
//+kubebuilder:object:root=true
@@ -82,12 +81,12 @@ type InfobloxInstanceList struct {
8281
}
8382

8483
// GetConditions gets cluster conditions.
85-
func (i *InfobloxInstance) GetConditions() clusterv1.Conditions {
84+
func (i *InfobloxInstance) GetConditions() []metav1.Condition {
8685
return i.Status.Conditions
8786
}
8887

8988
// SetConditions sets cluster conditions.
90-
func (i *InfobloxInstance) SetConditions(conditions clusterv1.Conditions) {
89+
func (i *InfobloxInstance) SetConditions(conditions []metav1.Condition) {
9190
i.Status.Conditions = conditions
9291
}
9392

api/v1alpha1/infobloxippool_types.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package v1alpha1
33
import (
44
corev1 "k8s.io/api/core/v1"
55
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
6-
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
76
)
87

98
// InfobloxIPPoolSpec defines the desired state of InfobloxIPPool.
@@ -26,7 +25,7 @@ type InfobloxIPPoolSpec struct {
2625

2726
// InfobloxIPPoolStatus defines the observed state of InfobloxIPPool.
2827
type InfobloxIPPoolStatus struct {
29-
Conditions clusterv1.Conditions `json:"conditions"`
28+
Conditions []metav1.Condition `json:"conditions"`
3029
}
3130

3231
// Subnet defines the CIDR and Gateway.
@@ -62,12 +61,12 @@ type InfobloxIPPoolList struct {
6261
}
6362

6463
// GetConditions returns pool conditions.
65-
func (i *InfobloxIPPool) GetConditions() clusterv1.Conditions {
64+
func (i *InfobloxIPPool) GetConditions() []metav1.Condition {
6665
return i.Status.Conditions
6766
}
6867

6968
// SetConditions sets pool conditions.
70-
func (i *InfobloxIPPool) SetConditions(conditions clusterv1.Conditions) {
69+
func (i *InfobloxIPPool) SetConditions(conditions []metav1.Condition) {
7170
i.Status.Conditions = conditions
7271
}
7372

api/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/ipam.cluster.x-k8s.io_infobloxinstances.yaml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -107,47 +107,57 @@ spec:
107107
description: InfobloxInstanceStatus defines the observed state of InfobloxInstance.
108108
properties:
109109
conditions:
110-
description: Conditions provide observations of the operational state
111-
of a Cluster API resource.
112110
items:
113-
description: Condition defines an observation of a Cluster API resource
114-
operational state.
111+
description: Condition contains details for one aspect of the current
112+
state of this API Resource.
115113
properties:
116114
lastTransitionTime:
117115
description: |-
118-
Last time the condition transitioned from one status to another.
119-
This should be when the underlying condition changed. If that is not known, then using the time when
120-
the API field changed is acceptable.
116+
lastTransitionTime is the last time the condition transitioned from one status to another.
117+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
121118
format: date-time
122119
type: string
123120
message:
124121
description: |-
125-
A human readable message indicating details about the transition.
126-
This field may be empty.
122+
message is a human readable message indicating details about the transition.
123+
This may be an empty string.
124+
maxLength: 32768
127125
type: string
128-
reason:
126+
observedGeneration:
129127
description: |-
130-
The reason for the condition's last transition in CamelCase.
131-
The specific API may choose whether or not this field is considered a guaranteed API.
132-
This field may be empty.
133-
type: string
134-
severity:
128+
observedGeneration represents the .metadata.generation that the condition was set based upon.
129+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
130+
with respect to the current state of the instance.
131+
format: int64
132+
minimum: 0
133+
type: integer
134+
reason:
135135
description: |-
136-
severity provides an explicit classification of Reason code, so the users or machines can immediately
137-
understand the current situation and act accordingly.
138-
The Severity field MUST be set only when Status=False.
136+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
137+
Producers of specific condition types may define expected values and meanings for this field,
138+
and whether the values are considered a guaranteed API.
139+
The value should be a CamelCase string.
140+
This field may not be empty.
141+
maxLength: 1024
142+
minLength: 1
143+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
139144
type: string
140145
status:
141146
description: status of the condition, one of True, False, Unknown.
147+
enum:
148+
- "True"
149+
- "False"
150+
- Unknown
142151
type: string
143152
type:
144-
description: |-
145-
type of condition in CamelCase or in foo.example.com/CamelCase.
146-
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
147-
can be useful (see .node.status.conditions), the ability to deconflict is important.
153+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
154+
maxLength: 316
155+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
148156
type: string
149157
required:
150158
- lastTransitionTime
159+
- message
160+
- reason
151161
- status
152162
- type
153163
type: object

config/crd/bases/ipam.cluster.x-k8s.io_infobloxippools.yaml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -98,47 +98,57 @@ spec:
9898
description: InfobloxIPPoolStatus defines the observed state of InfobloxIPPool.
9999
properties:
100100
conditions:
101-
description: Conditions provide observations of the operational state
102-
of a Cluster API resource.
103101
items:
104-
description: Condition defines an observation of a Cluster API resource
105-
operational state.
102+
description: Condition contains details for one aspect of the current
103+
state of this API Resource.
106104
properties:
107105
lastTransitionTime:
108106
description: |-
109-
Last time the condition transitioned from one status to another.
110-
This should be when the underlying condition changed. If that is not known, then using the time when
111-
the API field changed is acceptable.
107+
lastTransitionTime is the last time the condition transitioned from one status to another.
108+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
112109
format: date-time
113110
type: string
114111
message:
115112
description: |-
116-
A human readable message indicating details about the transition.
117-
This field may be empty.
113+
message is a human readable message indicating details about the transition.
114+
This may be an empty string.
115+
maxLength: 32768
118116
type: string
119-
reason:
117+
observedGeneration:
120118
description: |-
121-
The reason for the condition's last transition in CamelCase.
122-
The specific API may choose whether or not this field is considered a guaranteed API.
123-
This field may be empty.
124-
type: string
125-
severity:
119+
observedGeneration represents the .metadata.generation that the condition was set based upon.
120+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
121+
with respect to the current state of the instance.
122+
format: int64
123+
minimum: 0
124+
type: integer
125+
reason:
126126
description: |-
127-
severity provides an explicit classification of Reason code, so the users or machines can immediately
128-
understand the current situation and act accordingly.
129-
The Severity field MUST be set only when Status=False.
127+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
128+
Producers of specific condition types may define expected values and meanings for this field,
129+
and whether the values are considered a guaranteed API.
130+
The value should be a CamelCase string.
131+
This field may not be empty.
132+
maxLength: 1024
133+
minLength: 1
134+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
130135
type: string
131136
status:
132137
description: status of the condition, one of True, False, Unknown.
138+
enum:
139+
- "True"
140+
- "False"
141+
- Unknown
133142
type: string
134143
type:
135-
description: |-
136-
type of condition in CamelCase or in foo.example.com/CamelCase.
137-
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
138-
can be useful (see .node.status.conditions), the ability to deconflict is important.
144+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
145+
maxLength: 316
146+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
139147
type: string
140148
required:
141149
- lastTransitionTime
150+
- message
151+
- reason
142152
- status
143153
- type
144154
type: object

0 commit comments

Comments
 (0)