The Deckhouse Platform installs CRDs but does not remove them when a module is disabled. If you no longer need the created CRDs, delete them.
The module lifecycle stage: Preview
ClusterProjectRoleBinding
Short names: cprb
Scope: Cluster
Version: v1alpha3
ClusterProjectRoleBinding grants a role to subjects across all namespaces of all projects in the cluster, except the virtual projects deckhouse and default.
- objectspec
Required value
- objectspec.roleRef
Required value
Reference to the granted ClusterRole. Allowed prefixes:
d8:project:*,d8:namespace:*,d8:project-capability:*,d8:namespace-capability:*,d8:custom:*.- stringspec.roleRef.kind
Required value
Kind of the granted role.
Allowed values:
ClusterRole - stringspec.roleRef.name
Required value
Name of the granted ClusterRole.
- array of objectsspec.subjects
Required value
Subjects (users, groups or service accounts) the role is granted to.
- stringspec.subjects.apiGroup
API group of the subject:
rbac.authorization.k8s.ioforUserandGroup, empty forServiceAccount. - stringspec.subjects.kind
Required value
Kind of the subject.
Allowed values:
User,Group,ServiceAccount - stringspec.subjects.name
Required value
Name of the subject: the user name (
User.spec.email) forUser,Group.spec.nameforGroup, the ServiceAccount name forServiceAccount. - stringspec.subjects.namespace
Namespace of the ServiceAccount.
If omitted, the binding names the ServiceAccount with this name in each namespace of every project.
- objectstatus
- integerstatus.boundProjects
Number of projects the binding is currently applied to.
- array of objectsstatus.conditions
Current state of the object.
- stringstatus.conditions.lastProbeTime
Time of the last check of the condition.
- stringstatus.conditions.lastTransitionTime
Time when the condition last changed.
- stringstatus.conditions.message
Message with details of the condition state.
- stringstatus.conditions.status
Condition state:
True,FalseorUnknown. - stringstatus.conditions.type
Condition type.
- integerstatus.observedGeneration
Last generation of the object processed by the controller.
AvailableClusterResource
Short names: available
Scope: Namespaced
Version: v1alpha1
Contains information about cluster-wide resources available to the project and the value used by default.
The resource is automatically created and updated by the multitenancy-manager controller in the project namespace for each registered GrantableClusterResourceDefinition.
It is deleted from the project namespaces when the corresponding GrantableClusterResourceDefinition is deleted.
The AvailableClusterResource name matches the name of the corresponding GrantableClusterResourceDefinition.
Information about available cluster-wide resources and the default value is stored in the status field.
For more information about viewing available cluster-wide resources, refer to Usage examples.
Warning. The resource is read-only. Manual creation of AvailableClusterResource is prohibited.
- objectstatus
Cluster-wide resource availability status for the project.
- array of objectsstatus.available
List of cluster-wide resources available to the project, indicating the resource used by default. Each resource is listed once.
Information about a cluster-wide resource available to the project.
- booleanstatus.available.default
Indicates that the cluster-wide resource is used by default in the project.
- objectstatus.available.fields
Values of the cluster-wide resource fields listed in
spec.catalogFieldsof the corresponding GrantableClusterResourceDefinition, keyed by field name.A value keeps its JSON type: string, number, boolean, object or array. A field whose value is missing in the resource or is longer than 512 bytes is not shown. If
status.availablewith the fields of all resources would take more than 512 KiB in JSON serialization,fieldsis absent in every entry; the names and the default are still listed. - stringstatus.available.name
Required value
Name of the cluster-wide resource available to the project.
- integerstatus.availableCount
Number of cluster-wide resources available to the project.
Used when displaying the resource list. Names of available cluster-wide resources are listed in
status.available. - stringstatus.default
Name of the cluster-wide resource used by default in the project.
The value can be automatically assigned to the corresponding field of a resource being created if the field is empty or the specified value is unavailable to the project. The field remains empty if no default value is configured or the default value is unavailable to the project.
- stringstatus.grantedResourceKind
Kind of the cluster-wide resource.
- integerstatus.observedGeneration
Resource generation based on which the controller generated the current
status.
ClusterResourceGrantPolicy
Short names: crgp
Scope: Cluster
- v1alpha2
- v1alpha1
Defines a policy for project access to cluster-wide resources and the values used by default.
The resource applies to the project namespaces selected by spec.projectSelector (by the labels of the Project) and spec.namespaceSelector (by the labels of the namespace). For each type of cluster-wide resource, the policy allows you to configure allowed and denied resources, as well as their availability rules and default values.
The cluster-wide resource type is specified using spec.resources[].resourceName, which references the corresponding GrantableClusterResourceDefinition.
The policy is created by a cluster administrator.
For configuration examples, refer to Usage examples.
- objectspec
Required value
ClusterResourceGrantPolicy parameters.
- objectspec.namespaceSelector
Label selector for project namespaces to which the policy applies.
The selector is matched against the labels of the namespace. When
spec.projectSelectoris also specified, both must match. If the selector is not specified, all namespaces of the selected projects are covered. An empty selector matches all namespaces. The namespaces of the virtual projectsdeckhouseanddefaultare never covered.The value of the
projects.deckhouse.io/project-namespacelabel is the name that a project user gives to a ProjectNamespace. Withoutspec.projectSelector, a selector on this label also covers the namespace of a ProjectNamespace with the same name in any other project.An additional namespace of a project is created by a project user. It carries the labels set by the module and the labels of the project template, which it inherits from the main namespace; a label set by hand on the main namespace is not inherited. A policy that restricts resources by such a label does not cover a new additional namespace.
- array of objectsspec.namespaceSelector.matchExpressions
List of label selector expressions.
All expressions must match.
Label selector expression.
- stringspec.namespaceSelector.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.namespaceSelector.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.namespaceSelector.matchExpressions.values
List of label values.
For the
InandNotInoperators, the list must contain at least one value. For theExistsandDoesNotExistoperators, the list must be empty.
- objectspec.namespaceSelector.matchLabels
Set of namespace labels to which the policy applies.
All specified labels must match.
- objectspec.projectSelector
Label selector for projects to which the policy applies.
The selector is matched against the labels of the Project object. The policy applies to every namespace of a selected project, including an additional namespace created later, unless
spec.namespaceSelectornarrows the choice. If the selector is not specified, projects are not chosen by their labels. An empty selector matches all projects, except the virtual projectsdeckhouseanddefault, whose namespaces are never covered.If neither
spec.projectSelectornorspec.namespaceSelectoris specified, the policy does not apply to any projects on its own. Such a policy is a library policy that a ProjectTemplate applies throughspec.grantPolicies.- array of objectsspec.projectSelector.matchExpressions
List of label selector expressions.
All expressions must match.
Label selector expression.
- stringspec.projectSelector.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.projectSelector.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.projectSelector.matchExpressions.values
List of label values.
For the
InandNotInoperators, the list must contain at least one value. For theExistsandDoesNotExistoperators, the list must be empty.
- objectspec.projectSelector.matchLabels
Set of labels for projects to which the policy applies.
All specified labels must match.
- array of objectsspec.resources
Required value
Access settings for cluster-wide resources for the selected projects.
Access settings for one type of cluster-wide resource.
- array of stringsspec.resources.allowed
List of names of cluster-wide resources available to the projects.
Combined with resources selected using
allowedSelector. An empty list is not accepted: omit the field instead, or setavailabilityDefault: Noneto make nothing available. - objectspec.resources.allowedSelector
Label selector for cluster-wide resources available to the projects.
Combined with resources specified in
allowed. Applies only to cluster-wide resources represented by Kubernetes objects. An empty selector is not accepted: omit the field instead, or setavailabilityDefaultto open or lock the resource without a list.- array of objectsspec.resources.allowedSelector.matchExpressions
List of label selector expressions.
All expressions must match.
Label selector expression.
- stringspec.resources.allowedSelector.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.resources.allowedSelector.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.resources.allowedSelector.matchExpressions.values
List of label values.
For the
InandNotInoperators, the list must contain at least one value. For theExistsandDoesNotExistoperators, the list must be empty.
- objectspec.resources.allowedSelector.matchLabels
Set of labels for cluster-wide resources.
All specified labels must match.
- stringspec.resources.availabilityDefault
Determines the availability of cluster-wide resources that are not explicitly specified using
allowed,allowedSelector,denied, ordeniedSelector.Overrides
defaultAvailabilityof the corresponding GrantableClusterResourceDefinition for the projects selected by the policy.Allmakes all such cluster-wide resources available, whileNonemakes them unavailable.Usually, you do not need to specify this parameter. If
allowedorallowedSelectoris set andavailabilityDefaultis not specified, access to all other cluster-wide resources of this type is automatically denied. Set this parameter explicitly only to change availability without specifying a list of allowed resources:Allto make all resources of the type available, orNoneto make them unavailable.Allowed values:
All,None - stringspec.resources.default
Name of the cluster-wide resource used by default in the selected projects.
Overrides the value determined using
defaultFromin the corresponding GrantableClusterResourceDefinition. - array of stringsspec.resources.denied
List of names of cluster-wide resources unavailable to the projects.
Deny rules take precedence over
allowedandallowedSelector. - objectspec.resources.deniedSelector
Label selector for cluster-wide resources unavailable to the projects.
Deny rules take precedence over
allowedandallowedSelector. Applies only to cluster-wide resources represented by Kubernetes objects. An empty selector is not accepted.- array of objectsspec.resources.deniedSelector.matchExpressions
List of label selector expressions.
All expressions must match.
Label selector expression.
- stringspec.resources.deniedSelector.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.resources.deniedSelector.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.resources.deniedSelector.matchExpressions.values
List of label values.
For the
InandNotInoperators, the list must contain at least one value. For theExistsandDoesNotExistoperators, the list must be empty.
- objectspec.resources.deniedSelector.matchLabels
Set of labels for cluster-wide resources.
All specified labels must match.
- stringspec.resources.resourceName
Required value
Name of the GrantableClusterResourceDefinition for which the access settings are configured.
- objectstatus
ClusterResourceGrantPolicy status.
- array of objectsstatus.conditions
Current state of the ClusterResourceGrantPolicy.
Information about one aspect of the current resource state.
- stringstatus.conditions.lastTransitionTime
Required value
Time when the condition last changed.
- stringstatus.conditions.message
Required value
Message with additional information about the condition state.
Maximum length:
32768 - integerstatus.conditions.observedGeneration
Resource generation on which the condition state is based.
Allowed values:
0 <= X - stringstatus.conditions.reason
Required value
Reason for the last change in the condition state.
Pattern:
^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$Length:
1..1024 - stringstatus.conditions.status
Required value
Condition state.
Allowed values:
True,False,Unknown - stringstatus.conditions.type
Required value
Condition type.
Pattern:
^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$Maximum length:
316
- integerstatus.observedGeneration
Latest resource generation processed by the controller.
Deprecated resource. Support for the resource might be removed in a later release.
Defines a policy for project access to cluster-wide resources and the values used by default.
The resource applies to the project namespaces whose labels match spec.projectSelector. A policy written through multitenancy.deckhouse.io/v1alpha2 may also select projects by the labels of the Project; this version shows that selector as JSON in the multitenancy.deckhouse.io/v1alpha2-project-selector annotation. For each type of cluster-wide resource, the policy allows you to configure allowed and denied resources, as well as their availability rules and default values.
The cluster-wide resource type is specified using spec.resources[].resourceName, which references the corresponding GrantableClusterResourceDefinition.
The policy is created by a cluster administrator.
For configuration examples, refer to Usage examples.
- objectspec
Required value
ClusterResourceGrantPolicy parameters.
- objectspec.projectSelector
Label selector for project namespaces to which the policy applies.
The selector is matched against the labels of the namespace, the same as
spec.namespaceSelectorofmultitenancy.deckhouse.io/v1alpha2, which is the version to use.If the selector is not specified and the
multitenancy.deckhouse.io/v1alpha2-project-selectorannotation is absent, the policy does not apply to any projects. An empty selector matches all project namespaces, except the namespaces of the virtual projectsdeckhouseanddefault.The annotation holds
spec.projectSelectorofv1alpha2, which is matched against the labels of the Project. Keep the annotation when you update the policy through this version.- array of objectsspec.projectSelector.matchExpressions
List of label selector expressions.
All expressions must match.
Label selector expression.
- stringspec.projectSelector.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.projectSelector.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.projectSelector.matchExpressions.values
List of label values.
For the
InandNotInoperators, the list must contain at least one value. For theExistsandDoesNotExistoperators, the list must be empty.
- objectspec.projectSelector.matchLabels
Set of namespace labels to which the policy applies.
All specified labels must match.
- array of objectsspec.resources
Required value
Access settings for cluster-wide resources for the selected projects.
Access settings for one type of cluster-wide resource.
- array of stringsspec.resources.allowed
List of names of cluster-wide resources available to the projects.
Combined with resources selected using
allowedSelector. An empty list is not accepted: omit the field instead, or setavailabilityDefault: Noneto make nothing available. - objectspec.resources.allowedSelector
Label selector for cluster-wide resources available to the projects.
Combined with resources specified in
allowed. Applies only to cluster-wide resources represented by Kubernetes objects. An empty selector is not accepted: omit the field instead, or setavailabilityDefaultto open or lock the resource without a list.- array of objectsspec.resources.allowedSelector.matchExpressions
List of label selector expressions.
All expressions must match.
Label selector expression.
- stringspec.resources.allowedSelector.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.resources.allowedSelector.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.resources.allowedSelector.matchExpressions.values
List of label values.
For the
InandNotInoperators, the list must contain at least one value. For theExistsandDoesNotExistoperators, the list must be empty.
- objectspec.resources.allowedSelector.matchLabels
Set of labels for cluster-wide resources.
All specified labels must match.
- stringspec.resources.availabilityDefault
Determines the availability of cluster-wide resources that are not explicitly specified using
allowed,allowedSelector,denied, ordeniedSelector.Overrides
defaultAvailabilityof the corresponding GrantableClusterResourceDefinition for the projects selected by the policy.Allmakes all such cluster-wide resources available, whileNonemakes them unavailable.Usually, you do not need to specify this parameter. If
allowedorallowedSelectoris set andavailabilityDefaultis not specified, access to all other cluster-wide resources of this type is automatically denied. Set this parameter explicitly only to change availability without specifying a list of allowed resources:Allto make all resources of the type available, orNoneto make them unavailable.Allowed values:
All,None - stringspec.resources.default
Name of the cluster-wide resource used by default in the selected projects.
Overrides the value determined using
defaultFromin the corresponding GrantableClusterResourceDefinition. - array of stringsspec.resources.denied
List of names of cluster-wide resources unavailable to the projects.
Deny rules take precedence over
allowedandallowedSelector. - objectspec.resources.deniedSelector
Label selector for cluster-wide resources unavailable to the projects.
Deny rules take precedence over
allowedandallowedSelector. Applies only to cluster-wide resources represented by Kubernetes objects. An empty selector is not accepted.- array of objectsspec.resources.deniedSelector.matchExpressions
List of label selector expressions.
All expressions must match.
Label selector expression.
- stringspec.resources.deniedSelector.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.resources.deniedSelector.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.resources.deniedSelector.matchExpressions.values
List of label values.
For the
InandNotInoperators, the list must contain at least one value. For theExistsandDoesNotExistoperators, the list must be empty.
- objectspec.resources.deniedSelector.matchLabels
Set of labels for cluster-wide resources.
All specified labels must match.
- stringspec.resources.resourceName
Required value
Name of the GrantableClusterResourceDefinition for which the access settings are configured.
- objectstatus
ClusterResourceGrantPolicy status.
- array of objectsstatus.conditions
Current state of the ClusterResourceGrantPolicy.
Information about one aspect of the current resource state.
- stringstatus.conditions.lastTransitionTime
Required value
Time when the condition last changed.
- stringstatus.conditions.message
Required value
Message with additional information about the condition state.
Maximum length:
32768 - integerstatus.conditions.observedGeneration
Resource generation on which the condition state is based.
Allowed values:
0 <= X - stringstatus.conditions.reason
Required value
Reason for the last change in the condition state.
Pattern:
^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$Length:
1..1024 - stringstatus.conditions.status
Required value
Condition state.
Allowed values:
True,False,Unknown - stringstatus.conditions.type
Required value
Condition type.
Pattern:
^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$Maximum length:
316
- integerstatus.observedGeneration
Latest resource generation processed by the controller.
GrantableClusterResourceDefinition
Short names: gcrd
Scope: Cluster
Version: v1alpha1
Registers a type of cluster-wide resource for managing project access to it.
GrantableClusterResourceDefinition defines a cluster-wide resource for which access can be configured using ClusterResourceGrantPolicy, as well as the baseline rules for its availability and use of a default value.
The resource can register both Kubernetes objects, such as StorageClass or ClusterRole, and values that are not represented by separate Kubernetes objects.
Places where the cluster-wide resource is used in other Kubernetes resources are registered separately using GrantableClusterResourceReference.
GrantableClusterResourceDefinition is created by DP or a module developer. Custom definitions can be created to manage access to additional types of cluster-wide resources.
For more information, refer to “Usage examples”.
- objectspec
Required value
GrantableClusterResourceDefinition parameters.
- array of objectsspec.catalogFields
Fields of the cluster-wide resources shown to projects in AvailableClusterResource.
For each available resource, the controller reads the value of every listed field from the resource and puts it into
status.available[].fieldsof AvailableClusterResource under the specified name.Rules:
- Applies only to definitions with
grantedResource, which must be cluster-scoped. For values that are not represented by Kubernetes objects, the parameter is not allowed. - At most 10 fields can be listed.
- A field whose value is missing in the resource is not shown.
- A value longer than 512 bytes in JSON serialization is not shown.
- If
status.availableof one AvailableClusterResource with the fields of all resources would take more than 512 KiB in JSON serialization, no fields are shown in it.
The paths are checked when the object is created or updated, and an invalid entry is refused. The result for the stored object is shown in the
CatalogFieldsValidcondition. Values left out for their size are reported byCatalogFieldsSkippedwarning events on the GrantableClusterResourceDefinition.Warning. The values are visible to all users of every project the resource is available to. List only non-secret data.
Field of the cluster-wide resource shown to projects.
- stringspec.catalogFields.name
Required value
Name of the field in
status.available[].fieldsof AvailableClusterResource, in lowerCamelCase (for example,reclaimPolicy).Pattern:
^[a-z][a-zA-Z0-9]*$Maximum length:
63 - stringspec.catalogFields.path
Required value
Path to the value in the cluster-wide resource, for example
$.provisioner.Must be an RFC 9535 JSONPath singular query of at most 256 characters that selects exactly one value: member names and array indexes only, without wildcards (
*), descendant segments (..), slices or filters.Paths that read
metadata.managedFieldsor thekubectl.kubernetes.io/last-applied-configurationannotation, or a parent that contains them (for example,$.metadata), are not allowed: these fields hold a copy of the whole resource.Length:
1..256
- Applies only to definitions with
- stringspec.defaultAvailability
Baseline availability of cluster-wide resources to projects.
Allowed values:
All: Resources are available by default.None: Resources are unavailable by default.
The value applies if availability is not determined by ClusterResourceGrantPolicy.
Default:
AllAllowed values:
All,None - objectspec.defaultFrom
Settings for determining the cluster-wide resource used by default.
The resource is identified by the specified annotation carrying the value
true(compared case-insensitively;falsemarks a resource that is not the default, as the Kubernetes convention forstorageclass.kubernetes.io/is-default-classdoes) and is used as the default value if one is not specified using ClusterResourceGrantPolicy. When more than one resource carriestrue, there is no default.- stringspec.defaultFrom.annotationKey
Key of the annotation that marks the cluster-wide resource used by default; only the value
truecounts.
- stringspec.enforcement
Method for checking cluster-wide resource availability.
Allowed values:
Managed: The check is performed bymultitenancy-managerwebhooks.External: The check is performed by an external mechanism, such as a module webhook.
Default:
ManagedAllowed values:
Managed,External - array of objectsspec.excluded
Filters for excluded cluster-wide resources that are always unavailable to projects regardless of ClusterResourceGrantPolicy settings.
A resource is considered excluded if it matches at least one of the specified filters.
Filter for cluster-wide resources by name and labels.
- array of objectsspec.excluded.matchExpressions
List of label selector expressions for cluster-wide resources.
All expressions must match.
Label selector expression.
- stringspec.excluded.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.excluded.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.excluded.matchExpressions.values
List of label values.
For the
InandNotInoperators, the list must contain at least one value. For theExistsandDoesNotExistoperators, the list must be empty.
- objectspec.excluded.matchLabels
Set of labels for cluster-wide resources.
All specified labels must match.
- array of stringsspec.excluded.names
List of cluster-wide resource names.
- objectspec.grantedResource
Kubernetes cluster-wide resource for which access is configured.
Must be a cluster-scoped resource: a namespaced one (for example, Secret) is refused when the object is created or updated, and a definition stored with one is not processed, which the
GrantedResourceValidcondition shows. A resource that is not served yet (its CRD is not installed) is accepted and checked once it is served.If the parameter is not specified, access management applies to values that are not represented by separate Kubernetes objects.
- stringspec.grantedResource.apiGroup
API group of the cluster-wide resource.
For the core API group, specify an empty string (
""). - stringspec.grantedResource.kind
Kind of the cluster-wide resource (for example, StorageClass).
- array of objectsspec.reserved
Filters for reserved cluster-wide resources that are unavailable to projects by default.
A reserved resource becomes available to a project only if a ClusterResourceGrantPolicy that applies to the project lists it in
allowedor matches it withallowedSelector.availabilityDefault: Allin a policy anddefaultAvailabilitydo not make it available. Theexcludedfilters and thedeniedanddeniedSelectorvalues of a policy take precedence overallowedandallowedSelector.A resource is considered reserved if it matches at least one of the specified filters.
Filter for cluster-wide resources by name and labels.
- array of objectsspec.reserved.matchExpressions
List of label selector expressions for cluster-wide resources.
All expressions must match.
Label selector expression.
- stringspec.reserved.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.reserved.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.reserved.matchExpressions.values
List of label values.
For the
InandNotInoperators, the list must contain at least one value. For theExistsandDoesNotExistoperators, the list must be empty.
- objectspec.reserved.matchLabels
Set of labels for cluster-wide resources.
All specified labels must match.
- array of stringsspec.reserved.names
List of cluster-wide resource names.
- objectstatus
GrantableClusterResourceDefinition status.
- array of objectsstatus.conditions
Current state of the GrantableClusterResourceDefinition.
GrantedResourceValid: whetherspec.grantedResourcecan be processed.Truewith the reasonClusterScopedfor a cluster-scoped resource orValueBackedfor a definition withoutgrantedResource.Falsewith the reasonNamespacedfor a namespaced resource: the definition is not processed, no project gets its AvailableClusterResource, and the grant webhooks skip the references to it: their values are not checked.Unknownwith the reasonKindNotServedwhile the resource is not served (for example, its CRD is not installed yet), orMappingFailedif its scope could not be determined.CatalogFieldsValid: whetherspec.catalogFieldspass the checks applied when the object is created or updated: the paths are valid singular queries that do not readmetadata.managedFieldsor thekubectl.kubernetes.io/last-applied-configurationannotation, and the definition hasgrantedResource(reasonsValid,InvalidCatalogFields; the message lists all problems). A definition withoutcatalogFieldshas the conditionTrue.Falsemeans the object was stored bypassing these checks; the invalid entries are not shown in AvailableClusterResource.
Information about one aspect of the current resource state.
- stringstatus.conditions.lastTransitionTime
Required value
Time when the condition last changed.
- stringstatus.conditions.message
Required value
Message with additional information about the condition state.
Maximum length:
32768 - integerstatus.conditions.observedGeneration
Resource generation on which the condition state is based.
Allowed values:
0 <= X - stringstatus.conditions.reason
Required value
Reason for the last change in the condition state.
Pattern:
^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$Length:
1..1024 - stringstatus.conditions.status
Required value
Condition state.
Allowed values:
True,False,Unknown - stringstatus.conditions.type
Required value
Condition type.
Pattern:
^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$Maximum length:
316
- integerstatus.observedGeneration
Latest resource generation processed by the controller.
- integerstatus.referenceCount
Number of GrantableClusterResourceReference resources associated with this definition.
- array of objectsstatus.references
List of GrantableClusterResourceReference resources associated with this definition.
Information about a GrantableClusterResourceReference associated with this definition.
- stringstatus.references.name
Required value
Name of the GrantableClusterResourceReference.
- array of stringsstatus.references.resources
Types of Kubernetes resources that contain registered references to the cluster-wide resource.
GrantableClusterResourceReference
Short names: gcrr
Scope: Cluster
Version: v1alpha1
Registers where a cluster-wide resource is used in other Kubernetes resources.
GrantableClusterResourceReference defines Kubernetes resources and fields that contain references to a cluster-wide resource registered using GrantableClusterResourceDefinition. For such fields, you can configure availability checks for the specified cluster-wide resource and automatic default value assignment.
One GrantableClusterResourceDefinition can be associated with multiple GrantableClusterResourceReference resources if the cluster-wide resource is used in different resources or fields.
GrantableClusterResourceReference is created by a module developer when adding a reference to a registered cluster-wide resource.
For more information about registering references to cluster-wide resources, refer to “Usage examples”.
- objectspec
Required value
GrantableClusterResourceReference parameters.
- array of objectsspec.fieldPaths
Required value
List of Kubernetes resource fields that contain references to the cluster-wide resource.
For each field, you can limit applicability to specific resources, API groups and versions, define a matching condition, and configure default value assignment.
At least one item is required. The
resources,apiGroupsandapiVersionsof an item must be a subset of the corresponding lists inspec.rule(*inspec.ruleaccepts any value). Every combination of API group, version and resource thatspec.rulematches must be covered by at least one item, otherwise requests for it would not be checked at all. Either give items scoped to every such combination, or add an item withoutresources,apiGroupsandapiVersionsas the fallback for all other cases. An object that violates either rule is rejected.Settings for a field that contains a reference to the cluster-wide resource.
If a request matches multiple items, the most specific one applies:
resourcestakes precedence overapiGroups, andapiGroupstakes precedence overapiVersions.*inresources,apiGroups, orapiVersionsdoes not restrict the item and does not make it more specific. Items whosematchcondition does not hold for the object are skipped. Of equally restricted items, an item withmatchtakes precedence over an item without it. If several items are equally specific, the first one in the list applies. An item without restrictions and withoutmatchis used in all other cases.Several items with the same
pathcan therefore handle different objects of one resource. For example, an item withmatchon$.spec['dataSource','dataSourceRef'].kindanddefaulting: Nonehandles the PersistentVolumeClaims that restore or clone a volume, and an item withoutmatchand withdefaulting: Coercehandles all other PersistentVolumeClaims.- array of stringsspec.fieldPaths.apiGroups
API groups to which the field settings apply.
If the parameter is not specified, the settings apply to all API groups that match
spec.rule. - array of stringsspec.fieldPaths.apiVersions
API versions to which the field settings apply.
If the parameter is not specified, the settings apply to all API versions that match
spec.rule. - stringspec.fieldPaths.defaulting
Default value assignment mode.
Allowed values:
None: No value is assigned; only the availability of the specified cluster-wide resource is checked.FillEmpty: The default value is assigned when an object is created if the field is empty.Coerce: The default value is assigned when an object is created if the field is empty or the specified cluster-wide resource is unavailable to the project.
FillEmptyandCoercerequirepathto point to a single field, so only a simple member path is accepted, for example$.spec.storageClassNameor$.metadata.annotations['cert-manager.io/cluster-issuer']. A path with a wildcard, an array index or a filter is rejected with these modes and can only be used withNone.Default:
NoneAllowed values:
None,FillEmpty,Coerce - objectspec.fieldPaths.match
Condition for applying the field settings.
If the condition does not match, the item is skipped: the next most specific item applies, and if there is none, availability checks and default value assignment are not performed for this field.
Without
equalsandin, the condition matches whenfieldPathpoints to a string value.- stringspec.fieldPaths.match.equals
Value that the field specified in
fieldPathmust match. - stringspec.fieldPaths.match.fieldPath
Required value
JSONPath to the field whose value is checked by the condition.
Must be a valid RFC 9535 JSONPath of at most 256 characters; an object with a path that does not parse is rejected.
Maximum length:
256 - array of stringsspec.fieldPaths.match.in
List of allowed values for the field specified in
fieldPath.
- stringspec.fieldPaths.message
Text appended to the rejection of an object whose field references a cluster-wide resource that is unavailable to the project.
Use it to tell the user what to do, for example why the value cannot be replaced with the project default.
Maximum length:
512 - stringspec.fieldPaths.path
Required value
JSONPath to the string field containing the name of the cluster-wide resource.
The path can also point to an annotation, for example,
$.metadata.annotations['cert-manager.io/cluster-issuer'].Must be a valid RFC 9535 JSONPath of at most 256 characters; an object with a path that does not parse is rejected, whatever
defaultingis set to. A field name that is not a plain identifier (contains-,.or/, or starts with a digit) must be written in brackets, for example$.spec['foo-bar'].An availability check evaluates the full JSONPath, including wildcards, array indexes and filters. Default value assignment does not: with
defaulting: FillEmptyordefaulting: Coerce, only a simple member path is accepted.Maximum length:
256 - array of stringsspec.fieldPaths.resources
Kubernetes resource names in plural, for example,
podsorcronjobs, to which the field settings apply.If the parameter is not specified, the settings apply to all resources that match
spec.rule.*has the same effect as omitting the parameter: it does not restrict the item and does not make it more specific.- stringElement of the array
- stringspec.grantableClusterResourceName
Required value
Name of the GrantableClusterResourceDefinition that registers the cluster-wide resource referenced by the fields.
- objectspec.rule
Required value
Rule for selecting Kubernetes resources to which GrantableClusterResourceReference applies.
- array of stringsspec.rule.apiGroups
Required value
API groups of Kubernetes resources. The core group is the empty string.
*is not accepted: the admission webhook is registered for the listed groups only, so a wildcard would silently intercept nothing. - array of stringsspec.rule.apiVersions
Required value
API versions of Kubernetes resources.
Use
*to select all API versions. - array of stringsspec.rule.resources
Required value
Kubernetes resource names in plural form (for example,
ingresses).
- objectstatus
GrantableClusterResourceReference status.
- booleanstatus.bound
Indicates that the GrantableClusterResourceDefinition specified in
spec.grantableClusterResourceNameexists. - array of objectsstatus.conditions
Current state of GrantableClusterResourceReference.
Bound: whether the GrantableClusterResourceDefinition specified inspec.grantableClusterResourceNameexists (reasonsResolved,UnknownResource).FieldPathsValid: whetherspec.fieldPathspass the checks applied when the object is created or updated: the paths are valid, defaulting paths are simple member paths, item scopes are withinspec.rule, and every combinationspec.rulematches is covered (reasonsValid,InvalidFieldPaths; the message lists all problems).Falsemeans the object was stored bypassing these checks; the invalid paths are skipped during availability checks.
Information about one aspect of the current resource state.
- stringstatus.conditions.lastTransitionTime
Required value
Time when the condition last changed.
- stringstatus.conditions.message
Required value
Message with additional information about the condition state.
Maximum length:
32768 - integerstatus.conditions.observedGeneration
Resource generation on which the condition state is based.
Allowed values:
0 <= X - stringstatus.conditions.reason
Required value
Reason for the last change in the condition state.
Pattern:
^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$Length:
1..1024 - stringstatus.conditions.status
Required value
Condition state.
Allowed values:
True,False,Unknown - stringstatus.conditions.type
Required value
Condition type.
Pattern:
^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$Maximum length:
316
- integerstatus.observedGeneration
Latest resource generation processed by the controller.
ProjectNamespace
Short names: pns
Scope: Namespaced
Version: v1alpha3
Describes an additional namespace of a project.
Available in the commercial editions of Deckhouse Platform. In Deckhouse Platform Open, a ProjectNamespace cannot be created, and the controller neither creates nor manages its namespace.
It must be created in the project’s main namespace (the namespace whose name equals the project name).
The controller creates a namespace named <project>-<spec.name>, labels it with the project ownership
labels, and adds it to the parent Project.status.namespaces with kind Additional. Deleting the
ProjectNamespace removes that namespace.
- objectspec
Required value
- stringspec.name
Required value
Suffix of the resulting namespace. The created namespace is
<project>-<name>, where<project>is the main namespace this object lives in.The resulting name
<project>-<name>must be no longer than 63 characters.Pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$Length:
1..61
- objectstatus
- array of objectsstatus.conditions
Current state of the object.
- stringstatus.conditions.lastProbeTime
Time of the last check of the condition.
- stringstatus.conditions.lastTransitionTime
Time when the condition last changed.
- stringstatus.conditions.message
Message with details of the condition state.
- stringstatus.conditions.status
Condition state:
True,FalseorUnknown. - stringstatus.conditions.type
Condition type.
- stringstatus.namespace
The namespace the controller created for this ProjectNamespace.
- integerstatus.observedGeneration
Last generation of the object processed by the controller.
ProjectQuotaStatus
Short names: pqs
Scope: Cluster
Version: v1alpha1
Limits and usage of the quota of a project, summed over all namespaces of the project.
The object is read-only. The controller creates it from Project.spec.quota, keeps it up to date and
deletes it when the field is cleared or the project is deleted; set the quota of a project in
Project.spec.quota. The name of the object is the name of the project.
The controller puts the d8-project-quota ResourceQuota with the limits of spec.hard into every namespace
of the project, the ones created later included, so that the usage of each namespace is counted by its own
ResourceQuota and no namespace alone uses more than the whole project may. The status shows the usage summed
over the namespaces.
- objectspec
Required value
- objectspec.hard
Limits of the project, copied by the controller from
Project.spec.quota, in the format ofResourceQuota.spec.hard, for examplerequests.cpu: "100".Accepted keys are the ones a ResourceQuota counts in a namespace:
cpu,memory,requests.*,limits.*,pods,services,services.loadbalancers,services.nodeports,persistentvolumeclaims,configmaps,secrets,replicationcontrollers,ephemeral-storage, the storage class and device class keys, the requests of extended resources andcount/<RESOURCE>[.<GROUP>]for a namespaced resource the API server serves.projectNamespacesis an alias ofcount/projectnamespaces.deckhouse.io, the number of ProjectNamespace objects of the project.Where the
virtualizationmodule is enabled, the virtual machines of the project are limited by their specification withvirtualmachines.virtualization.deckhouse.io/cores,virtualmachines.virtualization.deckhouse.io/cpu,virtualmachines.virtualization.deckhouse.io/memory,virtualmachines.virtualization.deckhouse.io/gpusand<GPU_CLASS>.gpuclass.virtualization.deckhouse.io/gpus; no ResourceQuota counts these keys, so they do not go intod8-project-quota. The Services of type LoadBalancer are limited by class, pool and address with<CLASS>.loadbalancerclass.network.deckhouse.io/services,<CLASS>.loadbalancerclass.network.deckhouse.io/addresses,<POOL>.loadbalancerpool.network.deckhouse.io/addressesandloadbalancers.network.deckhouse.io/addresses, which do not go into it either.resourcequotas,count/resourcequotas, the count of a cluster-scoped resource and a misspelled resource are refused. Acount/key of a group the API server does not serve yet is accepted with a warning and counts nothing until the module that provides the group is enabled.
- objectstatus
- array of objectsstatus.conditions
State of the quota:
- If
EnforcedisTrue, the quota applies in every namespace of the project. IfEnforcedisFalse,reasonsays why:ControlPlaneNotManaged(Deckhouse Platform does not manage the control plane, so the sum is not enforced),Suspended(thequota-ledger-suspendConfigMap suspends the check of the sum),WebhookMissing(the webhook of the quota ledger is missing or itscaBundleis not the CA of the ledger certificate),WebhookMisconfigured(that webhook is changed so that writes ofd8-project-quotado not reach the ledger),WebhookNotCalled(some API server admits objects without calling that webhook),KeyNotServed(nothing counts a key: the API server does not serve the resource of acount/key yet, or the module that serves the resources of a key is disabled) orKeyRollout(thed8-project-quotaResourceQuota of some namespace is not there or not calculated with every limit yet). - If
ExceededisTrue, the usage of the project is above the quota on some key. Thereasonsays how the usage got above the quota:HardLowered(the limit was set below the usage, by a change or when the quota was created) orOvershoot(the usage grew past the limit).
- stringstatus.conditions.lastTransitionTime
Time when the condition last changed.
- stringstatus.conditions.message
Message with details of the condition state.
- integerstatus.conditions.observedGeneration
Generation of the object the condition was set for.
- stringstatus.conditions.reason
Reason of the condition state.
- stringstatus.conditions.status
Required value
Condition state:
True,FalseorUnknown. - stringstatus.conditions.type
Required value
Condition type.
- If
- objectstatus.hard
Limits the controller applies,
spec.hardwith the alias expanded. - integerstatus.namespaceCount
Number of namespaces of the project.
- integerstatus.observedGeneration
Last generation of the object the controller processed.
- array of objectsstatus.topNamespaces
Namespaces closest to a limit, at most 50 of them. The usage of every namespace is in its
d8-project-quotaResourceQuota.- stringstatus.topNamespaces.name
Required value
Name of the namespace.
- objectstatus.topNamespaces.used
Usage of the namespace.
- objectstatus.used
Usage of the project, summed over all of its namespaces.
ProjectRoleBinding
Short names: prb
Scope: Namespaced
Version: v1alpha3
ProjectRoleBinding grants a role to subjects across all namespaces of a single project.
It must be created in the project’s main namespace (the namespace whose name equals the project name).
- objectspec
Required value
- objectspec.roleRef
Required value
Reference to the granted ClusterRole. Allowed prefixes:
d8:project:*,d8:namespace:*,d8:project-capability:*,d8:namespace-capability:*,d8:custom:*.- stringspec.roleRef.kind
Required value
Kind of the granted role.
Allowed values:
ClusterRole - stringspec.roleRef.name
Required value
Name of the granted ClusterRole.
- array of objectsspec.subjects
Required value
Subjects (users, groups or service accounts) the role is granted to.
- stringspec.subjects.apiGroup
API group of the subject:
rbac.authorization.k8s.ioforUserandGroup, empty forServiceAccount. - stringspec.subjects.kind
Required value
Kind of the subject.
Allowed values:
User,Group,ServiceAccount - stringspec.subjects.name
Required value
Name of the subject: the user name (
User.spec.email) forUser,Group.spec.nameforGroup, the ServiceAccount name forServiceAccount. - stringspec.subjects.namespace
Namespace of the ServiceAccount.
If omitted, the binding names the ServiceAccount with this name in each namespace of the project.
- objectstatus
- array of objectsstatus.conditions
Current state of the object.
- stringstatus.conditions.lastProbeTime
Time of the last check of the condition.
- stringstatus.conditions.lastTransitionTime
Time when the condition last changed.
- stringstatus.conditions.message
Message with details of the condition state.
- stringstatus.conditions.status
Condition state:
True,FalseorUnknown. - stringstatus.conditions.type
Condition type.
- integerstatus.observedGeneration
Last generation of the object processed by the controller.
Project
Scope: Cluster
- v1alpha3
- v1alpha2
- v1alpha1
Describes a project: an isolated environment for applications.
A project consists of the main namespace named after the project, the additional namespaces (ProjectNamespace), if any, and the settings, policies and objects that its ProjectTemplate describes. See Creating a project.
- objectspec
- array of objectsspec.administrators
Users and groups that get administrative access to the project.
The controller grants them the
d8:project:adminrole through thed8-administratorsProjectRoleBinding. ForUser, the name is the user name (User.spec.email); forGroup, it isGroup.spec.name.Cannot be set together with
parameters.administrators.- stringspec.administrators.kind
Required value
Kind of the subject.
Allowed values:
User,Group - stringspec.administrators.name
Required value
Subject name. For
User, the user name (User.spec.email). ForGroup,Group.spec.name(the name in the token), notmetadata.name. The name cannot contain control characters or line breaks and cannot start withsystem:multitenancy-manager:, the prefix of the users that the controller acts as. An update that keeps such a name as it was is accepted with a warning.Pattern:
^[^\x00-\x1f\x7f]+$
- stringspec.description
Arbitrary description of the project’s purpose. Specify an empty string if no description is required.
- objectspec.grants
Cluster-wide resources available to the namespaces of the project, added to the ones its template grants.
The controller turns them into managed ClusterResourceGrantPolicy objects named
project-<PROJECT_NAME>-*, owned by the project. Changing the field needs the right to create ClusterResourceGrantPolicy objects.deckhouse.io/v1alpha2cannot describe the field, so a write of a project with grants through that version, a write of its status included, is refused.- array of stringsspec.grants.grantPolicies
References to library ClusterResourceGrantPolicy objects (created without
projectSelectorandnamespaceSelector).The controller creates and maintains one managed policy per reference,
project-<PROJECT_NAME>-<POLICY_NAME>, copying its resources and binding them to every namespace of the project. - array of objectsspec.grants.resources
Rules of access to cluster-wide resources for the namespaces of the project, in the format of
resourcesof a ProjectTemplate.The controller turns them into the
project-<PROJECT_NAME>-inlineClusterResourceGrantPolicy, which applies to every namespace of the project.Access settings for one type of cluster-wide resource.
- array of stringsspec.grants.resources.allowed
List of names of cluster-wide resources available to the project.
Combined with the resources selected with
allowedSelector. - objectspec.grants.resources.allowedSelector
Label selector of cluster-wide resources available to the project.
Combined with the resources listed in
allowed. Applies only to cluster-wide resources represented by Kubernetes objects.- array of objectsspec.grants.resources.allowedSelector.matchExpressions
List of label selector expressions.
All expressions must match.
- stringspec.grants.resources.allowedSelector.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.grants.resources.allowedSelector.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.grants.resources.allowedSelector.matchExpressions.values
List of label values.
- objectspec.grants.resources.allowedSelector.matchLabels
Set of labels of cluster-wide resources.
All specified labels must match.
- stringspec.grants.resources.availabilityDefault
Availability of the cluster-wide resources of this type that
allowed,allowedSelector,deniedanddeniedSelectordo not name.Overrides
defaultAvailabilityof the GrantableClusterResourceDefinition. IfallowedorallowedSelectoris set and this field is not, all other resources of this type are unavailable to the project.Allowed values:
All,None - stringspec.grants.resources.default
Name of the cluster-wide resource used by default in the project.
Overrides the value determined with
defaultFromin the GrantableClusterResourceDefinition. - array of stringsspec.grants.resources.denied
List of names of cluster-wide resources unavailable to the project.
Deny rules take precedence over
allowedandallowedSelector. - objectspec.grants.resources.deniedSelector
Label selector of cluster-wide resources unavailable to the project.
Deny rules take precedence over
allowedandallowedSelector.- array of objectsspec.grants.resources.deniedSelector.matchExpressions
List of label selector expressions.
All expressions must match.
- stringspec.grants.resources.deniedSelector.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.grants.resources.deniedSelector.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.grants.resources.deniedSelector.matchExpressions.values
List of label values.
- objectspec.grants.resources.deniedSelector.matchLabels
Set of labels of cluster-wide resources.
All specified labels must match.
- stringspec.grants.resources.resourceName
Required value
Name of the GrantableClusterResourceDefinition that registers the type of cluster-wide resource.
- objectspec.parameters
Values of the parameters that the template declares in
parametersSchema.The structured fields of the template take them through
{fromParam: <NAME>}.manifestsandresourcesTemplateget them in{{ .parameters }}, completed with the defaults ofparametersSchema. The values are validated againstparametersSchema.openAPIV3Schemaof the template when the project is created or changed. - stringspec.projectTemplateName
Name of the ProjectTemplate the project is created from.
The
simpletemplate creates only the project namespace.Default:
simple - objectspec.quota
Resource quota of the whole project.
The controller puts the
d8-project-quotaResourceQuota into every namespace of the project, sums the usage over them and shows the limits and the usage in the read-only ProjectQuotaStatus object of the project. Clearing the field deletes that ProjectQuotaStatus.Changing the field needs the
updateverb onprojects/quotain thedeckhouse.iogroup for the project, which themanage_quotascapability of themultitenancy-managermodule grants.Keys and values follow the
ResourceQuota.spec.hardformat, for examplerequests.cpu: "100". Memory and storage quantities must include an explicit unit suffix (for examplerequests.memory: 2Gi); bare numbers are interpreted as bytes, so the admission webhook rejects a bare number other than 0. An update that leaves such a value as it was is accepted with a warning, and so is a create throughdeckhouse.io/v1alpha2, where such a value comes fromparameters.resourceQuota.Cannot be set together with
parameters.resourceQuota.
- objectstatus
- array of objectsstatus.conditions
Current state of the project.
The condition types are described in Project status and diagnostics.
- stringstatus.conditions.lastProbeTime
Time of the last check of the condition.
- stringstatus.conditions.lastTransitionTime
Time when the condition last changed.
- stringstatus.conditions.message
Message with details of the condition state.
- stringstatus.conditions.status
Condition state:
True,FalseorUnknown. - stringstatus.conditions.type
Condition type.
- array of objectsstatus.handingOver
Objects of
manifeststhat an upgrade of the project release is taking over.Each entry names the object and the release revision the upgrade is expected to deploy. The object stays in the cluster, and
manifestObjectsdoes not list it while the entry exists. The entry is removed once the upgrade deploys the object. If the upgrade does not deploy it, the object goes back tomanifests. It gets theprojects.deckhouse.io/projectandprojects.deckhouse.io/source: manifestslabels back and loses theheritage,app.kubernetes.io/managed-byandprojects.deckhouse.io/project-templatelabels, andmanifestObjectslists it again.No object is handed over while the upgrade would also take an object that is not an object of
manifestsand exists without theapp.kubernetes.io/managed-by: Helmlabel and themeta.helm.sh/release-nameannotation of the release. The upgrade does not run then, and theResourcesUpgradedcondition names that object.- stringstatus.handingOver.apiVersion
API version of the object.
- stringstatus.handingOver.kind
Kind of the object.
- stringstatus.handingOver.name
Name of the object.
- stringstatus.handingOver.namespace
Namespace of the object.
- integerstatus.handingOver.revision
Release revision the upgrade is expected to deploy.
- array of objectsstatus.keptObjects
Objects that the project release stopped holding and that were left in place instead of being deleted.
These are the objects of a Helm text in
resourcesTemplateafter the project switched to structured fields, a quota kept for a handover after.spec.quotastopped covering it, and the objects of the release of the structured fields thatmanifestsrender. The release no longer manages them. They carry theprojects.deckhouse.io/kept-from-helm-template: "true"label, and while it is there, only a requester who may make the same change across the cluster may change or delete them.An object leaves the list once it is deleted, the label is removed from it, the release renders it again, or
manifeststake it over. When the project is deleted, the cluster-scoped ones that still carry the label are deleted with it.- stringstatus.keptObjects.apiVersion
API version of the object.
- stringstatus.keptObjects.kind
Kind of the object.
- stringstatus.keptObjects.name
Name of the object.
- stringstatus.keptObjects.namespace
Namespace of the object, empty for a cluster-scoped one.
- array of objectsstatus.manifestObjects
Objects that the controller applied from
manifestsof the project template, as thesystem:multitenancy-manager:project:<PROJECT_NAME>user. They carry theprojects.deckhouse.io/projectlabel with the project name and theprojects.deckhouse.io/source: manifestslabel. An object that the template does not render any more is deleted and leaves the list. One that lost one of these labels by then, or whose namespace left the project, leaves the list and stays in place.- stringstatus.manifestObjects.apiVersion
API version of the object.
- stringstatus.manifestObjects.kind
Kind of the object.
- stringstatus.manifestObjects.name
Name of the object.
- stringstatus.manifestObjects.namespace
Namespace of the object.
- array of objectsstatus.namespaces
Namespaces that belong to the project.
- stringstatus.namespaces.kind
Kind of the namespace (Main or Additional).
- stringstatus.namespaces.name
Name of the namespace.
- integerstatus.observedGeneration
Last generation of the project processed by the controller.
- objectstatus.resources
Rendered and skipped resources.
- stringstatus.state
State of the project:
DeployedorError. The conditions and their messages give the details. - integerstatus.templateGeneration
Generation of the template the project was last rendered from.
- objectstatus.usage
Current utilization of the project quota.
Describes a project: an isolated environment for applications.
A project consists of the main namespace named after the project, the additional namespaces (ProjectNamespace), if any, and the settings, policies and objects that its ProjectTemplate describes. See Creating a project.
- objectspec
- stringspec.description
Arbitrary description of the project’s purpose. Specify an empty string if no description is required.
- objectspec.parameters
Values of the parameters that the template declares in
parametersSchema.The structured fields of the template take them through
{fromParam: <NAME>}.manifestsandresourcesTemplateget them in{{ .parameters }}, completed with the defaults ofparametersSchema. The values are validated againstparametersSchema.openAPIV3Schemaof the template when the project is created or changed. - stringspec.projectTemplateName
Name of the ProjectTemplate the project is created from.
The
simpletemplate creates only the project namespace.Default:
simple
- objectstatus
- array of objectsstatus.conditions
Current state of the project.
The condition types are described in Project status and diagnostics.
- stringstatus.conditions.lastProbeTime
Time of the last check of the condition.
- stringstatus.conditions.lastTransitionTime
Time when the condition last changed.
- stringstatus.conditions.message
Message with details of the condition state.
- stringstatus.conditions.status
Condition state:
True,FalseorUnknown. - stringstatus.conditions.type
Condition type.
- array of objectsstatus.handingOver
Objects of
manifeststhat an upgrade of the project release is taking over.Each entry names the object and the release revision the upgrade is expected to deploy. The object stays in the cluster, and
manifestObjectsdoes not list it while the entry exists. The entry is removed once the upgrade deploys the object. If the upgrade does not deploy it, the object goes back tomanifests. It gets theprojects.deckhouse.io/projectandprojects.deckhouse.io/source: manifestslabels back and loses theheritage,app.kubernetes.io/managed-byandprojects.deckhouse.io/project-templatelabels, andmanifestObjectslists it again.No object is handed over while the upgrade would also take an object that is not an object of
manifestsand exists without theapp.kubernetes.io/managed-by: Helmlabel and themeta.helm.sh/release-nameannotation of the release. The upgrade does not run then, and theResourcesUpgradedcondition names that object.- stringstatus.handingOver.apiVersion
API version of the object.
- stringstatus.handingOver.kind
Kind of the object.
- stringstatus.handingOver.name
Name of the object.
- stringstatus.handingOver.namespace
Namespace of the object.
- integerstatus.handingOver.revision
Release revision the upgrade is expected to deploy.
- array of objectsstatus.keptObjects
Objects that the project release stopped holding and that were left in place instead of being deleted.
These are the objects of a Helm text in
resourcesTemplateafter the project switched to structured fields, a quota kept for a handover after.spec.quotastopped covering it, and the objects of the release of the structured fields thatmanifestsrender. The release no longer manages them. They carry theprojects.deckhouse.io/kept-from-helm-template: "true"label, and while it is there, only a requester who may make the same change across the cluster may change or delete them.An object leaves the list once it is deleted, the label is removed from it, the release renders it again, or
manifeststake it over. When the project is deleted, the cluster-scoped ones that still carry the label are deleted with it.- stringstatus.keptObjects.apiVersion
API version of the object.
- stringstatus.keptObjects.kind
Kind of the object.
- stringstatus.keptObjects.name
Name of the object.
- stringstatus.keptObjects.namespace
Namespace of the object, empty for a cluster-scoped one.
- array of objectsstatus.manifestObjects
Objects that the controller applied from
manifestsof the project template, as thesystem:multitenancy-manager:project:<PROJECT_NAME>user. They carry theprojects.deckhouse.io/projectlabel with the project name and theprojects.deckhouse.io/source: manifestslabel. An object that the template does not render any more is deleted and leaves the list. One that lost one of these labels by then, or whose namespace left the project, leaves the list and stays in place.- stringstatus.manifestObjects.apiVersion
API version of the object.
- stringstatus.manifestObjects.kind
Kind of the object.
- stringstatus.manifestObjects.name
Name of the object.
- stringstatus.manifestObjects.namespace
Namespace of the object.
- array of stringsstatus.namespaces
Used namespaces.
- integerstatus.observedGeneration
Last generation of the project processed by the controller.
- objectstatus.resources
Rendered and skipped resources.
- stringstatus.state
State of the project:
DeployedorError. The conditions and their messages give the details. - integerstatus.templateGeneration
Generation of the template the project was last rendered from.
Deprecated resource. Support for the resource might be removed in a later release.
ProjectTemplate
Scope: Cluster
- v1alpha2
- v1alpha1
Describes the project template as a set of structured, declarative fields.
This resource is referenced by the Project custom resource. The
resources and grantPolicies fields become ClusterResourceGrantPolicy
objects that apply to the projects of this template. The other fields become objects in the
namespaces of the projects.
Objects that no structured field describes are rendered from manifests. Instead of the
fields that render objects, a template created through deckhouse.io/v1alpha1 can carry a
Helm template in resourcesTemplate. This form is deprecated, and no template can get a
new resourcesTemplate.
The virtual name is reserved for the template of the virtual projects default and deckhouse: a ProjectTemplate with this name cannot be created.
- objectspec
- spec.allowedGIDs
Range of group IDs allowed in the project containers. A literal
{min, max}object or a parameter reference{fromParam: "<name>"}. - spec.allowedUIDs
Range of user IDs allowed in the project containers. A literal
{min, max}object or a parameter reference{fromParam: "<name>"}. - stringspec.description
Arbitrary description of the template’s purpose. Specify an empty string if no description is required.
- objectspec.features
Optional project capabilities.
- spec.features.monitoring
Enable extended monitoring for the project. A literal boolean or a parameter reference
{fromParam: "<name>"}. - spec.features.vulnerabilityScanning
Enable periodic vulnerability scans (Trivy) for the project. A literal boolean or a parameter reference
{fromParam: "<name>"}.
- array of stringsspec.grantPolicies
References to library ClusterResourceGrantPolicy objects (created without
projectSelectorandnamespaceSelector).The controller creates and maintains one managed policy per reference, copying its resources and binding them to the namespaces rendered from this template.
- objectspec.logShipping
Forwarding of the project logs to a cluster log destination.
- spec.logShipping.clusterDestinationRef
Name of the ClusterLogDestination to ship logs to. A literal string or a parameter reference
{fromParam: "<name>"}.
- stringspec.manifests
A template in the
go templateformat with thehelmfunctions that renders objects into the namespaces of a project, next to the objects that the structured fields render.The template gets the project name in
{{ .projectName }}, the template name in{{ .projectTemplateName }}and the project parameters completed with the defaults ofparametersSchemain{{ .parameters }}, the same values asresourcesTemplate. A project whose parameters turn into objects or keys of the rendered manifests instead of values is refused, so quote every substitution.The controller applies the objects with server-side apply as the
system:multitenancy-manager:project:<PROJECT_NAME>user, and thed8-manifestsProjectRoleBinding of the project grants this user thed8:project:adminrole. So an object gets only what this role allows in the namespaces of the project, not the rights of the controller. An AuthorizationRule of theAdminaccess level is refused when the manifests create it or raise an existing one to this level, although the role allows it. The administrators of a project are set in.spec.administratorsof the Project. The objects are applied once the binding is Ready, and theManifestsAppliedcondition of the project says whether they are applied and names the objects that the API server refused with the code of each refusal, such as 403.An object without
metadata.namespaceis created in the main namespace of the project, and a namespace that an object names has to be a namespace of the project or one that a ProjectNamespace of the samemanifestsmakes. The objects of such a namespace are applied once it exists, and until then theManifestsAppliedcondition names the namespaces they wait for. See Additional namespaces in manifests. A cluster-scoped object, an object in a namespace outside the project and an object with theheritage: multitenancy-managerorheritage: deckhouselabel are refused. The objects get theprojects.deckhouse.io/projectlabel with the project name and theprojects.deckhouse.io/source: manifestslabel, and.status.manifestObjectsof the project lists them. An object that the template does not render any more is deleted.An object that a switch of the project from a Helm text left in place and listed in
.status.keptObjectsis taken over whenmanifestsrenders an object of the same kind, namespace and name. The object then has whatmanifestsrenders, and a field that the Helm text set andmanifestsleaves out is removed, the annotations of Helm included. The same list moves an object from the release of the structured fields tomanifests. When the structured fields stop rendering an object thatmanifestsrender under the same kind, namespace and name, the controller leaves it in place with theprojects.deckhouse.io/kept-from-helm-template: "true"label and lists it in.status.keptObjects, andmanifeststake it over in the same change. Ifmanifestscannot apply it, the object stays on the list. See Moving an object of the release to manifests. Any other object that exists already and thatmanifestsdid not create is changed only when it has the two labels, and otherwise theManifestsAppliedcondition names it. An object thatmanifestscreated and that the template renders otherwise after a change, for example a NetworkPolicy namedisolatedoncenetworkPolicy.modeisIsolated, goes to the objects the project renders from the template in the same change. It gets what the template renders, and a field that onlymanifestsset is removed.Like the objects that the structured fields render, these objects are changed through the template only. The
d8-multitenancy-manager-manifests-objectsadmission policy refuses to create, change or delete an object with theprojects.deckhouse.io/source: manifestslabel to everyone, project and cluster administrators included. Only the user themanifestsof the project are applied as, the controller, the service accounts of thed8-*namespaces and the cluster components can do it. Anyone who may update a workload may restart its rollout, when thekubectl.kubernetes.io/restartedAtannotation of its pod template is the only change.metadata.resourceVersion,metadata.generationandmetadata.managedFieldsare not compared, because the API server sets them on the write. The controller applies the objects again after a while, which puts back the fields that the template sets if something else changed them. A project template can be read by users who have no access to its projects, the ones with theUseraccess level included, so do not put secret values intomanifests.The field cannot be set together with
resourcesTemplate.deckhouse.io/v1alpha1has no place for it, so a write of a template that has it throughdeckhouse.io/v1alpha1is refused. See Describing other objects in manifests. - objectspec.namespaceMetadata
Extra labels and annotations for the project namespaces.
- spec.namespaceMetadata.annotations
A literal annotation map or a parameter reference
{fromParam: "<name>"}.The annotations are set on the main namespace of the project only.
- spec.namespaceMetadata.labels
A literal label map or a parameter reference
{fromParam: "<name>"}.The labels are set on every namespace of the project, including the additional ones, and are listed in the
projects.deckhouse.io/template-labelsannotation of each.Labels that the module manages (
heritage,app.kubernetes.io/managed-by,projects.deckhouse.io/*,multitenancy.deckhouse.io/*, and the pod security, monitoring and scanning labels) and thekubernetes.io/metadata.namelabel cannot be set in this field. A template that sets one here is refused, and so is a Project whose parameters put one here. A template or Project that already has such a label can still be changed while it keeps the label as it is. The label is not applied, and the response warns about it.GitOps tracking labels (
app.kubernetes.io/instance,argocd.argoproj.io/*,kustomize.toolkit.fluxcd.io/*,helm.toolkit.fluxcd.io/*,kapp.k14s.io/*) are set on the main namespace only. A custom tracking key is inherited like any other label.When a namespace becomes a project automatically, its own labels are not copied into the Project and do not reach this field. A label declared in
spec.parameters.namespace.labelsof the Project reaches it through the built-in templates and is inherited.
- objectspec.networkPolicy
Network isolation of the project namespaces.
- spec.networkPolicy.mode
Network isolation mode of the project namespaces.
Isolated: Every namespace of the project gets theisolatedNetworkPolicy. It allows incoming traffic only from the project namespaces, Prometheus, the ingress-nginx controller and the service-with-healthchecks agent, and outgoing traffic only to the project namespaces and to DNS inkube-system.NotRestricted: No NetworkPolicy is created.
If the field is not set, no NetworkPolicy is created either.
A literal string (
Isolated/NotRestricted) or a parameter reference{fromParam: "<name>"}. The webhook refuses a literal outside the two values.
- spec.nodeSelector
Node selector of the pods in the main namespace of the project. A literal label map or a parameter reference
{fromParam: "<name>"}.It is set as the
scheduler.alpha.kubernetes.io/node-selectorannotation of the main namespace and is merged into the node selector of every pod there. A pod whose selector conflicts with it is rejected. The additional namespaces of the project do not get it. - objectspec.parametersSchema
OpenAPI v3 schema of the parameters of a project.
A boolean
requiredRequestsparameter declared here is read by name: when it istruefor a project, the pods in every namespace of the project must have CPU and memory requests (an OperationPolicy in theDenymode).- objectspec.parametersSchema.openAPIV3Schema
Required value
OpenAPI specification that the parameters of a project are validated against when the project is created or changed.
- spec.podSecurityStandard
Pod Security Standard profile applied to the project namespaces.
Privileged: Unrestricted policy.Baseline: Minimally restrictive policy that prevents known privilege escalations.Restricted: Heavily restricted policy that follows current pod hardening best practices.
A literal string (
Privileged/Baseline/Restricted) or a parameter reference{fromParam: "<name>"}pointing at aparametersSchemaproperty. The webhook refuses a literal outside the three values and a reference to an undeclared or mistyped parameter. - array of objectsspec.resources
Rules of access to cluster-wide resources for the projects of the template.
The controller turns them into the
template-<TEMPLATE_NAME>-inlineClusterResourceGrantPolicy, which applies to the namespaces of the projects of this template.Access settings for one type of cluster-wide resource.
- array of stringsspec.resources.allowed
List of names of cluster-wide resources available to the projects.
Combined with the resources selected with
allowedSelector. - objectspec.resources.allowedSelector
Label selector of cluster-wide resources available to the projects.
Combined with the resources listed in
allowed. Applies only to cluster-wide resources represented by Kubernetes objects.- array of objectsspec.resources.allowedSelector.matchExpressions
List of label selector expressions.
All expressions must match.
- stringspec.resources.allowedSelector.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.resources.allowedSelector.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.resources.allowedSelector.matchExpressions.values
List of label values.
- objectspec.resources.allowedSelector.matchLabels
Set of labels of cluster-wide resources.
All specified labels must match.
- stringspec.resources.availabilityDefault
Availability of the cluster-wide resources of this type that
allowed,allowedSelector,deniedanddeniedSelectordo not name.Overrides
defaultAvailabilityof the GrantableClusterResourceDefinition. IfallowedorallowedSelectoris set and this field is not, all other resources of this type are unavailable to the projects.Allowed values:
All,None - stringspec.resources.default
Name of the cluster-wide resource used by default in the projects.
Overrides the value determined with
defaultFromin the GrantableClusterResourceDefinition. - array of stringsspec.resources.denied
List of names of cluster-wide resources unavailable to the projects.
Deny rules take precedence over
allowedandallowedSelector. - objectspec.resources.deniedSelector
Label selector of cluster-wide resources unavailable to the projects.
Deny rules take precedence over
allowedandallowedSelector.- array of objectsspec.resources.deniedSelector.matchExpressions
List of label selector expressions.
All expressions must match.
- stringspec.resources.deniedSelector.matchExpressions.key
Required value
Label key to which the expression applies.
- stringspec.resources.deniedSelector.matchExpressions.operator
Required value
Operator that defines the relationship between the key and the set of values.
- array of stringsspec.resources.deniedSelector.matchExpressions.values
List of label values.
- objectspec.resources.deniedSelector.matchLabels
Set of labels of cluster-wide resources.
All specified labels must match.
- stringspec.resources.resourceName
Required value
Name of the GrantableClusterResourceDefinition that registers the type of cluster-wide resource.
- stringspec.resourcesTemplate
A template in the
go templateformat with thehelmfunctions that renders the objects of a project.The field is deprecated and is kept for the templates created through
deckhouse.io/v1alpha1. Describe new templates with the structured fields andmanifests. No template can get a newresourcesTemplatethrough either version: a create with a non-empty one and an update that sets one on a template that has none are refused, and a create throughdeckhouse.io/v1alpha1is refused as a whole. A template that has one keeps it, and it can be changed through either version whiledeckhouse.io/v1alpha1can describe the whole template. So a template with a Helm text cannot be created again, for example from a backup or from Git; move it to the structured fields andmanifestsfirst. The field leavesdeckhouse.io/v1alpha2together withdeckhouse.io/v1alpha1in a future release. See Moving a template from a Helm text.When the field is not empty, the template is rendered from it. It cannot be set together with the fields that render objects into the project namespaces (
podSecurityStandard,networkPolicy,namespaceMetadata,manifestsand the others), whileresourcesandgrantPoliciesapply in either case. A template that projects use keeps a non-emptyresourcesTemplateuntil a change sets such fields ormanifestsin its place.After such a change, as after a move of a project to a structured template, the AuthorizationRule and ResourceQuota objects of the Helm text that
.spec.administratorsand.spec.quotaof the project replace are deleted once these fields work, and an AuthorizationRule that names nobody from.spec.administratorsany more is deleted at once. Every other object of the Helm text that the new fields do not render under the same kind and name is left in place and listed in.status.keptObjectsof the project, untilmanifestsrenders an object of the same kind, namespace and name and takes it over..status.keptObjectsalso lists an object of the release of the structured fields thatmanifestsrender when the release drops it, untilmanifeststake it over. See Switching a project from a Helm text and Moving an object of the release to manifests.The template gets the project name in
{{ .projectName }}, the template name in{{ .projectTemplateName }}and the project parameters completed with the defaults ofparametersSchemain{{ .parameters }}. WhenparametersSchemadeclares theadministratorsandresourceQuotaparameters, they hold the administrators and the quota of the project, laid out as in adeckhouse.io/v1alpha2Project. A project whose parameters turn into objects or keys of the rendered manifests instead of values is refused, so quote every substitution.An object without
metadata.namespaceor in a namespace outside the project is created in the main namespace of the project. The labels the template puts on the main namespace, except the ones the module manages and the GitOps tracking labels, are listed in itsprojects.deckhouse.io/template-labelsannotation and are set on the additional namespaces too. - objectspec.runtimeAudit
Runtime audit rules; effective only when allowedUIDs/allowedGIDs are set.
- spec.runtimeAudit.enabled
A literal boolean or a parameter reference
{fromParam: "<name>"}.
- stringspec.title
Short human-readable name of the template.
- spec.tolerations
Default tolerations of the pods in the main namespace of the project. A literal list of tolerations or a parameter reference
{fromParam: "<name>"}.They are set as the
scheduler.alpha.kubernetes.io/defaultTolerationsannotation of the main namespace. The additional namespaces of the project do not get them.
- objectstatus
- stringstatus.message
Message indicating the cause of the current status.
- booleanstatus.ready
Whether the template is ready to use. Indicates that the template has been successfully validated.
Deprecated resource. Support for the resource might be removed in a later release.
Describes the project template.
This resource is referenced by the Project custom resource.
The version is deprecated. A template is created through deckhouse.io/v1alpha2, and a create through deckhouse.io/v1alpha1 is refused. The templates created through deckhouse.io/v1alpha1 earlier are read, changed and deleted through it as before.
- objectspec
- stringspec.description
Arbitrary description of the template’s purpose. Specify an empty string if no description is required.
- objectspec.parametersSchema
Required value
Schema of the project parameters.
Only
openAPIV3Schemais supported.- objectspec.parametersSchema.openAPIV3Schema
Required value
OpenAPI specification for parameters.
This is used to check the validity of the parameters that are passed when creating a new project.
- stringspec.resourcesTemplate
Required value
A template that defines resources in the
go templateformat to be created when setting up a new project.Templates are fully compatible with all
helmfunctions.See Moving a template from a Helm text.
The following parameters are available in templates:
{{ .projectName }}— the name of theProjectfor which the template is being rendered.{{ .projectTemplateName }}— the name of theProjectTemplate.{{ .parameters }}— a dictionary of custom values, described in the .spec.parametersSchema and defined in the .spec.parameters.
.metadata.namespaceof an object is optional: an object without it is created in the main namespace of the project.
- objectstatus
- stringstatus.message
Message indicating the cause of the current status.
- booleanstatus.ready
Whether the template is ready to use. Indicates that the template has been successfully validated.