You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/continuous-delivery/deploy-srv-diff-platforms/helm/helm-deployment-faqs.md
+73Lines changed: 73 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -571,3 +571,76 @@ Users facing namespace errors should remove namespace objects from their manifes
571
571
572
572
### Why does Helm uninstall runs after a failed initial deployment in Helm Deployment step?
573
573
Helm recommends purging the initial release if any failure happens: [https://github.com/helm/helm/issues/3353#issuecomment-358367529](https://github.com/helm/helm/issues/3353#issuecomment-358367529). Hence, Harness purges the release if the first ever release fails in Helm Deployment step. If this is not done, then the user would be manually required to clean up the failed release, otherwise all subsequent releases would fail. Harness helps users avoid this manual effort and purges the failed initial release in this case.
574
+
575
+
### Is switching between Kubernetes Deployment and Helm Deployment supported?
576
+
577
+
**Yes, switching between Kubernetes Deployment and Helm Deployment types is supported**, but requires careful planning due to some important limitations and considerations.
578
+
579
+
:::warning Important Considerations
580
+
Switching between deployment types on the same infrastructure and namespace can lead to deployment failures due to immutable Kubernetes selector labels. Plan your migration carefully and consider using different namespaces or performing force deployments.
581
+
:::
582
+
583
+
#### Limitations and Considerations
584
+
585
+
1. **Label Selector Handling**:
586
+
- When switching from Kubernetes to Helm deployments, leftover selector labels (particularly `harness.io/track: stable`) can cause deployment failures, especially when skipping canary steps.
587
+
- This happens because selector labels in Kubernetes are immutable and Helm's 3-way merge won't remove them from existing deployments.
588
+
589
+
2. **Deployment Type Compatibility**:
590
+
- Canary flows typically work because Harness adds track labels in pod labels for canary deployments.
591
+
- Rolling deployments (skipping canary steps) may fail due to label selector mismatches between the existing deployment and the new manifests.
592
+
593
+
3. **Maintenance Mode Deployments**:
594
+
- When services are in maintenance mode (replica: 0), skipping canary steps is often desired to avoid spinning up unnecessary pods.
595
+
- However, this scenario is most prone to selector mismatch issues when switching deployment types.
596
+
597
+
#### Best Practices for Switching Deployment Types
598
+
599
+
1. **Perform a Force Deployment**:
600
+
- When switching deployment types, perform a forced fresh deployment (delete and redeploy) to remove stale selectors.
601
+
- This is especially important for services that are in maintenance mode or not serving traffic.
- For Kubernetes deployments, enable the ["Skip Harness label selector tracking" setting](/docs/continuous-delivery/deploy-srv-diff-platforms/kubernetes/cd-kubernetes-category/skip-harness-label-selector-tracking-on-kubernetes-deployments).
605
+
- This helps when you need to switch between canary and rolling deployment flows.
606
+
607
+
3. **Use Different Release Names and Namespaces**:
608
+
- When deploying the same service using both Kubernetes and Helm deployment types, use different release names and consider using separate namespaces to avoid conflicts.
609
+
- Avoid deploying the same service to the same infrastructure using both deployment types simultaneously.
610
+
611
+
4. **Check Delegate Version**:
612
+
- Ensure your delegate is updated to the latest version to benefit from fixes related to label handling.
613
+
- If you can't update the delegate, consider updating the `harness-helm-post-renderer` binary using the following commands in the delegate's INIT_SCRIPT:
0 commit comments