Enter the following commands on a command line to perform the described action.
There are two ways to apply a license to ThreadFix running in Kubernetes, through a Kubernetes secret or a Helm value. Follow the appropriate section for the current installation method. If unsure of which method is currently being used, run the following command.
for name in $(kubectl get deploy -l app.kubernetes.io/part-of=threadfix -o jsonpath='{.items[*].metadata.name}'); do kubectl rollout restart deploy $name; done
Helm Value
Use this method if managing the ThreadFix license from the user’s values file.
Get the Helm release name for the ThreadFix instance.
TF_RELEASE=$(helm ls | grep threadfix | awk '{print $1}')
Get the current installed version of ThreadFix.
TF_VERSION=$(helm ls --filter "$TF_RELEASE" | grep -o 'threadfix-[Az0-9\.\-]*' | sed 's|threadfix-||g')
Export the currently installed Helm values.
helm get values $TF_RELEASE > currentValues.yaml
Backup values to a separate file.
cp currentValues.yaml currentValues.yaml.bak
Add the new license to myValues.yaml by performing the following:
Open the myValues.yaml file with a text editor
Navigate to the item named "threadfix.license"
Replace the lines after "threadfix.license" with the content of the new ThreadFix license
Indentation is important for this file to render correctly. Ensure that the new content adheres to the same indentation as the previous item
If not using 'denimgroup/threadfix' as the chart name, this value must be changed to the location of the ThreadFix chart. Use helm search repo threadfix to find the correct chart name.
If the new license does not apply after a few minutes, restart ThreadFix deployments.
for name in $(kubectl get deploy -l app.kubernetes.io/part-of=threadfix -o jsonpath='{.items[*].metadata.name}'); do kubectl rollout restart deploy $name; done