Skip to content

Docs: Update values.yaml comments to reference kubernetes service accounts docs

Romuald Atchadé requested to merge rbac-default-values-for-ownerreference into main

What does this MR do?

This MR update the default RBAC permissions to allow support the changes made in the !2983

Why was this MR needed?

This MR is needed to be able to run jobs with gitlab-runner 14.2 or later using the kubernetes executor. It also applies the principle of the least privileges needed for the account

value.yaml
imagePullPolicy: IfNotPresent

gitlabUrl: https://gitlab.com/

runnerToken: "__REDACTED__"

terminationGracePeriodSeconds: 3600

concurrent: 10

checkInterval: 30

## For RBAC support:
rbac:
  create: true

  rules: []

  clusterWideAccess: false

  podSecurityPolicy:
    enabled: false
    resourceNames:
    - gitlab-runner

metrics:
  enabled: true

## Configuration for the Pods that the runner launches for each new job
##
runners:
  config: |
    [[runners]]
    name = "kubernetes"
    executor = "kubernetes"
    [runners.kubernetes]
      image = "alpine:3.11"

  cache: {}

  builds: {}

  services: {}

  helpers: {}

securityContext:
  runAsUser: 100
  fsGroup: 65533

resources: {}

affinity: {}

nodeSelector: {}

tolerations: []

hostAliases: []

podAnnotations: {}

podLabels: {}

secrets: []

configMaps: {}

What's the best way to test this MR?

  1. Install gitlab-runner using the values.yaml specified above
helm install --namespace <NAMESPACE> gitlab-runner -f values.yaml gitlab/gitlab-runner
  1. The job will succeed :
  2. Delete the gitlab-runner instance installed
helm delete --namespace <NAMESPACE> gitlab-runner

What are the relevant issue numbers?

close: gitlab-org/gitlab-runner#28167 (closed)

Edited by Georgi N. Georgiev

Merge request reports