> For the complete documentation index, see [llms.txt](https://docs.catalyx.solutions/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.catalyx.solutions/catalyx-blockchain-manager/canton-network/version-1.10/validator-management/validator-custom-resource-definition.md).

# Validator Custom Resource Definition

This document provides an overview of the **Validator Custom Resource Definition (CRD)** in the Catalyst Blockchain Manager Canton system. It outlines the structure of the CRD and the components it deploys.

## Structure of the Spec

The spec specifies every component needed to deploy a validator separately.

| Component            | CRD Location                            |
| -------------------- | --------------------------------------- |
| **Validator** (core) | Top level of the spec                   |
| **ANS/CNS UI**       | `spec.applicationCantonNameServer.spec` |
| **Wallet UI**        | `spec.walletUI.spec`                    |
| **Participant Node** | `spec.participant.spec`                 |

### Provisioned Postgres Database

The database that is created is not represented in the spec. To increase the volume size (decreases are ignored), use:

```yaml
spec.storageSize
```

## Changing Component Specifications

### Environment Variables

For all components, environment variables are present under `spec.envVars`. These can have the same format as in Pods and Deployments.

### Resources

All components have a resource specification:

```yaml
resources:
    cpuLimit: '2'
    cpuRequested: '1'
    imagePullSecret: intellecteu-gitlab-access
    memoryLimit: 2Gi
    memoryRequested: 1Gi
    replicas: 1
```

| Field             | Description                                    |
| ----------------- | ---------------------------------------------- |
| `cpuLimit`        | Maximum CPU allocation                         |
| `cpuRequested`    | Minimum CPU allocation                         |
| `memoryLimit`     | Maximum memory allocation                      |
| `memoryRequested` | Minimum memory allocation                      |
| `replicas`        | Number of instances (can be set to `0` or `1`) |

To scale down the validator, set every `replicas` field to `0`.

## Example CRD

<details>

<summary>Full example Validator CRD YAML</summary>

```yaml
apiVersion: catalyst.manager.canton/v1
kind: Validator
metadata:
  name: validator1st
  namespace: canton-dev
spec:
  application:
    spec:
      domain: participant-validator1st
      resources:
        cpuLimit: '2'
        cpuRequested: '1'
        imagePullSecret: intellecteu-gitlab-access
        memoryLimit: 2Gi
        memoryRequested: 1Gi
        replicas: 1
      type: backend
      validatorParent: validator1st
  applicationCantonNameServer:
    spec:
      domain: cns-validator1st
      image: >-
        digitalasset-canton-network-docker.jfrog.io/digitalasset/ans-web-ui:0.3.15
      resources:
        cpuLimit: '1'
        cpuRequested: '0.1'
        imagePullSecret: intellecteu-gitlab-access
        memoryLimit: 1536Mi
        memoryRequested: 240Mi
        replicas: 1
      type: ui
  applicationWallet:
    spec:
      domain: wallet-validator1st
      image: >-
        digitalasset-canton-network-docker.jfrog.io/digitalasset/wallet-web-ui:0.3.15
      resources:
        cpuLimit: '1'
        cpuRequested: '0.1'
        imagePullSecret: intellecteu-gitlab-access
        memoryLimit: 1536Mi
        memoryRequested: 240Mi
        replicas: 1
      type: ui
  customAuth: false
  disableAutoInit: false
  image: digitalasset-canton-network-docker.jfrog.io/digitalasset/validator-app:0.3.15
  imageRepo: digitalasset-canton-network-docker.jfrog.io/digitalasset
  imageTag: 0.3.15
  migrationAttachPVC: 'false'
  migrationId: '0'
  migrationMigrating: false
  participant:
    spec:
      adminPort: '5002'
      auth: true
      authProvider: keycloak
      daemon: false
      enterprise: true
      ha: false
      image: >-
        digitalasset-canton-network-docker.jfrog.io/digitalasset/canton-participant:0.3.15
      jsonapi: false
      ledgerPort: '5001'
      logLevel: INFO
      navigator: false
      resources:
        cpuLimit: '2'
        cpuRequested: '1'
        imagePullSecret: intellecteu-gitlab-access
        memoryLimit: 2Gi
        memoryRequested: 1Gi
        replicas: 1
      storageType: Shared Postgres
  resources:
    cpuLimit: '2'
    cpuRequested: '1'
    imagePullSecret: intellecteu-gitlab-access
    memoryLimit: 2Gi
    memoryRequested: 1Gi
    replicas: 1
  storageSize: 20Gi
  walletEnabled: true
```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.catalyx.solutions/catalyx-blockchain-manager/canton-network/version-1.10/validator-management/validator-custom-resource-definition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
