feat: improve readiblity
This commit is contained in:
parent
5b1071c732
commit
875953af5c
1 changed files with 23 additions and 10 deletions
|
|
@ -1,10 +1,11 @@
|
|||
# Gitlab Runner on OCP
|
||||
|
||||
A quick and dirty guide for making the Gitlab Runner work on OCP.
|
||||
I know this is not production ready!
|
||||
A quick and dirty guide for making the Gitlab Runner work on OCP. This is probably not what you want for you prodcution
|
||||
environment...
|
||||
|
||||
## Step 1 Setup namespace and RBAC
|
||||
|
||||
```shell
|
||||
# 1. Setup namespace and RBAC
|
||||
oc new-project gitlab-runner
|
||||
oc apply -f - <<EOF
|
||||
apiVersion: v1
|
||||
|
|
@ -37,15 +38,31 @@ roleRef:
|
|||
name: gitlab-runner
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
EOF
|
||||
```
|
||||
|
||||
## Step 2 Create secrets
|
||||
|
||||
[!warning] REPLACE YOUR TOKEN!
|
||||
|
||||
```shell
|
||||
# 2. Create secret (REPLACE TOKEN!)
|
||||
oc create secret generic gitlab-runner-secret --from-literal=runner-registration-token=YOUR_REGISTRATION_TOKEN -n gitlab-runner
|
||||
oc create secret generic gitlab-runner-secret \
|
||||
--from-literal=runner-registration-token=YOUR_REGISTRATION_TOKEN \
|
||||
-n gitlab-runner
|
||||
```
|
||||
|
||||
# 3. Apply SCCs
|
||||
## 3. Apply SCCs
|
||||
|
||||
```shell
|
||||
oc adm policy add-scc-to-user anyuid -z gitlab-runner -n gitlab-runner
|
||||
oc adm policy add-scc-to-user privileged -z gitlab-runner -n gitlab-runner
|
||||
```
|
||||
|
||||
# 4. Deploy runner (REPLACE TOKEN IN YAML!)
|
||||
## 4. Deploy runner (REPLACE TOKEN IN YAML!)
|
||||
|
||||
[!warning] REPLACE YOUR TOKEN!
|
||||
|
||||
```shell
|
||||
oc apply -f - <<EOF
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
@ -100,8 +117,4 @@ spec:
|
|||
- name: config
|
||||
emptyDir: {}
|
||||
EOF
|
||||
|
||||
# 5. Verify
|
||||
oc get pods -n gitlab-runner
|
||||
oc logs -l app=gitlab-runner -n gitlab-runner
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue