Skip to content

Commit

Permalink
style: kubebuilder annotations start with empty space
Browse files Browse the repository at this point in the history
  • Loading branch information
prometherion committed Nov 19, 2022
1 parent 3c620bc commit 2ed1e4f
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/tenant_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
type TenantSpec struct {
Owner OwnerSpec `json:"owner"`

//+kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Minimum=1
NamespaceQuota *int32 `json:"namespaceQuota,omitempty"`
NamespacesMetadata *AdditionalMetadata `json:"namespacesMetadata,omitempty"`
ServicesMetadata *AdditionalMetadata `json:"servicesMetadata,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/namespace_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

type NamespaceOptions struct {
//+kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Minimum=1
// Specifies the maximum number of namespaces allowed for that Tenant. Once the namespace quota assigned to the Tenant has been reached, the Tenant owner cannot create further namespaces. Optional.
Quota *int32 `json:"quota,omitempty"`
// Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional.
Expand Down
6 changes: 3 additions & 3 deletions api/v1beta1/service_allowed_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
package v1beta1

type AllowedServices struct {
//+kubebuilder:default=true
// +kubebuilder:default=true
// Specifies if NodePort service type resources are allowed for the Tenant. Default is true. Optional.
NodePort *bool `json:"nodePort,omitempty"`
//+kubebuilder:default=true
// +kubebuilder:default=true
// Specifies if ExternalName service type resources are allowed for the Tenant. Default is true. Optional.
ExternalName *bool `json:"externalName,omitempty"`
//+kubebuilder:default=true
// +kubebuilder:default=true
// Specifies if LoadBalancer service type resources are allowed for the Tenant. Default is true. Optional.
LoadBalancer *bool `json:"loadBalancer,omitempty"`
}
2 changes: 1 addition & 1 deletion api/v1beta1/tenant_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const (

// Returns the observed state of the Tenant.
type TenantStatus struct {
//+kubebuilder:default=Active
// +kubebuilder:default=Active
// The operational state of the Tenant. Possible values are "Active", "Cordoned".
State tenantState `json:"state"`
// How many namespaces are assigned to the Tenant.
Expand Down
8 changes: 4 additions & 4 deletions api/v1beta1/tenant_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ type TenantSpec struct {
PriorityClasses *api.AllowedListSpec `json:"priorityClasses,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:storageversion
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:resource:scope=Cluster,shortName=tnt
// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state",description="The actual state of the Tenant"
// +kubebuilder:printcolumn:name="Namespace quota",type="integer",JSONPath=".spec.namespaceOptions.quota",description="The max amount of Namespaces can be created"
Expand All @@ -60,7 +60,7 @@ type Tenant struct {

func (in *Tenant) Hub() {}

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

// TenantList contains a list of Tenant.
type TenantList struct {
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta2/namespace_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

type NamespaceOptions struct {
//+kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Minimum=1
// Specifies the maximum number of namespaces allowed for that Tenant. Once the namespace quota assigned to the Tenant has been reached, the Tenant owner cannot create further namespaces. Optional.
Quota *int32 `json:"quota,omitempty"`
// Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional.
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta2/tenant_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const (

// Returns the observed state of the Tenant.
type TenantStatus struct {
//+kubebuilder:default=Active
// +kubebuilder:default=Active
// The operational state of the Tenant. Possible values are "Active", "Cordoned".
State tenantState `json:"state"`
// How many namespaces are assigned to the Tenant.
Expand Down
6 changes: 3 additions & 3 deletions api/v1beta2/tenant_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ type TenantSpec struct {
PreventDeletion bool `json:"preventDeletion,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,shortName=tnt
// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state",description="The actual state of the Tenant"
// +kubebuilder:printcolumn:name="Namespace quota",type="integer",JSONPath=".spec.namespaceOptions.quota",description="The max amount of Namespaces can be created"
Expand All @@ -72,7 +72,7 @@ func (in *Tenant) GetNamespaces() (res []string) {
return
}

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

// TenantList contains a list of Tenant.
type TenantList struct {
Expand Down
6 changes: 3 additions & 3 deletions api/v1beta2/tenantresource_global.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ func (p *ProcessedItems) AsSet() sets.String {
return set
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster

// GlobalTenantResource allows to propagate resource replications to a specific subset of Tenant resources.
Expand All @@ -47,7 +47,7 @@ type GlobalTenantResource struct {
Status GlobalTenantResourceStatus `json:"status,omitempty"`
}

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

// GlobalTenantResourceList contains a list of GlobalTenantResource.
type GlobalTenantResourceList struct {
Expand Down
6 changes: 3 additions & 3 deletions api/v1beta2/tenantresource_namespaced.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ type TenantResourceStatus struct {
ProcessedItems ProcessedItems `json:"processedItems"`
}

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

// TenantResource allows a Tenant Owner, if enabled with proper RBAC, to propagate resources in its Namespace.
// The object must be deployed in a Tenant Namespace, and cannot reference object living in non-Tenant namespaces.
Expand All @@ -63,7 +63,7 @@ type TenantResource struct {
Status TenantResourceStatus `json:"status,omitempty"`
}

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

// TenantResourceList contains a list of TenantResource.
type TenantResourceList struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/service_allowed_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ package api
// +kubebuilder:object:generate=true

type AllowedServices struct {
//+kubebuilder:default=true
// +kubebuilder:default=true
// Specifies if NodePort service type resources are allowed for the Tenant. Default is true. Optional.
NodePort *bool `json:"nodePort,omitempty"`
//+kubebuilder:default=true
// +kubebuilder:default=true
// Specifies if ExternalName service type resources are allowed for the Tenant. Default is true. Optional.
ExternalName *bool `json:"externalName,omitempty"`
//+kubebuilder:default=true
// +kubebuilder:default=true
// Specifies if LoadBalancer service type resources are allowed for the Tenant. Default is true. Optional.
LoadBalancer *bool `json:"loadBalancer,omitempty"`
}

0 comments on commit 2ed1e4f

Please sign in to comment.