Search…
2.10.X
Modifying Default TVK Configuration
This page describes how to make changes to default configurations for various components of the TrilioVault for Kubernetes application.

Main Configuration Types

There are different types of configuration for TVK which are helpful in tuning TVK as per requirements/cluster constraints. There are currently three types of configuration available:
  • InstanceName and LogLevel
  • Job Resource Requirements
  • CSI Configuration

InstanceName and LogLevel

TVK configuration is used to:
  • provide the InstanceName for the TVK installation.
  • configure the logLevel across the product, where available log levels are as follows:
    1. 1.
      Panic
    2. 2.
      Fatal
    3. 3.
      Error
    4. 4.
      Warn
    5. 5.
      Info (default value)
    6. 6.
      Debug
    7. 7.
      Trace

Job Resource Requirements

Job Resource Requirement is used to modify the default resources requirements like CPU and memory for all the pods which are created as part of product installation as well as backup and restore operation. There are different fields for setting resource requirements for different types of pods.
  • metadataJobResources - Specifies the resource requirements for all meta-data related and target mounting jobs like target-validator, meta-snapshot, pre-restore-validation, meta-restore etc
  • dataJobResources : Specifies the resource requirements for Datamover jobs
  • deploymentLimits : Specifies limits for helm chart deployments. Not applicable for OCP

CSI Configuration

CSI configuration is used to configure the CSI provisioners which do not support Volume Snapshot functionality. For full details about this, refer to TVK For Volumes with Generic Storage. To enable this configuration there are 3 lists:
  • default CSI Provisioner list: Known list of CSI provisioners which do not support Volume Snapshot. Maintained by TVK. This list will be updated as and when new non-snapshot CSI provisioners are discovered.
  • include CSI Provisioner list: User given list of CSI provisioners which do not support Volume Snapshot.
  • exclude CSI Provisioner list: User given list of CSI provisioners which need to be ignored from Default list.

Changing the Configuration

Input for the aforementioned TVK configurations is different for Upstream and OCP instances:
  • Upstream - Configuration is given in the TrilioVaultManager (TVM) CR, which is then propagated to a configMap called k8s-triliovault-config
  • Openshift - Configuration is directly set in the configMap k8s-triliovault-config
The following explains how to modify the TVK configurations in both Upstream and OpenShift:
Upstream
OpenShift
For upstream, all user input resource limits can be specified in the TVM CR and then upstream operator populates the same resource limits in the TVK helm chart configmap.
apiVersion: triliovault.trilio.io/v1
kind: TrilioVaultManager
metadata:
labels:
triliovault: k8s
name: sample-triliovaultmanager
spec:
applicationScope: Namespaced
dataJobResources:
limits:
cpu: 1500m
memory: 5Gi
requests:
cpu: 100m
memory: 800Mi
metadataJobResources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 10m
memory: 10Mi
deploymentLimits:
cpu: 250m
memory: 512Mi
logLevel: Info
csiConfig:
include:
- example.provisioner.csi
exclude:
- test.provisioner.csi
Job Resource Requirements:
  • Set spec.dataJobResources for data job resource requirements
  • Set spec.metadataJobResources for meta job resource requirements
  • Set spec.deploymentLimits for helm deployed deployments limits
TVK Configuration:
  • Set spec.logLevel for logLevel. Default is Info
  • Set spec.tvkInstanceName for TVK instance name
CSI Configuration:
  • Set spec.csiConfig.include list for including the CSI provisioners in the non-snapshot functionality category
  • Set spec.csiConfig.exclude list for excluding the CSI provisioners from the non-snapshot functionality category
There is no direct way of specifying TVK configuration in OCP during installation. However during installation on OCP, a configMap k8s-triliovault-config is created by webhook-init, which contains the default configuration for TVK. At a later stage, you can use this to change configurations. To edit the configMap, use the following command:
Kubectl edit configmap k8s-triliovault-config -n <NAMESPACE>
Within the configMap:
  • default resources requirements are under data.resources.default.
  • default csiConfig CSI provisioner list is under data.csiConfig.default.
  • edit the configMap to add custom configuration for TVK such as the InstanceName and logLevel, etc.
If the custom TVK configuration defined by user is invalid, then fall back to the default configuration requirements.
Only update custom TVK configuration. Do not update default configuration.
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/instance: k8s-triliovault-config
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: k8s-triliovault
app.kubernetes.io/part-of: k8s-triliovault
name: k8s-triliovault-config
data:
resources: |
default:
dataJobResources:
limits:
cpu: 1500m
memory: 5Gi
requests:
cpu: 100m
memory: 800Mi
metadataJobResources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 10m
memory: 10Mi
custom:
dataJobResources:
limits:
cpu: 1600m
memory: 6Gi
requests:
cpu: 200m
memory: 900Mi
metadataJobResources:
limits:
cpu: 600m
memory: 612Mi
requests:
cpu: 20m
memory: 20Mi
tvkConfig: |
logLevel: Info
name: tvk-instance
csiConfig: |
default:
- nfs.csi.k8s.io
include:
- example.provisioner.csi
exclude:
- test.provisioner.csi
Job Resource Requirements:
  • Set data.resources.custom.dataJobResources for data job resource requirements
  • Set data.resources.custom.metadataJobResources for meta job resource requirements
TVK Configuration:
  • Set data.tvkConfig.logLevel for logLevel. Default is Info
  • Set data.tvkConfig.tvkInstanceName for TVK instance name
CSI Configuration:
  • Set data.csiConfig.include list for including the CSI provisioner to be included in the non-snapshot functionality category
  • Set data.csiConfig.exclude list for excluding the CSI provisioner from the non-snapshot functionality category