v1beta2

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 33 Imported by: 3

Documentation

Overview

Package v1beta2 contains API Schema definitions for the capsule v1beta2 API group +kubebuilder:object:generate=true +groupName=capsule.clastix.io

Index

Constants

View Source
const (
	ResourceQuotaAnnotationPrefix = "quota.resources.capsule.clastix.io"
	ResourceUsedAnnotationPrefix  = "used.resources.capsule.clastix.io"
)
View Source
const (
	HardCapsuleQuotaAnnotation = "quota.capsule.clastix.io/hard-"
	UsedCapsuleQuotaAnnotation = "quota.capsule.clastix.io/used-"
)
View Source
const (
	TenantStateActive      tenantState = "Active"
	TenantStateCordoned    tenantState = "Cordoned"
	TenantStateTerminating tenantState = "Terminating"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "capsule.clastix.io", Version: "v1beta2"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func GetLimitResourceFromTenant

func GetLimitResourceFromTenant(tenant Tenant, kindGroup string) (int64, error)

func GetTypeLabel

func GetTypeLabel(t metav1.Object) (label string, err error)

func GetUsedResourceFromTenant

func GetUsedResourceFromTenant(tenant Tenant, kindGroup string) (int64, error)

func HardQuotaFor

func HardQuotaFor(resource fmt.Stringer) (string, error)

func LimitAnnotationForResource

func LimitAnnotationForResource(kindGroup string) string

func UsedAnnotationForResource

func UsedAnnotationForResource(kindGroup string) string

func UsedQuotaFor

func UsedQuotaFor(resource fmt.Stringer) (string, error)

Types

type AdditionalRoleBindingsSpec

type AdditionalRoleBindingsSpec struct {
	ClusterRoleName string `json:"clusterRoleName"`
	// kubebuilder:validation:Minimum=1
	Subjects []rbacv1.Subject `json:"subjects"`
}

func (*AdditionalRoleBindingsSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalRoleBindingsSpec.

func (*AdditionalRoleBindingsSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CapsuleConfiguration

type CapsuleConfiguration struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	Spec CapsuleConfigurationSpec `json:"spec"`

	// +optional
	Status CapsuleConfigurationStatus `json:"status,omitzero"`
}

CapsuleConfiguration is the Schema for the Capsule configuration API.

func (*CapsuleConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapsuleConfiguration.

func (*CapsuleConfiguration) DeepCopyInto

func (in *CapsuleConfiguration) DeepCopyInto(out *CapsuleConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CapsuleConfiguration) DeepCopyObject

func (in *CapsuleConfiguration) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CapsuleConfigurationList

type CapsuleConfigurationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`

	Items []CapsuleConfiguration `json:"items"`
}

CapsuleConfigurationList contains a list of CapsuleConfiguration.

func (*CapsuleConfigurationList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapsuleConfigurationList.

func (*CapsuleConfigurationList) DeepCopyInto

func (in *CapsuleConfigurationList) DeepCopyInto(out *CapsuleConfigurationList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CapsuleConfigurationList) DeepCopyObject

func (in *CapsuleConfigurationList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CapsuleConfigurationSpec

type CapsuleConfigurationSpec struct {
	// Define entities which are considered part of the Capsule construct
	// Users not mentioned here will be ignored by Capsule
	Users rbac.UserListSpec `json:"users,omitempty"`
	// Define groups which when found in the request of a user will be ignored by the Capsule
	// this might be useful if you have one group where all the users are in, but you want to separate administrators from normal users with additional groups.
	IgnoreUserWithGroups []string `json:"ignoreUserWithGroups,omitempty"`
	// ServiceAccounts within tenant namespaces can be promoted to owners of the given tenant
	// this can be achieved by labeling the serviceaccount and then they are considered owners. This can only be done by other owners of the tenant.
	// However ServiceAccounts which have been promoted to owner can not promote further serviceAccounts.
	// +kubebuilder:default=false
	AllowServiceAccountPromotion bool `json:"allowServiceAccountPromotion,omitempty"`
	// Enforces the Tenant owner, during Namespace creation, to name it using the selected Tenant name as prefix,
	// separated by a dash. This is useful to avoid Namespace name collision in a public CaaS environment.
	// +kubebuilder:default=false
	ForceTenantPrefix bool `json:"forceTenantPrefix,omitempty"`
	// Disallow creation of namespaces, whose name matches this regexp
	ProtectedNamespaceRegexpString string `json:"protectedNamespaceRegex,omitempty"`
	// Allows to set different name rather than the canonical one for the Capsule configuration objects,
	// such as webhook secret or configurations.
	// +kubebuilder:default={TLSSecretName:"capsule-tls",mutatingWebhookConfigurationName:"capsule-mutating-webhook-configuration",validatingWebhookConfigurationName:"capsule-validating-webhook-configuration"}
	// +optional
	CapsuleResources CapsuleResources `json:"overrides,omitzero"`
	// Allows to set the forbidden metadata for the worker nodes that could be patched by a Tenant.
	// This applies only if the Tenant has an active NodeSelector, and the Owner have right to patch their nodes.
	NodeMetadata *NodeMetadata `json:"nodeMetadata,omitempty"`
	// Toggles the TLS reconciler, the controller that is able to generate CA and certificates for the webhooks
	// when not using an already provided CA and certificate, or when these are managed externally with Vault, or cert-manager.
	// +kubebuilder:default=false
	EnableTLSReconciler bool `json:"enableTLSReconciler"` //nolint:tagliatelle
	// Define entities which can act as Administrators in the capsule construct
	// These entities are automatically owners for all existing tenants. Meaning they can add namespaces to any tenant. However they must be specific by using the capsule label
	// for interacting with namespaces. Because if that label is not defined, it's assumed that namespace interaction was not targeted towards a tenant and will therefor
	// be ignored by capsule.
	Administrators rbac.UserListSpec `json:"administrators,omitempty"`
	// Configuration for dynamic Validating and Mutating Admission webhooks managed by Capsule.
	Admission DynamicAdmission `json:"admission,omitempty"`
	// Define Properties for managed ClusterRoles by Capsule
	// +kubebuilder:default={}
	RBAC *RBACConfiguration `json:"rbac"`
	// Define the period of time upon a cache invalidation is executed for all caches.
	// +kubebuilder:default="24h"
	CacheInvalidation metav1.Duration `json:"cacheInvalidation"`
	// Service Account Client configuration for impersonation properties
	// +optional
	Impersonation ServiceAccountClient `json:"impersonation,omitzero"`

	// Deprecated: use users property instead (https://projectcapsule.dev/docs/operating/setup/configuration/#users)
	//
	// Names of the users considered as Capsule users.
	UserNames []string `json:"userNames,omitempty"`
	// Deprecated: use users property instead (https://projectcapsule.dev/docs/operating/setup/configuration/#users)
	//
	// Names of the groups considered as Capsule users.
	UserGroups []string `json:"userGroups,omitempty"`
}

CapsuleConfigurationSpec defines the Capsule configuration.

func (*CapsuleConfigurationSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapsuleConfigurationSpec.

func (*CapsuleConfigurationSpec) DeepCopyInto

func (in *CapsuleConfigurationSpec) DeepCopyInto(out *CapsuleConfigurationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CapsuleConfigurationStatus added in v0.13.0

type CapsuleConfigurationStatus struct {
	// Users which are considered Capsule Users and are bound to the Capsule Tenant construct.
	Users rbac.UserListSpec `json:"users,omitempty"`
}

CapsuleConfigurationStatus defines the Capsule configuration status.

func (*CapsuleConfigurationStatus) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapsuleConfigurationStatus.

func (*CapsuleConfigurationStatus) DeepCopyInto added in v0.13.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CapsuleResources

type CapsuleResources struct {
	// Defines the Secret name used for the webhook server.
	// Must be in the same Namespace where the Capsule Deployment is deployed.
	// +kubebuilder:default=capsule-tls
	TLSSecretName string `json:"TLSSecretName"` //nolint:tagliatelle
	// Deprecated: use dynamic admission instead
	//
	// Name of the MutatingWebhookConfiguration which contains the dynamic admission controller paths and resources.
	// +kubebuilder:default=capsule-mutating-webhook-configuration
	MutatingWebhookConfigurationName string `json:"mutatingWebhookConfigurationName"`
	// Deprecated: use dynamic admission instead
	//
	// Name of the ValidatingWebhookConfiguration which contains the dynamic admission controller paths and resources.
	// +kubebuilder:default=capsule-validating-webhook-configuration
	ValidatingWebhookConfigurationName string `json:"validatingWebhookConfigurationName"`
}

func (*CapsuleResources) DeepCopy

func (in *CapsuleResources) DeepCopy() *CapsuleResources

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapsuleResources.

func (*CapsuleResources) DeepCopyInto

func (in *CapsuleResources) DeepCopyInto(out *CapsuleResources)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomQuota added in v0.13.0

type CustomQuota struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	Spec CustomQuotaSpec `json:"spec"`

	// +optional
	Status CustomQuotaStatus `json:"status,omitzero"`
}

func (*CustomQuota) DeepCopy added in v0.13.0

func (in *CustomQuota) DeepCopy() *CustomQuota

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomQuota.

func (*CustomQuota) DeepCopyInto added in v0.13.0

func (in *CustomQuota) DeepCopyInto(out *CustomQuota)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CustomQuota) DeepCopyObject added in v0.13.0

func (in *CustomQuota) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CustomQuotaClaimItem added in v0.13.0

type CustomQuotaClaimItem struct {
	metav1.GroupVersionKind               `json:",inline"`
	meta.NamespacedObjectWithUIDReference `json:",inline"`

	// Resource Quantity for given item
	Usage resource.Quantity `json:"usage"`
}

func (*CustomQuotaClaimItem) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomQuotaClaimItem.

func (*CustomQuotaClaimItem) DeepCopyInto added in v0.13.0

func (in *CustomQuotaClaimItem) DeepCopyInto(out *CustomQuotaClaimItem)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomQuotaList added in v0.13.0

type CustomQuotaList struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ListMeta `json:"metadata,omitzero"`

	Items []CustomQuota `json:"items"`
}

CustomQuotaList contains a list of CustomQuota.

func (*CustomQuotaList) DeepCopy added in v0.13.0

func (in *CustomQuotaList) DeepCopy() *CustomQuotaList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomQuotaList.

func (*CustomQuotaList) DeepCopyInto added in v0.13.0

func (in *CustomQuotaList) DeepCopyInto(out *CustomQuotaList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CustomQuotaList) DeepCopyObject added in v0.13.0

func (in *CustomQuotaList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CustomQuotaOptionsSpec added in v0.13.0

type CustomQuotaOptionsSpec struct {
	// Additionally expose usage metrics for each claim contributing to the quota.
	// This is disabled by default to avoid high cardinality in the metrics, but can be enabled for more granular monitoring and alerting.
	// +kubebuilder:default:=false
	EmitPerClaimMetrics bool `json:"emitMetricPerClaimUsage,omitempty"`
}

CustomQuotaOptionsSpec.

func (*CustomQuotaOptionsSpec) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomQuotaOptionsSpec.

func (*CustomQuotaOptionsSpec) DeepCopyInto added in v0.13.0

func (in *CustomQuotaOptionsSpec) DeepCopyInto(out *CustomQuotaOptionsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomQuotaSpec added in v0.13.0

type CustomQuotaSpec struct {
	// Select items governed by this quota
	ScopeSelectors []metav1.LabelSelector `json:"scopeSelectors,omitempty"`
	// Resource Quantity as limit
	Limit resource.Quantity `json:"limit"`
	// Target resource
	Sources []CustomQuotaSpecSource `json:"sources,omitzero"`
	// Additional Options for the CustomQuotaSpecification
	// +kubebuilder:default:={emitMetricPerClaimUsage:false}
	Options *CustomQuotaOptionsSpec `json:"options,omitzero"`
}

CustomQuotaSpec.

func (*CustomQuotaSpec) CollectJSONPathExpressions added in v0.13.0

func (c *CustomQuotaSpec) CollectJSONPathExpressions() (expressions []string)

func (*CustomQuotaSpec) DeepCopy added in v0.13.0

func (in *CustomQuotaSpec) DeepCopy() *CustomQuotaSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomQuotaSpec.

func (*CustomQuotaSpec) DeepCopyInto added in v0.13.0

func (in *CustomQuotaSpec) DeepCopyInto(out *CustomQuotaSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomQuotaSpecSource added in v0.13.0

type CustomQuotaSpecSource struct {
	gvk.VersionKind             `json:",inline"`
	CustomQuotaSpecSourceConfig `json:",inline"`
}

+kubebuilder:validation:XValidation:rule="self.op == 'count' ? !has(self.path) || size(self.path) == 0 : has(self.path) && size(self.path) > 0",message="path must be empty when op is 'count'; otherwise path must be set and non-empty"

func (*CustomQuotaSpecSource) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomQuotaSpecSource.

func (*CustomQuotaSpecSource) DeepCopyInto added in v0.13.0

func (in *CustomQuotaSpecSource) DeepCopyInto(out *CustomQuotaSpecSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomQuotaSpecSourceConfig added in v0.13.0

type CustomQuotaSpecSourceConfig struct {
	// Path on GVK where usage is evaluated.
	// Must be empty when op is "count".
	// Required and non-empty for all other operations.
	// +optional
	Path string `json:"path,omitempty"`

	// Operation used to evaluate usage.
	// +kubebuilder:default:=add
	Operation quota.Operation `json:"op,omitempty"`

	// Provide more granular selectors for these sources
	// The ScopeSelector and NamespaceSelector are always applied
	// Allowing these selectors to make further selecting on the resulting subset.
	Selectors []selectors.SelectorWithFields `json:"selectors,omitempty"`
}

func (*CustomQuotaSpecSourceConfig) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomQuotaSpecSourceConfig.

func (*CustomQuotaSpecSourceConfig) DeepCopyInto added in v0.13.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomQuotaStatus added in v0.13.0

type CustomQuotaStatus struct {
	// Usage measurements
	// +optional
	Usage CustomQuotaStatusUsage `json:"usage,omitempty"`
	// Objects regarding this policy
	Claims []CustomQuotaClaimItem `json:"claims,omitempty"`
	// Targeting GVK
	Targets []CustomQuotaStatusTarget `json:"targets"`
	// Conditions
	Conditions meta.ConditionList `json:"conditions"`
}

CustomQuotaStatus defines the observed state of GlobalResourceQuota.

func (*CustomQuotaStatus) DeepCopy added in v0.13.0

func (in *CustomQuotaStatus) DeepCopy() *CustomQuotaStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomQuotaStatus.

func (*CustomQuotaStatus) DeepCopyInto added in v0.13.0

func (in *CustomQuotaStatus) DeepCopyInto(out *CustomQuotaStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CustomQuotaStatus) HasClaimUID added in v0.13.0

func (s *CustomQuotaStatus) HasClaimUID(uid types.UID) bool

type CustomQuotaStatusTarget added in v0.13.0

type CustomQuotaStatusTarget struct {
	metav1.GroupVersionKind     `json:",inline"`
	CustomQuotaSpecSourceConfig `json:",inline"`

	// Path on GVK where usage is evaluated
	Scope k8smeta.RESTScopeName `json:"scope,omitempty"`
}

func (*CustomQuotaStatusTarget) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomQuotaStatusTarget.

func (*CustomQuotaStatusTarget) DeepCopyInto added in v0.13.0

func (in *CustomQuotaStatusTarget) DeepCopyInto(out *CustomQuotaStatusTarget)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomQuotaStatusUsage added in v0.13.0

type CustomQuotaStatusUsage struct {
	// Used is the current observed total usage of the resource.
	// +optional
	Used resource.Quantity `json:"used"`
	// Used is the current observed total available of the resource (limit - used).
	// +optional
	Available resource.Quantity `json:"available"`
}

CustomQuotaStatus defines the observed state of GlobalResourceQuota.

func (*CustomQuotaStatusUsage) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomQuotaStatusUsage.

func (*CustomQuotaStatusUsage) DeepCopyInto added in v0.13.0

func (in *CustomQuotaStatusUsage) DeepCopyInto(out *CustomQuotaStatusUsage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DynamicAdmission added in v0.13.0

type DynamicAdmission struct {
	// Service Name of the Admission Service
	// +kubebuilder:default=capsule-webhook-service
	ServiceName string `json:"serviceName,omitempty"`

	// Configure dynamic Mutating Admission for Capsule
	Mutating *DynamicMutatingAdmissionConfig `json:"mutating,omitempty"`

	// Configure dynamic Validating Admission for Capsule
	Validating *DynamicValidatingAdmissionConfig `json:"validating,omitempty"`
}

func (*DynamicAdmission) DeepCopy added in v0.13.0

func (in *DynamicAdmission) DeepCopy() *DynamicAdmission

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicAdmission.

func (*DynamicAdmission) DeepCopyInto added in v0.13.0

func (in *DynamicAdmission) DeepCopyInto(out *DynamicAdmission)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DynamicMutatingAdmissionConfig added in v0.13.0

type DynamicMutatingAdmissionConfig struct {
	admission.DynamicAdmissionConfig `json:",inline"`

	// Define Dynamic Admission Webhooks
	// +optional
	Webhooks []*admission.MutatingWebhook `json:"webhooks,omitempty"`
}

func (*DynamicMutatingAdmissionConfig) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicMutatingAdmissionConfig.

func (*DynamicMutatingAdmissionConfig) DeepCopyInto added in v0.13.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DynamicValidatingAdmissionConfig added in v0.13.0

type DynamicValidatingAdmissionConfig struct {
	admission.DynamicAdmissionConfig `json:",inline"`

	// Define Dynamic Admission Webhooks
	// +optional
	Webhooks []*admission.ValidatingWebhook `json:"webhooks,omitempty"`
}

func (*DynamicValidatingAdmissionConfig) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicValidatingAdmissionConfig.

func (*DynamicValidatingAdmissionConfig) DeepCopyInto added in v0.13.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GatewayOptions added in v0.10.0

type GatewayOptions struct {
	AllowedClasses *api.DefaultAllowedListSpec `json:"allowedClasses,omitempty"`
}

func (*GatewayOptions) DeepCopy added in v0.10.0

func (in *GatewayOptions) DeepCopy() *GatewayOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayOptions.

func (*GatewayOptions) DeepCopyInto added in v0.10.0

func (in *GatewayOptions) DeepCopyInto(out *GatewayOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GlobalCustomQuota added in v0.13.0

type GlobalCustomQuota struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	Spec GlobalCustomQuotaSpec `json:"spec"`

	// +optional
	Status GlobalCustomQuotaStatus `json:"status,omitzero"`
}

func (*GlobalCustomQuota) DeepCopy added in v0.13.0

func (in *GlobalCustomQuota) DeepCopy() *GlobalCustomQuota

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalCustomQuota.

func (*GlobalCustomQuota) DeepCopyInto added in v0.13.0

func (in *GlobalCustomQuota) DeepCopyInto(out *GlobalCustomQuota)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GlobalCustomQuota) DeepCopyObject added in v0.13.0

func (in *GlobalCustomQuota) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GlobalCustomQuotaList added in v0.13.0

type GlobalCustomQuotaList struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ListMeta `json:"metadata,omitzero"`

	Items []GlobalCustomQuota `json:"items"`
}

ClusterCustomQuotaList contains a list of ClusterCustomQuota.

func (*GlobalCustomQuotaList) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalCustomQuotaList.

func (*GlobalCustomQuotaList) DeepCopyInto added in v0.13.0

func (in *GlobalCustomQuotaList) DeepCopyInto(out *GlobalCustomQuotaList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GlobalCustomQuotaList) DeepCopyObject added in v0.13.0

func (in *GlobalCustomQuotaList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GlobalCustomQuotaSpec added in v0.13.0

type GlobalCustomQuotaSpec struct {
	CustomQuotaSpec `json:",inline"`

	// Select specifc namespaces where this Quota selects items.
	NamespaceSelectors []selectors.NamespaceSelector `json:"namespaceSelectors,omitempty"`
}

ClusterCustomQuotaSpec.

func (*GlobalCustomQuotaSpec) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalCustomQuotaSpec.

func (*GlobalCustomQuotaSpec) DeepCopyInto added in v0.13.0

func (in *GlobalCustomQuotaSpec) DeepCopyInto(out *GlobalCustomQuotaSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GlobalCustomQuotaStatus added in v0.13.0

type GlobalCustomQuotaStatus struct {
	CustomQuotaStatus `json:",inline"`

	// Observed Namespaces
	Namespaces []string `json:"namespaces,omitempty"`
}

CustomQuotaStatus defines the observed state of GlobalResourceQuota.

func (*GlobalCustomQuotaStatus) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalCustomQuotaStatus.

func (*GlobalCustomQuotaStatus) DeepCopyInto added in v0.13.0

func (in *GlobalCustomQuotaStatus) DeepCopyInto(out *GlobalCustomQuotaStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GlobalCustomQuotaStatus) NamespacePresent added in v0.13.0

func (g *GlobalCustomQuotaStatus) NamespacePresent(ns string) bool

type GlobalTenantResource

type GlobalTenantResource struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	Spec GlobalTenantResourceSpec `json:"spec"`

	// +optional
	Status GlobalTenantResourceStatus `json:"status,omitzero"`
}

GlobalTenantResource allows to propagate resource replications to a specific subset of Tenant resources.

func (*GlobalTenantResource) AssignTenants added in v0.13.0

func (in *GlobalTenantResource) AssignTenants(tnts []Tenant)

func (*GlobalTenantResource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalTenantResource.

func (*GlobalTenantResource) DeepCopyInto

func (in *GlobalTenantResource) DeepCopyInto(out *GlobalTenantResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GlobalTenantResource) DeepCopyObject

func (in *GlobalTenantResource) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GlobalTenantResourceList

type GlobalTenantResourceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`

	Items []GlobalTenantResource `json:"items"`
}

GlobalTenantResourceList contains a list of GlobalTenantResource.

func (*GlobalTenantResourceList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalTenantResourceList.

func (*GlobalTenantResourceList) DeepCopyInto

func (in *GlobalTenantResourceList) DeepCopyInto(out *GlobalTenantResourceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GlobalTenantResourceList) DeepCopyObject

func (in *GlobalTenantResourceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GlobalTenantResourceSpec

type GlobalTenantResourceSpec struct {
	TenantResourceCommonSpec `json:",inline"`

	// Local ServiceAccount which will perform all the actions defined in the TenantResource
	// You must provide permissions accordingly to that ServiceAccount
	//+optional
	ServiceAccount *meta.NamespacedRFC1123ObjectReferenceWithNamespace `json:"serviceAccount,omitzero"`
	// Resource Scope, Can either be
	// - Tenant: Create Resources for each tenant  in selected Tenants
	// - Namespace: Create Resources for each namespace in selected Tenants
	// +kubebuilder:default:=Namespace
	// +optional
	Scope api.ResourceScope `json:"scope"`
	// Defines the Tenant selector used target the tenants on which resources must be propagated.
	// +optional
	TenantSelector metav1.LabelSelector `json:"tenantSelector,omitzero"`
}

GlobalTenantResourceSpec defines the desired state of GlobalTenantResource.

func (*GlobalTenantResourceSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalTenantResourceSpec.

func (*GlobalTenantResourceSpec) DeepCopyInto

func (in *GlobalTenantResourceSpec) DeepCopyInto(out *GlobalTenantResourceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GlobalTenantResourceStatus

type GlobalTenantResourceStatus struct {
	TenantResourceCommonStatus `json:",inline"`

	// List of Tenants addressed by the GlobalTenantResource.
	SelectedTenants []string `json:"selectedTenants,omitempty"`
}

GlobalTenantResourceStatus defines the observed state of GlobalTenantResource.

func (*GlobalTenantResourceStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalTenantResourceStatus.

func (*GlobalTenantResourceStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IngressOptions

type IngressOptions struct {
	// Specifies the allowed IngressClasses assigned to the Tenant.
	// Capsule assures that all Ingress resources created in the Tenant can use only one of the allowed IngressClasses.
	// A default value can be specified, and all the Ingress resources created will inherit the declared class.
	// Optional.
	AllowedClasses *api.DefaultAllowedListSpec `json:"allowedClasses,omitempty"`
	// Defines the scope of hostname collision check performed when Tenant Owners create Ingress with allowed hostnames.
	//
	//
	// - Cluster: disallow the creation of an Ingress if the pair hostname and path is already used across the Namespaces managed by Capsule.
	//
	// - Tenant: disallow the creation of an Ingress if the pair hostname and path is already used across the Namespaces of the Tenant.
	//
	// - Namespace: disallow the creation of an Ingress if the pair hostname and path is already used in the Ingress Namespace.
	//
	//
	// Optional.
	// +kubebuilder:default=Disabled
	HostnameCollisionScope api.HostnameCollisionScope `json:"hostnameCollisionScope,omitempty"`
	// Specifies the allowed hostnames in Ingresses for the given Tenant. Capsule assures that all Ingress resources created in the Tenant can use only one of the allowed hostnames. Optional.
	AllowedHostnames *api.AllowedListSpec `json:"allowedHostnames,omitempty"`
	// Toggles the ability for Ingress resources created in a Tenant to have a hostname wildcard.
	AllowWildcardHostnames bool `json:"allowWildcardHostnames,omitempty"`
}

func (*IngressOptions) DeepCopy

func (in *IngressOptions) DeepCopy() *IngressOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressOptions.

func (*IngressOptions) DeepCopyInto

func (in *IngressOptions) DeepCopyInto(out *IngressOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NamespaceOptions

type NamespaceOptions struct {
	// +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"`
	// Deprecated: Use additionalMetadataList instead (https://projectcapsule.dev/docs/tenants/metadata/#additionalmetadatalist)
	//
	// Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional.
	AdditionalMetadata *api.AdditionalMetadataSpec `json:"additionalMetadata,omitempty"`
	// Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant via a list. Optional.
	AdditionalMetadataList []api.AdditionalMetadataSelectorSpec `json:"additionalMetadataList,omitempty"`
	// Required Metadata for namespace within this tenant
	// +optional
	RequiredMetadata *RequiredMetadata `json:"requiredMetadata,omitzero"`
	// Define the labels that a Tenant Owner cannot set for their Namespace resources.
	// +optional
	ForbiddenLabels api.ForbiddenListSpec `json:"forbiddenLabels,omitzero"`
	// Define the annotations that a Tenant Owner cannot set for their Namespace resources.
	// +optional
	ForbiddenAnnotations api.ForbiddenListSpec `json:"forbiddenAnnotations,omitzero"`
	// If enabled only metadata from additionalMetadata is reconciled to the namespaces.
	//+kubebuilder:default:=false
	ManagedMetadataOnly bool `json:"managedMetadataOnly,omitempty"`
}

func (*NamespaceOptions) DeepCopy

func (in *NamespaceOptions) DeepCopy() *NamespaceOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceOptions.

func (*NamespaceOptions) DeepCopyInto

func (in *NamespaceOptions) DeepCopyInto(out *NamespaceOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeMetadata

type NodeMetadata struct {
	// Define the labels that a Tenant Owner cannot set for their nodes.
	// +optional
	ForbiddenLabels api.ForbiddenListSpec `json:"forbiddenLabels,omitzero"`
	// Define the annotations that a Tenant Owner cannot set for their nodes.
	// +optional
	ForbiddenAnnotations api.ForbiddenListSpec `json:"forbiddenAnnotations,omitzero"`
}

func (*NodeMetadata) DeepCopy

func (in *NodeMetadata) DeepCopy() *NodeMetadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMetadata.

func (*NodeMetadata) DeepCopyInto

func (in *NodeMetadata) DeepCopyInto(out *NodeMetadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NonLimitedResourceError

type NonLimitedResourceError struct {
	// contains filtered or unexported fields
}

func NewNonLimitedResourceError

func NewNonLimitedResourceError(kindGroup string) *NonLimitedResourceError

func (*NonLimitedResourceError) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonLimitedResourceError.

func (*NonLimitedResourceError) DeepCopyInto

func (in *NonLimitedResourceError) DeepCopyInto(out *NonLimitedResourceError)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (NonLimitedResourceError) Error

func (n NonLimitedResourceError) Error() string

type Permissions added in v0.12.0

type Permissions struct {
	// Matches TenantOwner objects which are promoted to owners of this tenant
	// The elements are OR operations and independent. You can see the resulting Tenant Owners
	// in the Status.Owners specification of the Tenant.
	MatchOwners []*metav1.LabelSelector `json:"matchOwners,omitempty"`

	// ClusterRoles granted to the promoted ServiceAccounts across the Tenant
	//+kubebuilder:default:=true
	AllowOwnerPromotion bool `json:"allowOwnerPromotion,omitempty"`
}

func (*Permissions) DeepCopy added in v0.12.0

func (in *Permissions) DeepCopy() *Permissions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Permissions.

func (*Permissions) DeepCopyInto added in v0.12.0

func (in *Permissions) DeepCopyInto(out *Permissions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Permissions) ListMatchingOwners added in v0.12.0

func (p *Permissions) ListMatchingOwners(
	ctx context.Context,
	c client.Reader,
	tnt string,
	opts ...client.ListOption,
) ([]*TenantOwner, error)

type QuantityLedger added in v0.13.0

type QuantityLedger struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   QuantityLedgerSpec   `json:"spec,omitempty"`
	Status QuantityLedgerStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=quantityledgers,scope=Namespaced,shortName=ql +kubebuilder:printcolumn:name="TargetKind",type=string,JSONPath=`.spec.targetRef.kind` +kubebuilder:printcolumn:name="TargetNamespace",type=string,JSONPath=`.spec.targetRef.namespace` +kubebuilder:printcolumn:name="TargetName",type=string,JSONPath=`.spec.targetRef.name` +kubebuilder:printcolumn:name="Reserved",type=string,JSONPath=`.status.reserved` +kubebuilder:printcolumn:name="Reservations",type=integer,JSONPath=`.status.reservations.size()` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

func (*QuantityLedger) DeepCopy added in v0.13.0

func (in *QuantityLedger) DeepCopy() *QuantityLedger

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuantityLedger.

func (*QuantityLedger) DeepCopyInto added in v0.13.0

func (in *QuantityLedger) DeepCopyInto(out *QuantityLedger)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*QuantityLedger) DeepCopyObject added in v0.13.0

func (in *QuantityLedger) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type QuantityLedgerList added in v0.13.0

type QuantityLedgerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []QuantityLedger `json:"items"`
}

+kubebuilder:object:root=true

func (*QuantityLedgerList) DeepCopy added in v0.13.0

func (in *QuantityLedgerList) DeepCopy() *QuantityLedgerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuantityLedgerList.

func (*QuantityLedgerList) DeepCopyInto added in v0.13.0

func (in *QuantityLedgerList) DeepCopyInto(out *QuantityLedgerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*QuantityLedgerList) DeepCopyObject added in v0.13.0

func (in *QuantityLedgerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type QuantityLedgerObjectRef added in v0.13.0

type QuantityLedgerObjectRef struct {
	// APIGroup of the tracked object.
	// +optional
	APIGroup string `json:"apiGroup,omitempty"`

	// APIVersion of the tracked object, for example "v1".
	// +kubebuilder:validation:MinLength=1
	APIVersion string `json:"apiVersion"`

	// Kind of the tracked object, for example "Pod".
	// +kubebuilder:validation:MinLength=1
	Kind string `json:"kind"`

	// Namespace of the tracked object.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Name of the tracked object.
	// +optional
	Name string `json:"name,omitempty"`

	// UID of the tracked object.
	// +optional
	UID types.UID `json:"uid,omitempty"`
}

QuotaLedgerObjectRef identifies the object for which a reservation exists. UID may be empty for CREATE admission before the object is persisted.

func (*QuantityLedgerObjectRef) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuantityLedgerObjectRef.

func (*QuantityLedgerObjectRef) DeepCopyInto added in v0.13.0

func (in *QuantityLedgerObjectRef) DeepCopyInto(out *QuantityLedgerObjectRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QuantityLedgerPendingDelete added in v0.13.0

type QuantityLedgerPendingDelete struct {
	ObjectRef QuantityLedgerObjectRef `json:"objectRef"`
	CreatedAt metav1.Time             `json:"createdAt"`
}

QuantityLedgerPendingDelete tracks objects that are expected to disappear from claims soon, but may still temporarily appear during rebuild due to propagation delay.

func (*QuantityLedgerPendingDelete) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuantityLedgerPendingDelete.

func (*QuantityLedgerPendingDelete) DeepCopyInto added in v0.13.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QuantityLedgerReservation added in v0.13.0

type QuantityLedgerReservation struct {
	// Unique reservation identifier.
	// +kubebuilder:validation:MinLength=1
	ID string `json:"id"`

	// Amount reserved for this request.
	Usage resource.Quantity `json:"usage"`

	// Object that this reservation is intended to create/update.
	ObjectRef QuantityLedgerObjectRef `json:"objectRef"`

	// Time the reservation was first created.
	CreatedAt metav1.Time `json:"createdAt"`

	// Time the reservation was last refreshed or updated.
	UpdatedAt metav1.Time `json:"updatedAt"`

	// Time after which the reservation may be considered stale.
	// +optional
	ExpiresAt *metav1.Time `json:"expiresAt,omitempty"`
}

QuantityLedgerReservation represents one active inflight reservation. ID should be stable for retries of the same admission request. In practice, admission.Request.UID is a good default.

func (*QuantityLedgerReservation) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuantityLedgerReservation.

func (*QuantityLedgerReservation) DeepCopyInto added in v0.13.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QuantityLedgerSpec added in v0.13.0

type QuantityLedgerSpec struct {
	// TargetRef points to the quota object that this ledger belongs to.
	TargetRef QuantityLedgerTargetRef `json:"targetRef"`
}

QuotaLedgerSpec contains the immutable target reference.

func (*QuantityLedgerSpec) DeepCopy added in v0.13.0

func (in *QuantityLedgerSpec) DeepCopy() *QuantityLedgerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuantityLedgerSpec.

func (*QuantityLedgerSpec) DeepCopyInto added in v0.13.0

func (in *QuantityLedgerSpec) DeepCopyInto(out *QuantityLedgerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QuantityLedgerStatus added in v0.13.0

type QuantityLedgerStatus struct {
	// Reserved is the aggregate sum of all active reservations.
	// Controllers/webhooks should treat this as derived data from Reservations.
	// +optional
	Reserved resource.Quantity `json:"reserved,omitempty"`

	// Active inflight reservations for this quota.
	// +optional
	Reservations []QuantityLedgerReservation `json:"reservations,omitempty"`

	// Pending delete hints carried over from admission delete handling.
	// +optional
	PendingDeletes []QuantityLedgerPendingDelete `json:"pendingDeletes,omitempty"`

	// Conditions for the resource claim
	// +optional
	Conditions meta.ConditionList `json:"conditions,omitzero"`

	// Allocated is the admission-owned total that has been accepted by the webhook.
	// It must be updated only through optimistic concurrency on QuantityLedger.
	Allocated resource.Quantity `json:"allocated,omitempty"`
}

QuantityLedgerStatus contains the mutable coordination state used by admission and quota controllers.

func (*QuantityLedgerStatus) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuantityLedgerStatus.

func (*QuantityLedgerStatus) DeepCopyInto added in v0.13.0

func (in *QuantityLedgerStatus) DeepCopyInto(out *QuantityLedgerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QuantityLedgerTargetRef added in v0.13.0

type QuantityLedgerTargetRef struct {
	// APIGroup of the target quota resource, for example "capsule.clastix.io".
	// +optional
	APIGroup string `json:"apiGroup,omitempty"`

	// Kind of the target quota resource, for example "CustomQuota" or "GlobalCustomQuota".
	// +kubebuilder:validation:MinLength=1
	Kind string `json:"kind"`

	// Namespace of the target quota resource.
	// Must be empty for cluster-scoped targets.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Name of the target quota resource.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`

	// UID of the target quota resource.
	// Optional, but useful for stale reference detection.
	// +optional
	UID types.UID `json:"uid,omitempty"`
}

QuotaLedgerTargetRef identifies the quota object that owns this ledger. Namespace is optional for cluster-scoped targets such as GlobalCustomQuota.

func (*QuantityLedgerTargetRef) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuantityLedgerTargetRef.

func (*QuantityLedgerTargetRef) DeepCopyInto added in v0.13.0

func (in *QuantityLedgerTargetRef) DeepCopyInto(out *QuantityLedgerTargetRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RBACConfiguration added in v0.13.0

type RBACConfiguration struct {
	// The ClusterRoles applied for Administrators
	// +kubebuilder:default={capsule-namespace-deleter}
	AdministrationClusterRoles []string `json:"administrationClusterRoles,omitempty"`
	// The ClusterRoles applied for ServiceAccounts which had owner Promotion
	// +kubebuilder:default={capsule-namespace-provisioner,capsule-namespace-deleter}
	PromotionClusterRoles []string `json:"promotionClusterRoles,omitempty"`
	// Name for the ClusterRole required to grant Namespace Deletion permissions.
	// +kubebuilder:default=capsule-namespace-deleter
	DeleterClusterRole string `json:"deleter,omitempty"`
	// Name for the ClusterRole required to grant Namespace Provision permissions.
	// +kubebuilder:default=capsule-namespace-provisioner
	ProvisionerClusterRole string `json:"provisioner,omitempty"`
}

func (*RBACConfiguration) DeepCopy added in v0.13.0

func (in *RBACConfiguration) DeepCopy() *RBACConfiguration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RBACConfiguration.

func (*RBACConfiguration) DeepCopyInto added in v0.13.0

func (in *RBACConfiguration) DeepCopyInto(out *RBACConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RawExtension

type RawExtension struct {
	runtime.RawExtension `json:",inline"`
}

+kubebuilder:validation:XPreserveUnknownFields

func (*RawExtension) DeepCopy

func (in *RawExtension) DeepCopy() *RawExtension

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawExtension.

func (*RawExtension) DeepCopyInto

func (in *RawExtension) DeepCopyInto(out *RawExtension)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RequiredMetadata added in v0.13.0

type RequiredMetadata struct {
	// Labels that must be defined for each namespace
	// +optional
	Labels map[string]string `json:"labels,omitzero"`

	// Annotations that must be defined for each namespace
	// +optional
	Annotations map[string]string `json:"annotations,omitzero"`
}

func (*RequiredMetadata) DeepCopy added in v0.13.0

func (in *RequiredMetadata) DeepCopy() *RequiredMetadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequiredMetadata.

func (*RequiredMetadata) DeepCopyInto added in v0.13.0

func (in *RequiredMetadata) DeepCopyInto(out *RequiredMetadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourcePool added in v0.10.0

type ResourcePool struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	Spec ResourcePoolSpec `json:"spec"`

	// +optional
	Status ResourcePoolStatus `json:"status,omitzero"`
}

Resourcepools allows you to define a set of resources as known from ResoureQuotas. The Resourcepools are defined at cluster-scope an should be administrated by cluster-administrators. However they create an interface, where cluster-administrators can define from which namespaces resources from a Resourcepool can be claimed. The claiming is done via a namespaced CRD called ResourcePoolClaim. Then it's up the group of users within these namespaces, to manage the resources they consume per namespace. Each Resourcepool provisions a ResourceQuotainto all the selected namespaces. Then essentially the ResourcePoolClaims, when they can be assigned to the ResourcePool stack resources on top of that ResourceQuota based on the namspace, where the ResourcePoolClaim was made from.

func (*ResourcePool) AddClaimToStatus added in v0.10.0

func (r *ResourcePool) AddClaimToStatus(claim *ResourcePoolClaim)

func (*ResourcePool) AssignClaims added in v0.10.0

func (r *ResourcePool) AssignClaims()

func (*ResourcePool) AssignNamespaces added in v0.10.0

func (r *ResourcePool) AssignNamespaces(namespaces []corev1.Namespace)

func (*ResourcePool) CalculateAvailableResources added in v0.10.0

func (r *ResourcePool) CalculateAvailableResources()

func (*ResourcePool) CalculateClaimedResources added in v0.10.0

func (r *ResourcePool) CalculateClaimedResources()

func (*ResourcePool) CanClaimFromPool added in v0.10.0

func (r *ResourcePool) CanClaimFromPool(claim corev1.ResourceList) []error

func (*ResourcePool) DeepCopy added in v0.10.0

func (in *ResourcePool) DeepCopy() *ResourcePool

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePool.

func (*ResourcePool) DeepCopyInto added in v0.10.0

func (in *ResourcePool) DeepCopyInto(out *ResourcePool)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourcePool) DeepCopyObject added in v0.10.0

func (in *ResourcePool) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ResourcePool) GetAvailableClaimableResources added in v0.10.0

func (r *ResourcePool) GetAvailableClaimableResources() corev1.ResourceList

func (*ResourcePool) GetClaimFromStatus added in v0.10.0

func (r *ResourcePool) GetClaimFromStatus(cl *ResourcePoolClaim) *ResourcePoolClaimsItem

func (*ResourcePool) GetClaimedByNamespaceClaims added in v0.10.0

func (r *ResourcePool) GetClaimedByNamespaceClaims() (claims map[string]corev1.ResourceList)

Calculate usage for each namespace.

func (*ResourcePool) GetNamespaceClaims added in v0.10.0

func (r *ResourcePool) GetNamespaceClaims(namespace string) (claims map[string]*ResourcePoolClaimsItem, claimedResources corev1.ResourceList)

Gets the total amount of claimed resources for a namespace.

func (*ResourcePool) GetQuotaName added in v0.12.0

func (r *ResourcePool) GetQuotaName() string

func (*ResourcePool) GetResourceQuotaHardResources added in v0.10.0

func (r *ResourcePool) GetResourceQuotaHardResources(namespace string) corev1.ResourceList

Gets the Hard specification for the resourcequotas This takes into account the default resources being used. However they don't count towards the claim usage This can be changed in the future, the default is not calculated as usage because this might interrupt the namespace management As we would need to verify if a new namespace with it's defaults still has place in the Pool. Same with attempting to join existing namespaces.

func (*ResourcePool) RemoveClaimFromStatus added in v0.10.0

func (r *ResourcePool) RemoveClaimFromStatus(claim *ResourcePoolClaim)

type ResourcePoolClaim added in v0.10.0

type ResourcePoolClaim struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	Spec ResourcePoolClaimSpec `json:"spec"`

	// +optional
	Status ResourcePoolClaimStatus `json:"status,omitzero"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Pool",type="string",JSONPath=".status.pool.name",description="The ResourcePool being claimed from" +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description="Ready Status" +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description="Ready Message" +kubebuilder:printcolumn:name="Bound",type="string",JSONPath=".status.conditions[?(@.type==\"Bound\")].status",description="Bound Status" +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type==\"Bound\")].message",description="Bound Message" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="" ResourcePoolClaim is the Schema for the resourcepoolclaims API.

func (*ResourcePoolClaim) DeepCopy added in v0.10.0

func (in *ResourcePoolClaim) DeepCopy() *ResourcePoolClaim

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePoolClaim.

func (*ResourcePoolClaim) DeepCopyInto added in v0.10.0

func (in *ResourcePoolClaim) DeepCopyInto(out *ResourcePoolClaim)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourcePoolClaim) DeepCopyObject added in v0.10.0

func (in *ResourcePoolClaim) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ResourcePoolClaim) GetPool added in v0.13.0

func (r *ResourcePoolClaim) GetPool() string

func (*ResourcePoolClaim) IsAssignedInResourcePool added in v0.13.0

func (r *ResourcePoolClaim) IsAssignedInResourcePool() bool

func (*ResourcePoolClaim) IsBoundInResourcePool added in v0.13.0

func (r *ResourcePoolClaim) IsBoundInResourcePool() bool

func (*ResourcePoolClaim) IsExhaustedInResourcePool added in v0.13.0

func (r *ResourcePoolClaim) IsExhaustedInResourcePool() bool

Indicate the claim is bound to a resource pool.

type ResourcePoolClaimList added in v0.10.0

type ResourcePoolClaimList struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ListMeta `json:"metadata,omitzero"`

	Items []ResourcePoolClaim `json:"items"`
}

+kubebuilder:object:root=true ResourceQuotaClaimList contains a list of ResourceQuotaClaim.

func (*ResourcePoolClaimList) DeepCopy added in v0.10.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePoolClaimList.

func (*ResourcePoolClaimList) DeepCopyInto added in v0.10.0

func (in *ResourcePoolClaimList) DeepCopyInto(out *ResourcePoolClaimList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourcePoolClaimList) DeepCopyObject added in v0.10.0

func (in *ResourcePoolClaimList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ResourcePoolClaimSpec added in v0.10.0

type ResourcePoolClaimSpec struct {
	// If there's the possability to claim from multiple global Quotas
	// You must be specific about which one you want to claim resources from
	// Once bound to a ResourcePool, this field is immutable
	Pool string `json:"pool"`
	// Amount which should be claimed for the resourcequota
	ResourceClaims corev1.ResourceList `json:"claim"`
}

func (*ResourcePoolClaimSpec) DeepCopy added in v0.10.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePoolClaimSpec.

func (*ResourcePoolClaimSpec) DeepCopyInto added in v0.10.0

func (in *ResourcePoolClaimSpec) DeepCopyInto(out *ResourcePoolClaimSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourcePoolClaimStatus added in v0.10.0

type ResourcePoolClaimStatus struct {
	// Reference to the GlobalQuota being claimed from
	// +optional
	Pool meta.LocalRFC1123ObjectReferenceWithUID `json:"pool,omitzero"`
	// Deprecated: Use Conditions
	//
	// +optional
	Condition metav1.Condition `json:"condition,omitzero"`
	// Conditions for the resource claim
	Conditions meta.ConditionList `json:"conditions,omitzero"`
	// Tracks the Usage from Claimed from this claim and available resources
	// +optional
	Allocation ResourcePoolQuotaStatus `json:"allocation,omitzero"`
}

ResourceQuotaClaimStatus defines the observed state of ResourceQuotaClaim.

func (*ResourcePoolClaimStatus) DeepCopy added in v0.10.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePoolClaimStatus.

func (*ResourcePoolClaimStatus) DeepCopyInto added in v0.10.0

func (in *ResourcePoolClaimStatus) DeepCopyInto(out *ResourcePoolClaimStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourcePoolClaimsItem added in v0.10.0

type ResourcePoolClaimsItem struct {
	// Reference to the GlobalQuota being claimed from
	meta.NamespacedRFC1123ObjectReferenceWithNamespaceWithUID `json:",inline"`

	// Claimed resources
	Claims corev1.ResourceList `json:"claims,omitempty"`
}

ResourceQuotaClaimStatus defines the observed state of ResourceQuotaClaim.

func (*ResourcePoolClaimsItem) DeepCopy added in v0.10.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePoolClaimsItem.

func (*ResourcePoolClaimsItem) DeepCopyInto added in v0.10.0

func (in *ResourcePoolClaimsItem) DeepCopyInto(out *ResourcePoolClaimsItem)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourcePoolClaimsList added in v0.10.0

type ResourcePoolClaimsList []*ResourcePoolClaimsItem

func (ResourcePoolClaimsList) DeepCopy added in v0.10.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePoolClaimsList.

func (ResourcePoolClaimsList) DeepCopyInto added in v0.10.0

func (in ResourcePoolClaimsList) DeepCopyInto(out *ResourcePoolClaimsList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourcePoolClaimsList) GetClaimByUID added in v0.10.0

func (r *ResourcePoolClaimsList) GetClaimByUID(uid types.UID) *ResourcePoolClaimsItem

type ResourcePoolList added in v0.10.0

type ResourcePoolList struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ListMeta `json:"metadata,omitzero"`

	Items []ResourcePool `json:"items"`
}

ResourcePoolList contains a list of ResourcePool.

func (*ResourcePoolList) DeepCopy added in v0.10.0

func (in *ResourcePoolList) DeepCopy() *ResourcePoolList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePoolList.

func (*ResourcePoolList) DeepCopyInto added in v0.10.0

func (in *ResourcePoolList) DeepCopyInto(out *ResourcePoolList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourcePoolList) DeepCopyObject added in v0.10.0

func (in *ResourcePoolList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ResourcePoolNamespaceClaimsStatus added in v0.10.0

type ResourcePoolNamespaceClaimsStatus map[string]ResourcePoolClaimsList

func (ResourcePoolNamespaceClaimsStatus) DeepCopy added in v0.10.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePoolNamespaceClaimsStatus.

func (ResourcePoolNamespaceClaimsStatus) DeepCopyInto added in v0.10.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourcePoolQuotaStatus added in v0.10.0

type ResourcePoolQuotaStatus struct {
	// Hard is the set of enforced hard limits for each named resource.
	// More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
	// +optional
	Hard corev1.ResourceList `json:"hard,omitempty" protobuf:"bytes,1,rep,name=hard,casttype=ResourceList,castkey=ResourceName"`
	// Used is the current observed total usage of the resource in the namespace.
	// +optional
	Claimed corev1.ResourceList `json:"used,omitempty" protobuf:"bytes,2,rep,name=used,casttype=ResourceList,castkey=ResourceName"`
	// Used to track the usage of the resource in the pool (diff hard - claimed). May be used for further automation
	// +optional
	Available corev1.ResourceList `json:"available,omitempty" protobuf:"bytes,2,rep,name=available,casttype=ResourceList,castkey=ResourceName"`
}

func (*ResourcePoolQuotaStatus) DeepCopy added in v0.10.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePoolQuotaStatus.

func (*ResourcePoolQuotaStatus) DeepCopyInto added in v0.10.0

func (in *ResourcePoolQuotaStatus) DeepCopyInto(out *ResourcePoolQuotaStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourcePoolSpec added in v0.10.0

type ResourcePoolSpec struct {
	// Selector to match the namespaces that should be managed by the GlobalResourceQuota
	Selectors []selectors.NamespaceSelector `json:"selectors,omitempty"`
	// Define the resourcequota served by this resourcepool.
	Quota corev1.ResourceQuotaSpec `json:"quota"`
	// The Defaults given for each namespace, the default is not counted towards the total allocation
	// When you use claims it's recommended to provision Defaults as the prevent the scheduling of any resources
	// +optional
	Defaults corev1.ResourceList `json:"defaults,omitzero"`
	// Additional Configuration
	//+kubebuilder:default:={}
	// +optional
	Config ResourcePoolSpecConfiguration `json:"config,omitzero"`
}

ResourcePoolSpec.

func (*ResourcePoolSpec) DeepCopy added in v0.10.0

func (in *ResourcePoolSpec) DeepCopy() *ResourcePoolSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePoolSpec.

func (*ResourcePoolSpec) DeepCopyInto added in v0.10.0

func (in *ResourcePoolSpec) DeepCopyInto(out *ResourcePoolSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourcePoolSpecConfiguration added in v0.10.0

type ResourcePoolSpecConfiguration struct {
	// With this option all resources which can be allocated are set to 0 for the resourcequota defaults. (Default false)
	// +kubebuilder:default=false
	DefaultsAssignZero *bool `json:"defaultsZero,omitempty"`
	// Claims are queued whenever they are allocated to a pool. A pool tries to allocate claims in order based on their
	// creation date. But no matter their creation time, if a claim is requesting too much resources it's put into the queue
	// but if a lower priority claim still has enough space in the available resources, it will be able to claim them. Eventough
	// it's priority was lower
	// Enabling this option respects to Order. Meaning the Creationtimestamp matters and if a resource is put into the queue, no
	// other claim can claim the same resources with lower priority. (Default false)
	// +kubebuilder:default=false
	OrderedQueue *bool `json:"orderedQueue,omitempty"`
	// When a resourcepool is deleted, the resourceclaims bound to it are disassociated from the resourcepool but not deleted.
	// By Enabling this option, the resourceclaims will be deleted when the resourcepool is deleted, if they are in bound state. (Default false)
	// +kubebuilder:default=false
	DeleteBoundResources *bool `json:"deleteBoundResources,omitempty"`
}

func (*ResourcePoolSpecConfiguration) DeepCopy added in v0.10.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePoolSpecConfiguration.

func (*ResourcePoolSpecConfiguration) DeepCopyInto added in v0.10.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourcePoolStatus added in v0.10.0

type ResourcePoolStatus struct {
	// How many namespaces are considered
	// +kubebuilder:default=0
	NamespaceSize uint `json:"namespaceCount,omitempty"`
	// Amount of claims
	// +kubebuilder:default=0
	ClaimSize uint `json:"claimCount,omitempty"`
	// Namespaces which are considered for claims
	Namespaces []string `json:"namespaces,omitempty"`
	// Tracks the quotas for the Resource.
	// +optional
	Claims ResourcePoolNamespaceClaimsStatus `json:"claims,omitzero"`
	// Tracks the Usage from Claimed against what has been granted from the pool
	// +optional
	Allocation ResourcePoolQuotaStatus `json:"allocation,omitzero"`
	// Exhaustions from claims associated with the pool
	Exhaustions map[string]api.PoolExhaustionResource `json:"exhaustions,omitempty"`
	// Conditions for the resource claim
	Conditions meta.ConditionList `json:"conditions,omitzero"`
}

GlobalResourceQuotaStatus defines the observed state of GlobalResourceQuota.

func (*ResourcePoolStatus) DeepCopy added in v0.10.0

func (in *ResourcePoolStatus) DeepCopy() *ResourcePoolStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePoolStatus.

func (*ResourcePoolStatus) DeepCopyInto added in v0.10.0

func (in *ResourcePoolStatus) DeepCopyInto(out *ResourcePoolStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceSpec

type ResourceSpec struct {
	// Defines the Namespace selector to select the Tenant Namespaces on which the resources must be propagated.
	// In case of nil value, all the Tenant Namespaces are targeted.
	NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
	// List of the resources already existing in other Namespaces that must be replicated.
	NamespacedItems []tpl.ResourceReference `json:"namespacedItems,omitempty"`
	// List of raw resources that must be replicated.
	RawItems []RawExtension `json:"rawItems,omitempty"`
	// Besides the Capsule metadata required by TenantResource controller, defines additional metadata that must be
	// added to the replicated resources.
	AdditionalMetadata *api.AdditionalMetadataSpec `json:"additionalMetadata,omitempty"`
	// Templates for advanced use cases
	Generators []TemplateItemSpec `json:"generators,omitempty"`
	// Provide additional template context, which can be used throughout all
	// the declared items for the replication
	// +optional
	Context *tpl.TemplateContext `json:"context,omitempty"`
}

func (*ResourceSpec) DeepCopy

func (in *ResourceSpec) DeepCopy() *ResourceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.

func (*ResourceSpec) DeepCopyInto

func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RuleStatus added in v0.13.0

type RuleStatus struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	// +optional
	Spec []*api.NamespaceRuleBodyNamespace `json:"spec,omitzero"`

	// +optional
	Status RuleStatusSpec `json:"status,omitzero"`
}

+kubebuilder:object:root=true +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age"

func (*RuleStatus) DeepCopy added in v0.13.0

func (in *RuleStatus) DeepCopy() *RuleStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleStatus.

func (*RuleStatus) DeepCopyInto added in v0.13.0

func (in *RuleStatus) DeepCopyInto(out *RuleStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RuleStatus) DeepCopyObject added in v0.13.0

func (in *RuleStatus) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RuleStatusList added in v0.13.0

type RuleStatusList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`

	Items []RuleStatus `json:"items"`
}

RuleStatusList contains a list of RuleStatus.

func (*RuleStatusList) DeepCopy added in v0.13.0

func (in *RuleStatusList) DeepCopy() *RuleStatusList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleStatusList.

func (*RuleStatusList) DeepCopyInto added in v0.13.0

func (in *RuleStatusList) DeepCopyInto(out *RuleStatusList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RuleStatusList) DeepCopyObject added in v0.13.0

func (in *RuleStatusList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RuleStatusSpec added in v0.13.0

type RuleStatusSpec struct {
	// Managed Enforcement properties per Namespace (aggregated from rules)
	//+optional
	Rule api.NamespaceRuleBodyNamespace `json:"rule,omitzero"`
	// Conditions
	Conditions meta.ConditionList `json:"conditions"`
}

RuleStatus contains the accumulated rules applying to namespace it's deployed in. +kubebuilder:object:generate=true

func (*RuleStatusSpec) DeepCopy added in v0.13.0

func (in *RuleStatusSpec) DeepCopy() *RuleStatusSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleStatusSpec.

func (*RuleStatusSpec) DeepCopyInto added in v0.13.0

func (in *RuleStatusSpec) DeepCopyInto(out *RuleStatusSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceAccountClient added in v0.13.0

type ServiceAccountClient struct {
	// Kubernetes API Endpoint to use for impersonation
	Endpoint string `json:"endpoint,omitempty"`
	// Namespace where the CA certificate secret is located
	CASecretNamespace meta.RFC1123SubdomainName `json:"caSecretNamespace,omitempty"`
	// Name of the secret containing the CA certificate
	CASecretName meta.RFC1123Name `json:"caSecretName,omitempty"`
	// Key in the secret that holds the CA certificate (e.g., "ca.crt")
	// +kubebuilder:default=ca.crt
	CASecretKey string `json:"caSecretKey,omitempty"`
	// If true, TLS certificate verification is skipped (not recommended for production)
	// +kubebuilder:default=false
	SkipTLSVerify bool `json:"skipTlsVerify,omitempty"`
	// Default ServiceAccount for global resources (GlobalTenantResource)
	// When defined, users are required to use this ServiceAccount anywhere in the cluster
	// unless they explicitly provide their own.
	GlobalDefaultServiceAccount meta.RFC1123Name `json:"globalDefaultServiceAccount,omitempty"`
	// Default ServiceAccount for global resources (GlobalTenantResource)
	// When defined, users are required to use this ServiceAccount anywhere in the cluster
	// unless they explicitly provide their own.
	// +optional
	GlobalDefaultServiceAccountNamespace meta.RFC1123SubdomainName `json:"globalDefaultServiceAccountNamespace,omitempty"`
	// Default ServiceAccount for namespaced resources (TenantResource)
	// When defined, users are required to use this ServiceAccount within the namespace
	// where they deploy the resource, unless they explicitly provide their own.
	TenantDefaultServiceAccount meta.RFC1123Name `json:"tenantDefaultServiceAccount,omitempty"`
}

+kubebuilder:object:generate=true

func (*ServiceAccountClient) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountClient.

func (*ServiceAccountClient) DeepCopyInto added in v0.13.0

func (in *ServiceAccountClient) DeepCopyInto(out *ServiceAccountClient)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateItemSpec added in v0.13.0

type TemplateItemSpec struct {
	// Template contains any amount of yaml which is applied to Kubernetes.
	// This can be a single resource or multiple resources
	Template string `json:"template,omitempty"`
	// Missing Key Option for templating
	// +kubebuilder:default=zero
	MissingKey tpl.MissingKeyOption `json:"missingKey,omitempty"`
}

func (*TemplateItemSpec) DeepCopy added in v0.13.0

func (in *TemplateItemSpec) DeepCopy() *TemplateItemSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateItemSpec.

func (*TemplateItemSpec) DeepCopyInto added in v0.13.0

func (in *TemplateItemSpec) DeepCopyInto(out *TemplateItemSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Tenant

type Tenant struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	// +optional
	Spec TenantSpec `json:"spec,omitzero"`

	// +optional
	Status TenantStatus `json:"status,omitzero"`
}

+kubebuilder:object:root=true +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,shortName=tnt +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.conditions[?(@.type==\"Cordoned\")].reason",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 count",type="integer",JSONPath=".status.size",description="The total amount of Namespaces in use" +kubebuilder:printcolumn:name="Node selector",type="string",JSONPath=".spec.nodeSelector",description="Node Selector applied to Pods" +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description="Reconcile Status for the tenant" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description="Reconcile Message for the tenant" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age" Tenant is the Schema for the tenants API.

func (*Tenant) AssignNamespaces

func (in *Tenant) AssignNamespaces(namespaces []corev1.Namespace)

func (*Tenant) ConvertFrom

func (in *Tenant) ConvertFrom(raw conversion.Hub) error

func (*Tenant) ConvertTo

func (in *Tenant) ConvertTo(raw conversion.Hub) error

func (*Tenant) DeepCopy

func (in *Tenant) DeepCopy() *Tenant

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tenant.

func (*Tenant) DeepCopyInto

func (in *Tenant) DeepCopyInto(out *Tenant)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Tenant) DeepCopyObject

func (in *Tenant) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Tenant) GetClusterRolesBySubject added in v0.7.2

func (in *Tenant) GetClusterRolesBySubject(ignoreOwnerKind []rbac.OwnerKind) []rbac.SubjectRoles

func (*Tenant) GetNamespaceObjects added in v0.13.0

func (in *Tenant) GetNamespaceObjects(ctx context.Context, c client.Reader) (namespaces []corev1.Namespace, err error)

Fetch all namespaces defined in the status.

func (*Tenant) GetNamespaces

func (in *Tenant) GetNamespaces() (res []string)

func (*Tenant) GetOwnerProxySettings

func (in *Tenant) GetOwnerProxySettings(name string, kind rbac.OwnerKind) []rbac.ProxySettings

func (*Tenant) GetPromotionRoleBindings added in v0.13.0

func (in *Tenant) GetPromotionRoleBindings() []rbac.AdditionalRoleBindingsWithNamespaceSpec

func (*Tenant) GetRoleBindings added in v0.13.0

func (in *Tenant) GetRoleBindings() []rbac.AdditionalRoleBindingsSpec

func (*Tenant) GetSubjectsByClusterRoles added in v0.7.2

func (in *Tenant) GetSubjectsByClusterRoles(ignoreOwnerKind []rbac.OwnerKind) (rolePerms map[string][]rbacv1.Subject)

GetClusterRolePermissions returns a map where the clusterRole is the key and the value is a list of permission subjects (kind and name) that reference that role. These mappings are gathered from the owners and additionalRolebindings spec.

func (*Tenant) IsFull

func (in *Tenant) IsFull() bool

type TenantAvailableClassesStatus added in v0.12.0

type TenantAvailableClassesStatus struct {
	// Available Storageclasses (Only collected if any matching condition is specified)
	StorageClasses []string `json:"storage,omitempty"`
	// Available PriorityClasses
	PriorityClasses []string `json:"priority,omitempty"`
	// Available StorageClasses
	RuntimeClasses []string `json:"runtime,omitempty"`
	// Available GatewayClasses
	GatewayClasses []string `json:"gateway,omitempty"`
	// Available DeviceClasses
	DeviceClasses []string `json:"device,omitempty"`
}

func (*TenantAvailableClassesStatus) DeepCopy added in v0.12.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantAvailableClassesStatus.

func (*TenantAvailableClassesStatus) DeepCopyInto added in v0.12.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantAvailableStatus added in v0.12.0

type TenantAvailableStatus struct {
	// Available Class Types within Tenant
	// +optional
	Classes TenantAvailableClassesStatus `json:"classes,omitzero"`
}

func (*TenantAvailableStatus) DeepCopy added in v0.12.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantAvailableStatus.

func (*TenantAvailableStatus) DeepCopyInto added in v0.12.0

func (in *TenantAvailableStatus) DeepCopyInto(out *TenantAvailableStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantList

type TenantList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`

	Items []Tenant `json:"items"`
}

TenantList contains a list of Tenant.

func (*TenantList) DeepCopy

func (in *TenantList) DeepCopy() *TenantList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantList.

func (*TenantList) DeepCopyInto

func (in *TenantList) DeepCopyInto(out *TenantList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TenantList) DeepCopyObject

func (in *TenantList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TenantOwner added in v0.12.0

type TenantOwner struct {
	metav1.TypeMeta `json:",inline"`

	// metadata is a standard object metadata.
	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	// spec defines the desired state of TenantOwner.
	// +required
	Spec TenantOwnerSpec `json:"spec"`

	// status defines the observed state of TenantOwner.
	// +optional
	Status TenantOwnerStatus `json:"status,omitzero"`
}

TenantOwner is the Schema for the tenantowners API.

func (*TenantOwner) DeepCopy added in v0.12.0

func (in *TenantOwner) DeepCopy() *TenantOwner

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantOwner.

func (*TenantOwner) DeepCopyInto added in v0.12.0

func (in *TenantOwner) DeepCopyInto(out *TenantOwner)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TenantOwner) DeepCopyObject added in v0.12.0

func (in *TenantOwner) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TenantOwnerList added in v0.12.0

type TenantOwnerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`

	Items []TenantOwner `json:"items"`
}

TenantOwnerList contains a list of TenantOwner.

func (*TenantOwnerList) DeepCopy added in v0.12.0

func (in *TenantOwnerList) DeepCopy() *TenantOwnerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantOwnerList.

func (*TenantOwnerList) DeepCopyInto added in v0.12.0

func (in *TenantOwnerList) DeepCopyInto(out *TenantOwnerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TenantOwnerList) DeepCopyObject added in v0.12.0

func (in *TenantOwnerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TenantOwnerSpec added in v0.12.0

type TenantOwnerSpec struct {
	// Subject
	rbac.CoreOwnerSpec `json:",inline"`

	// Adds the given subject as capsule user. When enabled this subject does not have to be
	// mentioned in the CapsuleConfiguration as Capsule User. In almost all scenarios Tenant Owners
	// must be Capsule Users.
	//+kubebuilder:default:=true
	Aggregate bool `json:"aggregate"`
}

TenantOwnerSpec defines the desired state of TenantOwner.

func (*TenantOwnerSpec) DeepCopy added in v0.12.0

func (in *TenantOwnerSpec) DeepCopy() *TenantOwnerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantOwnerSpec.

func (*TenantOwnerSpec) DeepCopyInto added in v0.12.0

func (in *TenantOwnerSpec) DeepCopyInto(out *TenantOwnerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantOwnerStatus added in v0.12.0

type TenantOwnerStatus struct{}

TenantOwnerStatus defines the observed state of TenantOwner.

func (*TenantOwnerStatus) DeepCopy added in v0.12.0

func (in *TenantOwnerStatus) DeepCopy() *TenantOwnerStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantOwnerStatus.

func (*TenantOwnerStatus) DeepCopyInto added in v0.12.0

func (in *TenantOwnerStatus) DeepCopyInto(out *TenantOwnerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantResource

type TenantResource struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	Spec TenantResourceSpec `json:"spec"`

	// +optional
	Status TenantResourceStatus `json:"status,omitzero"`
}

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. For such cases, the GlobalTenantResource must be used.

func (*TenantResource) DeepCopy

func (in *TenantResource) DeepCopy() *TenantResource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantResource.

func (*TenantResource) DeepCopyInto

func (in *TenantResource) DeepCopyInto(out *TenantResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TenantResource) DeepCopyObject

func (in *TenantResource) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TenantResourceCommonSpec added in v0.13.0

type TenantResourceCommonSpec struct {
	// Provide additional settings
	// +kubebuilder:default={}
	Settings TenantResourceCommonSpecSettings `json:"settings,omitzero"`
	// DependsOn may contain a meta.NamespacedObjectReference slice
	// with references to TenantResource resources that must be ready before this
	// TenantResource can be reconciled.
	// +optional
	DependsOn []meta.LocalRFC1123ObjectReference `json:"dependsOn,omitempty"`
	// Define the period of time upon a second reconciliation must be invoked.
	// Keep in mind that any change to the manifests will trigger a new reconciliation.
	// +kubebuilder:default="60s"
	ResyncPeriod metav1.Duration `json:"resyncPeriod"`
	// When the replicated resource manifest is deleted, all the objects replicated so far will be automatically deleted.
	// Disable this to keep replicated resources although the deletion of the replication manifest.
	// +kubebuilder:default=true
	PruningOnDelete *bool `json:"pruningOnDelete,omitempty"`
	// When cordoning a replication it will no longer execute any applies or deletions (paused).
	// This is useful for maintenances
	// +kubebuilder:default=false
	Cordoned *bool `json:"cordoned,omitempty"`
	// Defines the rules to select targeting Namespace, along with the objects that must be replicated.
	Resources []ResourceSpec `json:"resources"`
}

func (*TenantResourceCommonSpec) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantResourceCommonSpec.

func (*TenantResourceCommonSpec) DeepCopyInto added in v0.13.0

func (in *TenantResourceCommonSpec) DeepCopyInto(out *TenantResourceCommonSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantResourceCommonSpecSettings added in v0.13.0

type TenantResourceCommonSpecSettings struct {
	// Enabling this allows TenanResources to interact with objects which were not created by a TenantResource. In this case on prune no deletion of the entire object is made.
	// +kubebuilder:default=false
	Adopt *bool `json:"adopt,omitempty"`
	// Force indicates that in case of conflicts with server-side apply, the client should acquire ownership of the conflicting field.
	// You may create collisions with this.
	// +kubebuilder:default=false
	Force *bool `json:"force,omitempty"`
}

func (*TenantResourceCommonSpecSettings) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantResourceCommonSpecSettings.

func (*TenantResourceCommonSpecSettings) DeepCopyInto added in v0.13.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantResourceCommonStatus added in v0.13.0

type TenantResourceCommonStatus struct {
	// Condition of the GlobalTenantResource.
	Conditions meta.ConditionList `json:"conditions,omitempty"`

	// List of the replicated resources for the given TenantResource.
	//+optional
	ProcessedItems meta.ProcessedItems `json:"processedItems,omitzero"`

	// How many items are being replicated by the TenantResource.
	Size uint `json:"size"`

	// Serviceaccount used for impersonation
	//+optional
	ServiceAccount *meta.NamespacedRFC1123ObjectReferenceWithNamespace `json:"serviceAccount,omitzero"`
}

func (*TenantResourceCommonStatus) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantResourceCommonStatus.

func (*TenantResourceCommonStatus) DeepCopyInto added in v0.13.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TenantResourceCommonStatus) UpdateStats added in v0.13.0

func (s *TenantResourceCommonStatus) UpdateStats()

type TenantResourceList

type TenantResourceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`

	Items []TenantResource `json:"items"`
}

TenantResourceList contains a list of TenantResource.

func (*TenantResourceList) DeepCopy

func (in *TenantResourceList) DeepCopy() *TenantResourceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantResourceList.

func (*TenantResourceList) DeepCopyInto

func (in *TenantResourceList) DeepCopyInto(out *TenantResourceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TenantResourceList) DeepCopyObject

func (in *TenantResourceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TenantResourceSpec

type TenantResourceSpec struct {
	TenantResourceCommonSpec `json:",inline"`

	// Local ServiceAccount which will perform all the actions defined in the TenantResource
	// You must provide permissions accordingly to that ServiceAccount
	//+optional
	ServiceAccount *meta.LocalRFC1123ObjectReference `json:"serviceAccount,omitzero"`
}

TenantResourceSpec defines the desired state of TenantResource.

func (*TenantResourceSpec) DeepCopy

func (in *TenantResourceSpec) DeepCopy() *TenantResourceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantResourceSpec.

func (*TenantResourceSpec) DeepCopyInto

func (in *TenantResourceSpec) DeepCopyInto(out *TenantResourceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantResourceStatus

type TenantResourceStatus struct {
	TenantResourceCommonStatus `json:",inline"`
}

TenantResourceStatus defines the observed state of TenantResource.

func (*TenantResourceStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantResourceStatus.

func (*TenantResourceStatus) DeepCopyInto

func (in *TenantResourceStatus) DeepCopyInto(out *TenantResourceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantSpec

type TenantSpec struct {
	// Specify additional data relating to the tenant.
	// Mainly useable in templating and more accessible than labels/annotations.
	// +optional
	Data apiextensionsv1.JSON `json:"data"`

	// Specify Permissions for the Tenant.
	// +optional
	Permissions Permissions `json:"permissions,omitzero"`
	// Specify enforcement specifications for the scope of the Tenant.
	//  We are moving all configuration enforcement. per namespace into a rule construct.
	//  It's currently not final.
	//
	// Read More: https://projectcapsule.dev/docs/tenants/rules/
	//+optional
	Rules []*api.NamespaceRuleBodyTenant `json:"rules,omitzero"`

	// Specifies the owners of the Tenant.
	// Optional
	Owners rbac.OwnerListSpec `json:"owners,omitempty"`
	// Specifies options for the Namespaces, such as additional metadata or 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.
	NamespaceOptions *NamespaceOptions `json:"namespaceOptions,omitempty"`
	// Specifies options for the Service, such as additional metadata or block of certain type of Services. Optional.
	ServiceOptions *api.ServiceOptions `json:"serviceOptions,omitempty"`
	// Specifies options for the Pods deployed in the Tenant namespaces, such as additional metadata.
	PodOptions *api.PodOptions `json:"podOptions,omitempty"`
	// Specifies the allowed StorageClasses assigned to the Tenant.
	// Capsule assures that all PersistentVolumeClaim resources created in the Tenant can use only one of the allowed StorageClasses.
	// A default value can be specified, and all the PersistentVolumeClaim resources created will inherit the declared class.
	// Optional.
	StorageClasses *api.DefaultAllowedListSpec `json:"storageClasses,omitempty"`
	// Specifies options for the Ingress resources, such as allowed hostnames and IngressClass. Optional.
	// +optional
	IngressOptions IngressOptions `json:"ingressOptions,omitzero"`
	// Specifies the label to control the placement of pods on a given pool of worker nodes. All namespaces created within the Tenant will have the node selector annotation. This annotation tells the Kubernetes scheduler to place pods on the nodes having the selector label. Optional.
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// Specifies a list of ResourceQuota resources assigned to the Tenant. The assigned values are inherited by any namespace created in the Tenant. The Capsule operator aggregates ResourceQuota at Tenant level, so that the hard quota is never crossed for the given Tenant. This permits the Tenant owner to consume resources in the Tenant regardless of the namespace. Optional.
	// +optional
	ResourceQuota api.ResourceQuotaSpec `json:"resourceQuotas,omitzero"`
	// Specifies additional RoleBindings assigned to the Tenant. Capsule will ensure that all namespaces in the Tenant always contain the RoleBinding for the given ClusterRole. Optional.
	AdditionalRoleBindings []rbac.AdditionalRoleBindingsSpec `json:"additionalRoleBindings,omitempty"`
	// Specifies the allowed RuntimeClasses assigned to the Tenant.
	// Capsule assures that all Pods resources created in the Tenant can use only one of the allowed RuntimeClasses.
	// Optional.
	RuntimeClasses *api.DefaultAllowedListSpec `json:"runtimeClasses,omitempty"`
	// Specifies the allowed priorityClasses assigned to the Tenant.
	// Capsule assures that all Pods resources created in the Tenant can use only one of the allowed PriorityClasses.
	// A default value can be specified, and all the Pod resources created will inherit the declared class.
	// Optional.
	PriorityClasses *api.DefaultAllowedListSpec `json:"priorityClasses,omitempty"`
	// Specifies options for the DeviceClass resources.
	DeviceClasses *api.SelectorAllowedListSpec `json:"deviceClasses,omitempty"`
	// Specifies options for the GatewayClass resources.
	// +optional
	GatewayOptions GatewayOptions `json:"gatewayOptions,omitzero"`
	// Toggling the Tenant resources cordoning, when enable resources cannot be deleted.
	//+kubebuilder:default:=false
	Cordoned bool `json:"cordoned,omitempty"`
	// Prevent accidental deletion of the Tenant.
	// When enabled, the deletion request will be declined.
	//+kubebuilder:default:=false
	PreventDeletion bool `json:"preventDeletion,omitempty"`
	// Use this if you want to disable/enable the Tenant name prefix to specific Tenants, overriding global forceTenantPrefix in CapsuleConfiguration.
	// When set to 'true', it enforces Namespaces created for this Tenant to be named with the Tenant name prefix,
	// separated by a dash (i.e. for Tenant 'foo', namespace names must be prefixed with 'foo-'),
	// this is useful to avoid Namespace name collision.
	// When set to 'false', it allows Namespaces created for this Tenant to be named anything.
	// Overrides CapsuleConfiguration global forceTenantPrefix for the Tenant only.
	// If unset, Tenant uses CapsuleConfiguration's forceTenantPrefix
	// Optional
	ForceTenantPrefix *bool `json:"forceTenantPrefix,omitempty"`

	// Deprecated: Use Enforcement.Registries instead
	//
	// Specifies the trusted Image Registries assigned to the Tenant. Capsule assures that all Pods resources created in the Tenant can use only one of the allowed trusted registries. Optional.
	ContainerRegistries *api.AllowedListSpec `json:"containerRegistries,omitempty"`
	// Deprecated: Use Enforcement.Registries instead
	//
	// Specify the allowed values for the imagePullPolicies option in Pod resources. Capsule assures that all Pod resources created in the Tenant can use only one of the allowed policy. Optional.
	ImagePullPolicies []api.ImagePullPolicySpec `json:"imagePullPolicies,omitempty"`

	// Deprecated: Use Tenant Replications instead (https://projectcapsule.dev/docs/replications/)
	//
	// Specifies the NetworkPolicies assigned to the Tenant. The assigned NetworkPolicies are inherited by any namespace created in the Tenant. Optional.
	// +optional
	NetworkPolicies api.NetworkPolicySpec `json:"networkPolicies,omitzero"`
	// Deprecated: Use Tenant Replications instead (https://projectcapsule.dev/docs/replications/)
	//
	// Specifies the resource min/max usage restrictions to the Tenant. The assigned values are inherited by any namespace created in the Tenant. Optional.
	// +optional
	LimitRanges api.LimitRangesSpec `json:"limitRanges,omitzero"`
}

TenantSpec defines the desired state of Tenant.

func (*TenantSpec) DeepCopy

func (in *TenantSpec) DeepCopy() *TenantSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantSpec.

func (*TenantSpec) DeepCopyInto

func (in *TenantSpec) DeepCopyInto(out *TenantSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantStatus

type TenantStatus struct {
	// Allowed Cluster Objects within Tenant
	TenantAvailableStatus `json:",inline"`

	// Collected owners for this tenant
	Owners rbac.OwnerStatusListSpec `json:"owners,omitempty"`
	// Promoted ServiceAccounts across the Tenant
	Promotions rbac.PromotionStatusListSpec `json:"promotions,omitempty"`
	// +kubebuilder:default=Active
	// The operational state of the Tenant. Possible values are "Active", "Cordoned" or "Terminating".
	State tenantState `json:"state"`
	// How many namespaces are assigned to the Tenant.
	Size uint `json:"size"`
	// List of namespaces assigned to the Tenant. (Deprecated)
	Namespaces []string `json:"namespaces,omitempty"`
	// Tracks state for the namespaces associated with this tenant
	Spaces []*TenantStatusNamespaceItem `json:"spaces,omitempty"`
	// Tenant Condition
	Conditions meta.ConditionList `json:"conditions"`
}

Returns the observed state of the Tenant.

func (*TenantStatus) DeepCopy

func (in *TenantStatus) DeepCopy() *TenantStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantStatus.

func (*TenantStatus) DeepCopyInto

func (in *TenantStatus) DeepCopyInto(out *TenantStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TenantStatus) GetInstance added in v0.11.0

func (*TenantStatus) RemoveInstance added in v0.11.0

func (ms *TenantStatus) RemoveInstance(stat *TenantStatusNamespaceItem)

func (*TenantStatus) UpdateInstance added in v0.11.0

func (ms *TenantStatus) UpdateInstance(stat *TenantStatusNamespaceItem)

type TenantStatusNamespaceEnforcement added in v0.13.0

type TenantStatusNamespaceEnforcement struct {
	// Registries which are allowed within this namespace
	Registries []api.OCIRegistry `json:"registry,omitempty"`
}

func (*TenantStatusNamespaceEnforcement) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantStatusNamespaceEnforcement.

func (*TenantStatusNamespaceEnforcement) DeepCopyInto added in v0.13.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantStatusNamespaceItem added in v0.11.0

type TenantStatusNamespaceItem struct {
	// Conditions
	Conditions meta.ConditionList `json:"conditions"`
	// Namespace Name
	Name string `json:"name"`
	// Namespace UID
	UID k8stypes.UID `json:"uid,omitempty"`
	// Managed Metadata
	Metadata *TenantStatusNamespaceMetadata `json:"metadata,omitempty"`
	// Managed Metadata
	//+optional
	Enforce TenantStatusNamespaceEnforcement `json:"enforce,omitzero"`
}

func (*TenantStatusNamespaceItem) DeepCopy added in v0.11.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantStatusNamespaceItem.

func (*TenantStatusNamespaceItem) DeepCopyInto added in v0.11.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantStatusNamespaceMetadata added in v0.11.0

type TenantStatusNamespaceMetadata struct {
	// Managed Labels
	Labels map[string]string `json:"labels,omitempty"`
	// Managed Annotations
	Annotations map[string]string `json:"annotations,omitempty"`
}

func (*TenantStatusNamespaceMetadata) DeepCopy added in v0.11.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantStatusNamespaceMetadata.

func (*TenantStatusNamespaceMetadata) DeepCopyInto added in v0.11.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TenantStatusRuleStatusItem added in v0.13.0

type TenantStatusRuleStatusItem struct {
	// Promotions originating from this namespace
	Promotions rbac.OwnerStatusListSpec `json:"promotions,omitempty"`

	// Target Namespaces for this rule
	TargetNamespaces []meta.RFC1123SubdomainName `json:"namespaces,omitempty"`
}

RuleStatus contains the accumulated rules applying to namespace it's deployed in. +kubebuilder:object:generate=true

func (*TenantStatusRuleStatusItem) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantStatusRuleStatusItem.

func (*TenantStatusRuleStatusItem) DeepCopyInto added in v0.13.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL