From d3ce280e7786e5b5c8aed33cea6c8682a79e5254 Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 3 Aug 2022 09:15:04 +0200 Subject: [PATCH 01/18] Added github action to push API docs --- .github/workflows/api-docs.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/api-docs.yml diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml new file mode 100644 index 00000000..1d9f7cea --- /dev/null +++ b/.github/workflows/api-docs.yml @@ -0,0 +1,27 @@ +name: e2e + +on: + push: + branches: [ "*" ] + paths: + - 'charts/capsule/crds/**' + pull_request: + branches: [ "*" ] + paths: + - 'charts/capsule/crds/**' + +jobs: + kind: + name: Autogen API Docs + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-go@v2 + with: + go-version: '1.18' + - name: "Install generator" + run: go install fybrik.io/crdoc@latest + - name: Autogen APIs + run: crdoc --resources config/crd/bases --output docs/api.md From e96daeda47d0a0931c6fa5c7e53ef4617ffb4800 Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 3 Aug 2022 09:16:29 +0200 Subject: [PATCH 02/18] Fix --- config/crd/bases/capsule.clastix.io_capsuleconfigurations.yaml | 1 - config/crd/bases/capsule.clastix.io_tenants.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/config/crd/bases/capsule.clastix.io_capsuleconfigurations.yaml b/config/crd/bases/capsule.clastix.io_capsuleconfigurations.yaml index 5ce5bdfe..e092c94d 100644 --- a/config/crd/bases/capsule.clastix.io_capsuleconfigurations.yaml +++ b/config/crd/bases/capsule.clastix.io_capsuleconfigurations.yaml @@ -1,4 +1,3 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/bases/capsule.clastix.io_tenants.yaml b/config/crd/bases/capsule.clastix.io_tenants.yaml index 0298fb28..7d8fdbfd 100644 --- a/config/crd/bases/capsule.clastix.io_tenants.yaml +++ b/config/crd/bases/capsule.clastix.io_tenants.yaml @@ -1,4 +1,3 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition From bf6be633e91907a4e87b9b34bdecabf40eb0f85d Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 3 Aug 2022 09:16:57 +0200 Subject: [PATCH 03/18] Fix github action --- .github/workflows/api-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 1d9f7cea..ec56189b 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -1,4 +1,4 @@ -name: e2e +name: api-docs on: push: From af685092e8b20aee4611dad4d2c9a3daf377bcdd Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 3 Aug 2022 09:17:40 +0200 Subject: [PATCH 04/18] Fix github action --- .github/workflows/api-docs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index ec56189b..7a8f5914 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -1,4 +1,4 @@ -name: api-docs +name: Autogen API Docs on: push: @@ -12,7 +12,6 @@ on: jobs: kind: - name: Autogen API Docs runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 From 0af5156cc76fe536fdf483776a93cb5b11f4e510 Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 3 Aug 2022 09:18:30 +0200 Subject: [PATCH 05/18] Added manual --- .github/workflows/api-docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 7a8f5914..f2eb9dde 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -10,6 +10,8 @@ on: paths: - 'charts/capsule/crds/**' + workflow_dispatch: + jobs: kind: runs-on: ubuntu-18.04 From 05b7f42d8aa5c06d7dec8c4056bd068181c49c65 Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 3 Aug 2022 09:24:47 +0200 Subject: [PATCH 06/18] Add file to branch --- .github/workflows/api-docs.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index f2eb9dde..84738ef0 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -13,7 +13,7 @@ on: workflow_dispatch: jobs: - kind: + autogen: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 @@ -22,7 +22,12 @@ jobs: - uses: actions/setup-go@v2 with: go-version: '1.18' - - name: "Install generator" + - name: "Install code generator (fybrik.io/crdoc@latest)" run: go install fybrik.io/crdoc@latest - name: Autogen APIs - run: crdoc --resources config/crd/bases --output docs/api.md + run: crdoc --resources config/crd/bases --output docs/content/general/references.md + - name: Copy To Branches Action + uses: planetoftheweb/copy-to-branches@v1.2 + env: + key: main + files: docs/content/general/references.md From 1324ac27f34042ab7a37d37a46a25d2e8db62605 Mon Sep 17 00:00:00 2001 From: mastrogiovanni Date: Wed, 3 Aug 2022 07:26:55 +0000 Subject: [PATCH 07/18] Moving files docs/content/general/references.md using main --- docs/content/general/references.md | 3640 ++++++++++++++++++++++++++-- 1 file changed, 3422 insertions(+), 218 deletions(-) diff --git a/docs/content/general/references.md b/docs/content/general/references.md index 0cca67d5..9c387d16 100644 --- a/docs/content/general/references.md +++ b/docs/content/general/references.md @@ -1,242 +1,3446 @@ -# Reference +# API Reference -Reference document for Capsule Operator configuration +Packages: -## Custom Resource Definition +- [capsule.clastix.io/v1alpha1](#capsuleclastixiov1alpha1) +- [capsule.clastix.io/v1beta1](#capsuleclastixiov1beta1) -Capsule operator uses a Custom Resources Definition (CRD) for _Tenants_. Tenants are cluster wide resources, so you need cluster level permissions to work with tenants. You can learn about tenant CRD by the `kubectl explain` command: +# capsule.clastix.io/v1alpha1 -``` -kubectl explain tenant +Resource Types: -KIND: Tenant -VERSION: capsule.clastix.io/v1beta1 +- [CapsuleConfiguration](#capsuleconfiguration) -DESCRIPTION: - Tenant is the Schema for the tenants API +- [Tenant](#tenant) -FIELDS: - apiVersion - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - kind - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. In CamelCase. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - metadata - Standard object's metadata. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - spec - TenantSpec defines the desired state of Tenant +## CapsuleConfiguration +[↩ Parent](#capsuleclastixiov1alpha1 ) - status - Returns the observed state of the Tenant -``` -For Tenant spec: -``` -kubectl explain tenant.spec -KIND: Tenant -VERSION: capsule.clastix.io/v1beta1 -RESOURCE: spec -DESCRIPTION: - TenantSpec defines the desired state of Tenant +CapsuleConfiguration is the Schema for the Capsule configuration API. -FIELDS: - additionalRoleBindings <[]Object> - 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. - - containerRegistries - 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. - - imagePullPolicies <[]string> - 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. - - ingressOptions - Specifies options for the Ingress resources, such as allowed hostnames and - IngressClass. Optional. - - limitRanges - Specifies the resource min/max usage restrictions to the Tenant. The assigned - values are inherited by any namespace created in the Tenant. Optional. - - namespaceOptions - 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. - - networkPolicies - Specifies the NetworkPolicies assigned to the Tenant. The assigned - NetworkPolicies are inherited by any namespace created in the Tenant. - Optional. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringcapsule.clastix.io/v1alpha1true
kindstringCapsuleConfigurationtrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + CapsuleConfigurationSpec defines the Capsule configuration.
+
false
- nodeSelector - Specifies the label to control the placement of pods on a given pool of - worker nodes. All namesapces 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. - owners <[]Object> -required- - Specifies the owners of the Tenant. Mandatory. +### CapsuleConfiguration.spec +[↩ Parent](#capsuleconfiguration) - priorityClasses - Specifies the allowed priorityClasses assigned to the Tenant. Capsule - assures that all pods created in the Tenant can use only one - of the allowed priorityClasses. Optional. - resourceQuotas - 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. - - serviceOptions - Specifies options for the Service, such as additional metadata or block of - certain type of Services. Optional. - - storageClasses - 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. Optional. -``` - -and Tenant status: -``` -kubectl explain tenant.status -KIND: Tenant -VERSION: capsule.clastix.io/v1beta1 +CapsuleConfigurationSpec defines the Capsule configuration. -RESOURCE: status + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
forceTenantPrefixboolean + 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.
+
+ Default: false
+
false
protectedNamespaceRegexstring + Disallow creation of namespaces, whose name matches this regexp
+
false
userGroups[]string + Names of the groups for Capsule users.
+
+ Default: [capsule.clastix.io]
+
false
-DESCRIPTION: - Returns the observed state of the Tenant - -FIELDS: - namespaces <[]string> - List of namespaces assigned to the Tenant. - - size -required- - How many namespaces are assigned to the Tenant. - - state -required- - The operational state of the Tenant. Possible values are "Active", - "Cordoned". -``` - -## Capsule Configuration - -The Capsule configuration can be piloted by a Custom Resource definition named `CapsuleConfiguration`. - -```yaml -apiVersion: capsule.clastix.io/v1alpha1 -kind: CapsuleConfiguration -metadata: - name: default - annotations: - capsule.clastix.io/ca-secret-name: "capsule-ca" - capsule.clastix.io/tls-secret-name: "capsule-tls" - capsule.clastix.io/mutating-webhook-configuration-name: "capsule-mutating-webhook-configuration" - capsule.clastix.io/validating-webhook-configuration-name: "capsule-validating-webhook-configuration" -spec: - userGroups: ["capsule.clastix.io"] - forceTenantPrefix: false - protectedNamespaceRegex: "" -``` - -Option | Description | Default ---- |------------------------------------------------------------------------------| --- -`.spec.forceTenantPrefix` | Force the tenant name as prefix for namespaces: `-`. | `false` -`.spec.userGroups` | Array of Capsule groups to which all tenant owners must belong. | `[capsule.clastix.io]` -`.spec.protectedNamespaceRegex` | Disallows creation of namespaces matching the passed regexp. | `null` -`.metadata.annotations.capsule.clastix.io/ca-secret-name` | Set the Capsule Certificate Authority secret name | `capsule-ca` -`.metadata.annotations.capsule.clastic.io/tls-secret-name` | Set the Capsule TLS secret name | `capsule-tls` -`.metadata.annotations.capsule.clastix.io/mutating-webhook-configuration-name` | Set the MutatingWebhookConfiguration name | `mutating-webhook-configuration-name` -`.metadata.annotations.capsule.clastix.io/validating-webhook-configuration-name` | Set the ValidatingWebhookConfiguration name | `validating-webhook-configuration-name` - -Upon installation using Kustomize or Helm, a `capsule-default` resource will be created. -The reference to this configuration is managed by the CLI flag `--configuration-name`. - -## Capsule Permissions - -In the current implementation, the Capsule operator requires cluster admin permissions to fully operate. Make sure you deploy Capsule having access to the default `cluster-admin` ClusterRole. - -## Admission Controllers - -Capsule implements Kubernetes multi-tenancy capabilities using a minimum set of standard [Admission Controllers](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/) enabled on the Kubernetes APIs server. - -Here the list of required Admission Controllers you have to enable to get full support from Capsule: - -* PodNodeSelector -* LimitRanger -* ResourceQuota -* MutatingAdmissionWebhook -* ValidatingAdmissionWebhook - -In addition to the required controllers above, Capsule implements its own set through the [Dynamic Admission Controller](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/) mechanism, providing callbacks to add further validation or resource patching. - -To see Admission Controls installed by Capsule: - -``` -$ kubectl get ValidatingWebhookConfiguration -NAME WEBHOOKS AGE -capsule-validating-webhook-configuration 8 2h - -$ kubectl get MutatingWebhookConfiguration -NAME WEBHOOKS AGE -capsule-mutating-webhook-configuration 1 2h -``` - -## Command Options - -The Capsule operator provides the following command options: - -Option | Description | Default ---- | --- | --- -`--metrics-addr` | The address and port where `/metrics` are exposed. | `127.0.0.1:8080` -`--enable-leader-election` | Start a leader election client and gain leadership before executing the main loop. | `true` -`--zap-log-level` | The log verbosity with a value from 1 to 10 or the basic keywords. | `4` -`--zap-devel` | The flag to get the stack traces for deep debugging. | `null` -`--configuration-name` | The Capsule Configuration CRD name, default is installed automatically | `capsule-default` - - -## Created Resources - -Once installed, the Capsule operator creates the following resources in your cluster: - -``` -NAMESPACE RESOURCE - namespace/capsule-system - customresourcedefinition.apiextensions.k8s.io/tenants.capsule.clastix.io - customresourcedefinition.apiextensions.k8s.io/capsuleconfigurations.capsule.clastix.io - clusterrole.rbac.authorization.k8s.io/capsule-proxy-role - clusterrole.rbac.authorization.k8s.io/capsule-metrics-reader - capsuleconfiguration.capsule.clastix.io/capsule-default - mutatingwebhookconfiguration.admissionregistration.k8s.io/capsule-mutating-webhook-configuration - validatingwebhookconfiguration.admissionregistration.k8s.io/capsule-validating-webhook-configuration -capsule-system clusterrolebinding.rbac.authorization.k8s.io/capsule-manager-rolebinding -capsule-system clusterrolebinding.rbac.authorization.k8s.io/capsule-proxy-rolebinding -capsule-system secret/capsule-ca -capsule-system secret/capsule-tls -capsule-system service/capsule-controller-manager-metrics-service -capsule-system service/capsule-webhook-service -capsule-system deployment.apps/capsule-controller-manager -``` +## Tenant +[↩ Parent](#capsuleclastixiov1alpha1 ) + + + + + + +Tenant is the Schema for the tenants API. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringcapsule.clastix.io/v1alpha1true
kindstringTenanttrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + TenantSpec defines the desired state of Tenant.
+
false
statusobject + TenantStatus defines the observed state of Tenant.
+
false
+ + +### Tenant.spec +[↩ Parent](#tenant) + + + +TenantSpec defines the desired state of Tenant. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ownerobject + OwnerSpec defines tenant owner name and kind.
+
true
additionalRoleBindings[]object +
+
false
containerRegistriesobject +
+
false
externalServiceIPsobject +
+
false
ingressClassesobject +
+
false
ingressHostnamesobject +
+
false
limitRanges[]object +
+
false
namespaceQuotainteger +
+
+ Format: int32
+ Minimum: 1
+
false
namespacesMetadataobject +
+
false
networkPolicies[]object +
+
false
nodeSelectormap[string]string +
+
false
resourceQuotas[]object +
+
false
servicesMetadataobject +
+
false
storageClassesobject +
+
false
+ + +### Tenant.spec.owner +[↩ Parent](#tenantspec) + + + +OwnerSpec defines tenant owner name and kind. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindenum +
+
+ Enum: User, Group
+
true
namestring +
+
true
+ + +### Tenant.spec.additionalRoleBindings[index] +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
clusterRoleNamestring +
+
true
subjects[]object + kubebuilder:validation:Minimum=1
+
true
+ + +### Tenant.spec.additionalRoleBindings[index].subjects[index] +[↩ Parent](#tenantspecadditionalrolebindingsindex) + + + +Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindstring + Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+
true
namestring + Name of the object being referenced.
+
true
apiGroupstring + APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
+
false
namespacestring + Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.
+
false
+ + +### Tenant.spec.containerRegistries +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.externalServiceIPs +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
true
+ + +### Tenant.spec.ingressClasses +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.ingressHostnames +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.limitRanges[index] +[↩ Parent](#tenantspec) + + + +LimitRangeSpec defines a min/max usage limit for resources that match on kind. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
limits[]object + Limits is the list of LimitRangeItem objects that are enforced.
+
true
+ + +### Tenant.spec.limitRanges[index].limits[index] +[↩ Parent](#tenantspeclimitrangesindex) + + + +LimitRangeItem defines a min/max usage limit for any resource that matches on kind. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + Type of resource that this limit applies to.
+
true
defaultmap[string]int or string + Default resource requirement limit value by resource name if resource limit is omitted.
+
false
defaultRequestmap[string]int or string + DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
+
false
maxmap[string]int or string + Max usage constraints on this kind by resource name.
+
false
maxLimitRequestRatiomap[string]int or string + MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
+
false
minmap[string]int or string + Min usage constraints on this kind by resource name.
+
false
+ + +### Tenant.spec.namespacesMetadata +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
additionalAnnotationsmap[string]string +
+
false
additionalLabelsmap[string]string +
+
false
+ + +### Tenant.spec.networkPolicies[index] +[↩ Parent](#tenantspec) + + + +NetworkPolicySpec provides the specification of a NetworkPolicy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
podSelectorobject + Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.
+
true
egress[]object + List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8
+
false
ingress[]object + List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)
+
false
policyTypes[]string + List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8
+
false
+ + +### Tenant.spec.networkPolicies[index].podSelector +[↩ Parent](#tenantspecnetworkpoliciesindex) + + + +Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies[index].podSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesindexpodselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index] +[↩ Parent](#tenantspecnetworkpoliciesindex) + + + +NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8 + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ports[]object + List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
+
false
to[]object + List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].ports[index] +[↩ Parent](#tenantspecnetworkpoliciesindexegressindex) + + + +NetworkPolicyPort describes a port to allow traffic on + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
endPortinteger + If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort".
+
+ Format: int32
+
false
portint or string + The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
+
false
protocolstring + The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
+
+ Default: TCP
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].to[index] +[↩ Parent](#tenantspecnetworkpoliciesindexegressindex) + + + +NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ipBlockobject + IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
+
false
namespaceSelectorobject + Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
+
false
podSelectorobject + This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].to[index].ipBlock +[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindex) + + + +IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
cidrstring + CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64"
+
true
except[]string + Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].to[index].namespaceSelector +[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindex) + + + +Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].to[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].to[index].podSelector +[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindex) + + + +This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].to[index].podSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindexpodselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index] +[↩ Parent](#tenantspecnetworkpoliciesindex) + + + +NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
from[]object + List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.
+
false
ports[]object + List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].from[index] +[↩ Parent](#tenantspecnetworkpoliciesindexingressindex) + + + +NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ipBlockobject + IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
+
false
namespaceSelectorobject + Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
+
false
podSelectorobject + This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].from[index].ipBlock +[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindex) + + + +IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
cidrstring + CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64"
+
true
except[]string + Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].from[index].namespaceSelector +[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindex) + + + +Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].from[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].from[index].podSelector +[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindex) + + + +This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].from[index].podSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindexpodselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].ports[index] +[↩ Parent](#tenantspecnetworkpoliciesindexingressindex) + + + +NetworkPolicyPort describes a port to allow traffic on + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
endPortinteger + If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort".
+
+ Format: int32
+
false
portint or string + The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
+
false
protocolstring + The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
+
+ Default: TCP
+
false
+ + +### Tenant.spec.resourceQuotas[index] +[↩ Parent](#tenantspec) + + + +ResourceQuotaSpec defines the desired hard limits to enforce for Quota. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
hardmap[string]int or string + hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
+
false
scopeSelectorobject + scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.
+
false
scopes[]string + A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.
+
false
+ + +### Tenant.spec.resourceQuotas[index].scopeSelector +[↩ Parent](#tenantspecresourcequotasindex) + + + +scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + A list of scope selector requirements by scope of the resources.
+
false
+ + +### Tenant.spec.resourceQuotas[index].scopeSelector.matchExpressions[index] +[↩ Parent](#tenantspecresourcequotasindexscopeselector) + + + +A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
operatorstring + Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.
+
true
scopeNamestring + The name of the scope that the selector applies to.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.servicesMetadata +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
additionalAnnotationsmap[string]string +
+
false
additionalLabelsmap[string]string +
+
false
+ + +### Tenant.spec.storageClasses +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.status +[↩ Parent](#tenant) + + + +TenantStatus defines the observed state of Tenant. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
sizeinteger +
+
true
namespaces[]string +
+
false
+ +# capsule.clastix.io/v1beta1 + +Resource Types: + +- [Tenant](#tenant) + + + + +## Tenant +[↩ Parent](#capsuleclastixiov1beta1 ) + + + + + + +Tenant is the Schema for the tenants API. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringcapsule.clastix.io/v1beta1true
kindstringTenanttrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + TenantSpec defines the desired state of Tenant.
+
false
statusobject + Returns the observed state of the Tenant.
+
false
+ + +### Tenant.spec +[↩ Parent](#tenant-1) + + + +TenantSpec defines the desired state of Tenant. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
owners[]object + Specifies the owners of the Tenant. Mandatory.
+
true
additionalRoleBindings[]object + 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.
+
false
containerRegistriesobject + 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.
+
false
imagePullPolicies[]enum + 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.
+
false
ingressOptionsobject + Specifies options for the Ingress resources, such as allowed hostnames and IngressClass. Optional.
+
false
limitRangesobject + Specifies the resource min/max usage restrictions to the Tenant. The assigned values are inherited by any namespace created in the Tenant. Optional.
+
false
namespaceOptionsobject + 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.
+
false
networkPoliciesobject + Specifies the NetworkPolicies assigned to the Tenant. The assigned NetworkPolicies are inherited by any namespace created in the Tenant. Optional.
+
false
nodeSelectormap[string]string + 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.
+
false
priorityClassesobject + 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. Optional.
+
false
resourceQuotasobject + 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.
+
false
serviceOptionsobject + Specifies options for the Service, such as additional metadata or block of certain type of Services. Optional.
+
false
storageClassesobject + 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. Optional.
+
false
+ + +### Tenant.spec.owners[index] +[↩ Parent](#tenantspec-1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindenum + Kind of tenant owner. Possible values are "User", "Group", and "ServiceAccount"
+
+ Enum: User, Group, ServiceAccount
+
true
namestring + Name of tenant owner.
+
true
proxySettings[]object + Proxy settings for tenant owner.
+
false
+ + +### Tenant.spec.owners[index].proxySettings[index] +[↩ Parent](#tenantspecownersindex) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindenum +
+
+ Enum: Nodes, StorageClasses, IngressClasses, PriorityClasses
+
true
operations[]enum +
+
true
+ + +### Tenant.spec.additionalRoleBindings[index] +[↩ Parent](#tenantspec-1) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
clusterRoleNamestring +
+
true
subjects[]object + kubebuilder:validation:Minimum=1
+
true
+ + +### Tenant.spec.additionalRoleBindings[index].subjects[index] +[↩ Parent](#tenantspecadditionalrolebindingsindex-1) + + + +Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindstring + Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+
true
namestring + Name of the object being referenced.
+
true
apiGroupstring + APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
+
false
namespacestring + Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.
+
false
+ + +### Tenant.spec.containerRegistries +[↩ Parent](#tenantspec-1) + + + +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. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.ingressOptions +[↩ Parent](#tenantspec-1) + + + +Specifies options for the Ingress resources, such as allowed hostnames and IngressClass. Optional. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowedClassesobject + 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. Optional.
+
false
allowedHostnamesobject + 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.
+
false
hostnameCollisionScopeenum + 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.
+
+ Enum: Cluster, Tenant, Namespace, Disabled
+ Default: Disabled
+
false
+ + +### Tenant.spec.ingressOptions.allowedClasses +[↩ Parent](#tenantspecingressoptions) + + + +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. Optional. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.ingressOptions.allowedHostnames +[↩ Parent](#tenantspecingressoptions) + + + +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. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.limitRanges +[↩ Parent](#tenantspec-1) + + + +Specifies the resource min/max usage restrictions to the Tenant. The assigned values are inherited by any namespace created in the Tenant. Optional. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
items[]object +
+
false
+ + +### Tenant.spec.limitRanges.items[index] +[↩ Parent](#tenantspeclimitranges) + + + +LimitRangeSpec defines a min/max usage limit for resources that match on kind. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
limits[]object + Limits is the list of LimitRangeItem objects that are enforced.
+
true
+ + +### Tenant.spec.limitRanges.items[index].limits[index] +[↩ Parent](#tenantspeclimitrangesitemsindex) + + + +LimitRangeItem defines a min/max usage limit for any resource that matches on kind. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + Type of resource that this limit applies to.
+
true
defaultmap[string]int or string + Default resource requirement limit value by resource name if resource limit is omitted.
+
false
defaultRequestmap[string]int or string + DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
+
false
maxmap[string]int or string + Max usage constraints on this kind by resource name.
+
false
maxLimitRequestRatiomap[string]int or string + MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
+
false
minmap[string]int or string + Min usage constraints on this kind by resource name.
+
false
+ + +### Tenant.spec.namespaceOptions +[↩ Parent](#tenantspec-1) + + + +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. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
additionalMetadataobject + Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional.
+
false
quotainteger + 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.
+
+ Format: int32
+ Minimum: 1
+
false
+ + +### Tenant.spec.namespaceOptions.additionalMetadata +[↩ Parent](#tenantspecnamespaceoptions) + + + +Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
annotationsmap[string]string +
+
false
labelsmap[string]string +
+
false
+ + +### Tenant.spec.networkPolicies +[↩ Parent](#tenantspec-1) + + + +Specifies the NetworkPolicies assigned to the Tenant. The assigned NetworkPolicies are inherited by any namespace created in the Tenant. Optional. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
items[]object +
+
false
+ + +### Tenant.spec.networkPolicies.items[index] +[↩ Parent](#tenantspecnetworkpolicies) + + + +NetworkPolicySpec provides the specification of a NetworkPolicy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
podSelectorobject + Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.
+
true
egress[]object + List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8
+
false
ingress[]object + List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)
+
false
policyTypes[]string + List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8
+
false
+ + +### Tenant.spec.networkPolicies.items[index].podSelector +[↩ Parent](#tenantspecnetworkpoliciesitemsindex) + + + +Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].podSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexpodselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindex) + + + +NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8 + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ports[]object + List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
+
false
to[]object + List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].ports[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindex) + + + +NetworkPolicyPort describes a port to allow traffic on + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
endPortinteger + If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort".
+
+ Format: int32
+
false
portint or string + The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
+
false
protocolstring + The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
+
+ Default: TCP
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].to[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindex) + + + +NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ipBlockobject + IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
+
false
namespaceSelectorobject + Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
+
false
podSelectorobject + This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].to[index].ipBlock +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindex) + + + +IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
cidrstring + CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64"
+
true
except[]string + Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].to[index].namespaceSelector +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindex) + + + +Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].to[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].to[index].podSelector +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindex) + + + +This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].to[index].podSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindexpodselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindex) + + + +NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
from[]object + List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.
+
false
ports[]object + List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].from[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindex) + + + +NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ipBlockobject + IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
+
false
namespaceSelectorobject + Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
+
false
podSelectorobject + This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].ipBlock +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindex) + + + +IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
cidrstring + CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64"
+
true
except[]string + Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].namespaceSelector +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindex) + + + +Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].podSelector +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindex) + + + +This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].podSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindexpodselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].ports[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindex) + + + +NetworkPolicyPort describes a port to allow traffic on + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
endPortinteger + If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort".
+
+ Format: int32
+
false
portint or string + The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
+
false
protocolstring + The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
+
+ Default: TCP
+
false
+ + +### Tenant.spec.priorityClasses +[↩ Parent](#tenantspec-1) + + + +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. Optional. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.resourceQuotas +[↩ Parent](#tenantspec-1) + + + +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. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
items[]object +
+
false
scopeenum + Define if the Resource Budget should compute resource across all Namespaces in the Tenant or individually per cluster. Default is Tenant
+
+ Enum: Tenant, Namespace
+ Default: Tenant
+
false
+ + +### Tenant.spec.resourceQuotas.items[index] +[↩ Parent](#tenantspecresourcequotas) + + + +ResourceQuotaSpec defines the desired hard limits to enforce for Quota. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
hardmap[string]int or string + hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
+
false
scopeSelectorobject + scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.
+
false
scopes[]string + A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.
+
false
+ + +### Tenant.spec.resourceQuotas.items[index].scopeSelector +[↩ Parent](#tenantspecresourcequotasitemsindex) + + + +scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + A list of scope selector requirements by scope of the resources.
+
false
+ + +### Tenant.spec.resourceQuotas.items[index].scopeSelector.matchExpressions[index] +[↩ Parent](#tenantspecresourcequotasitemsindexscopeselector) + + + +A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
operatorstring + Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.
+
true
scopeNamestring + The name of the scope that the selector applies to.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.serviceOptions +[↩ Parent](#tenantspec-1) + + + +Specifies options for the Service, such as additional metadata or block of certain type of Services. Optional. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
additionalMetadataobject + Specifies additional labels and annotations the Capsule operator places on any Service resource in the Tenant. Optional.
+
false
allowedServicesobject + Block or deny certain type of Services. Optional.
+
false
externalIPsobject + Specifies the external IPs that can be used in Services with type ClusterIP. An empty list means no IPs are allowed. Optional.
+
false
+ + +### Tenant.spec.serviceOptions.additionalMetadata +[↩ Parent](#tenantspecserviceoptions) + + + +Specifies additional labels and annotations the Capsule operator places on any Service resource in the Tenant. Optional. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
annotationsmap[string]string +
+
false
labelsmap[string]string +
+
false
+ + +### Tenant.spec.serviceOptions.allowedServices +[↩ Parent](#tenantspecserviceoptions) + + + +Block or deny certain type of Services. Optional. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
externalNameboolean + Specifies if ExternalName service type resources are allowed for the Tenant. Default is true. Optional.
+
+ Default: true
+
false
loadBalancerboolean + Specifies if LoadBalancer service type resources are allowed for the Tenant. Default is true. Optional.
+
+ Default: true
+
false
nodePortboolean + Specifies if NodePort service type resources are allowed for the Tenant. Default is true. Optional.
+
+ Default: true
+
false
+ + +### Tenant.spec.serviceOptions.externalIPs +[↩ Parent](#tenantspecserviceoptions) + + + +Specifies the external IPs that can be used in Services with type ClusterIP. An empty list means no IPs are allowed. Optional. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
true
+ + +### Tenant.spec.storageClasses +[↩ Parent](#tenantspec-1) + + + +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. Optional. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.status +[↩ Parent](#tenant-1) + + + +Returns the observed state of the Tenant. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
sizeinteger + How many namespaces are assigned to the Tenant.
+
true
stateenum + The operational state of the Tenant. Possible values are "Active", "Cordoned".
+
+ Enum: Cordoned, Active
+ Default: Active
+
true
namespaces[]string + List of namespaces assigned to the Tenant.
+
false
\ No newline at end of file From e3478cb36e25d5dde899bfc7d716f15f382c9b65 Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 3 Aug 2022 09:29:47 +0200 Subject: [PATCH 08/18] Added apidoc generator --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 6c3805a6..e700a3f3 100644 --- a/Makefile +++ b/Makefile @@ -78,6 +78,9 @@ manifests: controller-gen generate: controller-gen $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." +apidoc: apidocs-gen + $(APIDOCS_GEN) crdoc --resources config/crd/bases --output docs/content/general/references.md + # Setup development env # Usage: # LAPTOP_HOST_IP= make dev-setup @@ -147,6 +150,10 @@ CONTROLLER_GEN = $(shell pwd)/bin/controller-gen controller-gen: ## Download controller-gen locally if necessary. $(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.5.0) +APIDOCS_GEN = $(shell pwd)/bin/crdoc +apidocs-gen: ## Download controller-gen locally if necessary. + $(call go-install-tool,$(APIDOCS_GEN),fybrik.io/crdoc@latest) + GINKGO = $(shell pwd)/bin/ginkgo ginkgo: ## Download ginkgo locally if necessary. $(call go-install-tool,$(KUSTOMIZE),github.com/onsi/ginkgo/ginkgo@v1.16.5) From f9e3ca7f90838d456cb289287cfc8db16bb1dd32 Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 3 Aug 2022 09:36:13 +0200 Subject: [PATCH 09/18] Cleanup --- .github/workflows/api-docs.yml | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .github/workflows/api-docs.yml diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml deleted file mode 100644 index 84738ef0..00000000 --- a/.github/workflows/api-docs.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Autogen API Docs - -on: - push: - branches: [ "*" ] - paths: - - 'charts/capsule/crds/**' - pull_request: - branches: [ "*" ] - paths: - - 'charts/capsule/crds/**' - - workflow_dispatch: - -jobs: - autogen: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-go@v2 - with: - go-version: '1.18' - - name: "Install code generator (fybrik.io/crdoc@latest)" - run: go install fybrik.io/crdoc@latest - - name: Autogen APIs - run: crdoc --resources config/crd/bases --output docs/content/general/references.md - - name: Copy To Branches Action - uses: planetoftheweb/copy-to-branches@v1.2 - env: - key: main - files: docs/content/general/references.md From d43e579d47b8d94d1e4780564b76747bec2fa698 Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 3 Aug 2022 09:38:54 +0200 Subject: [PATCH 10/18] Cleanup --- docs/content/general/references.md | 3446 ---------------------------- 1 file changed, 3446 deletions(-) delete mode 100644 docs/content/general/references.md diff --git a/docs/content/general/references.md b/docs/content/general/references.md deleted file mode 100644 index 9c387d16..00000000 --- a/docs/content/general/references.md +++ /dev/null @@ -1,3446 +0,0 @@ -# API Reference - -Packages: - -- [capsule.clastix.io/v1alpha1](#capsuleclastixiov1alpha1) -- [capsule.clastix.io/v1beta1](#capsuleclastixiov1beta1) - -# capsule.clastix.io/v1alpha1 - -Resource Types: - -- [CapsuleConfiguration](#capsuleconfiguration) - -- [Tenant](#tenant) - - - - -## CapsuleConfiguration -[↩ Parent](#capsuleclastixiov1alpha1 ) - - - - - - -CapsuleConfiguration is the Schema for the Capsule configuration API. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
apiVersionstringcapsule.clastix.io/v1alpha1true
kindstringCapsuleConfigurationtrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject - CapsuleConfigurationSpec defines the Capsule configuration.
-
false
- - -### CapsuleConfiguration.spec -[↩ Parent](#capsuleconfiguration) - - - -CapsuleConfigurationSpec defines the Capsule configuration. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
forceTenantPrefixboolean - 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.
-
- Default: false
-
false
protectedNamespaceRegexstring - Disallow creation of namespaces, whose name matches this regexp
-
false
userGroups[]string - Names of the groups for Capsule users.
-
- Default: [capsule.clastix.io]
-
false
- -## Tenant -[↩ Parent](#capsuleclastixiov1alpha1 ) - - - - - - -Tenant is the Schema for the tenants API. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
apiVersionstringcapsule.clastix.io/v1alpha1true
kindstringTenanttrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject - TenantSpec defines the desired state of Tenant.
-
false
statusobject - TenantStatus defines the observed state of Tenant.
-
false
- - -### Tenant.spec -[↩ Parent](#tenant) - - - -TenantSpec defines the desired state of Tenant. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
ownerobject - OwnerSpec defines tenant owner name and kind.
-
true
additionalRoleBindings[]object -
-
false
containerRegistriesobject -
-
false
externalServiceIPsobject -
-
false
ingressClassesobject -
-
false
ingressHostnamesobject -
-
false
limitRanges[]object -
-
false
namespaceQuotainteger -
-
- Format: int32
- Minimum: 1
-
false
namespacesMetadataobject -
-
false
networkPolicies[]object -
-
false
nodeSelectormap[string]string -
-
false
resourceQuotas[]object -
-
false
servicesMetadataobject -
-
false
storageClassesobject -
-
false
- - -### Tenant.spec.owner -[↩ Parent](#tenantspec) - - - -OwnerSpec defines tenant owner name and kind. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
kindenum -
-
- Enum: User, Group
-
true
namestring -
-
true
- - -### Tenant.spec.additionalRoleBindings[index] -[↩ Parent](#tenantspec) - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
clusterRoleNamestring -
-
true
subjects[]object - kubebuilder:validation:Minimum=1
-
true
- - -### Tenant.spec.additionalRoleBindings[index].subjects[index] -[↩ Parent](#tenantspecadditionalrolebindingsindex) - - - -Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
kindstring - Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
-
true
namestring - Name of the object being referenced.
-
true
apiGroupstring - APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
-
false
namespacestring - Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.
-
false
- - -### Tenant.spec.containerRegistries -[↩ Parent](#tenantspec) - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
allowed[]string -
-
false
allowedRegexstring -
-
false
- - -### Tenant.spec.externalServiceIPs -[↩ Parent](#tenantspec) - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
allowed[]string -
-
true
- - -### Tenant.spec.ingressClasses -[↩ Parent](#tenantspec) - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
allowed[]string -
-
false
allowedRegexstring -
-
false
- - -### Tenant.spec.ingressHostnames -[↩ Parent](#tenantspec) - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
allowed[]string -
-
false
allowedRegexstring -
-
false
- - -### Tenant.spec.limitRanges[index] -[↩ Parent](#tenantspec) - - - -LimitRangeSpec defines a min/max usage limit for resources that match on kind. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
limits[]object - Limits is the list of LimitRangeItem objects that are enforced.
-
true
- - -### Tenant.spec.limitRanges[index].limits[index] -[↩ Parent](#tenantspeclimitrangesindex) - - - -LimitRangeItem defines a min/max usage limit for any resource that matches on kind. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
typestring - Type of resource that this limit applies to.
-
true
defaultmap[string]int or string - Default resource requirement limit value by resource name if resource limit is omitted.
-
false
defaultRequestmap[string]int or string - DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
-
false
maxmap[string]int or string - Max usage constraints on this kind by resource name.
-
false
maxLimitRequestRatiomap[string]int or string - MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
-
false
minmap[string]int or string - Min usage constraints on this kind by resource name.
-
false
- - -### Tenant.spec.namespacesMetadata -[↩ Parent](#tenantspec) - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
additionalAnnotationsmap[string]string -
-
false
additionalLabelsmap[string]string -
-
false
- - -### Tenant.spec.networkPolicies[index] -[↩ Parent](#tenantspec) - - - -NetworkPolicySpec provides the specification of a NetworkPolicy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
podSelectorobject - Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.
-
true
egress[]object - List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8
-
false
ingress[]object - List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)
-
false
policyTypes[]string - List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8
-
false
- - -### Tenant.spec.networkPolicies[index].podSelector -[↩ Parent](#tenantspecnetworkpoliciesindex) - - - -Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
false
matchLabelsmap[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-
false
- - -### Tenant.spec.networkPolicies[index].podSelector.matchExpressions[index] -[↩ Parent](#tenantspecnetworkpoliciesindexpodselector) - - - -A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the label key that the selector applies to.
-
true
operatorstring - operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
true
values[]string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### Tenant.spec.networkPolicies[index].egress[index] -[↩ Parent](#tenantspecnetworkpoliciesindex) - - - -NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8 - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
ports[]object - List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
-
false
to[]object - List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.
-
false
- - -### Tenant.spec.networkPolicies[index].egress[index].ports[index] -[↩ Parent](#tenantspecnetworkpoliciesindexegressindex) - - - -NetworkPolicyPort describes a port to allow traffic on - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
endPortinteger - If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort".
-
- Format: int32
-
false
portint or string - The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
-
false
protocolstring - The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
-
- Default: TCP
-
false
- - -### Tenant.spec.networkPolicies[index].egress[index].to[index] -[↩ Parent](#tenantspecnetworkpoliciesindexegressindex) - - - -NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
ipBlockobject - IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
-
false
namespaceSelectorobject - Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. - If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
-
false
podSelectorobject - This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. - If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
-
false
- - -### Tenant.spec.networkPolicies[index].egress[index].to[index].ipBlock -[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindex) - - - -IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
cidrstring - CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64"
-
true
except[]string - Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range
-
false
- - -### Tenant.spec.networkPolicies[index].egress[index].to[index].namespaceSelector -[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindex) - - - -Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. - If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
false
matchLabelsmap[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-
false
- - -### Tenant.spec.networkPolicies[index].egress[index].to[index].namespaceSelector.matchExpressions[index] -[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindexnamespaceselector) - - - -A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the label key that the selector applies to.
-
true
operatorstring - operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
true
values[]string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### Tenant.spec.networkPolicies[index].egress[index].to[index].podSelector -[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindex) - - - -This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. - If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
false
matchLabelsmap[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-
false
- - -### Tenant.spec.networkPolicies[index].egress[index].to[index].podSelector.matchExpressions[index] -[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindexpodselector) - - - -A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the label key that the selector applies to.
-
true
operatorstring - operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
true
values[]string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### Tenant.spec.networkPolicies[index].ingress[index] -[↩ Parent](#tenantspecnetworkpoliciesindex) - - - -NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
from[]object - List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.
-
false
ports[]object - List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
-
false
- - -### Tenant.spec.networkPolicies[index].ingress[index].from[index] -[↩ Parent](#tenantspecnetworkpoliciesindexingressindex) - - - -NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
ipBlockobject - IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
-
false
namespaceSelectorobject - Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. - If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
-
false
podSelectorobject - This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. - If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
-
false
- - -### Tenant.spec.networkPolicies[index].ingress[index].from[index].ipBlock -[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindex) - - - -IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
cidrstring - CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64"
-
true
except[]string - Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range
-
false
- - -### Tenant.spec.networkPolicies[index].ingress[index].from[index].namespaceSelector -[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindex) - - - -Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. - If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
false
matchLabelsmap[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-
false
- - -### Tenant.spec.networkPolicies[index].ingress[index].from[index].namespaceSelector.matchExpressions[index] -[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindexnamespaceselector) - - - -A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the label key that the selector applies to.
-
true
operatorstring - operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
true
values[]string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### Tenant.spec.networkPolicies[index].ingress[index].from[index].podSelector -[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindex) - - - -This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. - If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
false
matchLabelsmap[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-
false
- - -### Tenant.spec.networkPolicies[index].ingress[index].from[index].podSelector.matchExpressions[index] -[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindexpodselector) - - - -A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the label key that the selector applies to.
-
true
operatorstring - operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
true
values[]string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### Tenant.spec.networkPolicies[index].ingress[index].ports[index] -[↩ Parent](#tenantspecnetworkpoliciesindexingressindex) - - - -NetworkPolicyPort describes a port to allow traffic on - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
endPortinteger - If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort".
-
- Format: int32
-
false
portint or string - The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
-
false
protocolstring - The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
-
- Default: TCP
-
false
- - -### Tenant.spec.resourceQuotas[index] -[↩ Parent](#tenantspec) - - - -ResourceQuotaSpec defines the desired hard limits to enforce for Quota. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
hardmap[string]int or string - hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
-
false
scopeSelectorobject - scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.
-
false
scopes[]string - A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.
-
false
- - -### Tenant.spec.resourceQuotas[index].scopeSelector -[↩ Parent](#tenantspecresourcequotasindex) - - - -scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - A list of scope selector requirements by scope of the resources.
-
false
- - -### Tenant.spec.resourceQuotas[index].scopeSelector.matchExpressions[index] -[↩ Parent](#tenantspecresourcequotasindexscopeselector) - - - -A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
operatorstring - Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.
-
true
scopeNamestring - The name of the scope that the selector applies to.
-
true
values[]string - An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### Tenant.spec.servicesMetadata -[↩ Parent](#tenantspec) - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
additionalAnnotationsmap[string]string -
-
false
additionalLabelsmap[string]string -
-
false
- - -### Tenant.spec.storageClasses -[↩ Parent](#tenantspec) - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
allowed[]string -
-
false
allowedRegexstring -
-
false
- - -### Tenant.status -[↩ Parent](#tenant) - - - -TenantStatus defines the observed state of Tenant. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
sizeinteger -
-
true
namespaces[]string -
-
false
- -# capsule.clastix.io/v1beta1 - -Resource Types: - -- [Tenant](#tenant) - - - - -## Tenant -[↩ Parent](#capsuleclastixiov1beta1 ) - - - - - - -Tenant is the Schema for the tenants API. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
apiVersionstringcapsule.clastix.io/v1beta1true
kindstringTenanttrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject - TenantSpec defines the desired state of Tenant.
-
false
statusobject - Returns the observed state of the Tenant.
-
false
- - -### Tenant.spec -[↩ Parent](#tenant-1) - - - -TenantSpec defines the desired state of Tenant. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
owners[]object - Specifies the owners of the Tenant. Mandatory.
-
true
additionalRoleBindings[]object - 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.
-
false
containerRegistriesobject - 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.
-
false
imagePullPolicies[]enum - 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.
-
false
ingressOptionsobject - Specifies options for the Ingress resources, such as allowed hostnames and IngressClass. Optional.
-
false
limitRangesobject - Specifies the resource min/max usage restrictions to the Tenant. The assigned values are inherited by any namespace created in the Tenant. Optional.
-
false
namespaceOptionsobject - 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.
-
false
networkPoliciesobject - Specifies the NetworkPolicies assigned to the Tenant. The assigned NetworkPolicies are inherited by any namespace created in the Tenant. Optional.
-
false
nodeSelectormap[string]string - 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.
-
false
priorityClassesobject - 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. Optional.
-
false
resourceQuotasobject - 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.
-
false
serviceOptionsobject - Specifies options for the Service, such as additional metadata or block of certain type of Services. Optional.
-
false
storageClassesobject - 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. Optional.
-
false
- - -### Tenant.spec.owners[index] -[↩ Parent](#tenantspec-1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
kindenum - Kind of tenant owner. Possible values are "User", "Group", and "ServiceAccount"
-
- Enum: User, Group, ServiceAccount
-
true
namestring - Name of tenant owner.
-
true
proxySettings[]object - Proxy settings for tenant owner.
-
false
- - -### Tenant.spec.owners[index].proxySettings[index] -[↩ Parent](#tenantspecownersindex) - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
kindenum -
-
- Enum: Nodes, StorageClasses, IngressClasses, PriorityClasses
-
true
operations[]enum -
-
true
- - -### Tenant.spec.additionalRoleBindings[index] -[↩ Parent](#tenantspec-1) - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
clusterRoleNamestring -
-
true
subjects[]object - kubebuilder:validation:Minimum=1
-
true
- - -### Tenant.spec.additionalRoleBindings[index].subjects[index] -[↩ Parent](#tenantspecadditionalrolebindingsindex-1) - - - -Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
kindstring - Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
-
true
namestring - Name of the object being referenced.
-
true
apiGroupstring - APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
-
false
namespacestring - Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.
-
false
- - -### Tenant.spec.containerRegistries -[↩ Parent](#tenantspec-1) - - - -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. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
allowed[]string -
-
false
allowedRegexstring -
-
false
- - -### Tenant.spec.ingressOptions -[↩ Parent](#tenantspec-1) - - - -Specifies options for the Ingress resources, such as allowed hostnames and IngressClass. Optional. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
allowedClassesobject - 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. Optional.
-
false
allowedHostnamesobject - 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.
-
false
hostnameCollisionScopeenum - 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.
-
- Enum: Cluster, Tenant, Namespace, Disabled
- Default: Disabled
-
false
- - -### Tenant.spec.ingressOptions.allowedClasses -[↩ Parent](#tenantspecingressoptions) - - - -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. Optional. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
allowed[]string -
-
false
allowedRegexstring -
-
false
- - -### Tenant.spec.ingressOptions.allowedHostnames -[↩ Parent](#tenantspecingressoptions) - - - -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. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
allowed[]string -
-
false
allowedRegexstring -
-
false
- - -### Tenant.spec.limitRanges -[↩ Parent](#tenantspec-1) - - - -Specifies the resource min/max usage restrictions to the Tenant. The assigned values are inherited by any namespace created in the Tenant. Optional. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
items[]object -
-
false
- - -### Tenant.spec.limitRanges.items[index] -[↩ Parent](#tenantspeclimitranges) - - - -LimitRangeSpec defines a min/max usage limit for resources that match on kind. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
limits[]object - Limits is the list of LimitRangeItem objects that are enforced.
-
true
- - -### Tenant.spec.limitRanges.items[index].limits[index] -[↩ Parent](#tenantspeclimitrangesitemsindex) - - - -LimitRangeItem defines a min/max usage limit for any resource that matches on kind. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
typestring - Type of resource that this limit applies to.
-
true
defaultmap[string]int or string - Default resource requirement limit value by resource name if resource limit is omitted.
-
false
defaultRequestmap[string]int or string - DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
-
false
maxmap[string]int or string - Max usage constraints on this kind by resource name.
-
false
maxLimitRequestRatiomap[string]int or string - MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
-
false
minmap[string]int or string - Min usage constraints on this kind by resource name.
-
false
- - -### Tenant.spec.namespaceOptions -[↩ Parent](#tenantspec-1) - - - -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. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
additionalMetadataobject - Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional.
-
false
quotainteger - 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.
-
- Format: int32
- Minimum: 1
-
false
- - -### Tenant.spec.namespaceOptions.additionalMetadata -[↩ Parent](#tenantspecnamespaceoptions) - - - -Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
annotationsmap[string]string -
-
false
labelsmap[string]string -
-
false
- - -### Tenant.spec.networkPolicies -[↩ Parent](#tenantspec-1) - - - -Specifies the NetworkPolicies assigned to the Tenant. The assigned NetworkPolicies are inherited by any namespace created in the Tenant. Optional. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
items[]object -
-
false
- - -### Tenant.spec.networkPolicies.items[index] -[↩ Parent](#tenantspecnetworkpolicies) - - - -NetworkPolicySpec provides the specification of a NetworkPolicy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
podSelectorobject - Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.
-
true
egress[]object - List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8
-
false
ingress[]object - List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)
-
false
policyTypes[]string - List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8
-
false
- - -### Tenant.spec.networkPolicies.items[index].podSelector -[↩ Parent](#tenantspecnetworkpoliciesitemsindex) - - - -Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
false
matchLabelsmap[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-
false
- - -### Tenant.spec.networkPolicies.items[index].podSelector.matchExpressions[index] -[↩ Parent](#tenantspecnetworkpoliciesitemsindexpodselector) - - - -A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the label key that the selector applies to.
-
true
operatorstring - operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
true
values[]string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### Tenant.spec.networkPolicies.items[index].egress[index] -[↩ Parent](#tenantspecnetworkpoliciesitemsindex) - - - -NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8 - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
ports[]object - List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
-
false
to[]object - List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.
-
false
- - -### Tenant.spec.networkPolicies.items[index].egress[index].ports[index] -[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindex) - - - -NetworkPolicyPort describes a port to allow traffic on - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
endPortinteger - If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort".
-
- Format: int32
-
false
portint or string - The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
-
false
protocolstring - The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
-
- Default: TCP
-
false
- - -### Tenant.spec.networkPolicies.items[index].egress[index].to[index] -[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindex) - - - -NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
ipBlockobject - IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
-
false
namespaceSelectorobject - Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. - If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
-
false
podSelectorobject - This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. - If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
-
false
- - -### Tenant.spec.networkPolicies.items[index].egress[index].to[index].ipBlock -[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindex) - - - -IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
cidrstring - CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64"
-
true
except[]string - Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range
-
false
- - -### Tenant.spec.networkPolicies.items[index].egress[index].to[index].namespaceSelector -[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindex) - - - -Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. - If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
false
matchLabelsmap[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-
false
- - -### Tenant.spec.networkPolicies.items[index].egress[index].to[index].namespaceSelector.matchExpressions[index] -[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindexnamespaceselector) - - - -A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the label key that the selector applies to.
-
true
operatorstring - operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
true
values[]string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### Tenant.spec.networkPolicies.items[index].egress[index].to[index].podSelector -[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindex) - - - -This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. - If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
false
matchLabelsmap[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-
false
- - -### Tenant.spec.networkPolicies.items[index].egress[index].to[index].podSelector.matchExpressions[index] -[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindexpodselector) - - - -A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the label key that the selector applies to.
-
true
operatorstring - operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
true
values[]string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### Tenant.spec.networkPolicies.items[index].ingress[index] -[↩ Parent](#tenantspecnetworkpoliciesitemsindex) - - - -NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
from[]object - List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.
-
false
ports[]object - List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
-
false
- - -### Tenant.spec.networkPolicies.items[index].ingress[index].from[index] -[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindex) - - - -NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
ipBlockobject - IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
-
false
namespaceSelectorobject - Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. - If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
-
false
podSelectorobject - This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. - If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
-
false
- - -### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].ipBlock -[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindex) - - - -IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
cidrstring - CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64"
-
true
except[]string - Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range
-
false
- - -### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].namespaceSelector -[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindex) - - - -Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. - If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
false
matchLabelsmap[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-
false
- - -### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].namespaceSelector.matchExpressions[index] -[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindexnamespaceselector) - - - -A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the label key that the selector applies to.
-
true
operatorstring - operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
true
values[]string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].podSelector -[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindex) - - - -This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. - If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
false
matchLabelsmap[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-
false
- - -### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].podSelector.matchExpressions[index] -[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindexpodselector) - - - -A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the label key that the selector applies to.
-
true
operatorstring - operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
true
values[]string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### Tenant.spec.networkPolicies.items[index].ingress[index].ports[index] -[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindex) - - - -NetworkPolicyPort describes a port to allow traffic on - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
endPortinteger - If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort".
-
- Format: int32
-
false
portint or string - The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
-
false
protocolstring - The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
-
- Default: TCP
-
false
- - -### Tenant.spec.priorityClasses -[↩ Parent](#tenantspec-1) - - - -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. Optional. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
allowed[]string -
-
false
allowedRegexstring -
-
false
- - -### Tenant.spec.resourceQuotas -[↩ Parent](#tenantspec-1) - - - -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. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
items[]object -
-
false
scopeenum - Define if the Resource Budget should compute resource across all Namespaces in the Tenant or individually per cluster. Default is Tenant
-
- Enum: Tenant, Namespace
- Default: Tenant
-
false
- - -### Tenant.spec.resourceQuotas.items[index] -[↩ Parent](#tenantspecresourcequotas) - - - -ResourceQuotaSpec defines the desired hard limits to enforce for Quota. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
hardmap[string]int or string - hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
-
false
scopeSelectorobject - scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.
-
false
scopes[]string - A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.
-
false
- - -### Tenant.spec.resourceQuotas.items[index].scopeSelector -[↩ Parent](#tenantspecresourcequotasitemsindex) - - - -scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - A list of scope selector requirements by scope of the resources.
-
false
- - -### Tenant.spec.resourceQuotas.items[index].scopeSelector.matchExpressions[index] -[↩ Parent](#tenantspecresourcequotasitemsindexscopeselector) - - - -A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
operatorstring - Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.
-
true
scopeNamestring - The name of the scope that the selector applies to.
-
true
values[]string - An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### Tenant.spec.serviceOptions -[↩ Parent](#tenantspec-1) - - - -Specifies options for the Service, such as additional metadata or block of certain type of Services. Optional. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
additionalMetadataobject - Specifies additional labels and annotations the Capsule operator places on any Service resource in the Tenant. Optional.
-
false
allowedServicesobject - Block or deny certain type of Services. Optional.
-
false
externalIPsobject - Specifies the external IPs that can be used in Services with type ClusterIP. An empty list means no IPs are allowed. Optional.
-
false
- - -### Tenant.spec.serviceOptions.additionalMetadata -[↩ Parent](#tenantspecserviceoptions) - - - -Specifies additional labels and annotations the Capsule operator places on any Service resource in the Tenant. Optional. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
annotationsmap[string]string -
-
false
labelsmap[string]string -
-
false
- - -### Tenant.spec.serviceOptions.allowedServices -[↩ Parent](#tenantspecserviceoptions) - - - -Block or deny certain type of Services. Optional. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
externalNameboolean - Specifies if ExternalName service type resources are allowed for the Tenant. Default is true. Optional.
-
- Default: true
-
false
loadBalancerboolean - Specifies if LoadBalancer service type resources are allowed for the Tenant. Default is true. Optional.
-
- Default: true
-
false
nodePortboolean - Specifies if NodePort service type resources are allowed for the Tenant. Default is true. Optional.
-
- Default: true
-
false
- - -### Tenant.spec.serviceOptions.externalIPs -[↩ Parent](#tenantspecserviceoptions) - - - -Specifies the external IPs that can be used in Services with type ClusterIP. An empty list means no IPs are allowed. Optional. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
allowed[]string -
-
true
- - -### Tenant.spec.storageClasses -[↩ Parent](#tenantspec-1) - - - -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. Optional. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
allowed[]string -
-
false
allowedRegexstring -
-
false
- - -### Tenant.status -[↩ Parent](#tenant-1) - - - -Returns the observed state of the Tenant. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
sizeinteger - How many namespaces are assigned to the Tenant.
-
true
stateenum - The operational state of the Tenant. Possible values are "Active", "Cordoned".
-
- Enum: Cordoned, Active
- Default: Active
-
true
namespaces[]string - List of namespaces assigned to the Tenant.
-
false
\ No newline at end of file From 324e4917af6ec72071801e54c144ab976fcd001d Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Thu, 4 Aug 2022 11:09:54 +0200 Subject: [PATCH 11/18] Fix --- config/crd/bases/capsule.clastix.io_capsuleconfigurations.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/crd/bases/capsule.clastix.io_capsuleconfigurations.yaml b/config/crd/bases/capsule.clastix.io_capsuleconfigurations.yaml index e092c94d..5ce5bdfe 100644 --- a/config/crd/bases/capsule.clastix.io_capsuleconfigurations.yaml +++ b/config/crd/bases/capsule.clastix.io_capsuleconfigurations.yaml @@ -1,3 +1,4 @@ + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition From e5cae8186244bebcce92fc524f632b2685bde089 Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Thu, 4 Aug 2022 11:26:40 +0200 Subject: [PATCH 12/18] Fix typo --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e700a3f3..ff7e49e3 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ generate: controller-gen $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." apidoc: apidocs-gen - $(APIDOCS_GEN) crdoc --resources config/crd/bases --output docs/content/general/references.md + $(APIDOCS_GEN) crdoc --resources config/crd/bases --output docs/content/general/tenantCRDMarkdown.md # Setup development env # Usage: @@ -151,7 +151,7 @@ controller-gen: ## Download controller-gen locally if necessary. $(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.5.0) APIDOCS_GEN = $(shell pwd)/bin/crdoc -apidocs-gen: ## Download controller-gen locally if necessary. +apidocs-gen: ## Download crdoc locally if necessary. $(call go-install-tool,$(APIDOCS_GEN),fybrik.io/crdoc@latest) GINKGO = $(shell pwd)/bin/ginkgo From 86f2c69aa8dd662f4d6e67325fb7651c5770bd81 Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Fri, 5 Aug 2022 13:25:57 +0200 Subject: [PATCH 13/18] Cleanup --- config/crd/bases/capsule.clastix.io_tenants.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/crd/bases/capsule.clastix.io_tenants.yaml b/config/crd/bases/capsule.clastix.io_tenants.yaml index 7d8fdbfd..0298fb28 100644 --- a/config/crd/bases/capsule.clastix.io_tenants.yaml +++ b/config/crd/bases/capsule.clastix.io_tenants.yaml @@ -1,3 +1,4 @@ + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition From d1a8cb7aaff31be33dfcfefc53e970a899909565 Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Fri, 5 Aug 2022 16:20:55 +0200 Subject: [PATCH 14/18] Added autogenerated file --- docs/content/general/references.md | 242 ++ docs/content/general/tenantCRDMarkdown.md | 3446 +++++++++++++++++++++ 2 files changed, 3688 insertions(+) create mode 100644 docs/content/general/references.md create mode 100644 docs/content/general/tenantCRDMarkdown.md diff --git a/docs/content/general/references.md b/docs/content/general/references.md new file mode 100644 index 00000000..5c83cb01 --- /dev/null +++ b/docs/content/general/references.md @@ -0,0 +1,242 @@ +# Reference + +Reference document for Capsule Operator configuration + +## Custom Resource Definition + +Capsule operator uses a Custom Resources Definition (CRD) for _Tenants_. Tenants are cluster wide resources, so you need cluster level permissions to work with tenants. You can learn about tenant CRD by the `kubectl explain` command: + +``` +kubectl explain tenant + +KIND: Tenant +VERSION: capsule.clastix.io/v1beta1 + +DESCRIPTION: + Tenant is the Schema for the tenants API + +FIELDS: + apiVersion + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, + and may reject unrecognized values. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + + kind + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. In CamelCase. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + + metadata + Standard object's metadata. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + + spec + TenantSpec defines the desired state of Tenant + + status + Returns the observed state of the Tenant +``` + +For Tenant spec: + +``` +kubectl explain tenant.spec + +KIND: Tenant +VERSION: capsule.clastix.io/v1beta1 + +RESOURCE: spec + +DESCRIPTION: + TenantSpec defines the desired state of Tenant + +FIELDS: + additionalRoleBindings <[]Object> + 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. + + containerRegistries + 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. + + imagePullPolicies <[]string> + 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. + + ingressOptions + Specifies options for the Ingress resources, such as allowed hostnames and + IngressClass. Optional. + + limitRanges + Specifies the resource min/max usage restrictions to the Tenant. The assigned + values are inherited by any namespace created in the Tenant. Optional. + + namespaceOptions + 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. + + networkPolicies + Specifies the NetworkPolicies assigned to the Tenant. The assigned + NetworkPolicies are inherited by any namespace created in the Tenant. + Optional. + + nodeSelector + Specifies the label to control the placement of pods on a given pool of + worker nodes. All namesapces 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. + + owners <[]Object> -required- + Specifies the owners of the Tenant. Mandatory. + + priorityClasses + Specifies the allowed priorityClasses assigned to the Tenant. Capsule + assures that all pods created in the Tenant can use only one + of the allowed priorityClasses. Optional. + + resourceQuotas + 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. + + serviceOptions + Specifies options for the Service, such as additional metadata or block of + certain type of Services. Optional. + + storageClasses + 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. Optional. +``` + +and Tenant status: + +``` +kubectl explain tenant.status +KIND: Tenant +VERSION: capsule.clastix.io/v1beta1 + +RESOURCE: status + +DESCRIPTION: + Returns the observed state of the Tenant + +FIELDS: + namespaces <[]string> + List of namespaces assigned to the Tenant. + + size -required- + How many namespaces are assigned to the Tenant. + + state -required- + The operational state of the Tenant. Possible values are "Active", + "Cordoned". +``` + +## Capsule Configuration + +The Capsule configuration can be piloted by a Custom Resource definition named `CapsuleConfiguration`. + +```yaml +apiVersion: capsule.clastix.io/v1alpha1 +kind: CapsuleConfiguration +metadata: + name: default + annotations: + capsule.clastix.io/ca-secret-name: "capsule-ca" + capsule.clastix.io/tls-secret-name: "capsule-tls" + capsule.clastix.io/mutating-webhook-configuration-name: "capsule-mutating-webhook-configuration" + capsule.clastix.io/validating-webhook-configuration-name: "capsule-validating-webhook-configuration" +spec: + userGroups: ["capsule.clastix.io"] + forceTenantPrefix: false + protectedNamespaceRegex: "" +``` + +Option | Description | Default +--- |------------------------------------------------------------------------------| --- +`.spec.forceTenantPrefix` | Force the tenant name as prefix for namespaces: `-`. | `false` +`.spec.userGroups` | Array of Capsule groups to which all tenant owners must belong. | `[capsule.clastix.io]` +`.spec.protectedNamespaceRegex` | Disallows creation of namespaces matching the passed regexp. | `null` +`.metadata.annotations.capsule.clastix.io/ca-secret-name` | Set the Capsule Certificate Authority secret name | `capsule-ca` +`.metadata.annotations.capsule.clastic.io/tls-secret-name` | Set the Capsule TLS secret name | `capsule-tls` +`.metadata.annotations.capsule.clastix.io/mutating-webhook-configuration-name` | Set the MutatingWebhookConfiguration name | `mutating-webhook-configuration-name` +`.metadata.annotations.capsule.clastix.io/validating-webhook-configuration-name` | Set the ValidatingWebhookConfiguration name | `validating-webhook-configuration-name` + +Upon installation using Kustomize or Helm, a `capsule-default` resource will be created. +The reference to this configuration is managed by the CLI flag `--configuration-name`. + +## Capsule Permissions + +In the current implementation, the Capsule operator requires cluster admin permissions to fully operate. Make sure you deploy Capsule having access to the default `cluster-admin` ClusterRole. + +## Admission Controllers + +Capsule implements Kubernetes multi-tenancy capabilities using a minimum set of standard [Admission Controllers](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/) enabled on the Kubernetes APIs server. + +Here the list of required Admission Controllers you have to enable to get full support from Capsule: + +* PodNodeSelector +* LimitRanger +* ResourceQuota +* MutatingAdmissionWebhook +* ValidatingAdmissionWebhook + +In addition to the required controllers above, Capsule implements its own set through the [Dynamic Admission Controller](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/) mechanism, providing callbacks to add further validation or resource patching. + +To see Admission Controls installed by Capsule: + +``` +$ kubectl get ValidatingWebhookConfiguration +NAME WEBHOOKS AGE +capsule-validating-webhook-configuration 8 2h + +$ kubectl get MutatingWebhookConfiguration +NAME WEBHOOKS AGE +capsule-mutating-webhook-configuration 1 2h +``` + +## Command Options + +The Capsule operator provides the following command options: + +Option | Description | Default +--- | --- | --- +`--metrics-addr` | The address and port where `/metrics` are exposed. | `127.0.0.1:8080` +`--enable-leader-election` | Start a leader election client and gain leadership before executing the main loop. | `true` +`--zap-log-level` | The log verbosity with a value from 1 to 10 or the basic keywords. | `4` +`--zap-devel` | The flag to get the stack traces for deep debugging. | `null` +`--configuration-name` | The Capsule Configuration CRD name, default is installed automatically | `capsule-default` + + +## Created Resources + +Once installed, the Capsule operator creates the following resources in your cluster: + +``` +NAMESPACE RESOURCE + namespace/capsule-system + customresourcedefinition.apiextensions.k8s.io/tenants.capsule.clastix.io + customresourcedefinition.apiextensions.k8s.io/capsuleconfigurations.capsule.clastix.io + clusterrole.rbac.authorization.k8s.io/capsule-proxy-role + clusterrole.rbac.authorization.k8s.io/capsule-metrics-reader + capsuleconfiguration.capsule.clastix.io/capsule-default + mutatingwebhookconfiguration.admissionregistration.k8s.io/capsule-mutating-webhook-configuration + validatingwebhookconfiguration.admissionregistration.k8s.io/capsule-validating-webhook-configuration +capsule-system clusterrolebinding.rbac.authorization.k8s.io/capsule-manager-rolebinding +capsule-system clusterrolebinding.rbac.authorization.k8s.io/capsule-proxy-rolebinding +capsule-system secret/capsule-ca +capsule-system secret/capsule-tls +capsule-system service/capsule-controller-manager-metrics-service +capsule-system service/capsule-webhook-service +capsule-system deployment.apps/capsule-controller-manager +``` \ No newline at end of file diff --git a/docs/content/general/tenantCRDMarkdown.md b/docs/content/general/tenantCRDMarkdown.md new file mode 100644 index 00000000..9c387d16 --- /dev/null +++ b/docs/content/general/tenantCRDMarkdown.md @@ -0,0 +1,3446 @@ +# API Reference + +Packages: + +- [capsule.clastix.io/v1alpha1](#capsuleclastixiov1alpha1) +- [capsule.clastix.io/v1beta1](#capsuleclastixiov1beta1) + +# capsule.clastix.io/v1alpha1 + +Resource Types: + +- [CapsuleConfiguration](#capsuleconfiguration) + +- [Tenant](#tenant) + + + + +## CapsuleConfiguration +[↩ Parent](#capsuleclastixiov1alpha1 ) + + + + + + +CapsuleConfiguration is the Schema for the Capsule configuration API. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringcapsule.clastix.io/v1alpha1true
kindstringCapsuleConfigurationtrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + CapsuleConfigurationSpec defines the Capsule configuration.
+
false
+ + +### CapsuleConfiguration.spec +[↩ Parent](#capsuleconfiguration) + + + +CapsuleConfigurationSpec defines the Capsule configuration. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
forceTenantPrefixboolean + 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.
+
+ Default: false
+
false
protectedNamespaceRegexstring + Disallow creation of namespaces, whose name matches this regexp
+
false
userGroups[]string + Names of the groups for Capsule users.
+
+ Default: [capsule.clastix.io]
+
false
+ +## Tenant +[↩ Parent](#capsuleclastixiov1alpha1 ) + + + + + + +Tenant is the Schema for the tenants API. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringcapsule.clastix.io/v1alpha1true
kindstringTenanttrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + TenantSpec defines the desired state of Tenant.
+
false
statusobject + TenantStatus defines the observed state of Tenant.
+
false
+ + +### Tenant.spec +[↩ Parent](#tenant) + + + +TenantSpec defines the desired state of Tenant. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ownerobject + OwnerSpec defines tenant owner name and kind.
+
true
additionalRoleBindings[]object +
+
false
containerRegistriesobject +
+
false
externalServiceIPsobject +
+
false
ingressClassesobject +
+
false
ingressHostnamesobject +
+
false
limitRanges[]object +
+
false
namespaceQuotainteger +
+
+ Format: int32
+ Minimum: 1
+
false
namespacesMetadataobject +
+
false
networkPolicies[]object +
+
false
nodeSelectormap[string]string +
+
false
resourceQuotas[]object +
+
false
servicesMetadataobject +
+
false
storageClassesobject +
+
false
+ + +### Tenant.spec.owner +[↩ Parent](#tenantspec) + + + +OwnerSpec defines tenant owner name and kind. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindenum +
+
+ Enum: User, Group
+
true
namestring +
+
true
+ + +### Tenant.spec.additionalRoleBindings[index] +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
clusterRoleNamestring +
+
true
subjects[]object + kubebuilder:validation:Minimum=1
+
true
+ + +### Tenant.spec.additionalRoleBindings[index].subjects[index] +[↩ Parent](#tenantspecadditionalrolebindingsindex) + + + +Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindstring + Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+
true
namestring + Name of the object being referenced.
+
true
apiGroupstring + APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
+
false
namespacestring + Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.
+
false
+ + +### Tenant.spec.containerRegistries +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.externalServiceIPs +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
true
+ + +### Tenant.spec.ingressClasses +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.ingressHostnames +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.limitRanges[index] +[↩ Parent](#tenantspec) + + + +LimitRangeSpec defines a min/max usage limit for resources that match on kind. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
limits[]object + Limits is the list of LimitRangeItem objects that are enforced.
+
true
+ + +### Tenant.spec.limitRanges[index].limits[index] +[↩ Parent](#tenantspeclimitrangesindex) + + + +LimitRangeItem defines a min/max usage limit for any resource that matches on kind. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + Type of resource that this limit applies to.
+
true
defaultmap[string]int or string + Default resource requirement limit value by resource name if resource limit is omitted.
+
false
defaultRequestmap[string]int or string + DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
+
false
maxmap[string]int or string + Max usage constraints on this kind by resource name.
+
false
maxLimitRequestRatiomap[string]int or string + MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
+
false
minmap[string]int or string + Min usage constraints on this kind by resource name.
+
false
+ + +### Tenant.spec.namespacesMetadata +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
additionalAnnotationsmap[string]string +
+
false
additionalLabelsmap[string]string +
+
false
+ + +### Tenant.spec.networkPolicies[index] +[↩ Parent](#tenantspec) + + + +NetworkPolicySpec provides the specification of a NetworkPolicy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
podSelectorobject + Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.
+
true
egress[]object + List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8
+
false
ingress[]object + List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)
+
false
policyTypes[]string + List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8
+
false
+ + +### Tenant.spec.networkPolicies[index].podSelector +[↩ Parent](#tenantspecnetworkpoliciesindex) + + + +Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies[index].podSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesindexpodselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index] +[↩ Parent](#tenantspecnetworkpoliciesindex) + + + +NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8 + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ports[]object + List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
+
false
to[]object + List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].ports[index] +[↩ Parent](#tenantspecnetworkpoliciesindexegressindex) + + + +NetworkPolicyPort describes a port to allow traffic on + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
endPortinteger + If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort".
+
+ Format: int32
+
false
portint or string + The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
+
false
protocolstring + The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
+
+ Default: TCP
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].to[index] +[↩ Parent](#tenantspecnetworkpoliciesindexegressindex) + + + +NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ipBlockobject + IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
+
false
namespaceSelectorobject + Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
+
false
podSelectorobject + This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].to[index].ipBlock +[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindex) + + + +IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
cidrstring + CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64"
+
true
except[]string + Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].to[index].namespaceSelector +[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindex) + + + +Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].to[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].to[index].podSelector +[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindex) + + + +This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies[index].egress[index].to[index].podSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesindexegressindextoindexpodselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index] +[↩ Parent](#tenantspecnetworkpoliciesindex) + + + +NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
from[]object + List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.
+
false
ports[]object + List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].from[index] +[↩ Parent](#tenantspecnetworkpoliciesindexingressindex) + + + +NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ipBlockobject + IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
+
false
namespaceSelectorobject + Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
+
false
podSelectorobject + This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].from[index].ipBlock +[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindex) + + + +IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
cidrstring + CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64"
+
true
except[]string + Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].from[index].namespaceSelector +[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindex) + + + +Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].from[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].from[index].podSelector +[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindex) + + + +This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].from[index].podSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesindexingressindexfromindexpodselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies[index].ingress[index].ports[index] +[↩ Parent](#tenantspecnetworkpoliciesindexingressindex) + + + +NetworkPolicyPort describes a port to allow traffic on + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
endPortinteger + If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort".
+
+ Format: int32
+
false
portint or string + The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
+
false
protocolstring + The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
+
+ Default: TCP
+
false
+ + +### Tenant.spec.resourceQuotas[index] +[↩ Parent](#tenantspec) + + + +ResourceQuotaSpec defines the desired hard limits to enforce for Quota. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
hardmap[string]int or string + hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
+
false
scopeSelectorobject + scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.
+
false
scopes[]string + A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.
+
false
+ + +### Tenant.spec.resourceQuotas[index].scopeSelector +[↩ Parent](#tenantspecresourcequotasindex) + + + +scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + A list of scope selector requirements by scope of the resources.
+
false
+ + +### Tenant.spec.resourceQuotas[index].scopeSelector.matchExpressions[index] +[↩ Parent](#tenantspecresourcequotasindexscopeselector) + + + +A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
operatorstring + Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.
+
true
scopeNamestring + The name of the scope that the selector applies to.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.servicesMetadata +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
additionalAnnotationsmap[string]string +
+
false
additionalLabelsmap[string]string +
+
false
+ + +### Tenant.spec.storageClasses +[↩ Parent](#tenantspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.status +[↩ Parent](#tenant) + + + +TenantStatus defines the observed state of Tenant. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
sizeinteger +
+
true
namespaces[]string +
+
false
+ +# capsule.clastix.io/v1beta1 + +Resource Types: + +- [Tenant](#tenant) + + + + +## Tenant +[↩ Parent](#capsuleclastixiov1beta1 ) + + + + + + +Tenant is the Schema for the tenants API. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringcapsule.clastix.io/v1beta1true
kindstringTenanttrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + TenantSpec defines the desired state of Tenant.
+
false
statusobject + Returns the observed state of the Tenant.
+
false
+ + +### Tenant.spec +[↩ Parent](#tenant-1) + + + +TenantSpec defines the desired state of Tenant. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
owners[]object + Specifies the owners of the Tenant. Mandatory.
+
true
additionalRoleBindings[]object + 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.
+
false
containerRegistriesobject + 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.
+
false
imagePullPolicies[]enum + 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.
+
false
ingressOptionsobject + Specifies options for the Ingress resources, such as allowed hostnames and IngressClass. Optional.
+
false
limitRangesobject + Specifies the resource min/max usage restrictions to the Tenant. The assigned values are inherited by any namespace created in the Tenant. Optional.
+
false
namespaceOptionsobject + 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.
+
false
networkPoliciesobject + Specifies the NetworkPolicies assigned to the Tenant. The assigned NetworkPolicies are inherited by any namespace created in the Tenant. Optional.
+
false
nodeSelectormap[string]string + 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.
+
false
priorityClassesobject + 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. Optional.
+
false
resourceQuotasobject + 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.
+
false
serviceOptionsobject + Specifies options for the Service, such as additional metadata or block of certain type of Services. Optional.
+
false
storageClassesobject + 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. Optional.
+
false
+ + +### Tenant.spec.owners[index] +[↩ Parent](#tenantspec-1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindenum + Kind of tenant owner. Possible values are "User", "Group", and "ServiceAccount"
+
+ Enum: User, Group, ServiceAccount
+
true
namestring + Name of tenant owner.
+
true
proxySettings[]object + Proxy settings for tenant owner.
+
false
+ + +### Tenant.spec.owners[index].proxySettings[index] +[↩ Parent](#tenantspecownersindex) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindenum +
+
+ Enum: Nodes, StorageClasses, IngressClasses, PriorityClasses
+
true
operations[]enum +
+
true
+ + +### Tenant.spec.additionalRoleBindings[index] +[↩ Parent](#tenantspec-1) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
clusterRoleNamestring +
+
true
subjects[]object + kubebuilder:validation:Minimum=1
+
true
+ + +### Tenant.spec.additionalRoleBindings[index].subjects[index] +[↩ Parent](#tenantspecadditionalrolebindingsindex-1) + + + +Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindstring + Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+
true
namestring + Name of the object being referenced.
+
true
apiGroupstring + APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
+
false
namespacestring + Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.
+
false
+ + +### Tenant.spec.containerRegistries +[↩ Parent](#tenantspec-1) + + + +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. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.ingressOptions +[↩ Parent](#tenantspec-1) + + + +Specifies options for the Ingress resources, such as allowed hostnames and IngressClass. Optional. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowedClassesobject + 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. Optional.
+
false
allowedHostnamesobject + 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.
+
false
hostnameCollisionScopeenum + 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.
+
+ Enum: Cluster, Tenant, Namespace, Disabled
+ Default: Disabled
+
false
+ + +### Tenant.spec.ingressOptions.allowedClasses +[↩ Parent](#tenantspecingressoptions) + + + +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. Optional. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.ingressOptions.allowedHostnames +[↩ Parent](#tenantspecingressoptions) + + + +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. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.limitRanges +[↩ Parent](#tenantspec-1) + + + +Specifies the resource min/max usage restrictions to the Tenant. The assigned values are inherited by any namespace created in the Tenant. Optional. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
items[]object +
+
false
+ + +### Tenant.spec.limitRanges.items[index] +[↩ Parent](#tenantspeclimitranges) + + + +LimitRangeSpec defines a min/max usage limit for resources that match on kind. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
limits[]object + Limits is the list of LimitRangeItem objects that are enforced.
+
true
+ + +### Tenant.spec.limitRanges.items[index].limits[index] +[↩ Parent](#tenantspeclimitrangesitemsindex) + + + +LimitRangeItem defines a min/max usage limit for any resource that matches on kind. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + Type of resource that this limit applies to.
+
true
defaultmap[string]int or string + Default resource requirement limit value by resource name if resource limit is omitted.
+
false
defaultRequestmap[string]int or string + DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
+
false
maxmap[string]int or string + Max usage constraints on this kind by resource name.
+
false
maxLimitRequestRatiomap[string]int or string + MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
+
false
minmap[string]int or string + Min usage constraints on this kind by resource name.
+
false
+ + +### Tenant.spec.namespaceOptions +[↩ Parent](#tenantspec-1) + + + +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. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
additionalMetadataobject + Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional.
+
false
quotainteger + 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.
+
+ Format: int32
+ Minimum: 1
+
false
+ + +### Tenant.spec.namespaceOptions.additionalMetadata +[↩ Parent](#tenantspecnamespaceoptions) + + + +Specifies additional labels and annotations the Capsule operator places on any Namespace resource in the Tenant. Optional. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
annotationsmap[string]string +
+
false
labelsmap[string]string +
+
false
+ + +### Tenant.spec.networkPolicies +[↩ Parent](#tenantspec-1) + + + +Specifies the NetworkPolicies assigned to the Tenant. The assigned NetworkPolicies are inherited by any namespace created in the Tenant. Optional. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
items[]object +
+
false
+ + +### Tenant.spec.networkPolicies.items[index] +[↩ Parent](#tenantspecnetworkpolicies) + + + +NetworkPolicySpec provides the specification of a NetworkPolicy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
podSelectorobject + Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.
+
true
egress[]object + List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8
+
false
ingress[]object + List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)
+
false
policyTypes[]string + List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8
+
false
+ + +### Tenant.spec.networkPolicies.items[index].podSelector +[↩ Parent](#tenantspecnetworkpoliciesitemsindex) + + + +Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].podSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexpodselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindex) + + + +NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8 + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ports[]object + List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
+
false
to[]object + List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].ports[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindex) + + + +NetworkPolicyPort describes a port to allow traffic on + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
endPortinteger + If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort".
+
+ Format: int32
+
false
portint or string + The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
+
false
protocolstring + The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
+
+ Default: TCP
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].to[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindex) + + + +NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ipBlockobject + IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
+
false
namespaceSelectorobject + Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
+
false
podSelectorobject + This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].to[index].ipBlock +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindex) + + + +IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
cidrstring + CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64"
+
true
except[]string + Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].to[index].namespaceSelector +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindex) + + + +Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].to[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].to[index].podSelector +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindex) + + + +This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].egress[index].to[index].podSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexegressindextoindexpodselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindex) + + + +NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
from[]object + List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.
+
false
ports[]object + List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].from[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindex) + + + +NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
ipBlockobject + IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
+
false
namespaceSelectorobject + Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
+
false
podSelectorobject + This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].ipBlock +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindex) + + + +IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
cidrstring + CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64"
+
true
except[]string + Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].namespaceSelector +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindex) + + + +Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].podSelector +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindex) + + + +This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods. + If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].from[index].podSelector.matchExpressions[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindexfromindexpodselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.networkPolicies.items[index].ingress[index].ports[index] +[↩ Parent](#tenantspecnetworkpoliciesitemsindexingressindex) + + + +NetworkPolicyPort describes a port to allow traffic on + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
endPortinteger + If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort".
+
+ Format: int32
+
false
portint or string + The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
+
false
protocolstring + The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
+
+ Default: TCP
+
false
+ + +### Tenant.spec.priorityClasses +[↩ Parent](#tenantspec-1) + + + +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. Optional. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.spec.resourceQuotas +[↩ Parent](#tenantspec-1) + + + +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. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
items[]object +
+
false
scopeenum + Define if the Resource Budget should compute resource across all Namespaces in the Tenant or individually per cluster. Default is Tenant
+
+ Enum: Tenant, Namespace
+ Default: Tenant
+
false
+ + +### Tenant.spec.resourceQuotas.items[index] +[↩ Parent](#tenantspecresourcequotas) + + + +ResourceQuotaSpec defines the desired hard limits to enforce for Quota. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
hardmap[string]int or string + hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
+
false
scopeSelectorobject + scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.
+
false
scopes[]string + A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.
+
false
+ + +### Tenant.spec.resourceQuotas.items[index].scopeSelector +[↩ Parent](#tenantspecresourcequotasitemsindex) + + + +scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + A list of scope selector requirements by scope of the resources.
+
false
+ + +### Tenant.spec.resourceQuotas.items[index].scopeSelector.matchExpressions[index] +[↩ Parent](#tenantspecresourcequotasitemsindexscopeselector) + + + +A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
operatorstring + Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.
+
true
scopeNamestring + The name of the scope that the selector applies to.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### Tenant.spec.serviceOptions +[↩ Parent](#tenantspec-1) + + + +Specifies options for the Service, such as additional metadata or block of certain type of Services. Optional. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
additionalMetadataobject + Specifies additional labels and annotations the Capsule operator places on any Service resource in the Tenant. Optional.
+
false
allowedServicesobject + Block or deny certain type of Services. Optional.
+
false
externalIPsobject + Specifies the external IPs that can be used in Services with type ClusterIP. An empty list means no IPs are allowed. Optional.
+
false
+ + +### Tenant.spec.serviceOptions.additionalMetadata +[↩ Parent](#tenantspecserviceoptions) + + + +Specifies additional labels and annotations the Capsule operator places on any Service resource in the Tenant. Optional. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
annotationsmap[string]string +
+
false
labelsmap[string]string +
+
false
+ + +### Tenant.spec.serviceOptions.allowedServices +[↩ Parent](#tenantspecserviceoptions) + + + +Block or deny certain type of Services. Optional. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
externalNameboolean + Specifies if ExternalName service type resources are allowed for the Tenant. Default is true. Optional.
+
+ Default: true
+
false
loadBalancerboolean + Specifies if LoadBalancer service type resources are allowed for the Tenant. Default is true. Optional.
+
+ Default: true
+
false
nodePortboolean + Specifies if NodePort service type resources are allowed for the Tenant. Default is true. Optional.
+
+ Default: true
+
false
+ + +### Tenant.spec.serviceOptions.externalIPs +[↩ Parent](#tenantspecserviceoptions) + + + +Specifies the external IPs that can be used in Services with type ClusterIP. An empty list means no IPs are allowed. Optional. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
true
+ + +### Tenant.spec.storageClasses +[↩ Parent](#tenantspec-1) + + + +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. Optional. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowed[]string +
+
false
allowedRegexstring +
+
false
+ + +### Tenant.status +[↩ Parent](#tenant-1) + + + +Returns the observed state of the Tenant. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
sizeinteger + How many namespaces are assigned to the Tenant.
+
true
stateenum + The operational state of the Tenant. Possible values are "Active", "Cordoned".
+
+ Enum: Cordoned, Active
+ Default: Active
+
true
namespaces[]string + List of namespaces assigned to the Tenant.
+
false
\ No newline at end of file From 3d75a4c00490bfefc39cb5702e46b56d4ef1032c Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 10 Aug 2022 13:15:36 +0200 Subject: [PATCH 15/18] docs: edited index and included CRD APIs in the references --- docs/content/general/references.md | 140 +----------------- .../{tenantCRDMarkdown.md => tenant-crd.md} | 0 docs/gridsome.server.js | 4 + 3 files changed, 7 insertions(+), 137 deletions(-) rename docs/content/general/{tenantCRDMarkdown.md => tenant-crd.md} (100%) diff --git a/docs/content/general/references.md b/docs/content/general/references.md index 5c83cb01..bc91c311 100644 --- a/docs/content/general/references.md +++ b/docs/content/general/references.md @@ -4,143 +4,9 @@ Reference document for Capsule Operator configuration ## Custom Resource Definition -Capsule operator uses a Custom Resources Definition (CRD) for _Tenants_. Tenants are cluster wide resources, so you need cluster level permissions to work with tenants. You can learn about tenant CRD by the `kubectl explain` command: - -``` -kubectl explain tenant - -KIND: Tenant -VERSION: capsule.clastix.io/v1beta1 - -DESCRIPTION: - Tenant is the Schema for the tenants API - -FIELDS: - apiVersion - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, - and may reject unrecognized values. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - - kind - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. In CamelCase. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - - metadata - Standard object's metadata. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - - spec - TenantSpec defines the desired state of Tenant - - status - Returns the observed state of the Tenant -``` - -For Tenant spec: - -``` -kubectl explain tenant.spec - -KIND: Tenant -VERSION: capsule.clastix.io/v1beta1 - -RESOURCE: spec - -DESCRIPTION: - TenantSpec defines the desired state of Tenant - -FIELDS: - additionalRoleBindings <[]Object> - 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. - - containerRegistries - 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. - - imagePullPolicies <[]string> - 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. - - ingressOptions - Specifies options for the Ingress resources, such as allowed hostnames and - IngressClass. Optional. - - limitRanges - Specifies the resource min/max usage restrictions to the Tenant. The assigned - values are inherited by any namespace created in the Tenant. Optional. - - namespaceOptions - 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. - - networkPolicies - Specifies the NetworkPolicies assigned to the Tenant. The assigned - NetworkPolicies are inherited by any namespace created in the Tenant. - Optional. - - nodeSelector - Specifies the label to control the placement of pods on a given pool of - worker nodes. All namesapces 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. - - owners <[]Object> -required- - Specifies the owners of the Tenant. Mandatory. - - priorityClasses - Specifies the allowed priorityClasses assigned to the Tenant. Capsule - assures that all pods created in the Tenant can use only one - of the allowed priorityClasses. Optional. - - resourceQuotas - 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. - - serviceOptions - Specifies options for the Service, such as additional metadata or block of - certain type of Services. Optional. - - storageClasses - 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. Optional. -``` - -and Tenant status: - -``` -kubectl explain tenant.status -KIND: Tenant -VERSION: capsule.clastix.io/v1beta1 - -RESOURCE: status - -DESCRIPTION: - Returns the observed state of the Tenant - -FIELDS: - namespaces <[]string> - List of namespaces assigned to the Tenant. - - size -required- - How many namespaces are assigned to the Tenant. - - state -required- - The operational state of the Tenant. Possible values are "Active", - "Cordoned". -``` +Capsule operator uses a Custom Resources Definition (CRD) for _Tenants_. +Tenants are cluster wide resources, so you need cluster level permissions to work with tenants. +You can learn about tenant CRDs in the following [section](./tenant-crd) ## Capsule Configuration diff --git a/docs/content/general/tenantCRDMarkdown.md b/docs/content/general/tenant-crd.md similarity index 100% rename from docs/content/general/tenantCRDMarkdown.md rename to docs/content/general/tenant-crd.md diff --git a/docs/gridsome.server.js b/docs/gridsome.server.js index cc88600d..f85a7649 100644 --- a/docs/gridsome.server.js +++ b/docs/gridsome.server.js @@ -37,6 +37,10 @@ module.exports = function (api) { label: 'References', path: '/docs/general/references' }, + { + label: 'CRDs APIs', + path: '/docs/general/tenant-crd' + }, { label: 'Multi-Tenant Benchmark', path: '/docs/general/mtb' From 29031183572387fa5e5a3587a91e42a5c301d658 Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 10 Aug 2022 13:15:47 +0200 Subject: [PATCH 16/18] docs: edited index and included CRD APIs in the references --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ff7e49e3..0dc0a0f9 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ generate: controller-gen $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." apidoc: apidocs-gen - $(APIDOCS_GEN) crdoc --resources config/crd/bases --output docs/content/general/tenantCRDMarkdown.md + $(APIDOCS_GEN) crdoc --resources config/crd/bases --output docs/content/general/tenant-crd.md # Setup development env # Usage: From 732a0c087771331834545ccc05994c4776559cea Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 10 Aug 2022 23:28:12 +0200 Subject: [PATCH 17/18] docs: Customized template to generare the reference page and added some style to improve readibility --- Makefile | 2 +- docs/content/general/tenant-crd.md | 16 +++++ docs/template/reference-cr.tmpl | 112 +++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 docs/template/reference-cr.tmpl diff --git a/Makefile b/Makefile index 0dc0a0f9..6a291919 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ generate: controller-gen $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." apidoc: apidocs-gen - $(APIDOCS_GEN) crdoc --resources config/crd/bases --output docs/content/general/tenant-crd.md + $(APIDOCS_GEN) crdoc --resources config/crd/bases --output docs/content/general/tenant-crd.md --template docs/template/reference-cr.tmpl # Setup development env # Usage: diff --git a/docs/content/general/tenant-crd.md b/docs/content/general/tenant-crd.md index 9c387d16..c70acdbb 100644 --- a/docs/content/general/tenant-crd.md +++ b/docs/content/general/tenant-crd.md @@ -1,3 +1,19 @@ + + # API Reference Packages: diff --git a/docs/template/reference-cr.tmpl b/docs/template/reference-cr.tmpl new file mode 100644 index 00000000..44a79d5e --- /dev/null +++ b/docs/template/reference-cr.tmpl @@ -0,0 +1,112 @@ + + +# API Reference + +Packages: +{{range .Groups}} +- [{{.Group}}/{{.Version}}](#{{ anchorize (printf "%s/%s" .Group .Version) }}) +{{- end -}}{{/* range .Groups */}} + +{{- range .Groups }} +{{- $group := . }} + +# {{.Group}}/{{.Version}} + +Resource Types: +{{range .Kinds}} +- [{{.Name}}](#{{ anchorize .Name }}) +{{end}}{{/* range .Kinds */}} + +{{range .Kinds}} +{{$kind := .}} +## {{.Name}} +[↩ Parent](#{{ anchorize (printf "%s/%s" $group.Group $group.Version) }} ) + +{{range .Types}} + +{{if not .IsTopLevel}} +### {{.Name}} +{{if .ParentKey}}[↩ Parent](#{{.ParentKey}}){{end}} +{{end}} + + +{{.Description}} + + + + + + + + + + + + {{- if .IsTopLevel -}} + + + + + + + + + + + + + + + + + + + {{- end -}} + {{- range .Fields -}} + + + + + + + {{- end -}} + +
NameTypeDescriptionRequired
apiVersionstring{{$group.Group}}/{{$group.Version}}true
kindstring{{$kind.Name}}true
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
{{if .TypeKey}}{{.Name}}{{else}}{{.Name}}{{end}}{{.Type}} + {{.Description}}
+ {{- if or .Schema.Format .Schema.Enum .Schema.Default .Schema.Minimum .Schema.Maximum }} +
+ {{- end}} + {{- if .Schema.Format }} + Format: {{ .Schema.Format }}
+ {{- end }} + {{- if .Schema.Enum }} + Enum: {{ .Schema.Enum | toStrings | join ", " }}
+ {{- end }} + {{- if .Schema.Default }} + Default: {{ .Schema.Default }}
+ {{- end }} + {{- if .Schema.Minimum }} + Minimum: {{ .Schema.Minimum }}
+ {{- end }} + {{- if .Schema.Maximum }} + Maximum: {{ .Schema.Maximum }}
+ {{- end }} +
{{.Required}}
+ +{{- end}}{{/* range .Types */}} +{{- end}}{{/* range .Kinds */}} +{{- end}}{{/* range .Groups */}} \ No newline at end of file From ffb04c3d722533d12c87ea4c866fab702ba0dc4a Mon Sep 17 00:00:00 2001 From: Michele Mastrogiovanni Date: Wed, 10 Aug 2022 23:29:51 +0200 Subject: [PATCH 18/18] docs: added padding to table cells --- docs/content/general/tenant-crd.md | 1 + docs/template/reference-cr.tmpl | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/content/general/tenant-crd.md b/docs/content/general/tenant-crd.md index c70acdbb..45fd3193 100644 --- a/docs/content/general/tenant-crd.md +++ b/docs/content/general/tenant-crd.md @@ -6,6 +6,7 @@ } th, td { border-bottom: 1px solid #ddd; + padding: 10px; border: solid; } tr:hover {background-color: coral;} diff --git a/docs/template/reference-cr.tmpl b/docs/template/reference-cr.tmpl index 44a79d5e..5d0cc1d1 100644 --- a/docs/template/reference-cr.tmpl +++ b/docs/template/reference-cr.tmpl @@ -6,6 +6,7 @@ } th, td { border-bottom: 1px solid #ddd; + padding: 10px; border: solid; } tr:hover {background-color: coral;}