Skip to content

Commit

Permalink
feat(api): defaulting suspend field to false and adding it on print c…
Browse files Browse the repository at this point in the history
…olumn
  • Loading branch information
nettoclaudio committed May 23, 2023
1 parent d6c35ce commit 415627d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api/v1alpha1/rpaasinstance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ type RpaasInstanceSpec struct {
// Suspend flag tells whether controller should suspend any further
// modifications on this resource. Defaults to false.
// +optional
// +kubebuilder:default:=false
Suspend *bool `json:"suspend,omitempty"`
}

Expand Down Expand Up @@ -316,6 +317,7 @@ type RpaasInstanceStatus struct {
// +kubebuilder:resource:shortName=rpaas
// +kubebuilder:subresource:status
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.currentReplicas,selectorpath=.status.podSelector
// +kubebuilder:printcolumn:name="Suspended",type=boolean,JSONPath=`.spec.suspend`

// RpaasInstance is the Schema for the rpaasinstances API
type RpaasInstance struct {
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/extensions.tsuru.io_rpaasflavors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6057,6 +6057,7 @@ spec:
type: boolean
type: object
suspend:
default: false
description: Suspend flag tells whether controller should suspend
any further modifications on this resource. Defaults to false.
type: boolean
Expand Down
7 changes: 6 additions & 1 deletion config/crd/bases/extensions.tsuru.io_rpaasinstances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ spec:
singular: rpaasinstance
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .spec.suspend
name: Suspended
type: boolean
name: v1alpha1
schema:
openAPIV3Schema:
description: RpaasInstance is the Schema for the rpaasinstances API
Expand Down Expand Up @@ -5818,6 +5822,7 @@ spec:
type: boolean
type: object
suspend:
default: false
description: Suspend flag tells whether controller should suspend
any further modifications on this resource. Defaults to false.
type: boolean
Expand Down

0 comments on commit 415627d

Please sign in to comment.