Skip to content

Commit

Permalink
Add status.conditions 'Ready' to all resources
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunyiLyu committed Mar 12, 2021
1 parent b7ee867 commit 6143683
Show file tree
Hide file tree
Showing 27 changed files with 399 additions and 8 deletions.
2 changes: 2 additions & 0 deletions api/v1alpha1/binding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ type BindingSpec struct {

// BindingStatus defines the observed state of Binding
type BindingStatus struct {
Conditions []Condition `json:"conditions,omitempty"`
}

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status

// Binding is the Schema for the bindings API
type Binding struct {
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/exchange_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ type ExchangeSpec struct {

// ExchangeStatus defines the observed state of Exchange
type ExchangeStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
Conditions []Condition `json:"conditions,omitempty"`
}

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status

// Exchange is the Schema for the exchanges API
type Exchange struct {
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha1/policy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ type PolicySpec struct {

// PolicyStatus defines the observed state of Policy
type PolicyStatus struct {
Conditions []Condition `json:"conditions,omitempty"`
}

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status

// Policy is the Schema for the policies API
type Policy struct {
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha1/queue_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ type RabbitmqClusterReference struct {

// QueueStatus defines the observed state of Queue
type QueueStatus struct {
Conditions []Condition `json:"conditions,omitempty"`
}

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status

// Queue is the Schema for the queues API
type Queue struct {
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha1/user_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type UserSpec struct {

// UserStatus defines the observed state of User.
type UserStatus struct {
Conditions []Condition `json:"conditions,omitempty"`
// Provides a reference to a Secret object containing the user credentials.
Credentials *corev1.LocalObjectReference `json:"credentials,omitempty"`
}
Expand All @@ -47,6 +48,7 @@ type UserStatus struct {
type UserTag string

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status

// User is the Schema for the users API.
// +kubebuilder:subresource:status
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha1/vhost_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ type VhostSpec struct {

// VhostStatus defines the observed state of Vhost
type VhostStatus struct {
Conditions []Condition `json:"conditions,omitempty"`
}

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status

// Vhost is the Schema for the vhosts API
type Vhost struct {
Expand Down
52 changes: 47 additions & 5 deletions api/v1alpha1/zz_generated.deepcopy.go

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

29 changes: 29 additions & 0 deletions config/crd/bases/rabbitmq.com_bindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,39 @@ spec:
type: object
status:
description: BindingStatus defines the observed state of Binding
properties:
conditions:
items:
properties:
lastTransitionTime:
description: The last time this Condition type changed.
format: date-time
type: string
message:
description: Full text reason for current status of the condition.
type: string
reason:
description: One word, camel-case reason for current status
of the condition.
type: string
status:
description: True, False, or Unknown
type: string
type:
description: Type indicates the scope of RabbitmqCluster status
addressed by the condition.
type: string
required:
- status
- type
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
Expand Down
29 changes: 29 additions & 0 deletions config/crd/bases/rabbitmq.com_exchanges.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,39 @@ spec:
type: object
status:
description: ExchangeStatus defines the observed state of Exchange
properties:
conditions:
items:
properties:
lastTransitionTime:
description: The last time this Condition type changed.
format: date-time
type: string
message:
description: Full text reason for current status of the condition.
type: string
reason:
description: One word, camel-case reason for current status
of the condition.
type: string
status:
description: True, False, or Unknown
type: string
type:
description: Type indicates the scope of RabbitmqCluster status
addressed by the condition.
type: string
required:
- status
- type
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
Expand Down
29 changes: 29 additions & 0 deletions config/crd/bases/rabbitmq.com_policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,39 @@ spec:
type: object
status:
description: PolicyStatus defines the observed state of Policy
properties:
conditions:
items:
properties:
lastTransitionTime:
description: The last time this Condition type changed.
format: date-time
type: string
message:
description: Full text reason for current status of the condition.
type: string
reason:
description: One word, camel-case reason for current status
of the condition.
type: string
status:
description: True, False, or Unknown
type: string
type:
description: Type indicates the scope of RabbitmqCluster status
addressed by the condition.
type: string
required:
- status
- type
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
Expand Down
29 changes: 29 additions & 0 deletions config/crd/bases/rabbitmq.com_queues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,39 @@ spec:
type: object
status:
description: QueueStatus defines the observed state of Queue
properties:
conditions:
items:
properties:
lastTransitionTime:
description: The last time this Condition type changed.
format: date-time
type: string
message:
description: Full text reason for current status of the condition.
type: string
reason:
description: One word, camel-case reason for current status
of the condition.
type: string
status:
description: True, False, or Unknown
type: string
type:
description: Type indicates the scope of RabbitmqCluster status
addressed by the condition.
type: string
required:
- status
- type
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
Expand Down
26 changes: 26 additions & 0 deletions config/crd/bases/rabbitmq.com_users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,32 @@ spec:
status:
description: Status exposes the observed state of the User object.
properties:
conditions:
items:
properties:
lastTransitionTime:
description: The last time this Condition type changed.
format: date-time
type: string
message:
description: Full text reason for current status of the condition.
type: string
reason:
description: One word, camel-case reason for current status
of the condition.
type: string
status:
description: True, False, or Unknown
type: string
type:
description: Type indicates the scope of RabbitmqCluster status
addressed by the condition.
type: string
required:
- status
- type
type: object
type: array
credentials:
description: Provides a reference to a Secret object containing the
user credentials.
Expand Down

0 comments on commit 6143683

Please sign in to comment.