Hi, I am currently trying to deploy a postgresql-ha (more specifically bitnami/postgresql-ha) helm chart through a gitlab CI job.
Locally, when running helm install postgresql ./postgresql-ha
, I am able to create the chart on my remote Kubernetes Cluster successfully without any error.
./postgresql-ha
is an unmodified pull of bitnami/postgresql-ha
.
When I try to run the same command in Gitlab's CI, with a properly set helm
and kubectl
, I get this error:
Release "postgresql" does not exist. Installing it now.
Error: template: postgresql-ha/templates/NOTES.txt:60:4: executing "postgresql-ha/templates/NOTES.txt" at <include "postgresql-ha.validateValues" .>: error calling include: template: postgresql-ha/templates/_helpers.tpl:682:51: executing "postgresql-ha.validateValues" at <fail>: error calling fail:
VALUES VALIDATION:
postgresql-ha: Nodes hostnames
PostgreSQL nodes hostnames exceeds the characters limit for Pgpool: 128.
Consider using a shorter release name or namespace.
The first line validates the kubectl/helm configurations.
##########
# Stages #
##########
stages:
- deploy charts
########
# Jobs #
########
deploy_postgresql-ha:
image: dtzar/helm-kubectl:3.0.0
stage: deploy charts
environment:
name: production
script:
- helm upgrade --install postgresql ./postgresql-ha
The Kubernetes Cluster was created via Gitlab's Kubernetes Integration tool and is therefore already set up, as per this Gitlab Documentation page.
Thanks in advance the help!
It seems there is a bug on pgpool:
ping probes fail with long hostnames due to small buffer pgpool calls "ping -q -c3 " and parses the result to ascertain if a host is up or down. Unfortunately it uses a rather small buffer to read the output and the last line of the ping command can get truncated. This means that pgpool assumes the host is down.
Bitnami upgraded the code so now long hostnames are not allowed anymore. Nodehostname is composed on the following components, so you can adjust:
$nodeHostname := printf "%s-00.%s.%s.svc.%s:1234" $postgresqlFullname $postgresqlHeadlessServiceName $releaseNamespace $clusterDomain }}
https://github.com/bitnami/charts/blob/master/bitnami/postgresql-ha/templates/_helpers.tpl