Deploying the PLAN-R Helm Chart

Preparing for Deployment

Deployment requires:

  • A configured Kubernetes or Deckhouse cluster.
  • Cluster management tools: kubectl and the Helm package manager.
  • A configured Ingress, such as NGINX, or Gateway API, such as Traefik, for external access.

    Important! The Ingress must support WebSocket.

  • S3-compatible storage, such as MinIO or ZAKROMA.Storage, can be used for persistent storage.

    When using another storage type, make sure the CSI driver supports ReadWriteMany access, because all PLAN-R pods need access to the files.

  • Access to the public image registry: registry.dppm.pro.

    When using a private image registry, configure image proxying from registry.dppm.pro/releases to the private registry. You can also manually load images from the distribution into the private registry.

Recommendations:

  • Deploy PostgreSQL on a dedicated server or server cluster for improved stability, easier management, and fault tolerance.

    When deploying the database through a Helm chart, make sure the appropriate CSI driver uses ReclaimPolicy: Retain to prevent data loss.

  • For external HTTPS access, generate a self-signed certificate or use cert-manager to automate SSL certificate requests and issuance.
  • Redis does not require persistent storage: all data is held in memory, and data loss is not critical.
  • When installing the Helm chart, create a separate values file containing only overrides to the original values.yaml. This simplifies maintenance and future updates.

Obtaining the PLAN-R Helm Chart

You can obtain the PLAN-R Helm chart in the following ways:

  1. From the distribution package. The Helm chart version matches the image version.
  2. From the public OCI repository registry.dppm.pro/charts.

You can also download the PLAN-R Helm chart directly from the OCI repository. The latest version is downloaded by default; specify --version to select another version.

helm pull oci://registry.dppm.pro/charts/planr --version 1.0.0

register imageObtaining the PLAN-R Helm Chart

Obtaining System Images

  1. From the distribution package.

With this method, manually load the supplied images into a private registry before using them in Kubernetes.

Also override all Docker image references in values.yaml.

Use the supplied load.sh script to load the images into a private registry. Authenticate to the registry before publishing the images.

docker login <registry>

./load.sh --help
./load.sh <path-to-image> <registry> --push

register imageLoading System Images into a Private Registry

  1. From the public OCI repository registry.dppm.pro/releases.

Docker images based on RED OS 7.3 are also available. Add redos to the end of each tag to use them. To use them consistently, override planrGlobal.image.redos=true.

You can also configure image proxying from registry.dppm.pro/releases to a private registry for use within an isolated network.

Creating the Required Secrets

Secret configuration is stored in planrGlobal.secrets. Secrets are unified for convenience: deployment creates a secret containing all required keys.

You can also override secrets manually by changing the required values in values.yaml. Create either one unified secret with multiple keys or multiple secrets with one key each.

Specify the required secrets in planrConfig.secrets:

planrConfig:
  secrets:
    postgresqlUrl:
      value: "postgresql://planr:planr@{{ .Release.Name }}-postgresql-hl:5432/planr"
      createSecretForPostgres: false
      existingSecret: ""
      existingSecretKey: ""

Where:

  • planrConfig — general PLAN-R configuration.
  • secrets — secret settings.
  • postgresqlUrl — an example secret containing the PostgreSQL connection string.
  • value — the default secret value when it is not created manually. You can also enter a custom value to store in the generated secret. Storing values in values.yml is insecure.
  • createSecretForPostgres — enables automatic creation of the PostgreSQL secret when PostgreSQL is installed as a subchart.
  • existingSecret — the name of a manually created secret. When specified, value and createSecretForPostgres are ignored.
  • existingSecretKey — the key in the manually created secret.

The following secrets are required when creating them manually:

  • PostgreSQL connection string;
  • RabbitMQ connection string;
  • Redis connection string.

Run the following command to create the secrets. You can change them later if necessary. Secret values are stored in base64.

Important: The secret name must differ from the secret generated by PLAN-R, named {{ .Release.Name }}-unified.

To create a secret from the command line:

kubectl create secret generic --namespace planr planr-connection \
  --from-literal=postgresql-url='postgresql://planr:planr@planr-postgresql-hl:5432/planr' \
  --from-literal=rabbitmq-url='amqp://planr:planr@planr-rabbitmq-headless:5672/planr' \
  --from-literal=redis-url='redis://:redisplanr@planr-redis-headless:6379'

To create it explicitly from a YAML file, use:

cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
  name: planr-connection
  namespace: planr
type: Opaque
stringData:
  postgresql-url: postgresql://planr:planr@planr-postgresql-hl:5432/planr
  rabbitmq-url: amqp://planr:planr@planr-rabbitmq-headless:5672/planr
  redis-url: redis://:redisplanr@planr-redis-headless:6379
EOF

To change a secret after deployment, run:

kubectl edit -n planr secret planr-connection

Add the created secret references to values-planr.yaml.

planrConfig:
  secrets:
    postgresqlUrl:
        existingSecret: planr-connection
        existingSecretKey: postgresql-url
    rabbitmqUrl:
        existingSecret: planr-connection
        existingSecretKey: rabbitmq-url
    redisUrl:
        existingSecret: planr-connection
        existingSecretKey: redis-url

Important: Restart all pods using the secret for changes to take effect.

Configuring Storage

Storage is configured in persistence.

When using S3-compatible storage, configured in the administration console, leave persistence.enabled=false.

A basic storage configuration looks like this:

persistence:
  enabled: true
  storageClass: "Longhorn" # Storage class to use
  size: 100Gi  # Desired storage size

If the volume already exists, specify it using persistence.existingClaim=existing-pvc.

Configuring External Access

External access is configured in ingress or httpRoute.

Option 1: Using Ingress

There are two Ingress configuration options:

  1. Create one Ingress for the user interface and administration console (/admin) on the same domain.

Use the following configuration:

ingress:
  main:
    enabled: true
    hostname: planr.local
    ingressClassName: "nginx"

The user interface is available at planr.local and the administration console at planr.local/admin.

If ingressClassName is not explicitly specified, the default Ingress class is used.

  1. Create separate Ingress resources for the user interface and administration console.

Use the following configuration:

ingress:
  main:
    enabled: true
    hostname: planr.local
    ingressClassName: "nginx"
  admin:
    enabled: true
    hostname: planr-admin.local
    ingressClassName: "nginx"

The user interface is available at planr.local and the administration console at planr-admin.local/admin.

Option 2: Using Gateway API

Gateway API also supports two configuration options:

  1. Create one HTTPRoute for the user interface and administration console (/admin) on the same domain.

Use the following configuration:

httpRoute:
  main:
    enabled: true
    hostnames:
      - planr.local
    parentRefs:
      - name: gateway
        sectionName: web

The user interface is available at planr.local and the administration console at planr.local/admin.

  1. Create separate HTTPRoute resources for the user interface and administration console.

Use the following configuration:

httpRoute:
  main:
    enabled: true
    hostnames:
      - planr.local
    parentRefs:
      - name: gateway
        sectionName: web
  admin:
    enabled: true
    hostnames:
      - planr-admin.local
    parentRefs:
      - name: gateway
        sectionName: web

The user interface is available at planr.local and the administration console at planr-admin.local/admin.

Option 3: Configuring External Access Through NodePort Services According to the architecture diagram, configure three NodePort services: planrMain.service, planrAdmin.service, planrApi.service. Override their settings in values.yml.

planrMain:
  service:
    type: NodePort
    nodePorts:
      http: "30800" (fixed port from the 30000-32767 range)

planrAdmin:
  service:
    type: NodePort
    nodePorts:
      http: "30801" (fixed port from the 30000-32767 range)

planrApi:
  service:
    type: NodePort
    nodePorts:
      http: "30802" (fixed port from the 30000-32767 range)

The services are created as NodePort services and are available on the selected ports of the cluster nodes.

Configuring TLS/SSL for External Access

  1. Use self-signed certificates previously created as a secret.
kubectl create secret planr.local-tls \
  --cert=tls.crt \
  --key=tls.key \
  --namespace=planr

tls.crt must contain the complete certificate chain.

Example configuration in values.yml:

ingress:
    main:
      enabled: true
      hostname: planr.local
      ingressClassName: nginx
      tls: true
      extraTls:
        - hosts:
            - planr.local
        secretName: planr.local-tls
  1. Issue certificates through cert-manager using an Issuer or ClusterIssuer.

Example of issuing certificates for an Ingress resource through a ClusterIssuer:

ingress:
  main:
    enabled: true
    hostname: plan-r.tech
    ingressClassName: traefik
    annotations:
      cert-manager.io/cluster-issuer: "letsencrypt-prod"  # Use ClusterIssuer to issue a Let's Encrypt certificate
    tls: true

Configuring SSL/TLS Connections to Services

To configure SSL/TLS encryption for connections to PostgreSQL, Redis, and RabbitMQ:

  1. Generate server certificates for the services you will connect to.
  2. Create a secret containing all root certificates and corresponding private keys.
  3. Add root certificates or the root certificate chain to the containers' trusted certificate stores.
  4. Configure PostgreSQL, Redis, and RabbitMQ to use certificates.
  5. Update the connection strings to use SSL.

Preparing Server Certificates

  1. Create a configuration file specifying the required extensions (req_ext) and parameters (alt_names).
  • req_ext specifies the certificate type (extendedKeyUsage = serverAuth) and enables SAN (subjectAltName = @alt_names).
  • alt_names specifies valid FQDNs for the server certificate, including localhost for health checks and Kubernetes service names.
  1. Generate a .csr signing request and private key.
  2. Have the certificates signed by your organization's certificate authority.

Examples for each external service are provided below:

Postgres:

# Create the PostgreSQL certificate configuration.
cat > postgres.conf << EOF
[req]
default_bits = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
prompt = no

[req_distinguished_name]
C = RU
ST = Moscow
L = Moscow
O = Planr
CN = planr-postgres.planr.svc.cluster.local

[req_ext]
subjectAltName = @alt_names
keyUsage = digitalSignature, keyEncipherment
extendedKeyUsage = serverAuth

[alt_names]
DNS.1 = postgres
DNS.2 = planr-postgres
DNS.3 = planr-postgres-headless
DNS.4 = planr-postgres.planr.svc.cluster.local
DNS.5 = planr-postgres-headless.planr.svc.cluster.local
DNS.6 = localhost
IP.1 = 127.0.0.1
EOF

## Generate a .csr signing request and private key together.
openssl req -newkey rsa:2048 -nodes -keyout postgres.key -out postgres.csr -config postgres.conf

Redis:

# Create the certificate configuration.
cat > redis.conf << EOF
[req]
default_bits = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
prompt = no

[req_distinguished_name]
C = RU
ST = Moscow
L = Moscow
O = Planr
CN = planr-redis.planr.svc.cluster.local

[req_ext]
subjectAltName = @alt_names
keyUsage = digitalSignature, keyEncipherment
extendedKeyUsage = serverAuth

[alt_names]
DNS.1 = redis
DNS.2 = planr-redis
DNS.3 = planr-redis-headless
DNS.4 = planr-redis.planr.svc.cluster.local
DNS.5 = planr-redis-headless.planr.svc.cluster.local
DNS.6 = localhost
IP.1 = 127.0.0.1
EOF

## Generate a .csr signing request and private key together.
openssl req -newkey rsa:2048 -nodes -keyout redis.key -out redis.csr -config redis.conf

Rabbitmq:

# Create the certificate configuration.
cat > rabbitmq.conf << EOF
[req]
default_bits = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
prompt = no

[req_distinguished_name]
C = RU
ST = Moscow
L = Moscow
O = Planr
CN = planr-rabbitmq.planr.svc.cluster.local

[req_ext]
subjectAltName = @alt_names
keyUsage = digitalSignature, keyEncipherment
extendedKeyUsage = serverAuth

[alt_names]
DNS.1 = rabbitmq
DNS.2 = planr-rabbitmq
DNS.3 = planr-rabbitmq-headless
DNS.4 = planr-rabbitmq.planr.svc.cluster.local
DNS.5 = planr-rabbitmq-headless.planr.svc.cluster.local
DNS.6 = localhost
IP.1 = 127.0.0.1
EOF

## Generate a .csr signing request and private key together.
openssl req -newkey rsa:2048 -nodes -keyout rabbitmq.key -out rabbitmq.csr -config rabbitmq.conf

To sign the certificates using a root certificate, if its private key is available, run:

openssl x509 -req -in postgres.csr -CA <ca>.crt -CAkey <ca>.key -CAcreateserial -out postgres.crt -days 365 -sha256 -extfile postgres.conf -extensions req_ext
openssl x509 -req -in redis.csr -CA <ca>.crt -CAkey <ca>.key -CAcreateserial -out redis.crt -days 365 -sha256 -extfile redis.conf -extensions req_ext
openssl x509 -req -in rabbitmq.csr -CA <ca>.crt -CAkey <ca>.key -CAcreateserial -out rabbitmq.crt -days 365 -sha256 -extfile rabbitmq.conf -extensions req_ext

Creating a Secret with Certificates

For convenience, create one secret containing the root certificates, server certificates, and server private keys. Run:

Since stringData is used, values can be supplied without base64 encoding; encoding is applied automatically.

kubectl apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
  name: tls-unified
  # Specify the correct namespace.
  namespace: planr
type: Opaque
stringData:
  ca.pem: |
    -----BEGIN CERTIFICATE-----
    ...
    -----END CERTIFICATE-----
  postgres.key: |
    -----BEGIN PRIVATE KEY-----
    ...
    -----END PRIVATE KEY-----
  postgres.pem: |
    -----BEGIN CERTIFICATE-----
    ...
    -----END CERTIFICATE-----
  rabbitmq.key: |
    -----BEGIN PRIVATE KEY-----
    ...
    -----END PRIVATE KEY-----
  rabbitmq.pem: |
    -----BEGIN CERTIFICATE-----
    ...
    -----END CERTIFICATE-----
  redis.key: |
    -----BEGIN PRIVATE KEY-----
    ...
    -----END PRIVATE KEY-----
  redis.pem: |
    -----BEGIN CERTIFICATE-----
    ...
    -----END CERTIFICATE-----
EOF

Adding Trusted Certificate Authorities

To add a root certificate or root certificate chain to the container's trusted certificate store, specify the following values settings:

Use the root certificates (ca.pem) from the secret created in the previous step.

planrConfig:
  ssl:
    ## @param planrConfig.ssl.ignoreUntrusted Disable certificate trust verification (adds NODE_TLS_REJECT_UNAUTHORIZED=0). Not recommended.
    ##
    ignoreUntrusted: false
    trusted:
      ## @param planrConfig.ssl.trusted.existingConfigMap ConfigMap containing self-signed root certificates.
      ## @param planrConfig.ssl.trusted.existingConfigMapKey ConfigMap key containing self-signed root certificates.
      ## @param planrConfig.ssl.trusted.existingSecret Secret containing self-signed root certificates.
      ## @param planrConfig.ssl.trusted.existingSecretKey Secret key containing self-signed certificates.
      ## @param planrConfig.ssl.trusted.ca String containing root certificates in plain text.
      ##
      existingConfigMap: ""
      existingConfigMapKey: ca.pem
      existingSecret: "tls-unified"
      existingSecretKey: ca.pem
      ca: ""

Configuring External Services for SSL/TLS

Configure PostgreSQL, Redis, and RabbitMQ as follows to enable encryption:

Mount only the server certificate and private key required by each service.

Postgres:

postgres:
  enabled: true
  config:
    ## Add the required rule for password authentication and encryption.
    ## hostssl all             all             0.0.0.0/0               scram-sha-256
    pgHbaConfig: |
      # Default pg_hba.conf configuration
      # TYPE  DATABASE        USER            ADDRESS                 METHOD

      # "local" is for Unix domain socket connections only
      local   all             all                                     trust
      # IPv4 local connections:
      host    all             all             127.0.0.1/32            trust
      # IPv6 local connections:
      host    all             all             ::1/128                 trust
      # Allow replication connections from localhost, by a user with the
      # replication privilege.
      local   replication     all                                     trust
      host    replication     all             127.0.0.1/32            trust
      host    replication     all             ::1/128                 trust

      # Allow connections from any host with password authentication
      hostssl all             all             0.0.0.0/0               scram-sha-256
    ## Configure SSL settings.
    ## Important
    ## Generate PostgreSQL server certificates and mount them in the pod before applying these settings.
    extraConfig:
      - ssl = on
      - ssl_ca_file = '/var/lib/postgresql/tls/ca.pem'
      - ssl_cert_file = '/var/lib/postgresql/tls/postgres.pem'
      - ssl_key_file = '/var/lib/postgresql/tls/postgres.key'
  ## Mount the secret containing certificates.
  ## ca.pem — root certificate or root certificate chain.
  ## postgres.pem — PostgreSQL server certificate.
  ## postgres.key — server certificate private key.
  extraVolumes:
    - name: tls-secret-temp
      secret:
        secretName: tls-unified
        items:
          - key: ca.pem
            path: ca.pem
          - key: postgres.pem
            path: postgres.pem
          - key: postgres.key
            path: postgres.key
  # PostgreSQL requires certificate permissions of 644; set them using an init container.
  initContainers:
    - name: setup-tls
      image: alpine:latest
      securityContext:
        runAsUser: 0
      command:
        - /bin/sh
        - -c
        - |
          set -ex

          mkdir -p /var/lib/postgresql/data/tls

          # Copy from the init container.
          cp /tmp-tls/ca.pem /var/lib/postgresql/data/tls/
          cp /tmp-tls/postgres.pem /var/lib/postgresql/data/tls/
          cp /tmp-tls/postgres.key /var/lib/postgresql/data/tls/

          # Set the permissions required by PostgreSQL.
          chmod 644 /var/lib/postgresql/data/tls/ca.pem
          chmod 644 /var/lib/postgresql/data/tls/postgres.pem
          chmod 600 /var/lib/postgresql/data/tls/postgres.key
          # Change the directory owner to PostgreSQL.
          chown -R 999:999 /var/lib/postgresql/data/tls

      # Mount certificates from the secret.
      volumeMounts:
        - name: data
          mountPath: /var/lib/postgresql/data
        - name: tls-secret-temp
          mountPath: /tmp-tls
          readOnly: true

Redis:

redis:
  enabled: true
  ## Configure Redis with an encrypted connection.
  ## ca.pem — root certificate or root certificate chain.
  ## redis.pem — Redis server certificate.
  ## redis.key — Redis certificate private key.
  tls:
    enabled: true
    authClients: false
    port: 6379
    existingSecret: tls-unified
    certFilename: redis.pem
    certKeyFilename: redis.key
    certCAFilename: ca.pem
  config:
    content: |-
      appendonly no

Rabbitmq:

rabbitmq:
  enabled: true
  config:
    extraConfiguration: |
      # disable anonymous auth
      loopback_users = none
      anonymous_login_user = none

      # auth setup
      # auth_mechanisms.1 = EXTERNAL
      auth_backends.1 = internal
      # ssl_cert_login_from = common_name

      # ssl setup
      listeners.tcp = none
      listeners.ssl.default = 5672
      ssl_options.cacertfile = /tls/ca.pem
      ssl_options.certfile   = /tls/rabbitmq.pem
      ssl_options.keyfile    = /tls/rabbitmq.key
      ssl_options.verify     = verify_peer
      ssl_options.fail_if_no_peer_cert = false
      ssl_options.versions.1 = tlsv1.3
      ssl_options.versions.2 = tlsv1.2
  ## Mount the required certificates from the secret.
  extraVolumes:
    - name: rabbitmq-tls
      secret:
        secretName: tls-unified
        items:
          - key: ca.pem
            path: ca.pem
          - key: rabbitmq.pem
            path: rabbitmq.pem
          - key: rabbitmq.key
            path: rabbitmq.key
  extraVolumeMounts:
    - name: rabbitmq-tls
      mountPath: /tls
      readOnly: true

Configuring SSL/TLS Connection Strings

To connect to PostgreSQL, RabbitMQ, and Redis over SSL/TLS, update the connection strings as follows:

Postgres:

The PostgreSQL connection string should be:

Add ?ssl=true and use a valid DNS name from the certificate's alt_names as the host.

postgresql://planr:planr@planr-postgres-headless.planr.svc.cluster.local:5432/planr?ssl=true

Redis:

