v1alpha1

package
v0.1.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 18 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 AdditionalMetadataSpec added in v0.1.0

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

func (*AdditionalMetadataSpec) DeepCopy added in v0.1.0

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

func (*AdditionalMetadataSpec) DeepCopyInto added in v0.1.0

func (in *AdditionalMetadataSpec) DeepCopyInto(out *AdditionalMetadataSpec)

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

type AdditionalRoleBindingsSpec added in v0.1.0

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

func (*AdditionalRoleBindingsSpec) DeepCopy added in v0.1.0

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

func (*AdditionalRoleBindingsSpec) DeepCopyInto added in v0.1.0

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

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

func (*ExternalServiceIPsSpec) DeepCopy added in v0.1.0

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

func (*ExternalServiceIPsSpec) DeepCopyInto added in v0.1.0

func (in *ExternalServiceIPsSpec) DeepCopyInto(out *ExternalServiceIPsSpec)

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

func (t *Tenant) ConvertFrom(srcRaw conversion.Hub) error

func (*Tenant) ConvertTo added in v0.1.0

func (t *Tenant) ConvertTo(dstRaw 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) IsCordoned added in v0.1.0

func (t *Tenant) IsCordoned() bool

func (*Tenant) IsFull

func (t *Tenant) IsFull() bool

func (*Tenant) SetupWebhookWithManager added in v0.1.0

func (t *Tenant) SetupWebhookWithManager(mgr ctrl.Manager) error

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     *AdditionalMetadataSpec          `json:"namespacesMetadata,omitempty"`
	ServicesMetadata       *AdditionalMetadataSpec          `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 []AdditionalRoleBindingsSpec     `json:"additionalRoleBindings,omitempty"`
	ExternalServiceIPs     *ExternalServiceIPsSpec          `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.

Jump to

Keyboard shortcuts

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