This document describes how to configure the credentials required for GitLab instances.
GitLab has the following requirements for Redis deployment mode and version:
Standalone
and Sentinel
modes, but Redis Cluster
mode is not supportedCreate a Secret in the namespace where the GitLab instance is planned to be deployed, select the Opaque type, and add and fill in the following fields in the configuration:
Field | Description | Arch | Example Value |
---|---|---|---|
host | Redis connection address. Ensure that the GitLab service can connect to it. | standalone | 192.168.1.1 |
port | Redis connection port. Ensure that the GitLab service can connect to this port. | standalone | 6379 |
password | Redis instance account password. Required when Redis authentication is enabled. | standalone,sentinel | password111 |
address | Sentinel node connection address. | sentinel | 192.168.1.1:26379,192.168.1.2:26379,192.168.1.3:26379 |
masterName | The name of the instance group monitored by Sentinel in the sentinel.conf. | sentinel | mymaster |
sentinelPassword | Sentinel password for Sentinel instances. Required when Sentinel authentication is enabled. | sentinel | password111 |
Standalone Example
Sentinel Example
If you want to modify Redis connection information after deploying a GitLab instance, you need to directly update the GitLab instance resource, rather than modifying the credential content. For specific operations, please refer to Configuring Redis Access Credentials.
Redis service can be provided through Alauda Cache Service for Redis OSS
, please consider the following important requirements:
system-rdb-redis-7.2-sentinel
When creating a Redis instance, a Secret containing connection information is automatically generated, which can be used directly to deploy GitLab. This Secret resource can be filtered using the label middleware.instance/type: Redis
.
If the Redis instance and GitLab instance are not in the same namespace, you need to copy the Secret resource to the namespace where the GitLab instance is located.
For more Redis deployment parameters and high availability deployment requirements, please refer to the .
Using Alauda Cache Service for Redis OSS
Redis service can be provided by Alauda Cache Service for Redis OSS. In some special scenarios, some restrictions need to be noted.
GitLab has the following requirements for PostgreSQL versions:
Create a Secret in the namespace where the GitLab instance is planned to be deployed, select the Opaque type, and add and fill in the following fields in the configuration:
Field | Description | Example Value |
---|---|---|
host | Database connection address. Ensure that the GitLab service can connect to this database address. | 192.168.1.1 |
port | Database connection port. Ensure that the GitLab service can connect to this database port. | 5432 |
username | Database account username | gitlab |
password | Database account password | password111 |
database | Database name. This database must already exist and be empty. You can use the command create database <database name> to create it | gitlab_db |
sslmode | Whether to enable SSL for the database connection. Available options: - enable : Enable SSL connection- disable : Disable SSL connection, more about sslmode | enable |
YAML example:
How to create a database on a PG instance
Connect to the PG instance using the psql cli and execute the following command to create a database
Creating a separate database for gitaly cluster
In high availability mode, the gitaly component needs to be configured in cluster mode and requires a separate database to store gitaly metadata. You need to create another Secret to store the database connection information, with fields consistent with those described above.
sslmode is a parameter that controls the security of the connection between the Gitlab service and the PostgreSQL database. Available options:
enable
: Enable SSL connectiondisable
: Disable SSL connectionWhen you use Alauda support for PostgreSQL
, the sslmode
should be set to enable
.
When you use external PostgreSQL, the sslmode
is depends on your PostgreSQL configuration.
If you want to modify PostgreSQL connection information after deploying a GitLab instance, you need to directly update the GitLab instance resource, rather than modifying the credential content. For specific operations, please refer to Configure PostgreSQL Credentials.
Data Services
supports deploying PostgreSQL instances that can be used for GitLab deployment. When creating a PostgreSQL instance, please consider the following important requirements:
When creating a PostgreSQL instance, a Secret containing connection information is automatically generated. This Secret resource can be filtered using the label middleware.instance/type: PostgreSQL
.
This Secret contains host
, port
, username
, password
information. You need to supplement database
and sslmode
(set to enable
) information based on this Secret, and create a new secret in the namespace where the GitLab instance is located.
For more PostgreSQL deployment parameters and requirements, please refer to .
Create a Secret in the namespace where the GitLab instance is planned to be deployed, select the Opaque type, and add and fill in the following fields in the configuration:
Field | Description | Example Value |
---|---|---|
password | Set the password for the default root account, which must contain letters, numbers, and special characters, be at least 8 characters long, and common weak passwords cannot be used | password111@ |
namespace | Set the same namespace as the gitlab instance | tools |