Skip to content

Restart single service

Restart a Single Privacera Service Using Helm Upgrade

This section outlines how to restart a specific Privacera service deployed via Helm. This approach is useful when a configuration change has been made and a full redeployment is not required.

While the privacera-manager.sh and pm_with_helm.sh scripts do not currently support restarting individual services, Helm offers a flexible alternative. It allows you to perform targeted upgrades of specific components, enabling configuration changes to be applied and a single service to be restarted—without affecting the rest of the deployment.

Helm supports targeted upgrades of individual components, allowing you to reapply configuration changes and restart a specific service without affecting the rest of the deployment.


Prerequisites

Before proceeding, ensure that:

  • The Privacera environment is already deployed via Helm using pm_with_helm.sh.
  • You have access to the appropriate Kubernetes context and namespace.
  • Changes have been made to either the ~/privacera/privacera-manager/config/ directory or directly under the ~/privacera/privacera-manager/output/ directory for the intended service.

Restart Procedure

Case 1: If changes are made under the ~/privacera/privacera-manager/config/ directory (or sub-directories)

Perform the following steps:

  1. Regenerate the Helm templates:
Bash
cd ~/privacera/privacera-manager
./privacera-manager.sh setup
  1. Navigate to the Helm chart directory of the target service:
Bash
cd ~/privacera/privacera-manager/output/kubernetes/helm/<service-name>
  1. Determine the Helm release name:
Bash
helm ls -n <YOUR_NAMESPACE>
  1. Run the Helm upgrade to restart the service:
Bash
helm upgrade <helm-release-name> . -n <YOUR_NAMESPACE>

Case 2: If changes are made directly under the ~/privacera/privacera-manager/output/ directory (or sub-directories)

In this case, you can directly proceed to the upgrade step:

  1. Navigate to the Helm chart directory of the target service:
Bash
cd ~/privacera/privacera-manager/output/kubernetes/helm/<service-name>
  1. Determine the Helm release name:
Bash
helm ls -n <YOUR_NAMESPACE>
  1. Run the Helm upgrade:
Bash
helm upgrade <helm-release-name> . -n <YOUR_NAMESPACE>

⚠️ Important Note If you make direct changes inside the ~/privacera/privacera-manager/output/ folder, those changes will be lost the next time you run ./privacera-manager.sh setup, as it regenerates the contents based on the configuration defined in ~/privacera/privacera-manager/config/custom-vars.

💡 To persist changes, always make your updates in the appropriate files under ~/privacera/privacera-manager/config/custom-vars/. This ensures that future setups retain the desired configuration.


Post-Upgrade Validation

After executing the Helm upgrade, validate that the service has restarted and is running as expected:

Bash
kubectl get pods -n <YOUR_NAMESPACE> |grep <service-name>

You may also review pod logs or events if any issues occur during the upgrade:

Bash
kubectl logs <pod-name> -n <YOUR_NAMESPACE>
kubectl describe pod <pod-name> -n <YOUR_NAMESPACE>

Notes

  • The helm upgrade command automatically triggers a rolling restart of the service with the latest rendered templates and configuration.
  • Ensure that changes made in ~/privacera/privacera-manager/config/ are valid and correctly rendered during privacera-manager.sh setup.

Comments