From 73270d3a7c94616675f27d70cc849163adc040b6 Mon Sep 17 00:00:00 2001
From: Helmut Hutzler <helmut.hutzler@th-nuernberg.de>
Date: Fri, 16 Sep 2022 10:42:25 +0000
Subject: [PATCH] Add locked: false to runner configuration

---
 GITLAB_Runner/gitlab-runner-manifest.yaml |  2 +-
 GITLAB_Runner/runner-chart-values.yaml    |  1 +
 GITLAB_Runner/runner-manifest.yaml_save   | 35 -----------------------
 deployments/gitlab-runner-manifest.yaml   |  2 +-
 4 files changed, 3 insertions(+), 37 deletions(-)
 delete mode 100644 GITLAB_Runner/runner-manifest.yaml_save

diff --git a/GITLAB_Runner/gitlab-runner-manifest.yaml b/GITLAB_Runner/gitlab-runner-manifest.yaml
index d940345..1b53205 100644
--- a/GITLAB_Runner/gitlab-runner-manifest.yaml
+++ b/GITLAB_Runner/gitlab-runner-manifest.yaml
@@ -246,7 +246,7 @@ spec:
         - name: RUNNER_EXECUTOR
           value: "kubernetes"
         - name: REGISTER_LOCKED
-          value: "true"
+          value: "false"
         - name: RUNNER_TAG_LIST
           value: ""
         - name: KUBERNETES_PRIVILEGED
diff --git a/GITLAB_Runner/runner-chart-values.yaml b/GITLAB_Runner/runner-chart-values.yaml
index 641fabc..7c420c1 100644
--- a/GITLAB_Runner/runner-chart-values.yaml
+++ b/GITLAB_Runner/runner-chart-values.yaml
@@ -19,6 +19,7 @@ rbac:
 # https://docs.gitlab.com/runner/executors/kubernetes.html#using-dockerdind
 runners:
     privileged: true
+    locked: false
     cache:
       ## General settings
       cacheType: s3
diff --git a/GITLAB_Runner/runner-manifest.yaml_save b/GITLAB_Runner/runner-manifest.yaml_save
deleted file mode 100644
index c9f7bc2..0000000
--- a/GITLAB_Runner/runner-manifest.yaml_save
+++ /dev/null
@@ -1,35 +0,0 @@
-# The GitLab Server URL (with protocol) that you want to register the runner against
-# ref: https://docs.gitlab.com/runner/commands/index.html#gitlab-runner-register
-#
-gitlabUrl: https://git.informatik.fh-nuernberg.de/
-
-# The registration token for adding new runners to the GitLab server
-# Retrieve this value from your GitLab instance
-# For more info: https://docs.gitlab.com/ee/ci/runners/index.html
-#
-runnerRegistrationToken: "GR1348941-DZhkAiiFzq9HpjTjewS"
-
-# For RBAC support:
-rbac:
-    create: true
-
-# Run all containers with the privileged flag enabled
-# This flag allows the docker:dind image to run if you need to run Docker commands
-# Read the docs before turning this on:
-# https://docs.gitlab.com/runner/executors/kubernetes.html#using-dockerdind
-runners:
-    privileged: true
-    cache:
-      ## General settings
-      cacheType: s3
-      cacheShared: true
-      cachePath: "gitlab-runner"
-      ## S3 settings
-      s3ServerAddress: minio:9000
-      s3BucketName: gitlab-runner
-      # s3BucketLocation:
-      s3CacheInsecure: true
-      secretName: gitlab-runner-s3-access-secret
-      #s3AccessKey: "minio"
-      #s3SecretrKey: "minio123"
-
diff --git a/deployments/gitlab-runner-manifest.yaml b/deployments/gitlab-runner-manifest.yaml
index d940345..1b53205 100644
--- a/deployments/gitlab-runner-manifest.yaml
+++ b/deployments/gitlab-runner-manifest.yaml
@@ -246,7 +246,7 @@ spec:
         - name: RUNNER_EXECUTOR
           value: "kubernetes"
         - name: REGISTER_LOCKED
-          value: "true"
+          value: "false"
         - name: RUNNER_TAG_LIST
           value: ""
         - name: KUBERNETES_PRIVILEGED
-- 
GitLab