<p>Recently I installed a new GitLab Server in a Kubernetes cluster running on <code>GKE</code>.
I followed this documentation:</p>
<ul>
<li><a href="https://cloud.google.com/solutions/deploying-production-ready-gitlab-on-gke" rel="nofollow noreferrer">https://cloud.google.com/solutions/deploying-production-ready-gitlab-on-gke</a></li>
</ul>
<p>I used Helm 3 instead Helm 2.</p>
<p>Now I needed to configure a mail server to send emails to each operation (new user, pipelines, etc.) but I didn't find how to do that in this documentation.
I found a doc (<a href="https://docs.gitlab.com/omnibus/settings/smtp.html#example-configurations" rel="nofollow noreferrer">https://docs.gitlab.com/omnibus/settings/smtp.html#example-configurations</a>) but is useful only in GitLab installed in virtual machines, also I looked in the <code>replicaset</code> and <code>deployment</code>, but I can't find it.</p>
<p>How can I access my configurations in my GitLab Server?</p>
<ul>
<li>GitLab version: 13.7.0</li>
<li>Helm chart: gitlab-4.7.0</li>
</ul>

<p>As asked in the question:</p>
<blockquote>
<p>How can I access my configurations in my GitLab Server? GitLab version: 13.7.0 Helm chart: gitlab-4.7.0</p>
</blockquote>
<p>You already accessed some of the configuration of your <code>Gitlab</code> by your <code>values.yaml</code> file. This is the file that stores the configuration of the resources you will be (or was) deploying.</p>
<p>By following one of the parts of the official documentation:</p>
<ul>
<li><em><a href="https://cloud.google.com/solutions/deploying-production-ready-gitlab-on-gke#install_the_gitlab_chart" rel="nofollow noreferrer">Cloud.google.com: Solutions: Deploying production ready gitlab on GKE: Install the gitlab chart</a></em></li>
</ul>
<p>You created your own <code>values.yaml</code> and used it to override the values (only some) of the <code>values.yaml</code> file in the <code>Helm</code> Chart.</p>
<p>To pass additional configuration to your <code>Gitlab</code> you could either:</p>
<ul>
<li>Pull the whole <code>gitlab</code> chart, modify it's <code>values.yaml</code> and run it from local source:
<ul>
<li><code>$ helm pull gitlab/gitlab --untar</code></li>
<li>edit the <code>gitlab/values.yaml</code> file</li>
<li><code>$ helm install gitlab gitlab/ -f gcp-values.yaml</code> (<code>gcp-values.yaml</code> is the values from <code>GCP</code> guide and it's in the preceding directory)</li>
</ul>
</li>
<li>Add to your previously created <code>values.yaml</code> configuration that is responsible for managing email communication (add to the <code>values.yaml</code> from <code>GCP</code> guide).</li>
</ul>
<p>There are multiple parts responsible for mail communication in the <code>Gitlab</code> <code>values.yaml</code>.</p>
<p>For example, there is a part responsible for handling outgoing messages under <code>global.smtp</code> section:</p>
<pre class="lang-yaml prettyprint-override"><code>  ## doc/installation/deployment.md#outgoing-email
  ## Outgoing email server settings
  smtp:
    enabled: false
    address: smtp.mailgun.org
    port: 2525
    user_name: &quot;&quot;
    ## doc/installation/secrets.md#smtp-password
    password:
      secret: &quot;&quot;
      key: password
    # domain:
    authentication: &quot;plain&quot;
    starttls_auto: false
    openssl_verify_mode: &quot;peer&quot;

  ## doc/installation/deployment.md#outgoing-email
  ## Email persona used in email sent by GitLab
  email:
    from: ''
    display_name: GitLab
    reply_to: ''
    subject_suffix: ''
    smime:
      enabled: false
      secretName: &quot;&quot;
      keyName: &quot;tls.key&quot;
      certName: &quot;tls.crt&quot;
</code></pre>
<p>There are also parts for incoming messages, service desk etc.. You will need to check for yourself and configure it to match your needs.</p>
<p>The site that you mentioned:</p>
<ul>
<li><em><a href="https://docs.gitlab.com/omnibus/settings/smtp.html#example-configurations" rel="nofollow noreferrer">Docs.gitlab.com: Omnibus: Settings: SMTP: Example configurations</a></em></li>
</ul>
<p>Could be a good reference/guide when modifying the <code>values.yaml</code> file to support the mail configuration of your choosing.</p>
<p>I also encourage you to also check <a href="https://docs.gitlab.com/ee/administration/incoming_email.html" rel="nofollow noreferrer">this</a> site for incoming emails configuration.</p>
<hr />
<p>As for mail communication in <code>GKE</code>.</p>
<p><code>GKE</code> nodes are in fact <code>GCE</code> <code>VM's</code> and they are under certain limitations:</p>
<blockquote>
<h2>Sending email from an instance</h2>
<p>This document describes the options for sending mail from a virtual machine (VM) instance and provides general recommendations on how to set up your instances to send email.</p>
<h3>Using standard email ports</h3>
<p>Due to the risk of abuse, connections to destination TCP Port 25 are <a href="https://cloud.google.com/vpc/docs/firewalls#blockedtraffic" rel="nofollow noreferrer">always blocked</a> when the destination is external to your VPC network. This includes using SMTP relay with Google Workspace.</p>
<p>Google Cloud does not place any restrictions on traffic sent to external destination IP addresses using destination TCP ports 587 or 465.</p>
<p>-- <em><a href="https://cloud.google.com/compute/docs/tutorials/sending-mail" rel="nofollow noreferrer">Cloud.google.com: Compute: Docs: Tutorials: Sending mail</a></em></p>
</blockquote>
<p>Following on the above <a href="https://cloud.google.com/compute/docs/tutorials/sending-mail" rel="nofollow noreferrer">link</a>:</p>
<p>I've managed to use one of the mentioned external mail service providers to configure the outgoing email communication on my <code>Gitlab</code> instance. You can choose one that suits your needs the most.</p>
<p>You can also check this ServerFault answer which provides some additional information:</p>
<ul>
<li><em><a href="https://serverfault.com/questions/1043566/is-it-possible-to-run-an-smtp-server-like-postfix-on-a-google-cloud-instance-wit">Serverfault.com: Questions: Is it possible to run an SMTP server like postfix on a Google Cloud instance</a></em></li>
</ul>
