mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-02-14 18:09:58 +00:00
style: kubebuilder annotations start with empty space
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
|||||||
type TenantSpec struct {
|
type TenantSpec struct {
|
||||||
Owner OwnerSpec `json:"owner"`
|
Owner OwnerSpec `json:"owner"`
|
||||||
|
|
||||||
//+kubebuilder:validation:Minimum=1
|
// +kubebuilder:validation:Minimum=1
|
||||||
NamespaceQuota *int32 `json:"namespaceQuota,omitempty"`
|
NamespaceQuota *int32 `json:"namespaceQuota,omitempty"`
|
||||||
NamespacesMetadata *AdditionalMetadata `json:"namespacesMetadata,omitempty"`
|
NamespacesMetadata *AdditionalMetadata `json:"namespacesMetadata,omitempty"`
|
||||||
ServicesMetadata *AdditionalMetadata `json:"servicesMetadata,omitempty"`
|
ServicesMetadata *AdditionalMetadata `json:"servicesMetadata,omitempty"`
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type NamespaceOptions struct {
|
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.
|
// 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"`
|
Quota *int32 `json:"quota,omitempty"`
|
||||||
// Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional.
|
// Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional.
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
type AllowedServices struct {
|
type AllowedServices struct {
|
||||||
//+kubebuilder:default=true
|
// +kubebuilder:default=true
|
||||||
// Specifies if NodePort service type resources are allowed for the Tenant. Default is true. Optional.
|
// Specifies if NodePort service type resources are allowed for the Tenant. Default is true. Optional.
|
||||||
NodePort *bool `json:"nodePort,omitempty"`
|
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.
|
// Specifies if ExternalName service type resources are allowed for the Tenant. Default is true. Optional.
|
||||||
ExternalName *bool `json:"externalName,omitempty"`
|
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.
|
// Specifies if LoadBalancer service type resources are allowed for the Tenant. Default is true. Optional.
|
||||||
LoadBalancer *bool `json:"loadBalancer,omitempty"`
|
LoadBalancer *bool `json:"loadBalancer,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const (
|
|||||||
|
|
||||||
// Returns the observed state of the Tenant.
|
// Returns the observed state of the Tenant.
|
||||||
type TenantStatus struct {
|
type TenantStatus struct {
|
||||||
//+kubebuilder:default=Active
|
// +kubebuilder:default=Active
|
||||||
// The operational state of the Tenant. Possible values are "Active", "Cordoned".
|
// The operational state of the Tenant. Possible values are "Active", "Cordoned".
|
||||||
State tenantState `json:"state"`
|
State tenantState `json:"state"`
|
||||||
// How many namespaces are assigned to the Tenant.
|
// How many namespaces are assigned to the Tenant.
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ type TenantSpec struct {
|
|||||||
PriorityClasses *api.AllowedListSpec `json:"priorityClasses,omitempty"`
|
PriorityClasses *api.AllowedListSpec `json:"priorityClasses,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//+kubebuilder:object:root=true
|
// +kubebuilder:object:root=true
|
||||||
//+kubebuilder:subresource:status
|
// +kubebuilder:subresource:status
|
||||||
//+kubebuilder:storageversion
|
// +kubebuilder:storageversion
|
||||||
// +kubebuilder:resource:scope=Cluster,shortName=tnt
|
// +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="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"
|
// +kubebuilder:printcolumn:name="Namespace quota",type="integer",JSONPath=".spec.namespaceOptions.quota",description="The max amount of Namespaces can be created"
|
||||||
@@ -60,7 +60,7 @@ type Tenant struct {
|
|||||||
|
|
||||||
func (in *Tenant) Hub() {}
|
func (in *Tenant) Hub() {}
|
||||||
|
|
||||||
//+kubebuilder:object:root=true
|
// +kubebuilder:object:root=true
|
||||||
|
|
||||||
// TenantList contains a list of Tenant.
|
// TenantList contains a list of Tenant.
|
||||||
type TenantList struct {
|
type TenantList struct {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type NamespaceOptions struct {
|
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.
|
// 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"`
|
Quota *int32 `json:"quota,omitempty"`
|
||||||
// Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional.
|
// Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const (
|
|||||||
|
|
||||||
// Returns the observed state of the Tenant.
|
// Returns the observed state of the Tenant.
|
||||||
type TenantStatus struct {
|
type TenantStatus struct {
|
||||||
//+kubebuilder:default=Active
|
// +kubebuilder:default=Active
|
||||||
// The operational state of the Tenant. Possible values are "Active", "Cordoned".
|
// The operational state of the Tenant. Possible values are "Active", "Cordoned".
|
||||||
State tenantState `json:"state"`
|
State tenantState `json:"state"`
|
||||||
// How many namespaces are assigned to the Tenant.
|
// How many namespaces are assigned to the Tenant.
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ type TenantSpec struct {
|
|||||||
PreventDeletion bool `json:"preventDeletion,omitempty"`
|
PreventDeletion bool `json:"preventDeletion,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//+kubebuilder:object:root=true
|
// +kubebuilder:object:root=true
|
||||||
//+kubebuilder:subresource:status
|
// +kubebuilder:subresource:status
|
||||||
// +kubebuilder:resource:scope=Cluster,shortName=tnt
|
// +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="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"
|
// +kubebuilder:printcolumn:name="Namespace quota",type="integer",JSONPath=".spec.namespaceOptions.quota",description="The max amount of Namespaces can be created"
|
||||||
@@ -72,7 +72,7 @@ func (in *Tenant) GetNamespaces() (res []string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//+kubebuilder:object:root=true
|
// +kubebuilder:object:root=true
|
||||||
|
|
||||||
// TenantList contains a list of Tenant.
|
// TenantList contains a list of Tenant.
|
||||||
type TenantList struct {
|
type TenantList struct {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ func (p *ProcessedItems) AsSet() sets.String {
|
|||||||
return set
|
return set
|
||||||
}
|
}
|
||||||
|
|
||||||
//+kubebuilder:object:root=true
|
// +kubebuilder:object:root=true
|
||||||
//+kubebuilder:subresource:status
|
// +kubebuilder:subresource:status
|
||||||
// +kubebuilder:resource:scope=Cluster
|
// +kubebuilder:resource:scope=Cluster
|
||||||
|
|
||||||
// GlobalTenantResource allows to propagate resource replications to a specific subset of Tenant resources.
|
// GlobalTenantResource allows to propagate resource replications to a specific subset of Tenant resources.
|
||||||
@@ -47,7 +47,7 @@ type GlobalTenantResource struct {
|
|||||||
Status GlobalTenantResourceStatus `json:"status,omitempty"`
|
Status GlobalTenantResourceStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//+kubebuilder:object:root=true
|
// +kubebuilder:object:root=true
|
||||||
|
|
||||||
// GlobalTenantResourceList contains a list of GlobalTenantResource.
|
// GlobalTenantResourceList contains a list of GlobalTenantResource.
|
||||||
type GlobalTenantResourceList struct {
|
type GlobalTenantResourceList struct {
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ type TenantResourceStatus struct {
|
|||||||
ProcessedItems ProcessedItems `json:"processedItems"`
|
ProcessedItems ProcessedItems `json:"processedItems"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//+kubebuilder:object:root=true
|
// +kubebuilder:object:root=true
|
||||||
//+kubebuilder:subresource:status
|
// +kubebuilder:subresource:status
|
||||||
|
|
||||||
// TenantResource allows a Tenant Owner, if enabled with proper RBAC, to propagate resources in its Namespace.
|
// 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.
|
// The object must be deployed in a Tenant Namespace, and cannot reference object living in non-Tenant namespaces.
|
||||||
@@ -63,7 +63,7 @@ type TenantResource struct {
|
|||||||
Status TenantResourceStatus `json:"status,omitempty"`
|
Status TenantResourceStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//+kubebuilder:object:root=true
|
// +kubebuilder:object:root=true
|
||||||
|
|
||||||
// TenantResourceList contains a list of TenantResource.
|
// TenantResourceList contains a list of TenantResource.
|
||||||
type TenantResourceList struct {
|
type TenantResourceList struct {
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ package api
|
|||||||
// +kubebuilder:object:generate=true
|
// +kubebuilder:object:generate=true
|
||||||
|
|
||||||
type AllowedServices struct {
|
type AllowedServices struct {
|
||||||
//+kubebuilder:default=true
|
// +kubebuilder:default=true
|
||||||
// Specifies if NodePort service type resources are allowed for the Tenant. Default is true. Optional.
|
// Specifies if NodePort service type resources are allowed for the Tenant. Default is true. Optional.
|
||||||
NodePort *bool `json:"nodePort,omitempty"`
|
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.
|
// Specifies if ExternalName service type resources are allowed for the Tenant. Default is true. Optional.
|
||||||
ExternalName *bool `json:"externalName,omitempty"`
|
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.
|
// Specifies if LoadBalancer service type resources are allowed for the Tenant. Default is true. Optional.
|
||||||
LoadBalancer *bool `json:"loadBalancer,omitempty"`
|
LoadBalancer *bool `json:"loadBalancer,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user