このコンテンツは選択した言語では利用できません。
Chapter 3. Configuring self-hosted GitLab runner requirements
If you use a self-hosted GitLab instance or self-hosted GitLab runners on OpenShift with Red Hat Advanced Developer Suite - software supply chain, you might encounter failures. The following procedures outline adjustments you might need to make.
- Security Context Constraint (SCC): This is required only if you use your own GitLab runners on OpenShift. This applies whether you are using a self-hosted GitLab instance or gitlab.com.
- Maximum Artifact Size: This is required only if you use a self-hosted GitLab instance
Prerequisites
- You have administrative access to your self-hosted GitLab instance.
- You have cluster-admin access to the OpenShift cluster where your runners will start their jobs.
-
You have installed the OpenShift CLI (
oc).
Procedure
If you use self-hosted runners on OpenShift, set the required security context for the GitLab runners by applying a custom Security Context Constraint (SCC).
Create a YAML file, for example
gitlab-ci-scc.yml, with the following sample content.Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThis manifest is a sample. You might need to adjust settings, such as the namespace in the
usersfield, for your environment.Apply the manifest to your cluster.
oc apply -f gitlab-ci-sa-scc.yml
$ oc apply -f gitlab-ci-sa-scc.ymlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
-
If you use a self-hosted GitLab instance, increase the maximum artifact size to prevent pipeline failures. The default 100 MB limit is often insufficient. Increase the limit to at least 1 GB (
1024MB) by following the official GitLab documentation.
Verification
Verify that the Security Context Constraint has been created.
oc get scc gitlab-ci-sa-scc
$ oc get scc gitlab-ci-sa-sccCopy to Clipboard Copied! Toggle word wrap Toggle overflow The command should return the name of the SCC.
- After running a pipeline, confirm that it no longer fails due to security context or artifact size errors.
Revised on 2026-02-04 23:23:45 UTC