Change redis to rediss and use a valid DNS name from the certificate's alt_names as the host.

rediss://:planr@planr-redis.planr.svc.cluster.local:6379

Rabbitmq:

Change amqp to amqps and use a valid DNS name from the certificate's alt_names as the host.

amqps://planr:planr@planr-rabbitmq.planr.svc.cluster.local:5672/planr

Configuring Resource Usage

Configure resources for all containers in planrGlobal.resources. Container-specific settings are available in planrMain.resources, planrApi.resources, planrAdmin.resources, planrWorkers.backup.resources, planrWorkers.planr.resources, planrWorkers.impex.resources, planrWorkers.schedule.resources, planrWorkers.notice.resources, planrWorkers.storage.resources, planrWorkers.csharp.resources, planrWorkers.costr.resources.

Example resource configuration based on the documented requirements:

# Override limits for specific containers according to the hardware requirements in the documentation:
planrMain:
  resources:
    limits:
      cpu: 1.3
      memory: 2048Mi

planrApi:
  resources:
    limits:
      cpu: 1.3
      memory: 2048Mi

planrAdmin:
  resources:
    limits:
      cpu: 1.3
      memory: 1024Mi

planrWorkers:
  backup:
    resources:
      limits:
        cpu: 1.3
        memory: 12288Mi
  planr:
    resources:
      limits:
        cpu: 1.3
        memory: 4096Mi
  impex:
    resources:
      limits:
        cpu: 1.3
        memory: 8192Mi
  schedule:
    resources:
      limits:
        cpu: 1.3
        memory: 1024Mi
  notice:
    resources:
      limits:
        cpu: 1.3
        memory: 2048Mi
  storage:
    resources:
      limits:
        cpu: 1.3
        memory: 2048Mi
  csharp:
    resources:
      limits:
        cpu: 6
        memory: 12288Mi
  costr:
    resources:
      limits:
        cpu: 1.3
        memory: 4096Mi

Installing the PLAN-R Helm Chart

  1. Verify the cluster connection and the availability of kubectl and Helm.
kubectl version
kubectl cluster-info
helm version

register imageChecking the Cluster Connection

  1. Create planr-values.yaml to store only the required overrides. See Deployment Examples.
vi planr-values.yaml

To view the original parameters file, run:

You can redirect the output to a file because the original file is large.

helm show values plan-r-1.0.0.tgz >> base-values.yaml
helm show values oci://registry.dppm.pro/charts/planr >> base-values.yaml
  1. Install the chart.

Add --create-namespace to create the namespace during installation.

helm upgrade --install -namespace <namespce> --create-namespace --values=<path_to_custom_values> <RELEASE_NAME> <CHART_PATH>

For a local installation:

helm upgrade --install --namespace planr --create-namespace --values=./planr-values.yaml planr plan-r-1.0.0.tgz

To install from the OCI repository (without --version, the latest available version is installed):

helm upgrade --install --namespace planr --create-namespace --values ./planr-values.yaml planr oci://registry.dppm.pro/charts/planr --version 1.0.0

Updating the PLAN-R Helm Chart

To update, run:

To update the PLAN-R Helm chart from the distribution package:

helm upgrade --install --namespace planr --create-namespace --values ./planr-values.yaml planr oci://registry.dppm.pro/charts/planr --version 1.1.0

To update the PLAN-R Helm chart from the distribution repository:

helm upgrade --install --namespace planr --create-namespace --values ./planr-values.yaml planr plan-r-1.0.0.tgz --version 1.1.0

Important: Without an explicit --version, the chart is updated to the latest available version.

Deployment Examples

Example values.yml files are available in the PLAN-R Helm chart's examples directory for review and quick testing.

To extract the example files quickly, run:

For the OCI repository:

mkdir -p examples && helm pull oci://registry.dppm.pro/charts/planr -d /tmp && tar -xzf /tmp/planr-*.tgz -C ./examples --strip-components=2 "planr/examples/"

If the Helm chart has already been downloaded:

mkdir -p examples && tar -xzf ./planr-1.0.0.tgz -C ./examples --strip-components=2 "planr/examples/"

The example files are saved in the newly created examples directory.

register imageDeployment Examples Directory


608.0-5d1f26c7