Skip to main content

Madhava Kubernetes Helm Chart

Madhava Intermediate Servers can be installed in Kubernetes Cluster environments using Helm Charts.

The Madhava servers are installed as a Statefulset along with an optional Postgres DB as a side container

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure

Install Instructions

The steps to install the Madhava Helm chart are :

  • Add Gyeeta Repo to Helm
  • Fetch and edit the values.yaml for the Madhava chart
  • Install the Madhava chart with the edited values

helm repo add gyeeta https://gyeeta.io/helmcharts
helm repo update
helm show values gyeeta/madhava > /tmp/madhava.yaml

# Thereafter you can edit the /tmp/madhava.yaml file if you need to change any option.
# After editing the /tmp/madhava.yaml, install the Madhava Helm chart using :

helm install --namespace gyeeta --create-namespace madhava1 gyeeta/madhava -f /tmp/madhava.yaml

Uninstalling the Chart

To uninstall the Madhava deployment say madhava1 as per command above :

helm uninstall madhava1

Madhava Chart Parameters

The default Chart config can be obtained using the command :

helm show values gyeeta/madhava > /tmp/madhava.yaml

Then users can edit the /tmp/madhava.yaml file.

Mandatory parameters to provide

The following are the mandatory parameters which users need to provide while installing the chart either using the --set CLI option or by editing the yaml values in the file saved (for example, the /tmp/madhava.yaml file in the command above) :

  • madhava_config.shyama_hosts
  • madhava_config.shyama_ports
  • madhava_config.shyama_secret

The Helm chart install will fail if these parameters are not provided. Explanation about these parameters are given below.

info

The default Chart values enable a Replica Count of 2. This means, 2 pods of Madhava servers will be started.

Please refer to Number of Madhava Servers needed for details on planning the number of Madhava Replica counts.

NameDescriptionData TypeDefault Value
madhava_config.madhava_nameName of madhava instance : Name must start with keyword madhava : If not specified, auto-generatedString""
madhava_config.shyama_hostsShyama Service Domains : Specify one or more Shyama Service Names (e.g., [ "shyama1-headless" ])Array[]
madhava_config.shyama_portsShyama Service Ports : Specify one or more Shyama Service Ports (e.g., [ 10037 ])Array[]
madhava_config.shyama_secretPassword string to be used by remote Madhava servers to authenticate. If not specified, auto-generatedString""
madhava_config .shyama_existing_secretnameName of external K8s Secret containing the shyama_secret. Use if shyama_secret not specifiedString""
madhava_config.cloud_typeCloud Operator : Specify as either of aws, gcp, azure. For other clouds or on-prem, leave blankString""
madhava_config.region_nameRegion Name : Ignore if cloud_type is set. For on-prem or other clouds, specify as the Network region nameString""
madhava_config.zone_nameZone Name : Ignore if cloud_type is set. For on-prem or other clouds, specify as the Network Zone nameString""
madhava_config.logtofileProcess Log sent to file instead of stdout/stderr. If true will use the emptyDir mount point for loggingBooleantrue
madhava_config.db .postgres_hostnamePostgres DB Host to connect to. If postgres.enabled is true, then specify as localhostStringlocalhost
madhava_config.db .postgres_portPostgres DB Port to connect to. If postgres.enabled is true, then specify as 10040Number10040
madhava_config.db .external_postgres_userPostgres Username. Specify only if external postgres DB to be used (postgresdb.enabled is false)String""
madhava_config.db .external_postgres_passwordPostgres User Password. Specify only if external postgres DB to be used (postgresdb.enabled is false)String""
madhava_config.db .storage_daysNumber of days of data storage in DB (max 60)Number3
madhava_config.service.typeMadhava Kubernetes Service type (Specify either ClusterIP or NodePort)StringClusterIP
madhava_config.service.portMadhava Kubernetes Service portNumber10037
madhava_config.service .nodePortMadhava Kubernetes Node port. Specify if type set to NodePort. Choose port between 30000-32767Number""
madhava_config.service .clusterIPStatic ClusterIP or None for headless servicesString""
madhava_config.service .annotationsService AnnotationsObject{}
madhava_config.service .loadBalancerIPLoad balancer IP if service type is LoadBalancerString""
madhava_config.service .externalTrafficPolicyCluster External Traffic PolicyStringCluster
madhava_config.service .loadBalancerSourceRangesAddresses that are allowed when service is LoadBalancerArray[]

The main Postgres Container parameters are mentioned below.

