<h2>What I'm trying to achieve</h2>

<p>Hi, I am currently trying to deploy a postgresql-ha (more specifically bitnami/postgresql-ha) helm chart through a gitlab CI job.</p>

<h2>What I can achieve locally</h2>

<p>Locally, when running <code>helm install postgresql ./postgresql-ha</code>, I am able to create the chart on my remote Kubernetes Cluster successfully without any error. </p>

<p><code>./postgresql-ha</code> is an unmodified pull of <code>bitnami/postgresql-ha</code>.</p>

<h2>What happens when I run it through CI</h2>

<p>When I try to run the same command in Gitlab's CI, with a properly set <code>helm</code> and <code>kubectl</code>, I get this error:</p>

<pre><code>Release "postgresql" does not exist. Installing it now.
Error: template: postgresql-ha/templates/NOTES.txt:60:4: executing "postgresql-ha/templates/NOTES.txt" at &lt;include "postgresql-ha.validateValues" .&gt;: error calling include: template: postgresql-ha/templates/_helpers.tpl:682:51: executing "postgresql-ha.validateValues" at &lt;fail&gt;: 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.
</code></pre>

<p>The first line validates the <strong>kubectl</strong>/<strong>helm</strong> configurations.</p>

<h2><em>.gitlab-ci.yml</em> File</h2>

<pre><code>##########
# 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
</code></pre>

<p>The Kubernetes Cluster was created via Gitlab's Kubernetes Integration tool and is therefore already set up, as per <a href="https://docs.gitlab.com/ee/user/project/clusters/#deploying-to-a-kubernetes-cluster" rel="nofollow noreferrer">this Gitlab Documentation page</a>.</p>

<p>Thanks in advance the help!</p>

Sebastien De Varennes
<p>It seems there is a bug on pgpool: </p>

<p><em>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.</em></p>

<p><a href="https://pgpool.net/mantisbt/print_all_bug_page_word.php?search=&amp;sort=&amp;dir=DESC&amp;type_page=html&amp;export=-1&amp;show_flag=0" rel="nofollow noreferrer">https://pgpool.net/mantisbt/print_all_bug_page_word.php?search=&amp;sort=&amp;dir=DESC&amp;type_page=html&amp;export=-1&amp;show_flag=0</a></p>

<p>Bitnami upgraded the code so now long hostnames are not allowed anymore. Nodehostname is composed on the following components, so you can adjust: </p>

<pre><code>$nodeHostname := printf "%s-00.%s.%s.svc.%s:1234" $postgresqlFullname $postgresqlHeadlessServiceName $releaseNamespace $clusterDomain }}
</code></pre>

<p><a href="https://github.com/bitnami/charts/blob/master/bitnami/postgresql-ha/templates/_helpers.tpl" rel="nofollow noreferrer">https://github.com/bitnami/charts/blob/master/bitnami/postgresql-ha/templates/_helpers.tpl</a></p>
