Discover an existing Harness SMP installation
If you have an existing Harness SMP installation and want it to be discovered by the Harness SMP Operator, use the script generate-harness-values.sh to extract your current configuration.
This topic covers what the script does, how to run it, the two files it generates, how to install with those files using either helm or clustermgr, and how to verify the result in the Installer UI.
What the Script Does
The generate-harness-values.sh script connects to your running cluster, reads the existing Harness Helm release values and Kubernetes secrets, and generates the files needed for Operator to discover your existing installation.
Usage
Download the script: generate-harness-values.sh, and execute the following commands in your terminal.
# outputs two files: tfi-values.yaml and harness-values.yaml
# option 1: after downloading the script from this page
chmod +x generate-harness-values.sh
./generate-harness-values.sh
# option 2: if running from extracted clustermgr package
./values-migrator/generate-harness-values.sh
| Flag | Default | Description |
|---|---|---|
-n, --namespace | harness | Kubernetes namespace of existing Harness install |
-r, --release | harness | Helm release name |
Generated Files
The script generates two files:
-
tfi-values.yaml- Containscluster.tfi.*values extracted from the existing install:cluster:tfi:ci: falsecd: trueccm: falsesto: falsesrm: falseff: falsechaos: falsescs: falsedbops: falsecode: falseiacm: falseidp: falseharnessLicense: "..."postgresqlPassword: "..."mongodbPassword: "..."minioPassword: "..."additionalFeatureFlags: |FEATURE_FLAG_1FEATURE_FLAG_2 -
harness-values.yaml- Contains Helm values (global:andharness:sections, excluding module flags and license which are intfi-values.yaml).
Install with Discovered Values
After the script generates the two files, pass them to your install command. In this step, the install command supplies your existing configuration to the operator.
- helm
- clustermgr
helm install platform-installer ./platform-installer-<VERSION>.tgz -n harness --create-namespace \
-f tfi-values.yaml \
--set-file cluster.helmValues.harness=harness-values.yaml \
-f override.yaml \
-f override-<ingress>.yaml
- Use the generated
tfi-values.yamlandharness-values.yamlwithhelm install. - Reference the appropriate override and ingress files from the Configure and Install section.
After running the script, use the generated files with clustermgr install-pi:
./clustermgr install-pi \
--dns <your-dns> \
--namespace harness \
--email <admin-email> \
--password '<password>' \
--version <version> \
--multi-node \
--pi-set cluster.triggerInstall=false \
--pi-set cluster.tfi.storageClass=<storage-class> \
--pi-set cluster.profile=<profile-type> \
--pi-values tfi-values.yaml \
--pi-set-file cluster.helmValues.harness=harness-values.yaml
For air-gapped environments, add the registry flags:
./clustermgr install-pi \
--dns <your-dns> \
--namespace harness \
--registry-host registry.example.com \
--registry-prefix your-prefix \
--registry-user <user> \
--registry-password '<password>' \
--email <admin-email> \
--password '<password>' \
--version <version> \
--multi-node \
--pi-set cluster.triggerInstall=false \
--pi-set cluster.tfi.storageClass=<storage-class> \
--pi-set cluster.profile=<profile-type> \
--pi-values tfi-values.yaml \
--pi-set-file cluster.helmValues.harness=harness-values.yaml
Post-Discovery Verification
- Access the Installer UI at
https://<YOUR_DNS>/pi - Navigate to Global Variables and verify that modules, license, and database passwords are populated correctly
- Navigate to Helm Releases → harness → user/values.yaml and verify the values from
harness-values.yamlare populated