Skip to content

Commit 058ee20

Browse files
vishal-avHarness
authored andcommitted
[CDS-117741] Helm configuration file handling (#100835)
* 16d358 fixed kebab-cases * b7c73e Merge branch 'main' into CDS-117741 * 5dac43 Update helm-deployment-faqs.md * dd5f5b update * e2ae1d [CDS-117741] Helm configuration file handling
1 parent aafabc3 commit 058ee20

File tree

8 files changed

+73
-6
lines changed

8 files changed

+73
-6
lines changed

docs/continuous-delivery/deploy-srv-diff-platforms/helm/deploy-helm-charts.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,10 @@ Helm charts can be deployed using any of the execution steps and deployment stra
538538

539539
Each Helm chart deployment is treated as a release. During deployment, when Harness detects that there is a previous release for the chart, it upgrades the chart to the new release.
540540

541+
:::info Configuration file handling
542+
During deployment, Harness downloads your Helm chart manifests and override files (values and secrets) to the delegate. Override files are stored persistently in `/repository/helm/overrides/` and are not automatically deleted after deployment. For details about file storage, cleanup options, and security considerations, go to [Helm Deployment FAQs](/docs/continuous-delivery/deploy-srv-diff-platforms/helm/helm-deployment-faqs#how-does-harness-handle-configuration-files-for-helm-deployments-on-the-delegate).
543+
:::
544+
541545
In your pipeline, click **Run**.
542546

543547
The Helm chart deployment runs.

docs/continuous-delivery/deploy-srv-diff-platforms/helm/helm-deployment-faqs.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,69 @@ For a smooth transition between deployment types:
693693
3. **Document your current configuration** before making changes.
694694
4. **Consider using different services** for different deployment types if you need both approaches.
695695

696+
### How does Harness store and manage Helm configuration files on the delegate?
697+
698+
When you run a Helm deployment, Harness handles different file types with distinct storage and lifecycle behaviors:
699+
700+
**Manifest files**
701+
702+
Stored in temporary directories during deployment execution and automatically cleaned up after the task completes.
703+
704+
**Override files (values and secrets)**
705+
706+
Stored persistently at `/repository/helm/overrides/${CONTENT_HASH}.yaml`, where `${CONTENT_HASH}` is an MD5 hash of the file content. Key characteristics:
707+
708+
- Files use content-based naming, so identical configurations produce the same file path and overwrite previous versions
709+
- Different configurations generate different hashes, creating separate files
710+
- Files are **not automatically deleted** after deployment completion and persist on the delegate until manually removed
711+
- Harness does not provide built-in automatic cleanup (no cron jobs, post-hooks, or disk-based sweeps)
712+
713+
**Impact on deployments**
714+
715+
Persistent override files do not affect deployment correctness. Each deployment fetches fresh copies from source repositories or secrets managers, regenerates content hashes, and overwrites files as needed. Stale files from previous deployments cannot interfere with new executions.
716+
717+
### How should I handle cleanup of Helm override files?
718+
719+
**Do you need to clean up?**
720+
721+
Manual cleanup is not required for functional deployments, but consider it if:
722+
- You have compliance or security requirements for sensitive file storage
723+
- Delegate disk space is limited
724+
- You deploy frequently with many unique configurations
725+
726+
**Cleanup approaches**
727+
728+
If cleanup is needed for your environment:
729+
730+
- **OS-level scripts**: Create cron jobs or scripts to periodically remove files from `/repository/helm/overrides/` on the delegate
731+
- **Maintenance windows**: Schedule regular delegate maintenance to clear accumulated files
732+
- **Monitoring**: Set up disk usage alerts to prompt cleanup when thresholds are reached
733+
- **Built-in cleanup**: Contact Harness Support if you need an automated cleanup feature (tracked as a product enhancement)
734+
735+
**Monitoring recommendations**
736+
737+
Regularly monitor delegate disk space, especially in high-frequency deployment environments. Track the growth of `/repository/helm/overrides/` to identify when cleanup is necessary.
738+
739+
### What security measures should I implement for Helm configuration files?
740+
741+
**Built-in security**
742+
743+
Harness provides baseline security for configuration files:
744+
745+
- **Content-hash naming**: Files use MD5 hashes, making paths non-predictable
746+
- **Restricted permissions**: Files created with `600` permissions on Unix-like systems (owner read/write only)
747+
- **Fresh fetch**: Each deployment retrieves current data from sources, preventing use of outdated credentials
748+
749+
**Enhanced security for compliance**
750+
751+
If you have strict security or compliance requirements:
752+
753+
- **Encrypted filesystems**: Run delegates on hosts with encrypted filesystems to protect data at rest
754+
- **Access controls**: Restrict filesystem access to delegate processes only
755+
- **Secrets managers**: Store sensitive values in integrated secrets managers (HashiCorp Vault, AWS Secrets Manager, Azure Key Vault) instead of values files to minimize persistent sensitive data
756+
- **Regular cleanup**: Implement cleanup procedures for `/repository/helm/overrides/` to limit exposure window for sensitive files
757+
- **Audit logging**: Enable delegate logging and monitor file access patterns
758+
696759
### Why does Helm deployment fail with "validation: chart.metadata.version is invalid" but succeed on rerun?
697760

698761
During Helm deployment, Harness fetches the Helm repository and reads the `index.yaml` file to resolve the requested chart and version. Helm performs strict validation on all chart entries in the repository index. If any chart entry contains an invalid version that does not follow [Semantic Versioning (SemVer)](https://semver.org/) format, Helm skips that entry while loading the index.
@@ -746,4 +809,4 @@ To permanently resolve this issue:
746809

747810
```bash
748811
helm search repo <repo-name>/<chart-name> --versions
749-
```
812+
```

docs/continuous-delivery/gitops/argo-rollouts/argo-rollouts-overview.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ Configure the application:
216216
- **Service (optional):** Create or select a service to track this deployment
217217
- **Environment (optional):** Create or select an environment
218218

219-
![](./static/gitops_app_creation.png)
219+
![](./static/gitops-app-creation.png)
220220

221221
### Step 3: Configure the application source
222222

@@ -231,7 +231,7 @@ The repository uses Kustomize for configuration. You can leave the Kustomize opt
231231

232232
Click Continue.
233233

234-
![](./static/gitops_app_source_selection.png)
234+
![](./static/gitops-app-source-selection.png)
235235

236236
### Step 4: Configure the destination
237237

@@ -240,7 +240,7 @@ Click Continue.
240240

241241
Click Create.
242242

243-
![](./static/gitops_app_destination_selection.png)
243+
![](./static/gitops-app-destination-selection.png)
244244

245245
### Step 5: Monitor the initial deployment
246246

@@ -254,7 +254,7 @@ In the **Resources** tab, you'll see:
254254
- Two Service resources (stable and canary)
255255
- A ReplicaSet created by the Rollout
256256

257-
![](./static/gitops_resource_view.png)
257+
![](./static/gitops-resource-view.png)
258258

259259
### Step 6: Understand the canary configuration
260260

@@ -291,7 +291,7 @@ Commit and push this change. Harness GitOps will detect the change and sync it t
291291
2. Watch as the Rollout progresses through the canary stages
292292
3. You'll see the rollout pause at each stage, waiting for manual promotion
293293
294-
![](./static/gitops_canary_demo.png)
294+
![](./static/gitops-canary-demo.png)
295295
296296
To manually promote the rollout using kubectl:
297297

docs/continuous-delivery/gitops/argo-rollouts/static/gitops_app_creation.png renamed to docs/continuous-delivery/gitops/argo-rollouts/static/gitops-app-creation.png

File renamed without changes.

docs/continuous-delivery/gitops/argo-rollouts/static/gitops_app_destination_selection.png renamed to docs/continuous-delivery/gitops/argo-rollouts/static/gitops-app-destination-selection.png

File renamed without changes.

docs/continuous-delivery/gitops/argo-rollouts/static/gitops_app_source_selection.png renamed to docs/continuous-delivery/gitops/argo-rollouts/static/gitops-app-source-selection.png

File renamed without changes.

docs/continuous-delivery/gitops/argo-rollouts/static/gitops_canary_demo.png renamed to docs/continuous-delivery/gitops/argo-rollouts/static/gitops-canary-demo.png

File renamed without changes.

docs/continuous-delivery/gitops/argo-rollouts/static/gitops_resource_view.png renamed to docs/continuous-delivery/gitops/argo-rollouts/static/gitops-resource-view.png

File renamed without changes.

0 commit comments

Comments
 (0)