Upgrade Synthetic Worker on Kubernetes

You can upgrade an existing Synthetic Worker on Kubernetes by updating the Helm Chart.

Here are the steps to be performed to upgrade the Synthetic Worker on Kubernetes:

  1. If you have not saved the original values file used during the initial Helm chart installation, you can retrieve the user-supplied values by running the following:
    helm get values <release-name> -n <namespace> -o yaml > /home/user/myvalues.yaml

    All values are now saved under /home/user/myvalues.yaml file.

  2. Use the /home/user/myvalues.yaml file as an argument in the helm upgrade command, like the following: -f /home/user/myvalues.yaml
  3. Use --set parameter for old and new values by running the following:
    helm upgrade --install --wait --namespace <namespace> --create-namespace <release-name> <helm_chart_path_new_version> [--set <previous_customized_value> ..] [--set <new_variables_value>]
  4. Run the helm upgrade command to change LOG_LEVEL=DEBUG and pass previously used values along with the new or updated values.
    For example, see below the new values for WORKER_NAMES and LOG_LEVEL are passed along with the existing values:
    export PULLSECRET=`kubectl -n default get secret ocirsecret -o jsonpath='{.data.*}'`;
    
    helm upgrade --install --wait \
    --namespace opvp-ns --create-namespace \
    --set pvp.name=opvp-name \
    --set opvp.env.WORKER_NAMES="{worker-1,worker-2}"\
    --set image.repository=phx.ocir.io/axlxx1s82ggh/nhedau/opvp:1.2.8\
    --set image.pullSecret=$PULLSECRET \
    --set opvp.env.LOG_LEVEL=DEBUG \
    --set opvp.proxy.enabled=true\
    --set opvp.env.WORKER_PROXY_LOCATION=www-proxy.aa.bb.com:80\
    --set opvp.env.WORKER_PROXY_BYPASS_LIST=''\
    --set opvp.env.WORKER_PROXY_USER=''\
    --set opvp.env.WORKER_PROXY_PASS=''\
    --set opvp.env.WORKER_PROXY_TYPE=BASIC \
    --set opvp.env.APM_DOMAIN_OCID=ocid1.apmdomain.oc1.phx.aaa......rcq \
    --set opvp.env.OPVP_OCID=ocid1.apmsyntheticopvp.oc1.phx.aaa...tva \
    --set opvp.env.APM_DOMAIN_PRIVATE_DATA_KEY=4PU....RHK \
    --set opvp.env.SYN_API_SERVER=https://apm-synthetic.us-phoenix-1.oci.oraclecloud.com/ \
    --set opvp.env.AUTH_TYPE=oci_config \
    --set opvp.env.OCI_CONFIG_PROFILE=dev-phx \
    --set opvp.oci.config=/Users/ppp/Downloads/oci/config \
    --set opvp.oci.apiKey=/Users/ppp/Downloads/oci/oci-api-key.pem \
    --set nodeSelector.applications=synthetic-agent \
    --set nodeSelector.app=apm_synthetic \
    opvp-1.2.8 apm-synthetic-worker-helm-0.2.59/helm/.
    Note

    Do not pass --reuse-values to helm upgrade command because the default values in the new Helm chart version will get ignored which can result in templating errors and upgrade failures.