Skip to content

Post Install Job

The Post Install job is a standalone Kubernetes job designed to upload dashboards and alerts to your Grafana instance. It ensures your monitoring data stays current through two key components:

  • Job: Automatically triggered with every Privacera upgrade. This job supports on-demand updates of dashboards and alerts in Grafana.
  • CronJob: Scheduled to run daily at 12:00 AM by default (configurable as needed). This job keeps your Grafana instance updated with the latest dashboards and alerts on a regular basis.

Customizing Post Install Job Configurations

This section explains how to customize the Helm chart values for the Post-Install Job, which includes both a Kubernetes Job and a CronJob. These resources perform post-installation tasks such as on-demand setup operations and scheduled updates.

You can configure parameters such as resource allocations, environment variables, and scheduling preferences for both components.

To do this, follow the steps below and select the customization option.

  1. Login to the Privacera jumphost and navigate to the custom-vars directory.

    Bash
    cd ~/privacera/privacera-manager/config/custom-vars/
    

  2. Copy vars.monitoring-post-install-job.yml file from sample-vars directory to custom-vars directory.

    Bash
    cp ../sample-vars/vars.monitoring-post-install-job.yml ./
    

Customizing the Job Configuration

  • If you want to change the backoff limit (number of time the job restarts if the job pod fails) of Job, uncomment the variables below and provide the desired values in place of <PLEASE_CHANGE>. Default backoff value id 1.
    Bash
    POST_INSTALL_JOB_BACKOFF_LIMIT: 2
    
  • To update the resource quota of the Job running in Post Install, uncomment the below variables in vars.monitoring-post-install-job.yml file and provide the desired values in place of <PLEASE_CHANGE>. Default memory limit is 500Mi and CPU is 500m core.
    Bash
    1
    2
    3
    4
    POST_INSTALL_JOB_CPU_LIMIT: "<PLEASE_CHANGE>"
    POST_INSTALL_JOB_CPU_REQUEST: "<PLEASE_CHANGE>"
    POST_INSTALL_JOB_MEMORY_LIMIT: "<PLEASE_CHANGE>"
    POST_INSTALL_JOB_MEMORY_REQUEST: "<PLEASE_CHANGE>"
    

Customizing the CronJob Configuration

  • If you want to change schedule of Cron Job, uncomment the variables below and provide the desired value of cron. Default schedule time is everyday 12:00 AM
    Bash
    POST_INSTALL_CRONJOB_SCHEDULE: "0 0 * * *"
    
  • To update the resource quota of the Cron Job running in Post Install, uncomment the below variables in vars.monitoring-post-install-job.yml file and provide the desired values in place of <PLEASE_CHANGE>. Default memory limit is 500Mi and CPU is 500m core.
    Bash
    1
    2
    3
    4
    POST_INSTALL_CRONJOB_CPU_LIMIT: "<PLEASE_CHANGE>"
    POST_INSTALL_CRONJOB_CPU_REQUEST: "<PLEASE_CHANGE>"
    POST_INSTALL_CRONJOB_MEMORY_LIMIT: "<PLEASE_CHANGE>"
    POST_INSTALL_CRONJOB_MEMORY_REQUEST: "<PLEASE_CHANGE>"
    

Triggering the Post-Install Job

To immediately upload Grafana dashboards and alerts using the Post-Install Job, perform the steps below:

  1. Login to the Privacera jumphost and navigate to the privacera-manager directory.

    Bash
    cd ~/privacera/privacera-manager
    

  2. You can trigger the Post-Install Job in one of the following ways:

    • Option 1: Upgrade the post-install-job Helm chart. This method uploads dashboards and alerts without affecting other services.
      Bash
      helm upgrade post-install-job output/kubernetes/helm/post-install-job/ -n <NAMESPACE>
      
    • Option 2: Re-run the install command. This method may restart additional services along with the Post-Install Job.
      Bash
      ./pm_with_helm.sh install
      

Disable Post Install Job

To disable the Post-Install Job in Privacera, follow these steps:

  1. Login to the Privacera jumphost and navigate to the custom-vars directory.

    Bash
    cd ~/privacera/privacera-manager/config/custom-vars/
    

  2. Copy vars.monitoring-post-install-job.yml file from sample-vars directory to custom-vars directory.

    Bash
    cp ../sample-vars/vars.monitoring-post-install-job.yml ./
    

  3. Uncomment POST_INSTALL_JOB_ENABLED variable in the file and save.

    Bash
    POST_INSTALL_JOB_ENABLED: "false"
    

  4. (optional) If the Post-Install Job was previously enabled and you are now disabling it, complete the following additional steps.

    a. Uninstall the existing Post-Install Job HELM chart using the following command.

    Bash
    helm uninstall post-install-job -n <NAMESPACE>
    
    b. Remove the existing Post-Install Job folder from the HELM directory.
    Bash
    cd ~/privacera/privacera-manager/output/kubernetes/helm/
    rm -rf post-install-job
    

Comments