v1alpha1

package
v0.1.0-rc1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	AvailableIngressClassesAnnotation       = "capsule.clastix.io/ingress-classes"
	AvailableIngressClassesRegexpAnnotation = "capsule.clastix.io/ingress-classes-regexp"
	AvailableStorageClassesAnnotation       = "capsule.clastix.io/storage-classes"
	AvailableStorageClassesRegexpAnnotation = "capsule.clastix.io/storage-classes-regexp"
	AllowedRegistriesAnnotation             = "capsule.clastix.io/allowed-registries"
	AllowedRegistriesRegexpAnnotation       = "capsule.clastix.io/allowed-registries-regexp"
)

Variables

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

	// 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 GetTypeLabel

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

func HardQuotaFor added in v0.0.4

func HardQuotaFor(resource fmt.Stringer) string

func UsedQuotaFor

func UsedQuotaFor(resource fmt.Stringer) string

Types

type AdditionalMetadata

type AdditionalMetadata struct {
	AdditionalLabels      map[string]string `json:"additionalLabels,omitempty"`
	AdditionalAnnotations map[string]string `json:"additionalAnnotations,omitempty"`
}

func (*AdditionalMetadata) DeepCopy

func (in *AdditionalMetadata) DeepCopy() *AdditionalMetadata

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

func (*AdditionalMetadata) DeepCopyInto

func (in *AdditionalMetadata) DeepCopyInto(out *AdditionalMetadata)

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

type AdditionalRoleBindings added in v0.0.3

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

func (*AdditionalRoleBindings) DeepCopy added in v0.0.3

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

func (*AdditionalRoleBindings) DeepCopyInto added in v0.0.3

func (in *AdditionalRoleBindings) DeepCopyInto(out *AdditionalRoleBindings)

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

type AllowedIP added in v0.0.4

type AllowedIP string

+kubebuilder:validation:Pattern="^([0-9]{1,3}.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))?$"

type AllowedListSpec added in v0.0.4

type AllowedListSpec struct {
	Exact []string `json:"allowed,omitempty"`
	Regex string   `json:"allowedRegex,omitempty"`
}

func (*AllowedListSpec) DeepCopy added in v0.0.4

func (in *AllowedListSpec) DeepCopy() *AllowedListSpec

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

func (*AllowedListSpec) DeepCopyInto added in v0.0.4

func (in *AllowedListSpec) DeepCopyInto(out *AllowedListSpec)

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

func (*AllowedListSpec) ExactMatch added in v0.0.4

func (in *AllowedListSpec) ExactMatch(value string) (ok bool)

func (AllowedListSpec) RegexMatch added in v0.0.4

func (in AllowedListSpec) RegexMatch(value string) (ok bool)

type CapsuleConfiguration added in v0.1.0

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

	Spec CapsuleConfigurationSpec `json:"spec,omitempty"`
}

CapsuleConfiguration is the Schema for the Capsule configuration API

func (*CapsuleConfiguration) DeepCopy added in v0.1.0

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

func (*CapsuleConfiguration) DeepCopyInto added in v0.1.0

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 added in v0.1.0

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

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

type CapsuleConfigurationList added in v0.1.0

type CapsuleConfigurationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CapsuleConfiguration `json:"items"`
}

CapsuleConfigurationList contains a list of CapsuleConfiguration

func (*CapsuleConfigurationList) DeepCopy added in v0.1.0

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

func (*CapsuleConfigurationList) DeepCopyInto added in v0.1.0

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 added in v0.1.0

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

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

type CapsuleConfigurationSpec added in v0.1.0

type CapsuleConfigurationSpec struct {
	// Names of the groups for Capsule users.
	// +kubebuilder:default={capsule.clastix.io}
	UserGroups []string `json:"userGroups,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"`
	// When defining the exact match for allowed Ingress hostnames at Tenant level, a collision is not allowed.
	// Toggling this, Capsule will not check if a hostname collision is in place, allowing the creation of
	// two or more Tenant resources although sharing the same allowed hostname(s).
	//
	// The JSON path of the resource is: /spec/ingressHostnames/allowed
	AllowTenantIngressHostnamesCollision bool `json:"allowTenantIngressHostnamesCollision,omitempty"`
	// Allow the collision of Ingress resource hostnames across all the Tenants.
	// +kubebuilder:default=true
	AllowIngressHostnameCollision bool `json:"allowIngressHostnameCollision,omitempty"`
}

CapsuleConfigurationSpec defines the Capsule configuration nolint:maligned