NameDescriptionData TypeDefault Value
postgresdb.enabledEnable or Disable Madhava specific DB container. If false, an external Postgres must be specified in the madhava configBooleantrue
postgresdb.resources .requestsPostgres Container Resource RequestsObject{}
postgresdb.resources .limitsPostgres Container Resource LimitsObject{}
postgresdb.mounts .volumesList of extra volumes to add to the Postgres containerArray[]
postgresdb.mounts .volumeMountsList of extra volume mounts to add to the Postgres containerArray[]
postgresdb.extra.envExtra environment variables to pass onto Postgres containerObject{}
postgresdb.extra.argsExtra Command Line Arguments (CLI) to pass onto Postgres containerArray[]
postgresdb.extra.envinitExtra environment variables to pass onto Postgres Init db containerObject{}
postgresdb.extra.argsinitExtra Command Line Arguments (CLI) to pass onto Postgres Init db containerArray[]
postgresdb.postgresdb_config .passwordpostgres user password. If empty, will be auto-generatedString""
postgresdb.postgresdb_config .service.portPort on which the Postgres process will listen onNumber10040
postgresdb.persistence.enabledPostgres data persistence using PVC. If false, will use emptyDir (data delete on pod termination)Booleantrue
postgresdb.persistence .existingClaimName of an existing PVC to use : If used, specify only for replicaCount set as 1String""
postgresdb.persistence .storageClassPVC Storage Class for Postgres data volume. If empty, the default provisioner is used.String""
postgresdb.persistence .accessModesPVC Access Mode for Postgres volumeStringReadWriteOnce
postgresdb.persistence.sizePVC Storage Size for Postgres volumeString20Gi
postgresdb.persistence .annotationsAnnotations for the PVCObject{}
postgresdb.persistence .selectorSelector to match an existing Persistent VolumeObject{}
postgresdb.persistence .dataSourceCustom PVC dataSourceObject{}
postgresdb.persistence .dataSourceRefCustom PVC dataSourceRef. If specified dataSource will be ignoredObject{}
postgresdb.initChownData .enabledIf false, data ownership will not be reset at startupBooleanfalse
info

Once this chart is deployed, it is not possible to change the Postgres DB access credentials, such as username or password, using Helm. To change these after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or connect to DB externally and manually set the params.

Other parameters

NameDescriptionData TypeDefault Value
nameOverrideSet a new name if you want to override the release name usedString""
fullnameOverrideSet a new name if you want to override the fullname usedString""
clusterDomainDefault Kubernetes cluster domainStringcluster.local
resources.requestsMadhava Container Resource RequestsObject{}
resources.limitsMadhava Container Resource LimitsObject{}
hostAliasesMadhava pod host aliases for /etc/hostsArray[]
readinessEnabledEnable Readiness ProbeBooleantrue
podSecurityPolicyEnable PodSecurityPolicy (only for K8s versions < 1.25)Booleanfalse
affinityAffinity constraint for pod schedulingObject{}
podAffinityPresetPod affinity preset. Ignored if affinity is set. Allowed values: soft or hardString""
podAntiAffinityPresetPod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hardStringsoft
nodeAffinityPreset.typeNode affinity preset. Ignored if affinity is set. Allowed values: soft or hardString""
nodeAffinityPreset.keyNode label key to match. Ignored if affinity is set.String""
nodeAffinityPreset.valuesNode label values to match. Ignored if affinity is set.Array[]
replicaCountNumber of madhava replicas. This number needs to be based on max Hosts to be monitoredNumber2
mounts.volumesList of extra volumes to add to the Madhava containerArray[]
mounts.volumeMountsList of extra volume mounts to add to the Madhava containerArray[]
extra.envExtra environment variables to pass onto Madhava containerObject{}
extra.argsExtra Command Line Arguments (CLI) to pass onto Madhava containerArray[]
networkPolicy.enabledIf enabled is true, all egress is allowed and ingress is limited to Madhava ports with optional namespaceSelectorBooleanfalse
networkPolicy.namespaceSelectorKubernetes LabelSelector to explicitly select namespaces from which traffic could be allowedBooleanfalse
networkPolicy.enabledIf enabled is true, all egress is allowed and ingress is limited to Madhava ports with optional namespaceSelectorObject{}
serviceAccount.createCreate ServiceAccountBooleanfalse
info

If madhava_config.logtofile is set to true, then the Madhava process logs will be sent to /hostdata/log/madhava.log. Users can analyze the logs by running the command :


# Get the Madhava pod name and fill in MADHAVAPOD env

kubectl exec -it $MADHAVAPOD -- more /hostdata/log/madhava.log