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.

  • spec
    object

    Required value

    • spec.roleRef
      object

      Required value

      Reference to the granted ClusterRole. Allowed prefixes: d8:project:*, d8:namespace:*, d8:project-capability:*, d8:namespace-capability:*, d8:custom:*.

      • spec.roleRef.kind
        string

        Required value

        Kind of the granted role.

        Allowed values: ClusterRole

      • spec.roleRef.name
        string

        Required value

        Name of the granted ClusterRole.

    • spec.subjects
      array of objects

      Required value

      Subjects (users, groups or service accounts) the role is granted to.

      • spec.subjects.apiGroup
        string

        API group of the subject: rbac.authorization.k8s.io for User and Group, empty for ServiceAccount.

      • spec.subjects.kind
        string

        Required value

        Kind of the subject.

        Allowed values: User, Group, ServiceAccount

      • spec.subjects.name
        string

        Required value

        Name of the subject: the user name (User.spec.email) for User, Group.spec.name for Group, the ServiceAccount name for ServiceAccount.

      • spec.subjects.namespace
        string

        Namespace of the ServiceAccount.

        If omitted, the binding names the ServiceAccount with this name in each namespace of every project.

  • status
    object
    • status.boundProjects
      integer

      Number of projects the binding is currently applied to.

    • status.conditions
      array of objects

      Current state of the object.

      • status.conditions.lastProbeTime
        string

        Time of the last check of the condition.

      • status.conditions.lastTransitionTime
        string

        Time when the condition last changed.

      • status.conditions.message
        string

        Message with details of the condition state.

      • status.conditions.status
        string

        Condition state: True, False or Unknown.

      • status.conditions.type
        string

        Condition type.

    • status.observedGeneration
      integer

      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.

  • status
    object

    Cluster-wide resource availability status for the project.

    • status.available
      array of objects

      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.

      • status.available.default
        boolean

        Indicates that the cluster-wide resource is used by default in the project.

      • status.available.fields
        object

        Values of the cluster-wide resource fields listed in spec.catalogFields of 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.available with the fields of all resources would take more than 512 KiB in JSON serialization, fields is absent in every entry; the names and the default are still listed.

      • status.available.name
        string

        Required value

        Name of the cluster-wide resource available to the project.

    • status.availableCount
      integer

      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.

    • status.default
      string

      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.

    • status.grantedResourceKind
      string

      Kind of the cluster-wide resource.

    • status.observedGeneration
      integer

      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.

  • spec
    object

    Required value

    ClusterResourceGrantPolicy parameters.

    • spec.namespaceSelector
      object

      Label selector for project namespaces to which the policy applies.

      The selector is matched against the labels of the namespace. When spec.projectSelector is 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 projects deckhouse and default are never covered.

      The value of the projects.deckhouse.io/project-namespace label is the name that a project user gives to a ProjectNamespace. Without spec.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.

      • spec.namespaceSelector.matchExpressions
        array of objects

        List of label selector expressions.

        All expressions must match.

        Label selector expression.

        • spec.namespaceSelector.matchExpressions.key
          string

          Required value

          Label key to which the expression applies.

        • spec.namespaceSelector.matchExpressions.operator
          string

          Required value

          Operator that defines the relationship between the key and the set of values.

        • spec.namespaceSelector.matchExpressions.values
          array of strings

          List of label values.

          For the In and NotIn operators, the list must contain at least one value. For the Exists and DoesNotExist operators, the list must be empty.

      • spec.namespaceSelector.matchLabels
        object

        Set of namespace labels to which the policy applies.

        All specified labels must match.

    • spec.projectSelector
      object

      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.namespaceSelector narrows the choice. If the selector is not specified, projects are not chosen by their labels. An empty selector matches all projects, except the virtual projects deckhouse and default, whose namespaces are never covered.

      If neither spec.projectSelector nor spec.namespaceSelector is specified, the policy does not apply to any projects on its own. Such a policy is a library policy that a ProjectTemplate applies through spec.grantPolicies.

      • spec.projectSelector.matchExpressions
        array of objects

        List of label selector expressions.

        All expressions must match.

        Label selector expression.

        • spec.projectSelector.matchExpressions.key
          string

          Required value

          Label key to which the expression applies.

        • spec.projectSelector.matchExpressions.operator
          string

          Required value

          Operator that defines the relationship between the key and the set of values.

        • spec.projectSelector.matchExpressions.values
          array of strings

          List of label values.

          For the In and NotIn operators, the list must contain at least one value. For the Exists and DoesNotExist operators, the list must be empty.

      • spec.projectSelector.matchLabels
        object

        Set of labels for projects to which the policy applies.

        All specified labels must match.

    • spec.resources
      array of objects

      Required value

      Access settings for cluster-wide resources for the selected projects.

      Access settings for one type of cluster-wide resource.

      • spec.resources.allowed
        array of strings

        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 set availabilityDefault: None to make nothing available.

      • spec.resources.allowedSelector
        object

        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 set availabilityDefault to open or lock the resource without a list.

        • spec.resources.allowedSelector.matchExpressions
          array of objects

          List of label selector expressions.

          All expressions must match.

          Label selector expression.

          • spec.resources.allowedSelector.matchExpressions.key
            string

            Required value

            Label key to which the expression applies.

          • spec.resources.allowedSelector.matchExpressions.operator
            string

            Required value

            Operator that defines the relationship between the key and the set of values.

          • spec.resources.allowedSelector.matchExpressions.values
            array of strings

            List of label values.

            For the In and NotIn operators, the list must contain at least one value. For the Exists and DoesNotExist operators, the list must be empty.

        • spec.resources.allowedSelector.matchLabels
          object

          Set of labels for cluster-wide resources.

          All specified labels must match.

      • spec.resources.availabilityDefault
        string

        Determines the availability of cluster-wide resources that are not explicitly specified using allowed, allowedSelector, denied, or deniedSelector.

        Overrides defaultAvailability of the corresponding GrantableClusterResourceDefinition for the projects selected by the policy.

        All makes all such cluster-wide resources available, while None makes them unavailable.

        Usually, you do not need to specify this parameter. If allowed or allowedSelector is set and availabilityDefault is 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: All to make all resources of the type available, or None to make them unavailable.

        Allowed values: All, None

      • spec.resources.default
        string

        Name of the cluster-wide resource used by default in the selected projects.

        Overrides the value determined using defaultFrom in the corresponding GrantableClusterResourceDefinition.

      • spec.resources.denied
        array of strings

        List of names of cluster-wide resources unavailable to the projects.

        Deny rules take precedence over allowed and allowedSelector.

      • spec.resources.deniedSelector
        object

        Label selector for cluster-wide resources unavailable to the projects.

        Deny rules take precedence over allowed and allowedSelector. Applies only to cluster-wide resources represented by Kubernetes objects. An empty selector is not accepted.

        • spec.resources.deniedSelector.matchExpressions
          array of objects

          List of label selector expressions.

          All expressions must match.

          Label selector expression.

          • spec.resources.deniedSelector.matchExpressions.key
            string

            Required value

            Label key to which the expression applies.

          • spec.resources.deniedSelector.matchExpressions.operator
            string

            Required value

            Operator that defines the relationship between the key and the set of values.

          • spec.resources.deniedSelector.matchExpressions.values
            array of strings

            List of label values.

            For the In and NotIn operators, the list must contain at least one value. For the Exists and DoesNotExist operators, the list must be empty.

        • spec.resources.deniedSelector.matchLabels
          object

          Set of labels for cluster-wide resources.

          All specified labels must match.

      • spec.resources.resourceName
        string

        Required value

        Name of the GrantableClusterResourceDefinition for which the access settings are configured.

  • status
    object

    ClusterResourceGrantPolicy status.

    • status.conditions
      array of objects

      Current state of the ClusterResourceGrantPolicy.

      Information about one aspect of the current resource state.

      • status.conditions.lastTransitionTime
        string

        Required value

        Time when the condition last changed.

      • status.conditions.message
        string

        Required value

        Message with additional information about the condition state.

        Maximum length: 32768

      • status.conditions.observedGeneration
        integer

        Resource generation on which the condition state is based.

        Allowed values: 0 <= X

      • status.conditions.reason
        string

        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

      • status.conditions.status
        string

        Required value

        Condition state.

        Allowed values: True, False, Unknown

      • status.conditions.type
        string

        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

    • status.observedGeneration
      integer

      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.

  • spec
    object

    Required value

    ClusterResourceGrantPolicy parameters.

    • spec.projectSelector
      object

      Label selector for project namespaces to which the policy applies.

      The selector is matched against the labels of the namespace, the same as spec.namespaceSelector of multitenancy.deckhouse.io/v1alpha2, which is the version to use.

      If the selector is not specified and the multitenancy.deckhouse.io/v1alpha2-project-selector annotation is absent, the policy does not apply to any projects. An empty selector matches all project namespaces, except the namespaces of the virtual projects deckhouse and default.

      The annotation holds spec.projectSelector of v1alpha2, which is matched against the labels of the Project. Keep the annotation when you update the policy through this version.

      • spec.projectSelector.matchExpressions
        array of objects

        List of label selector expressions.

        All expressions must match.

        Label selector expression.

        • spec.projectSelector.matchExpressions.key
          string

          Required value

          Label key to which the expression applies.

        • spec.projectSelector.matchExpressions.operator
          string

          Required value

          Operator that defines the relationship between the key and the set of values.

        • spec.projectSelector.matchExpressions.values
          array of strings

          List of label values.

          For the In and NotIn operators, the list must contain at least one value. For the Exists and DoesNotExist operators, the list must be empty.

      • spec.projectSelector.matchLabels
        object

        Set of namespace labels to which the policy applies.

        All specified labels must match.

    • spec.resources
      array of objects

      Required value

      Access settings for cluster-wide resources for the selected projects.

      Access settings for one type of cluster-wide resource.

      • spec.resources.allowed
        array of strings

        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 set availabilityDefault: None to make nothing available.

      • spec.resources.allowedSelector
        object

        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 set availabilityDefault to open or lock the resource without a list.

        • spec.resources.allowedSelector.matchExpressions
          array of objects

          List of label selector expressions.

          All expressions must match.

          Label selector expression.

          • spec.resources.allowedSelector.matchExpressions.key
            string

            Required value

            Label key to which the expression applies.

          • spec.resources.allowedSelector.matchExpressions.operator
            string

            Required value

            Operator that defines the relationship between the key and the set of values.

          • spec.resources.allowedSelector.matchExpressions.values
            array of strings

            List of label values.

            For the In and NotIn operators, the list must contain at least one value. For the Exists and DoesNotExist operators, the list must be empty.

        • spec.resources.allowedSelector.matchLabels
          object

          Set of labels for cluster-wide resources.

          All specified labels must match.

      • spec.resources.availabilityDefault
        string

        Determines the availability of cluster-wide resources that are not explicitly specified using allowed, allowedSelector, denied, or deniedSelector.

        Overrides defaultAvailability of the corresponding GrantableClusterResourceDefinition for the projects selected by the policy.

        All makes all such cluster-wide resources available, while None makes them unavailable.

        Usually, you do not need to specify this parameter. If allowed or allowedSelector is set and availabilityDefault is 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: All to make all resources of the type available, or None to make them unavailable.

        Allowed values: All, None

      • spec.resources.default
        string

        Name of the cluster-wide resource used by default in the selected projects.

        Overrides the value determined using defaultFrom in the corresponding GrantableClusterResourceDefinition.

      • spec.resources.denied
        array of strings

        List of names of cluster-wide resources unavailable to the projects.

        Deny rules take precedence over allowed and allowedSelector.

      • spec.resources.deniedSelector
        object

        Label selector for cluster-wide resources unavailable to the projects.

        Deny rules take precedence over allowed and allowedSelector. Applies only to cluster-wide resources represented by Kubernetes objects. An empty selector is not accepted.

        • spec.resources.deniedSelector.matchExpressions
          array of objects

          List of label selector expressions.

          All expressions must match.

          Label selector expression.

          • spec.resources.deniedSelector.matchExpressions.key
            string

            Required value

            Label key to which the expression applies.

          • spec.resources.deniedSelector.matchExpressions.operator
            string

            Required value

            Operator that defines the relationship between the key and the set of values.

          • spec.resources.deniedSelector.matchExpressions.values
            array of strings

            List of label values.

            For the In and NotIn operators, the list must contain at least one value. For the Exists and DoesNotExist operators, the list must be empty.

        • spec.resources.deniedSelector.matchLabels
          object

          Set of labels for cluster-wide resources.

          All specified labels must match.

      • spec.resources.resourceName
        string

        Required value

        Name of the GrantableClusterResourceDefinition for which the access settings are configured.

  • status
    object

    ClusterResourceGrantPolicy status.

    • status.conditions
      array of objects

      Current state of the ClusterResourceGrantPolicy.

      Information about one aspect of the current resource state.

      • status.conditions.lastTransitionTime
        string

        Required value

        Time when the condition last changed.

      • status.conditions.message
        string

        Required value

        Message with additional information about the condition state.

        Maximum length: 32768

      • status.conditions.observedGeneration
        integer

        Resource generation on which the condition state is based.

        Allowed values: 0 <= X

      • status.conditions.reason
        string

        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

      • status.conditions.status
        string

        Required value

        Condition state.

        Allowed values: True, False, Unknown

      • status.conditions.type
        string

        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

    • status.observedGeneration
      integer

      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”.

  • spec
    object

    Required value

    GrantableClusterResourceDefinition parameters.

    • spec.catalogFields
      array of objects

      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[].fields of 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.available of 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 CatalogFieldsValid condition. Values left out for their size are reported by CatalogFieldsSkipped warning 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.

      • spec.catalogFields.name
        string

        Required value

        Name of the field in status.available[].fields of AvailableClusterResource, in lowerCamelCase (for example, reclaimPolicy).

        Pattern: ^[a-z][a-zA-Z0-9]*$

        Maximum length: 63

      • spec.catalogFields.path
        string

        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.managedFields or the kubectl.kubernetes.io/last-applied-configuration annotation, or a parent that contains them (for example, $.metadata), are not allowed: these fields hold a copy of the whole resource.

        Length: 1..256

    • spec.defaultAvailability
      string

      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: All

      Allowed values: All, None

    • spec.defaultFrom
      object

      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; false marks a resource that is not the default, as the Kubernetes convention for storageclass.kubernetes.io/is-default-class does) and is used as the default value if one is not specified using ClusterResourceGrantPolicy. When more than one resource carries true, there is no default.

      • spec.defaultFrom.annotationKey
        string

        Key of the annotation that marks the cluster-wide resource used by default; only the value true counts.

    • spec.enforcement
      string

      Method for checking cluster-wide resource availability.

      Allowed values:

      • Managed: The check is performed by multitenancy-manager webhooks.
      • External: The check is performed by an external mechanism, such as a module webhook.

      Default: Managed

      Allowed values: Managed, External

    • spec.excluded
      array of objects

      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.

      • spec.excluded.matchExpressions
        array of objects

        List of label selector expressions for cluster-wide resources.

        All expressions must match.

        Label selector expression.

        • spec.excluded.matchExpressions.key
          string

          Required value

          Label key to which the expression applies.

        • spec.excluded.matchExpressions.operator
          string

          Required value

          Operator that defines the relationship between the key and the set of values.

        • spec.excluded.matchExpressions.values
          array of strings

          List of label values.

          For the In and NotIn operators, the list must contain at least one value. For the Exists and DoesNotExist operators, the list must be empty.

      • spec.excluded.matchLabels
        object

        Set of labels for cluster-wide resources.

        All specified labels must match.

      • spec.excluded.names
        array of strings

        List of cluster-wide resource names.

    • spec.grantedResource
      object

      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 GrantedResourceValid condition 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.

      • spec.grantedResource.apiGroup
        string

        API group of the cluster-wide resource.

        For the core API group, specify an empty string ("").

      • spec.grantedResource.kind
        string

        Kind of the cluster-wide resource (for example, StorageClass).

    • spec.reserved
      array of objects

      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 allowed or matches it with allowedSelector. availabilityDefault: All in a policy and defaultAvailability do not make it available. The excluded filters and the denied and deniedSelector values of a policy take precedence over allowed and allowedSelector.

      A resource is considered reserved if it matches at least one of the specified filters.

      Filter for cluster-wide resources by name and labels.

      • spec.reserved.matchExpressions
        array of objects

        List of label selector expressions for cluster-wide resources.

        All expressions must match.

        Label selector expression.

        • spec.reserved.matchExpressions.key
          string

          Required value

          Label key to which the expression applies.

        • spec.reserved.matchExpressions.operator
          string

          Required value

          Operator that defines the relationship between the key and the set of values.

        • spec.reserved.matchExpressions.values
          array of strings

          List of label values.

          For the In and NotIn operators, the list must contain at least one value. For the Exists and DoesNotExist operators, the list must be empty.

      • spec.reserved.matchLabels
        object

        Set of labels for cluster-wide resources.

        All specified labels must match.

      • spec.reserved.names
        array of strings

        List of cluster-wide resource names.

  • status
    object

    GrantableClusterResourceDefinition status.

    • status.conditions
      array of objects

      Current state of the GrantableClusterResourceDefinition.

      • GrantedResourceValid: whether spec.grantedResource can be processed. True with the reason ClusterScoped for a cluster-scoped resource or ValueBacked for a definition without grantedResource. False with the reason Namespaced for 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. Unknown with the reason KindNotServed while the resource is not served (for example, its CRD is not installed yet), or MappingFailed if its scope could not be determined.
      • CatalogFieldsValid: whether spec.catalogFields pass the checks applied when the object is created or updated: the paths are valid singular queries that do not read metadata.managedFields or the kubectl.kubernetes.io/last-applied-configuration annotation, and the definition has grantedResource (reasons Valid, InvalidCatalogFields; the message lists all problems). A definition without catalogFields has the condition True. False means the object was stored bypassing these checks; the invalid entries are not shown in AvailableClusterResource.

      Information about one aspect of the current resource state.

      • status.conditions.lastTransitionTime
        string

        Required value

        Time when the condition last changed.

      • status.conditions.message
        string

        Required value

        Message with additional information about the condition state.

        Maximum length: 32768

      • status.conditions.observedGeneration
        integer

        Resource generation on which the condition state is based.

        Allowed values: 0 <= X

      • status.conditions.reason
        string

        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

      • status.conditions.status
        string

        Required value

        Condition state.

        Allowed values: True, False, Unknown

      • status.conditions.type
        string

        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

    • status.observedGeneration
      integer

      Latest resource generation processed by the controller.

    • status.referenceCount
      integer

      Number of GrantableClusterResourceReference resources associated with this definition.

    • status.references
      array of objects

      List of GrantableClusterResourceReference resources associated with this definition.

      Information about a GrantableClusterResourceReference associated with this definition.

      • status.references.name
        string

        Required value

        Name of the GrantableClusterResourceReference.

      • status.references.resources
        array of strings

        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”.

  • spec
    object

    Required value

    GrantableClusterResourceReference parameters.

    • spec.fieldPaths
      array of objects

      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, apiGroups and apiVersions of an item must be a subset of the corresponding lists in spec.rule (* in spec.rule accepts any value). Every combination of API group, version and resource that spec.rule matches 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 without resources, apiGroups and apiVersions as 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: resources takes precedence over apiGroups, and apiGroups takes precedence over apiVersions. * in resources, apiGroups, or apiVersions does not restrict the item and does not make it more specific. Items whose match condition does not hold for the object are skipped. Of equally restricted items, an item with match takes precedence over an item without it. If several items are equally specific, the first one in the list applies. An item without restrictions and without match is used in all other cases.

      Several items with the same path can therefore handle different objects of one resource. For example, an item with match on $.spec['dataSource','dataSourceRef'].kind and defaulting: None handles the PersistentVolumeClaims that restore or clone a volume, and an item without match and with defaulting: Coerce handles all other PersistentVolumeClaims.

      • spec.fieldPaths.apiGroups
        array of strings

        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.

      • spec.fieldPaths.apiVersions
        array of strings

        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.

      • spec.fieldPaths.defaulting
        string

        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.

        FillEmpty and Coerce require path to point to a single field, so only a simple member path is accepted, for example $.spec.storageClassName or $.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 with None.

        Default: None

        Allowed values: None, FillEmpty, Coerce

      • spec.fieldPaths.match
        object

        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 equals and in, the condition matches when fieldPath points to a string value.

        • spec.fieldPaths.match.equals
          string

          Value that the field specified in fieldPath must match.

        • spec.fieldPaths.match.fieldPath
          string

          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

        • spec.fieldPaths.match.in
          array of strings

          List of allowed values for the field specified in fieldPath.

      • spec.fieldPaths.message
        string

        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

      • spec.fieldPaths.path
        string

        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 defaulting is 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: FillEmpty or defaulting: Coerce, only a simple member path is accepted.

        Maximum length: 256

      • spec.fieldPaths.resources
        array of strings

        Kubernetes resource names in plural, for example, pods or cronjobs, 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.

        • Element of the array
          string
    • spec.grantableClusterResourceName
      string

      Required value

      Name of the GrantableClusterResourceDefinition that registers the cluster-wide resource referenced by the fields.

    • spec.rule
      object

      Required value

      Rule for selecting Kubernetes resources to which GrantableClusterResourceReference applies.

      • spec.rule.apiGroups
        array of strings

        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.

      • spec.rule.apiVersions
        array of strings

        Required value

        API versions of Kubernetes resources.

        Use * to select all API versions.

      • spec.rule.resources
        array of strings

        Required value

        Kubernetes resource names in plural form (for example, ingresses).

  • status
    object

    GrantableClusterResourceReference status.

    • status.bound
      boolean

      Indicates that the GrantableClusterResourceDefinition specified in spec.grantableClusterResourceName exists.

    • status.conditions
      array of objects

      Current state of GrantableClusterResourceReference.

      • Bound: whether the GrantableClusterResourceDefinition specified in spec.grantableClusterResourceName exists (reasons Resolved, UnknownResource).
      • FieldPathsValid: whether spec.fieldPaths pass the checks applied when the object is created or updated: the paths are valid, defaulting paths are simple member paths, item scopes are within spec.rule, and every combination spec.rule matches is covered (reasons Valid, InvalidFieldPaths; the message lists all problems). False means the object was stored bypassing these checks; the invalid paths are skipped during availability checks.

      Information about one aspect of the current resource state.

      • status.conditions.lastTransitionTime
        string

        Required value

        Time when the condition last changed.

      • status.conditions.message
        string

        Required value

        Message with additional information about the condition state.

        Maximum length: 32768

      • status.conditions.observedGeneration
        integer

        Resource generation on which the condition state is based.

        Allowed values: 0 <= X

      • status.conditions.reason
        string

        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

      • status.conditions.status
        string

        Required value

        Condition state.

        Allowed values: True, False, Unknown

      • status.conditions.type
        string

        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

    • status.observedGeneration
      integer

      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.

  • spec
    object

    Required value

    • spec.name
      string

      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

  • status
    object
    • status.conditions
      array of objects

      Current state of the object.

      • status.conditions.lastProbeTime
        string

        Time of the last check of the condition.

      • status.conditions.lastTransitionTime
        string

        Time when the condition last changed.

      • status.conditions.message
        string

        Message with details of the condition state.

      • status.conditions.status
        string

        Condition state: True, False or Unknown.

      • status.conditions.type
        string

        Condition type.

    • status.namespace
      string

      The namespace the controller created for this ProjectNamespace.

    • status.observedGeneration
      integer

      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.

  • spec
    object

    Required value

    • spec.hard
      object

      Limits of the project, copied by the controller from Project.spec.quota, in the format of ResourceQuota.spec.hard, for example requests.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 and count/<RESOURCE>[.<GROUP>] for a namespaced resource the API server serves. projectNamespaces is an alias of count/projectnamespaces.deckhouse.io, the number of ProjectNamespace objects of the project.

      Where the virtualization module is enabled, the virtual machines of the project are limited by their specification with virtualmachines.virtualization.deckhouse.io/cores, virtualmachines.virtualization.deckhouse.io/cpu, virtualmachines.virtualization.deckhouse.io/memory, virtualmachines.virtualization.deckhouse.io/gpus and <GPU_CLASS>.gpuclass.virtualization.deckhouse.io/gpus; no ResourceQuota counts these keys, so they do not go into d8-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/addresses and loadbalancers.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. A count/ 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.

  • status
    object
    • status.conditions
      array of objects

      State of the quota:

      • If Enforced is True, the quota applies in every namespace of the project. If Enforced is False, reason says why: ControlPlaneNotManaged (Deckhouse Platform does not manage the control plane, so the sum is not enforced), Suspended (the quota-ledger-suspend ConfigMap suspends the check of the sum), WebhookMissing (the webhook of the quota ledger is missing or its caBundle is not the CA of the ledger certificate), WebhookMisconfigured (that webhook is changed so that writes of d8-project-quota do 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 a count/ key yet, or the module that serves the resources of a key is disabled) or KeyRollout (the d8-project-quota ResourceQuota of some namespace is not there or not calculated with every limit yet).
      • If Exceeded is True, the usage of the project is above the quota on some key. The reason says how the usage got above the quota: HardLowered (the limit was set below the usage, by a change or when the quota was created) or Overshoot (the usage grew past the limit).
      • status.conditions.lastTransitionTime
        string

        Time when the condition last changed.

      • status.conditions.message
        string

        Message with details of the condition state.

      • status.conditions.observedGeneration
        integer

        Generation of the object the condition was set for.

      • status.conditions.reason
        string

        Reason of the condition state.

      • status.conditions.status
        string

        Required value

        Condition state: True, False or Unknown.

      • status.conditions.type
        string

        Required value

        Condition type.

    • status.hard
      object

      Limits the controller applies, spec.hard with the alias expanded.

    • status.namespaceCount
      integer

      Number of namespaces of the project.

    • status.observedGeneration
      integer

      Last generation of the object the controller processed.

    • status.topNamespaces
      array of objects

      Namespaces closest to a limit, at most 50 of them. The usage of every namespace is in its d8-project-quota ResourceQuota.

      • status.topNamespaces.name
        string

        Required value

        Name of the namespace.

      • status.topNamespaces.used
        object

        Usage of the namespace.

    • status.used
      object

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

  • spec
    object

    Required value

    • spec.roleRef
      object

      Required value

      Reference to the granted ClusterRole. Allowed prefixes: d8:project:*, d8:namespace:*, d8:project-capability:*, d8:namespace-capability:*, d8:custom:*.

      • spec.roleRef.kind
        string

        Required value

        Kind of the granted role.

        Allowed values: ClusterRole

      • spec.roleRef.name
        string

        Required value

        Name of the granted ClusterRole.

    • spec.subjects
      array of objects

      Required value

      Subjects (users, groups or service accounts) the role is granted to.

      • spec.subjects.apiGroup
        string

        API group of the subject: rbac.authorization.k8s.io for User and Group, empty for ServiceAccount.

      • spec.subjects.kind
        string

        Required value

        Kind of the subject.

        Allowed values: User, Group, ServiceAccount

      • spec.subjects.name
        string

        Required value

        Name of the subject: the user name (User.spec.email) for User, Group.spec.name for Group, the ServiceAccount name for ServiceAccount.

      • spec.subjects.namespace
        string

        Namespace of the ServiceAccount.

        If omitted, the binding names the ServiceAccount with this name in each namespace of the project.

  • status
    object
    • status.conditions
      array of objects

      Current state of the object.

      • status.conditions.lastProbeTime
        string

        Time of the last check of the condition.

      • status.conditions.lastTransitionTime
        string

        Time when the condition last changed.

      • status.conditions.message
        string

        Message with details of the condition state.

      • status.conditions.status
        string

        Condition state: True, False or Unknown.

      • status.conditions.type
        string

        Condition type.

    • status.observedGeneration
      integer

      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.

  • spec
    object
    • spec.administrators
      array of objects

      Users and groups that get administrative access to the project.

      The controller grants them the d8:project:admin role through the d8-administrators ProjectRoleBinding. For User, the name is the user name (User.spec.email); for Group, it is Group.spec.name.

      Cannot be set together with parameters.administrators.

      • spec.administrators.kind
        string

        Required value

        Kind of the subject.

        Allowed values: User, Group

      • spec.administrators.name
        string

        Required value

        Subject name. For User, the user name (User.spec.email). For Group, Group.spec.name (the name in the token), not metadata.name. The name cannot contain control characters or line breaks and cannot start with system: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]+$

    • spec.description
      string

      Arbitrary description of the project’s purpose. Specify an empty string if no description is required.

    • spec.grants
      object

      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/v1alpha2 cannot describe the field, so a write of a project with grants through that version, a write of its status included, is refused.

      • spec.grants.grantPolicies
        array of strings

        References to library ClusterResourceGrantPolicy objects (created without projectSelector and namespaceSelector).

        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.

      • spec.grants.resources
        array of objects

        Rules of access to cluster-wide resources for the namespaces of the project, in the format of resources of a ProjectTemplate.

        The controller turns them into the project-<PROJECT_NAME>-inline ClusterResourceGrantPolicy, which applies to every namespace of the project.

        Access settings for one type of cluster-wide resource.

        • spec.grants.resources.allowed
          array of strings

          List of names of cluster-wide resources available to the project.

          Combined with the resources selected with allowedSelector.

        • spec.grants.resources.allowedSelector
          object

          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.

          • spec.grants.resources.allowedSelector.matchExpressions
            array of objects

            List of label selector expressions.

            All expressions must match.

            • spec.grants.resources.allowedSelector.matchExpressions.key
              string

              Required value

              Label key to which the expression applies.

            • spec.grants.resources.allowedSelector.matchExpressions.operator
              string

              Required value

              Operator that defines the relationship between the key and the set of values.

            • spec.grants.resources.allowedSelector.matchExpressions.values
              array of strings

              List of label values.

          • spec.grants.resources.allowedSelector.matchLabels
            object

            Set of labels of cluster-wide resources.

            All specified labels must match.

        • spec.grants.resources.availabilityDefault
          string

          Availability of the cluster-wide resources of this type that allowed, allowedSelector, denied and deniedSelector do not name.

          Overrides defaultAvailability of the GrantableClusterResourceDefinition. If allowed or allowedSelector is set and this field is not, all other resources of this type are unavailable to the project.

          Allowed values: All, None

        • spec.grants.resources.default
          string

          Name of the cluster-wide resource used by default in the project.

          Overrides the value determined with defaultFrom in the GrantableClusterResourceDefinition.

        • spec.grants.resources.denied
          array of strings

          List of names of cluster-wide resources unavailable to the project.

          Deny rules take precedence over allowed and allowedSelector.

        • spec.grants.resources.deniedSelector
          object

          Label selector of cluster-wide resources unavailable to the project.

          Deny rules take precedence over allowed and allowedSelector.

          • spec.grants.resources.deniedSelector.matchExpressions
            array of objects

            List of label selector expressions.

            All expressions must match.

            • spec.grants.resources.deniedSelector.matchExpressions.key
              string

              Required value

              Label key to which the expression applies.

            • spec.grants.resources.deniedSelector.matchExpressions.operator
              string

              Required value

              Operator that defines the relationship between the key and the set of values.

            • spec.grants.resources.deniedSelector.matchExpressions.values
              array of strings

              List of label values.

          • spec.grants.resources.deniedSelector.matchLabels
            object

            Set of labels of cluster-wide resources.

            All specified labels must match.

        • spec.grants.resources.resourceName
          string

          Required value

          Name of the GrantableClusterResourceDefinition that registers the type of cluster-wide resource.

    • spec.parameters
      object

      Values of the parameters that the template declares in parametersSchema.

      The structured fields of the template take them through {fromParam: <NAME>}. manifests and resourcesTemplate get them in {{ .parameters }}, completed with the defaults of parametersSchema. The values are validated against parametersSchema.openAPIV3Schema of the template when the project is created or changed.

    • spec.projectTemplateName
      string

      Name of the ProjectTemplate the project is created from.

      The simple template creates only the project namespace.

      Default: simple

    • spec.quota
      object

      Resource quota of the whole project.

      The controller puts the d8-project-quota ResourceQuota 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 update verb on projects/quota in the deckhouse.io group for the project, which the manage_quotas capability of the multitenancy-manager module grants.

      Keys and values follow the ResourceQuota.spec.hard format, for example requests.cpu: "100". Memory and storage quantities must include an explicit unit suffix (for example requests.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 through deckhouse.io/v1alpha2, where such a value comes from parameters.resourceQuota.

      Cannot be set together with parameters.resourceQuota.

  • status
    object
    • status.conditions
      array of objects

      Current state of the project.

      The condition types are described in Project status and diagnostics.

      • status.conditions.lastProbeTime
        string

        Time of the last check of the condition.

      • status.conditions.lastTransitionTime
        string

        Time when the condition last changed.

      • status.conditions.message
        string

        Message with details of the condition state.

      • status.conditions.status
        string

        Condition state: True, False or Unknown.

      • status.conditions.type
        string

        Condition type.

    • status.handingOver
      array of objects

      Objects of manifests that 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 manifestObjects does 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 to manifests. It gets the projects.deckhouse.io/project and projects.deckhouse.io/source: manifests labels back and loses the heritage, app.kubernetes.io/managed-by and projects.deckhouse.io/project-template labels, and manifestObjects lists it again.

      No object is handed over while the upgrade would also take an object that is not an object of manifests and exists without the app.kubernetes.io/managed-by: Helm label and the meta.helm.sh/release-name annotation of the release. The upgrade does not run then, and the ResourcesUpgraded condition names that object.

      • status.handingOver.apiVersion
        string

        API version of the object.

      • status.handingOver.kind
        string

        Kind of the object.

      • status.handingOver.name
        string

        Name of the object.

      • status.handingOver.namespace
        string

        Namespace of the object.

      • status.handingOver.revision
        integer

        Release revision the upgrade is expected to deploy.

    • status.keptObjects
      array of objects

      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 resourcesTemplate after the project switched to structured fields, a quota kept for a handover after .spec.quota stopped covering it, and the objects of the release of the structured fields that manifests render. The release no longer manages them. They carry the projects.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 manifests take it over. When the project is deleted, the cluster-scoped ones that still carry the label are deleted with it.

      • status.keptObjects.apiVersion
        string

        API version of the object.

      • status.keptObjects.kind
        string

        Kind of the object.

      • status.keptObjects.name
        string

        Name of the object.

      • status.keptObjects.namespace
        string

        Namespace of the object, empty for a cluster-scoped one.

    • status.manifestObjects
      array of objects

      Objects that the controller applied from manifests of the project template, as the system:multitenancy-manager:project:<PROJECT_NAME> user. They carry the projects.deckhouse.io/project label with the project name and the projects.deckhouse.io/source: manifests label. 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.

      • status.manifestObjects.apiVersion
        string

        API version of the object.

      • status.manifestObjects.kind
        string

        Kind of the object.

      • status.manifestObjects.name
        string

        Name of the object.

      • status.manifestObjects.namespace
        string

        Namespace of the object.

    • status.namespaces
      array of objects

      Namespaces that belong to the project.

      • status.namespaces.kind
        string

        Kind of the namespace (Main or Additional).

      • status.namespaces.name
        string

        Name of the namespace.

    • status.observedGeneration
      integer

      Last generation of the project processed by the controller.

    • status.resources
      object

      Rendered and skipped resources.

    • status.state
      string

      State of the project: Deployed or Error. The conditions and their messages give the details.

    • status.templateGeneration
      integer

      Generation of the template the project was last rendered from.

    • status.usage
      object

      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.

  • spec
    object
    • spec.description
      string

      Arbitrary description of the project’s purpose. Specify an empty string if no description is required.

    • spec.parameters
      object

      Values of the parameters that the template declares in parametersSchema.

      The structured fields of the template take them through {fromParam: <NAME>}. manifests and resourcesTemplate get them in {{ .parameters }}, completed with the defaults of parametersSchema. The values are validated against parametersSchema.openAPIV3Schema of the template when the project is created or changed.

    • spec.projectTemplateName
      string

      Name of the ProjectTemplate the project is created from.

      The simple template creates only the project namespace.

      Default: simple

  • status
    object
    • status.conditions
      array of objects

      Current state of the project.

      The condition types are described in Project status and diagnostics.

      • status.conditions.lastProbeTime
        string

        Time of the last check of the condition.

      • status.conditions.lastTransitionTime
        string

        Time when the condition last changed.

      • status.conditions.message
        string

        Message with details of the condition state.

      • status.conditions.status
        string

        Condition state: True, False or Unknown.

      • status.conditions.type
        string

        Condition type.

    • status.handingOver
      array of objects

      Objects of manifests that 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 manifestObjects does 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 to manifests. It gets the projects.deckhouse.io/project and projects.deckhouse.io/source: manifests labels back and loses the heritage, app.kubernetes.io/managed-by and projects.deckhouse.io/project-template labels, and manifestObjects lists it again.

      No object is handed over while the upgrade would also take an object that is not an object of manifests and exists without the app.kubernetes.io/managed-by: Helm label and the meta.helm.sh/release-name annotation of the release. The upgrade does not run then, and the ResourcesUpgraded condition names that object.

      • status.handingOver.apiVersion
        string

        API version of the object.

      • status.handingOver.kind
        string

        Kind of the object.

      • status.handingOver.name
        string

        Name of the object.

      • status.handingOver.namespace
        string

        Namespace of the object.

      • status.handingOver.revision
        integer

        Release revision the upgrade is expected to deploy.

    • status.keptObjects
      array of objects

      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 resourcesTemplate after the project switched to structured fields, a quota kept for a handover after .spec.quota stopped covering it, and the objects of the release of the structured fields that manifests render. The release no longer manages them. They carry the projects.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 manifests take it over. When the project is deleted, the cluster-scoped ones that still carry the label are deleted with it.

      • status.keptObjects.apiVersion
        string

        API version of the object.

      • status.keptObjects.kind
        string

        Kind of the object.

      • status.keptObjects.name
        string

        Name of the object.

      • status.keptObjects.namespace
        string

        Namespace of the object, empty for a cluster-scoped one.

    • status.manifestObjects
      array of objects

      Objects that the controller applied from manifests of the project template, as the system:multitenancy-manager:project:<PROJECT_NAME> user. They carry the projects.deckhouse.io/project label with the project name and the projects.deckhouse.io/source: manifests label. 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.

      • status.manifestObjects.apiVersion
        string

        API version of the object.

      • status.manifestObjects.kind
        string

        Kind of the object.

      • status.manifestObjects.name
        string

        Name of the object.

      • status.manifestObjects.namespace
        string

        Namespace of the object.

    • status.namespaces
      array of strings

      Used namespaces.

    • status.observedGeneration
      integer

      Last generation of the project processed by the controller.

    • status.resources
      object

      Rendered and skipped resources.

    • status.state
      string

      State of the project: Deployed or Error. The conditions and their messages give the details.

    • status.templateGeneration
      integer

      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.

  • spec
    object
    • 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>"}.

    • spec.description
      string

      Arbitrary description of the template’s purpose. Specify an empty string if no description is required.

    • spec.features
      object

      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>"}.

    • spec.grantPolicies
      array of strings

      References to library ClusterResourceGrantPolicy objects (created without projectSelector and namespaceSelector).

      The controller creates and maintains one managed policy per reference, copying its resources and binding them to the namespaces rendered from this template.

    • spec.logShipping
      object

      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>"}.

    • spec.manifests
      string

      A template in the go template format with the helm functions 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 of parametersSchema in {{ .parameters }}, the same values as resourcesTemplate. 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 the d8-manifests ProjectRoleBinding of the project grants this user the d8:project:admin role. So an object gets only what this role allows in the namespaces of the project, not the rights of the controller. An AuthorizationRule of the Admin access 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.administrators of the Project. The objects are applied once the binding is Ready, and the ManifestsApplied condition 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.namespace is 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 same manifests makes. The objects of such a namespace are applied once it exists, and until then the ManifestsApplied condition 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 the heritage: multitenancy-manager or heritage: deckhouse label are refused. The objects get the projects.deckhouse.io/project label with the project name and the projects.deckhouse.io/source: manifests label, and .status.manifestObjects of 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.keptObjects is taken over when manifests renders an object of the same kind, namespace and name. The object then has what manifests renders, and a field that the Helm text set and manifests leaves out is removed, the annotations of Helm included. The same list moves an object from the release of the structured fields to manifests. When the structured fields stop rendering an object that manifests render under the same kind, namespace and name, the controller leaves it in place with the projects.deckhouse.io/kept-from-helm-template: "true" label and lists it in .status.keptObjects, and manifests take it over in the same change. If manifests cannot apply it, the object stays on the list. See Moving an object of the release to manifests. Any other object that exists already and that manifests did not create is changed only when it has the two labels, and otherwise the ManifestsApplied condition names it. An object that manifests created and that the template renders otherwise after a change, for example a NetworkPolicy named isolated once networkPolicy.mode is Isolated, goes to the objects the project renders from the template in the same change. It gets what the template renders, and a field that only manifests set is removed.

      Like the objects that the structured fields render, these objects are changed through the template only. The d8-multitenancy-manager-manifests-objects admission policy refuses to create, change or delete an object with the projects.deckhouse.io/source: manifests label to everyone, project and cluster administrators included. Only the user the manifests of the project are applied as, the controller, the service accounts of the d8-* namespaces and the cluster components can do it. Anyone who may update a workload may restart its rollout, when the kubectl.kubernetes.io/restartedAt annotation of its pod template is the only change. metadata.resourceVersion, metadata.generation and metadata.managedFields are 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 the User access level included, so do not put secret values into manifests.

      The field cannot be set together with resourcesTemplate. deckhouse.io/v1alpha1 has no place for it, so a write of a template that has it through deckhouse.io/v1alpha1 is refused. See Describing other objects in manifests.

    • spec.namespaceMetadata
      object

      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-labels annotation 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 the kubernetes.io/metadata.name label 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.labels of the Project reaches it through the built-in templates and is inherited.

    • spec.networkPolicy
      object

      Network isolation of the project namespaces.

      • spec.networkPolicy.mode

        Network isolation mode of the project namespaces.

        • Isolated: Every namespace of the project gets the isolated NetworkPolicy. 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 in kube-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-selector annotation 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.

    • spec.parametersSchema
      object

      OpenAPI v3 schema of the parameters of a project.

      A boolean requiredRequests parameter declared here is read by name: when it is true for a project, the pods in every namespace of the project must have CPU and memory requests (an OperationPolicy in the Deny mode).

      • spec.parametersSchema.openAPIV3Schema
        object

        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 a parametersSchema property. The webhook refuses a literal outside the three values and a reference to an undeclared or mistyped parameter.

    • spec.resources
      array of objects

      Rules of access to cluster-wide resources for the projects of the template.

      The controller turns them into the template-<TEMPLATE_NAME>-inline ClusterResourceGrantPolicy, which applies to the namespaces of the projects of this template.

      Access settings for one type of cluster-wide resource.

      • spec.resources.allowed
        array of strings

        List of names of cluster-wide resources available to the projects.

        Combined with the resources selected with allowedSelector.

      • spec.resources.allowedSelector
        object

        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.

        • spec.resources.allowedSelector.matchExpressions
          array of objects

          List of label selector expressions.

          All expressions must match.

          • spec.resources.allowedSelector.matchExpressions.key
            string

            Required value

            Label key to which the expression applies.

          • spec.resources.allowedSelector.matchExpressions.operator
            string

            Required value

            Operator that defines the relationship between the key and the set of values.

          • spec.resources.allowedSelector.matchExpressions.values
            array of strings

            List of label values.

        • spec.resources.allowedSelector.matchLabels
          object

          Set of labels of cluster-wide resources.

          All specified labels must match.

      • spec.resources.availabilityDefault
        string

        Availability of the cluster-wide resources of this type that allowed, allowedSelector, denied and deniedSelector do not name.

        Overrides defaultAvailability of the GrantableClusterResourceDefinition. If allowed or allowedSelector is set and this field is not, all other resources of this type are unavailable to the projects.

        Allowed values: All, None

      • spec.resources.default
        string

        Name of the cluster-wide resource used by default in the projects.

        Overrides the value determined with defaultFrom in the GrantableClusterResourceDefinition.

      • spec.resources.denied
        array of strings

        List of names of cluster-wide resources unavailable to the projects.

        Deny rules take precedence over allowed and allowedSelector.

      • spec.resources.deniedSelector
        object

        Label selector of cluster-wide resources unavailable to the projects.

        Deny rules take precedence over allowed and allowedSelector.

        • spec.resources.deniedSelector.matchExpressions
          array of objects

          List of label selector expressions.

          All expressions must match.

          • spec.resources.deniedSelector.matchExpressions.key
            string

            Required value

            Label key to which the expression applies.

          • spec.resources.deniedSelector.matchExpressions.operator
            string

            Required value

            Operator that defines the relationship between the key and the set of values.

          • spec.resources.deniedSelector.matchExpressions.values
            array of strings

            List of label values.

        • spec.resources.deniedSelector.matchLabels
          object

          Set of labels of cluster-wide resources.

          All specified labels must match.

      • spec.resources.resourceName
        string

        Required value

        Name of the GrantableClusterResourceDefinition that registers the type of cluster-wide resource.

    • spec.resourcesTemplate
      string

      A template in the go template format with the helm functions 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 and manifests. No template can get a new resourcesTemplate through 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 through deckhouse.io/v1alpha1 is refused as a whole. A template that has one keeps it, and it can be changed through either version while deckhouse.io/v1alpha1 can 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 and manifests first. The field leaves deckhouse.io/v1alpha2 together with deckhouse.io/v1alpha1 in 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, manifests and the others), while resources and grantPolicies apply in either case. A template that projects use keeps a non-empty resourcesTemplate until a change sets such fields or manifests in 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.administrators and .spec.quota of the project replace are deleted once these fields work, and an AuthorizationRule that names nobody from .spec.administrators any 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.keptObjects of the project, until manifests renders an object of the same kind, namespace and name and takes it over. .status.keptObjects also lists an object of the release of the structured fields that manifests render when the release drops it, until manifests take 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 of parametersSchema in {{ .parameters }}. When parametersSchema declares the administrators and resourceQuota parameters, they hold the administrators and the quota of the project, laid out as in a deckhouse.io/v1alpha2 Project. 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.namespace or 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 its projects.deckhouse.io/template-labels annotation and are set on the additional namespaces too.

    • spec.runtimeAudit
      object

      Runtime audit rules; effective only when allowedUIDs/allowedGIDs are set.

      • spec.runtimeAudit.enabled

        A literal boolean or a parameter reference {fromParam: "<name>"}.

    • spec.title
      string

      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/defaultTolerations annotation of the main namespace. The additional namespaces of the project do not get them.

  • status
    object
    • status.message
      string

      Message indicating the cause of the current status.

    • status.ready
      boolean

      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.

  • spec
    object
    • spec.description
      string

      Arbitrary description of the template’s purpose. Specify an empty string if no description is required.

    • spec.parametersSchema
      object

      Required value

      Schema of the project parameters.

      Only openAPIV3Schema is supported.

      • spec.parametersSchema.openAPIV3Schema
        object

        Required value

        OpenAPI specification for parameters.

        This is used to check the validity of the parameters that are passed when creating a new project.

    • spec.resourcesTemplate
      string

      Required value

      A template that defines resources in the go template format to be created when setting up a new project.

      Templates are fully compatible with all helm functions.

      See Moving a template from a Helm text.

      The following parameters are available in templates:

      • {{ .projectName }} — the name of the Project for which the template is being rendered.
      • {{ .projectTemplateName }} — the name of the ProjectTemplate.
      • {{ .parameters }} — a dictionary of custom values, described in the .spec.parametersSchema and defined in the .spec.parameters.

      .metadata.namespace of an object is optional: an object without it is created in the main namespace of the project.

  • status
    object
    • status.message
      string

      Message indicating the cause of the current status.

    • status.ready
      boolean

      Whether the template is ready to use. Indicates that the template has been successfully validated.