func (*CapsuleConfigurationSpec) DeepCopy added in v0.1.0

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

func (*CapsuleConfigurationSpec) DeepCopyInto added in v0.1.0

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

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

type ExternalServiceIPs added in v0.0.4

type ExternalServiceIPs struct {
	Allowed []AllowedIP `json:"allowed"`
}

func (*ExternalServiceIPs) DeepCopy added in v0.0.4

func (in *ExternalServiceIPs) DeepCopy() *ExternalServiceIPs

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

func (*ExternalServiceIPs) DeepCopyInto added in v0.0.4

func (in *ExternalServiceIPs) DeepCopyInto(out *ExternalServiceIPs)

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

type IngressHostnamesList added in v0.0.4

type IngressHostnamesList []string

func (IngressHostnamesList) DeepCopy added in v0.0.4

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

func (IngressHostnamesList) DeepCopyInto added in v0.0.4

func (in IngressHostnamesList) DeepCopyInto(out *IngressHostnamesList)

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

func (IngressHostnamesList) IsStringInList added in v0.0.4

func (hostnames IngressHostnamesList) IsStringInList(value string) (ok bool)

func (IngressHostnamesList) Len added in v0.0.4

func (hostnames IngressHostnamesList) Len() int

func (IngressHostnamesList) Less added in v0.0.4

func (hostnames IngressHostnamesList) Less(i, j int) bool

func (IngressHostnamesList) Swap added in v0.0.4

func (hostnames IngressHostnamesList) Swap(i, j int)

type IngressHostnamesSpec added in v0.0.4

type IngressHostnamesSpec struct {
	Allowed      IngressHostnamesList `json:"allowed"`
	AllowedRegex string               `json:"allowedRegex"`
}

func (*IngressHostnamesSpec) DeepCopy added in v0.0.4

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

func (*IngressHostnamesSpec) DeepCopyInto added in v0.0.4

func (in *IngressHostnamesSpec) DeepCopyInto(out *IngressHostnamesSpec)

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

type Kind

type Kind string

+kubebuilder:validation:Enum=User;Group

func (Kind) String

func (k Kind) String() string

type OwnerSpec

type OwnerSpec struct {
	Name string `json:"name"`
	Kind Kind   `json:"kind"`
}

OwnerSpec defines tenant owner name and kind

func (*OwnerSpec) DeepCopy

func (in *OwnerSpec) DeepCopy() *OwnerSpec

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

func (*OwnerSpec) DeepCopyInto

func (in *OwnerSpec) DeepCopyInto(out *OwnerSpec)

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"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TenantSpec   `json:"spec,omitempty"`
	Status TenantStatus `json:"status,omitempty"`
}

Tenant is the Schema for the tenants API

func (*Tenant) AssignNamespaces

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

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) IsFull

func (t *Tenant) IsFull() bool

type TenantList

type TenantList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	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 TenantSpec

type TenantSpec struct {
	Owner OwnerSpec `json:"owner"`

	//+kubebuilder:validation:Minimum=1
	NamespaceQuota         *int32                           `json:"namespaceQuota,omitempty"`
	NamespacesMetadata     AdditionalMetadata               `json:"namespacesMetadata,omitempty"`
	ServicesMetadata       AdditionalMetadata               `json:"servicesMetadata,omitempty"`
	StorageClasses         *AllowedListSpec                 `json:"storageClasses,omitempty"`
	IngressClasses         *AllowedListSpec                 `json:"ingressClasses,omitempty"`
	IngressHostnames       *AllowedListSpec                 `json:"ingressHostnames,omitempty"`
	ContainerRegistries    *AllowedListSpec                 `json:"containerRegistries,omitempty"`
	NodeSelector           map[string]string                `json:"nodeSelector,omitempty"`
	NetworkPolicies        []networkingv1.NetworkPolicySpec `json:"networkPolicies,omitempty"`
	LimitRanges            []corev1.LimitRangeSpec          `json:"limitRanges,omitempty"`
	ResourceQuota          []corev1.ResourceQuotaSpec       `json:"resourceQuotas,omitempty"`
	AdditionalRoleBindings []AdditionalRoleBindings         `json:"additionalRoleBindings,omitempty"`
	ExternalServiceIPs     *ExternalServiceIPs              `json:"externalServiceIPs,omitempty"`
}

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 {
	Size       uint     `json:"size"`
	Namespaces []string `json:"namespaces,omitempty"`
}

TenantStatus defines the observed state of 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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