Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions api/v1alpha1/condition_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ limitations under the License.
package v1alpha1

const (
// ReadyReason is a generic Reason for the Ready condition to be true.
ReadyReason = "Ready"

// PoolNotReadyReason indicates that the InfobloxIPPool referenced by a claim is not ready.
PoolNotReadyReason = "PoolNotReady"
// AddressAllocatedReason indicates that an IP address has been successfully allocated from the InfobloxIPPool.
AddressAllocatedReason = "AddressAllocated"
// AllocationFailedReason indicates that the allocation of an IP address from the InfobloxIPPool has failed.
AllocationFailedReason = "AllocationFailed"

// AuthenticationFailedReason indicates that the credentials provided to Infoblox were invalid.
AuthenticationFailedReason = "AuthenticationFailed"
// NetworkViewNotFoundReason indicates that the specified network view could not be found on the Infoblox instance.
Expand All @@ -25,4 +35,6 @@ const (
DNSViewNotFoundReason = "DNSViewNotFound"
// NetworkNotFoundReason indicates that the specified network could not be found on the Infoblox instance.
NetworkNotFoundReason = "NetworkNotFound"
// ConfigurationValidReason indicates that the configuration of the InfobloxInstance has been validated successfully.
ConfigurationValidReason = "ConfigurationValid"
)
7 changes: 3 additions & 4 deletions api/v1alpha1/infobloxinstance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package v1alpha1
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
)

// InfobloxInstanceSpec defines the desired state of InfobloxInstance.
Expand Down Expand Up @@ -53,7 +52,7 @@ type InfobloxInstanceSpec struct {

// InfobloxInstanceStatus defines the observed state of InfobloxInstance.
type InfobloxInstanceStatus struct {
Conditions clusterv1.Conditions `json:"conditions"`
Conditions []metav1.Condition `json:"conditions"`
}

//+kubebuilder:object:root=true
Expand Down Expand Up @@ -82,12 +81,12 @@ type InfobloxInstanceList struct {
}

// GetConditions gets cluster conditions.
func (i *InfobloxInstance) GetConditions() clusterv1.Conditions {
func (i *InfobloxInstance) GetConditions() []metav1.Condition {
return i.Status.Conditions
}

// SetConditions sets cluster conditions.
func (i *InfobloxInstance) SetConditions(conditions clusterv1.Conditions) {
func (i *InfobloxInstance) SetConditions(conditions []metav1.Condition) {
i.Status.Conditions = conditions
}

Expand Down
7 changes: 3 additions & 4 deletions api/v1alpha1/infobloxippool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package v1alpha1
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
)

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

// InfobloxIPPoolStatus defines the observed state of InfobloxIPPool.
type InfobloxIPPoolStatus struct {
Conditions clusterv1.Conditions `json:"conditions"`
Conditions []metav1.Condition `json:"conditions"`
}

// Subnet defines the CIDR and Gateway.
Expand Down Expand Up @@ -62,12 +61,12 @@ type InfobloxIPPoolList struct {
}

// GetConditions returns pool conditions.
func (i *InfobloxIPPool) GetConditions() clusterv1.Conditions {
func (i *InfobloxIPPool) GetConditions() []metav1.Condition {
return i.Status.Conditions
}

// SetConditions sets pool conditions.
func (i *InfobloxIPPool) SetConditions(conditions clusterv1.Conditions) {
func (i *InfobloxIPPool) SetConditions(conditions []metav1.Condition) {
i.Status.Conditions = conditions
}

Expand Down
6 changes: 3 additions & 3 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 32 additions & 22 deletions config/crd/bases/ipam.cluster.x-k8s.io_infobloxinstances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,47 +107,57 @@ spec:
description: InfobloxInstanceStatus defines the observed state of InfobloxInstance.
properties:
conditions:
description: Conditions provide observations of the operational state
of a Cluster API resource.
items:
description: Condition defines an observation of a Cluster API resource
operational state.
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable.
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
A human readable message indicating details about the transition.
This field may be empty.
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
reason:
observedGeneration:
description: |-
The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty.
type: string
severity:
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False.
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important.
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
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])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
Expand Down
54 changes: 32 additions & 22 deletions config/crd/bases/ipam.cluster.x-k8s.io_infobloxippools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,47 +98,57 @@ spec:
description: InfobloxIPPoolStatus defines the observed state of InfobloxIPPool.
properties:
conditions:
description: Conditions provide observations of the operational state
of a Cluster API resource.
items:
description: Condition defines an observation of a Cluster API resource
operational state.
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable.
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
A human readable message indicating details about the transition.
This field may be empty.
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
reason:
observedGeneration:
description: |-
The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty.
type: string
severity:
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False.
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important.
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
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])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
Expand Down
Loading