Sidecar containers
TPOSS Helm chart allows you to deploy sidecar containersOpens in a new tab for TPOSS. These are the configuration options that you can use to deploy and configure sidecar containers:
sidecarsinitContainerSidecarssidecarPVCssidecarSecretVolumes
Sidecar containers deployment
You can use the sidecars option to deploy one or multiple sidecar containers. This configuration option expects the list of containerOpens in a new tab specifications.
For example, you can add a debug sidecar using this configuration:
After the TPOSS pods are deployed, each of them will have the tposs-debugging-sidecar container with the following additional utilities:
bpfccurldrilliperf3iproute2netsniff-ngsocattcpdumptelnettrafgen
Apart from sidecar containers, TPOSS runs init containersOpens in a new tab to wait for the database to start and execute the database migration. If you need a sidecar container that runs independently of TPOSS init containers and starts before them, use the initContainerSidecars option. These sidecar containers can start, stop, or restart without affecting the main application container or other init containers. For more information, see the Kubernetes documentationOpens in a new tab.
For example, you can use this option to set up HAProxyOpens in a new tab to forward queries to multiple HAProxy instances. These instances, in turn, forward queries to multiple MySQL instances using a Kubernetes headless serviceOpens in a new tab. This setup operates independently from the TPOSS init containers, which handle database migrations.
Note
Any ConfigMapOpens in a new tab should be specified in the sidecars[container].configMap or initContainerSidecars[container].configMap of your sidecar container specification. The resulting ConfigMap name is generated as:
{TPOSS_HELM_RELEASE_NAME}-{CONFIGMAP_NAME}-configfor the ConfigMaps specified in sidecars{TPOSS_HELM_RELEASE_NAME}-{CONFIGMAP_NAME}-init-configfor the ConfigMap specified in initContainerSidecars
Caution
Do not use long names in sidecars[N].configMap and initContainersSidecars[N].configMap as the generated name can exceed the length limit (253 characters) of Kubernetes object names.
Volumes for sidecar containers
TPOSS provides two additional configuration options to set up Persistent VolumesOpens in a new tab and SecretsOpens in a new tab for the sidecar containers:
sidecarPVCssidecarSecretVolumes
You can deploy Persistent Volume Claims (PVCs) using the following configuration option:
You must also specify the PVC name and mount path in your sidecar container using the volumeMounts section.
For example:
Note
After deployment, the name of your PVC is automatically generated based on the volume name using this format: {TPOSS_HELM_RELEASE_NAME}-{VOLUME_NAME}-{POD_NAME}.
To create a Secret, use the following configuration option:
Note
After deployment, the name of your Secret is automatically generated based on the volume name using this format: {TPOSS_HELM_RELEASE_NAME}-{SECRET_NAME}-secret.