Applying Custom Pod Configurations

Objective

The objective of this chapter is to implement custom changes related to pod specifications and prevent any issues with overridden changes after upgrades.

Feature Specifications and Commands

The features and the respective commands are as follows:
  1. Update pod affinity
    ./appviewx.sh --apply-affinities
  2. To update node labels.
    ./appviewx.sh --apply-labels
  3. Update memory allocations for particular application pod.
    ./appviewx.sh --apply-allocate-memory
  4. Change the pipeline worker count for logstash conf
    ./appviewx.sh --apply-logstashCustoms
  5. Change the replica count
    ./appviewx.sh --apply-replicas
  6. Change the HPA value of deployment
    ./appviewx.sh --apply-hpa

Steps to Apply Custom Changes

  1. Navigate to <installer>/scripts location.
  2. Copy the custom_changes.yaml.template to custom_changes.yaml
  3. Find the formatting below for all custom configurations.
    1. Pod affinities
      affinities:
          <Plugin Name>:
              nodeAffinity:
                  enable: false
                  type: "required"
                  key: "dummy"
                  values:
                      - "dummy"
              podAffinity:                                                                                                                                                                             
                 enable: false
                 key: "app"
                 values:
                     - "dummy"
                 namespaces:
                     - "avx"
                 topologyKey: "kubernetes.io/hostname"
              podAntiAffinity:
                  enable: false
                  key: "app"
                  values:
                      - "dummy"
                 topologyKey: "kubernetes.io/hostname"
      Note: All three types of affinities should be mentioned during the configuration. It is necessary to set the enable field to true or false according to use case.
    2. Node labels
      node_labels:
          <node name>:
              ingress: "true"
    3. Pod memory allocation
      memoryAllocations:                                     
             avx_subsystems:                                     
                xms: "1g"                                        
                xmx: "2g"                                        
                memoryRequest: "100Mi"              
                cpuRequest:  "100"
      Note: xms and xmx fields are mandatory in case of custom memory allocations. After applying changes on the plugin you must re-deploy the same plugin in your setup.
    4. Pipeline worker count for logstash conf
      logstash_customs:              
             pipelineWorkerCount: "5"
    5. Replica count
      replication:
              <pod_name>:
                  count: "2"
    6. HPA value of deployment
      horizontalPodAutoScalling:                
             avx_subsystems_sync:                   
                 maxReplicas: "3"                         
                 minReplicas: "1"                          
                 cpu: "300"                                    
                 memory: "300"
      Note: memory for HPA is optional parameter, you may skip it during configuration.
At the time modifying the custom_changes.yaml file for custom configurations, the rules of yaml code should be intact.
  1. Before you start writing the custom configurations, ensure the three dashes “---” are present on the top of very first line of the custom configuration.
  2. Field and its scope must be accurate.

Post the changes in custom_changes.yaml, installing the plugins will apply all custom changes.