<p>I'm writing an Ansible task to deploy GitLab in my k3s environment.</p>
<p>According to the doc, I need to execute this to install GitLab using Helm:</p>
<pre class="lang-sh prettyprint-override"><code>$ helm install gitlab gitlab/gitlab \
  --set global.hosts.domain=DOMAIN \
  --set certmanager-issuer.email=me@example.com
</code></pre>
<p>But the <code>community.kubernetes.helm</code> doesn't handle <code>--set</code> parameters and only call helm with the <code>--values</code> parameter.</p>
<p>So my Ansible task looks like this:</p>
<pre class="lang-yaml prettyprint-override"><code>- name: Deploy GitLab
  community.kubernetes.helm:
    update_repo_cache: yes
    release_name: gitlab
    chart_ref: gitlab/gitlab
    release_namespace: git
    release_values:
      global.hosts.domain: example.com
      certmanager-issuer.email: info@example.com
</code></pre>
<p>But the helm chart still return the error <code>You must provide an email to associate with your TLS certificates. Please set certmanager-issuer.email.</code></p>
<p>I've tried manually in a terminal, and it seems that the GitLab helm chart requires <code>--set</code> parameters and fail with <code>--values</code>. But <code>community.kubernetes.helm</code> doesn't.</p>
<p>What can I do?<br />
Is there a bug on GitLab helm chart side?</p>

<blockquote>
<p>it seems that the GitLab helm chart requires --set parameters and fail with --values</p>
</blockquote>
<p>That is an erroneous assumption; what you are running into is that <code>--set</code> splits on <code>.</code> because otherwise providing fully-formed YAML on the command line would be painful</p>
<p>The correct values are using sub-objects where the <code>.</code> occurs:</p>
<pre class="lang-yaml prettyprint-override"><code>- name: Deploy GitLab
  community.kubernetes.helm:
    update_repo_cache: yes
    release_name: gitlab
    chart_ref: gitlab/gitlab
    release_namespace: git
    release_values:
      global:
        hosts:
          # https://gitlab.com/gitlab-org/charts/gitlab/-/blob/v4.4.5/values.yaml#L47
          domain: example.com
      # https://gitlab.com/gitlab-org/charts/gitlab/-/blob/v4.4.5/values.yaml#L592-595
      certmanager-issuer:
        email: info@example.com
</code></pre>
