Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Image RemovedImage Added

📙 You will learn

How to scale ThreadFix services.

Prerequisites

Audience: IT Professional
Difficulty: Intermediate
Time needed: Approximately 10 minutes
Tools required: If any

There are two ways to scale services in ThreadFix, using Helm values or by directly modifying the Kubernetes deployment. Changes made using Helm values will persist until changed again. Changes made directly on the Kubernetes deployment will persist until the next upgrade.

Note

Not all services in ThreadFix can be safely scaled. Please contact ThreadFix support staff for further
consult the Configurations and Tuning Guide
for more information on what services can be scaled and what values may be appropriate for the user case.

Enter the following commands on a command line to perform the described action.

Using Kubernetes

  1. Get a list of Kubernetes deployments associated with the ThreadFix application:

    Code Block
    kubectl get deploy -l kubernetes.io/part-of=threadfix

  2. Scale the desired services (replace <numReplicas> with the number of pods to scale to and <deployment> with the name of the resource to scale):

    Code Block
    kubectl scale --replicas=<numReplicas> deployment/<deployment>

Using Helm

  1. Get the Helm release name for the ThreadFix instance:

    Code Block
    TF_RELEASE=$(helm ls | grep threadfix | awk '{print $1}')

  2. Get the current installed version of ThreadFix:

    Code Block
    TF_VERSION=$(helm ls --filter "$TF_RELEASE" | grep -o 'threadfix-[Az0-9\.\-]*' | sed 's|threadfix-||g')

  3. Export the currently installed Helm values:

    Code Block
    helm get values $TF_RELEASE > myValues.yaml

  4. Edit the resources 'replicaCount' field in myValues.yaml with the desired number or pods:

    • For example, to scale appsec-data to 2 pods, add the following to the myValues.yaml/code

      Code Block
      appsecdata:
        replicaCount: 2

    • Use the following to get a list of editable fields:

      Code Block
      helm inspect values denimgroup/threadfix

  5. Run a helm upgrade with the modified values field:

    Code Block
    helm upgrade $TF_RELEASE denimgroup/threadfix --version $TF_VERSION -f myValues.yaml

https://threadfix.it/ | www.denimgroup.com
© Copyright 2021 Denim Group, LTD. All Rights Reserved.

Table of

contents

Contents

Table of Contents