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:
- Update pod
affinity
./appviewx.sh --apply-affinities - To update node labels.
./appviewx.sh --apply-labels - Update memory allocations for particular application
pod.
./appviewx.sh --apply-allocate-memory - Change the pipeline worker count for logstash
conf
./appviewx.sh --apply-logstashCustoms - Change the replica
count
./appviewx.sh --apply-replicas - Change the HPA value of
deployment
./appviewx.sh --apply-hpa
Steps to Apply Custom Changes
- Navigate to <installer>/scripts location.
- Copy the custom_changes.yaml.template to custom_changes.yaml
- Find the formatting below for all custom configurations.
- 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. - Node labels
node_labels: <node name>: ingress: "true" - 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. - Pipeline worker count for logstash
conf
logstash_customs: pipelineWorkerCount: "5" - Replica count
replication: <pod_name>: count: "2" - 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.
- Pod
affinities
At the time modifying the custom_changes.yaml file for custom
configurations, the rules of yaml code should be intact.
- Before you start writing the custom configurations, ensure the three dashes “---” are present on the top of very first line of the custom configuration.
- Field and its scope must be accurate.
Post the changes in custom_changes.yaml, installing the plugins will apply all custom changes.
