Helm Chart Deployment Guide
Acting as an application package manager running atop Kubernetes, Helm charts simplify the deployment of containerized applications. In Helm, these packages are called charts, which is a package of pre-configured Kubernetes resources. A release is a specific instance of a chart which has been deployed to the cluster using Helm. For more information on this Kubernetes-based deployment, please see official documentation from Helm.
Prerequisites
-
Obtain the on-premisess installer folder and nfs-provisioner package provided by Onetrust. This will be copied into the terminal.
-
Kubernetes environment, with the following:
-
Minimum: 5 x 2 CPU, 4GB RAM nodes
-
Recommended: 3 x 4 CPU, 16GB RAM nodes
-
-
Deploy box machine which will be used to access the Kubernetes Cluster
-
Minimum: 4 CPU, 8GB RAM, 250 GB HDD, Ubuntu 18.04
-
Should have access to Internet to pull the OneTrust Docker Images from docker hub
-
Docker >=19.x ce + pre-installed (OneTrust can also install this)
-
-
Storage class available in the cluster that should support dynamically provision the PVC (recommended). For more information, see Kubernetes Storage Classes
-
Update the kube configuration to access the cluster.
-
Azure Example:
CODEaz aks get-credentials --resource-group <rg_name> --name <cluster_name> --subscription <subscription_name> -
AWS Example:
CODEaws eks --region <regionname> update-kubeconfig --name <cluster_name>
-
-
Latest version of kubectl, with a minimum version of 1.22
Upgrading from Zookeeper to KRaft
OneTrust recommends switching to KRaft only for new installations.
Switching from Zookeeper to KRaft (Kafka Raft) simplifies your architecture by eliminating the need for an external Zookeeper cluster. With KRaft, you benefit from faster setup and easier maintenance. Additionally, Zookeeper may be deprecated soon, making KRaft a better choice.
To switch to KRaft, update the following properties in your values.yaml:
-
"IS_KRAFT_MODE_ENABLED": "true" -
"KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP": "CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT"
For detailed information on the migration, see Migrating Worker Nodes from Zookeeper to KRaft.
Creating the Worker Node
-
On the Data Discovery menu, select Worker Nodes. The Worker Nodes screen appears.
-
Click the Add Worker Node button. The Create On-Premises Worker modal appears.
-
Provide the necessary details, then select the Manual Install option.
-
Click the Save button. The worker node is now created and available in the Worker Nodes screen. Use the search bar to quickly locate the new worker node.
-
Use the Summary, Logs, and Settings tab to edit, review, or further configure the worker node.
-
The Worker Node ID can be copied in the Settings tab. You will need to reference this ID during installation.
To create client credentials
Manually Deploying with Helm
-
Download the on-premises installer file package by clicking the Download Installer button in the Worker Details screen. See prerequisites above required for VM and Cluster setup.
-
The Download Installer Package modal will present download options for Kubernetes or Onebox.
-
Copy the .zip file (package) to the Ubuntu server by executing the following commands:
CODEscp -i <identity-file> <path-to-zip-file> <username>@<hostname>:/home/azureuser -
Unzip the file. You can use the following to assist:
CODEsudo apt install unzipa. unzip <zip-file> -
Download the nfs-provisioner package provided by OneTrust.
-
Copy the folder to the Ubuntu Server by executing the following command:
CODEscp -i <identity-file> <path-to-zip-file> <username>@<hostname>:/ home/azureuser -
Connect to VM using the below command:
CODEsudo ssh -I <pem file path> azureuser@IP -
Navigate to data-discovery/k8s-deployment/dd-helm-chart
-
Edit the values.yaml file:
-
Enter the namespace value in
OT_NAMESPACE_DD -
Enter storage class name in
STORAGE_CLASS_NAMECODEFor azure 'managed-premium' For aws 'gp2' For aws + fargate 'aws-efs-onetrust-dd' For gcp : 'standard' (or 'gcp-onetrust-dd' for NFS based) For external nfs storage: 'nfs-onetrust-dd' (make sure you have provided the nfs configuration), For ocp : 'oci' (or 'ocp-onetrust-dd' for NFS based) For minikube : 'standard -
Enter
EXTLIB_SHARED_STORAGE_NAMEinSTORAGE_CLASS_NAMECODEFor azure 'azurefile-onetrust-dd' For aws(aws + fargate) 'aws-efs-onetrust-dd'(make sure you have provided the efs configurations below) For gcp : 'gcp-onetrust-dd' For external nfs storage 'nfs-onetrust-dd' (make sure you have provided the nfs configuration), For ocp: 'ocp-onetrust-dd' For nfs server as pod 'nfs-pod-onetrust-dd', set it as 'none' if extlib is not needed For minikube : 'standard' -
Enter Platform Provider in
PLATFORM_PROVIDERCODEFor azure 'AZURE' For aws 'AWS', For aws + fargate 'AWS_FARGATE' For gcp 'GCP' For Openshift 'OPENSHIFT' For onprem-k8s 'ONPREM' For Oracle Cloud Platform 'ORACLE' For Minikube 'MINIKUBE' -
Enter docker registry values in:
CODE“OT_DOCKER_REGISTRY": "docker.onetrust.io", "DOCKER_USER": "datadiscovery-readonly", "DOCKER_PASSWORD": "89r9thK1DBy/E3x1inSdtkLubMUrWkc0t5YeT1EGy4+ACRCQG8Hn" -
Under worker node settings, enter the value for:
PYTHON"OT_SERVICE_BASE_URL": "" (This would be your tenant URL. For eg: https://beta.onetrust.com, https://app.onetrust.com) "OT_WORKER_NODE_ID": "" (You would get this value from OneTrust tenant under worker node section) -
Under worker node settings, enter the value for:
CODE"OT_SERVICE_CLIENT_ID": "" "OT_SERVICE_CLIENT_SECRET": ""(For generating client id and secret, you would need to go to OneTrust tenant -> Settings -> Client Credentials. Select Data Discovery and generate)
-
-
By default, worker node is configured to deploy an internal hashicorp vault in your namespace. If you are planning to use an external vault to store data source credentials, such as Azure Key Vault, AWS Secret Manager, Google Secret Manager, or CyberArk Vault, please change the value for:
-
"CREDENTIAL_PROVIDER": "",System
Value
Azure Key Vault
"AZURE_VAULT"AWS Secret Manager
"AWS_SECRET_MANAGER"CyberArk Vault
"CYBER_ARK_VAULT"External Hashicorp
"EXTERNAL_VAULT"Google Secret Manager
"GOOGLE_SECRET_MANAGER" -
If you choose any of the above external vaults for
CREDENTIAL_PROVIDER, empty the value for OT_VAULT_URI in your values.yaml i.e."OT_VAULT_URI": "", -
Depending on the type of vault you end up configuring, there are additional values that need to be entered. For example, if you choose AZURE_VAULT as your credential provider, then the following values will need to be filled out.
CODE"AZURE_VAULT_BASE_URI": "", "AZURE_VAULT_CLIENT_ID": "", "AZURE_VAULT_CLIENT_SECRET": "", "AZURE_VAULT_TENANT_ID": "", ”SCANNER_CREDENTIAL_REFERENCE_TYPE”: "AZURE", ”OT_CREDENTIAL_STORE_TYPES”: “AZURE”,Note:For more configuration options for different types of vaults, see Credential Vault Options for Data Sources.
-
-
Navigate to nfs-server-provisioner folder.
-
Edit the values-templates.yaml file:
-
Enter the Platform Provider name
-
Make the below value changes:
Note:Reach to your OneTrust representative for docker credentials. If you do not want to use OT docker credentials, you may use your own.
CODEimagePullSecret: registryURL: "docker.onetrust.io" username: "" password: "" image: repository: docker.onetrust.io/nfs-server-provisioner -
Enter the storage class name. This should be same as the one entered in values.yaml.
-
-
Make sure you have the kubectl command installed. If not, run the below commands after coming out from nfs-provisioner folder:
CODEcurl -LO https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl kubectl version –client -
Run the below commands to connect to the cluster:
CODEsudo apt install azure-cli az login az account set --subscription <subscription id> az aks get-credentials --resource-group <resourcegroup name> --name <clustername> -
Install helm on your VM using the below commands:
CODEcurl -fsSL -o get_helm.sh #See https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 chmod 700 get_helm.sh ./get_helm.sh -
Navigate to data-discovery>k8s>inventory_template and create a text file and add below details:
CODECLOUD_AZURE_SUBSCRIPTION="YOUR_CLOUD_SUBSCRIPTION_GUID" CLOUD_AZURE_RG="YOUR_RESOURCE_GROUP" CLOUD_AZURE_AKS_CLUSTER="YOUR_AKS_CLUSTER" -
Remain in the nfs-server-provisioner folder and execute the below command, then check the status of the pod:
CODEhelm upgrade --install nfs-provisioner --namespace nfs-provisioner --create-namespace . -f values-template.yaml -
Create a namespace whose value should be the same to that entered in values.yaml in dd-helm-chart
-
Navigate to data-discovery>k8s>dd-helmchart and execute the following commands:
JSONecho '{"keys":[]}' | jq -c ".keys |= .+ [ {\"version\":\"$(date +%s)\",\"keyActual\":\"$(od -An -t x2 -N 16 < /dev/random | tr -d " ")\"} ]" > encryption-key.json kubectl --namespace <namespace> create secret generic encryption-key --from-file=encryption-key.json helm upgrade --install <namespace> --namespace <namespace> ./ -f ./default-resources.yaml -f ./image_versions.yaml -f ./custom-labels-annotations.json -f ./values.yaml -
When we configure credentials using Azure-key vault, navigate to values.yaml file dd-helm-chart and add the values in below field as follow:
CODE"CREDENTIAL_PROVIDER": "AZURE_VAULT", "OT_VAULT_AUTHENTICATION": "", "OT_CREDENTIAL_STORE_TYPES": "AZURE", "SCANNER_CREDENTIAL_REFERENCE_TYPE": "AZURE",
Manually Install Istio NS for Helm Only
This section describes how to manually install Istio 1.11.4. The Helm chart is downloaded with the zip package of Onetrust’s deployment.
Deploy Istio (Not In OpenShift)
-
Create an Istio namespace:
CODEkubectl create ns istio-system -
Create Istio CRDs for upgrade:
CODEkubectl apply -f $PWD/vendor-helm-charts/istio-1.11.4/base/crds -
If the docker image must be pulled from the s repository, you will need to create a new docker secret titled,
regcred:CODEkubectl create secret docker-registry regcred --docker-server="<docker_registry_url>" --docker-username="<docker_user>" --docker-password="<docker_password>" --namespace istio-system --save-config --dry-run=client -o yaml | kubectl apply -f - -
Install istio-base chart and istio-discovery chart:
CODE#Istio-Base Chart helm upgrade --install istio-base ~/vendor-helm-charts/istio-${istio_version}/base -n istio-system --set global.imagePullSecrets[0]="regcred" --skip-crdsCODE#istio-Discovery Chart helm upgrade --install istiod ~/vendor-helm-charts/istio-${istio_version}/istio-control/istio-discovery -n istio-system --set global.hub="<docker_registry_url>" --set global.tag="1.11.4.1" --set global.imagePullSecrets[0]="regcred"
Deploy Istio (In OpenShift)
-
Create an Istio namespace:
CODEkubectl create ns istio-system -
Create Istio CRDs for upgrade:
CODEkubectl apply -f $PWD/vendor-helm-charts/istio-1.11.4/base/crds -
If the docker image must be pulled from the s repository, you will need to create a new docker secret titled,
regcred:CODEkubectl create secret docker-registry regcred --docker-server="<docker_registry_url>" --docker-username="<docker_user>" --docker-password="<docker_password>" --namespace istio-system --save-config --dry-run=client -o yaml | kubectl apply -f - -
Create a regcred secret inside a kube-system namespace:
CODEkubectl create secret docker-registry regcred --docker-server="${docker_registry_url}" --docker-username="${docker_user}" --docker-password="${docker_password}" --namespace kube-system --save-config --dry-run=client -o yaml | kubectl apply -f - -
Create an Istio system policy:
CODEoc adm policy add-scc-to-group anyuid system:serviceaccounts:istio-system -
Install istio-base chart:
CODEhelm upgrade --install istio-base ~/vendor-helm-charts/istio-${istio_version}/base -n istio-system --set global.imagePullSecrets[0]="regcred" --skip-crds -
Install istio-cni:
CODEhelm upgrade --install istio-cni -n kube-system "$(base_path)/vendor-helm-charts/istio-1.11.4/istio-cni" \ --set cni.cniBinDir="/var/lib/cni/bin" --set cni.cniConfDir="/etc/cni/multus/net.d" --set cni.chained=false --set cni.cniConfFileName="istio-cni.conf" --set cni.excludeNamespaces[0]="istio-system" --set cni.excludeNamespaces[1]="kube-system" --set cni.repair.enabled=false --set cni.logLevel=info --set global.imagePullSecrets[0]="regcred" --set global.tag="1.11.4.1" --set global.hub="<docker_registry_url>" -
Install istio-discovery:
CODEhelm upgrade --install -n istio-system istiod ~/vendor-helm-charts/istio-1.11.4/istio-control/istio-discovery --set global.imagePullSecrets[0]="regcred" --set istio_cni.enabled=true --set global.jwtPolicy=first-party-jwt # or third-party-jwt --set sidecarInjectorWebhook.injectedAnnotations."k8s.v1.cni.cncf.io/networks"="istio-cni" --set global.tag="1.11.4.1" --set global.hub="<docker_registry_url>"
Updating with Helm
You can also leverage the auto-update button in the worker node details. See Updating Worker Nodes on how to configure this preference in Data Discovery settings.
-
Download the latest installer file package provided by OneTrust.
-
Retrieve latest set of docker images.
-
Update the values.yml file which can be found here: data-discovery > k8s-deployment > dd-helm-chart
Note:The variables can be copied from the current file.
-
Run the following command:
CODEhelm upgrade --install "${OT_NAMESPACE_DD}" --namespace "${OT_NAMESPACE_DD}" ./dd-helm-chart -f ./dd-helm-chart/default-resources.yaml -f ./dd-helm-chart/image_versions.yaml -f ./dd-helm-chart/custom-labels-annotations.json -f ./dd-helm-chart/values.yaml