GitLab Operator
If you already have a Git repository consider using that and skip this step.
Official Documentation
GitLab Operator: https://gitlab.com/gitlab-org/cloud-native/gitlab-operator
Install the GitLab Operator from the OperatorHub
cluster admin
role is required.As a cluster administrator, install the GitLab operator from the OperatorHub to the
namespace gitlab-system
as follows:
Navigate in the OpenShift Web Console to the Operators → OperatorHub page
Filter by keyword: gitlab
Select the operator: GitLab provided by GitLab Inc
Read the information about the operator and click Install
On the Create Operator Subscription page:
Select option A specific namespace on the cluster with namespace
gitlab-system
Select an update channel (if more than one is available)
Select Automatic approval strategy
Click Subscribe
After the subscription's upgrade status is up to date, navigate in the web console to the Operators → Installed Operators page
Select the GitLab operator and verify that the content for the Overview tab of the Operators → Operator Details page is displayed
Create the GitLab instance
Create the GitLab CRD instance in the namespace gitlab-system
as follows:
Navigate in the OpenShift Web Console to the Operators → Installed Operators page
Select the GitLab Operator
Navigate to the GitLab tab of the Operators → Operator Details page
Click Create GitLab
Enter the resource definition (See Example GitLab Configuration)
Click on Create
Verify that in the GitLab tab the newly created
gitlab
CRD instance is displayed.
Example GitLab Configuration
apiVersion: apps.gitlab.com/v1beta1
kind: GitLab
metadata:
name: gitlab
namespace: gitlab-system
spec:
chart:
values:
certmanager:
install: false
global:
appConfig:
omniauth:
enabled: true
autoLinkSamlUser: false
providers:
- key: provider
secret: gitlab-client
syncProfileAttributes:
- email
autoSignInWithProvider: null
syncProfileFromProvider: []
allowBypassTwoFactor: []
allowSingleSignOn:
- oauth2_generic
autoLinkUser: []
externalProviders: []
autoLinkLdapUser: false
blockAutoCreatedUsers: false
hosts:
domain: apps.openshift.my.cloud
ingress:
configureCertmanager: false
version: 6.2.2