---

##
# Source:
# `helm show values --repo 'https://charts.gitlab.io' 'gitlab-runner'`
##

useTini: false

image:
  registry: registry.gitlab.com
  image: gitlab-org/gitlab-runner
imagePullPolicy: IfNotPresent

gitlabUrl: https://gitlab.company.com/

unregisterRunners: true

terminationGracePeriodSeconds: 3600

concurrent: 50
shutdown_timeout: 0
checkInterval: 15

sessionServer:
  enabled: false

rbac:
  create: true
  generatedServiceAccountName: ""
  rules: []
  clusterWideAccess: false
  podSecurityPolicy:
    enabled: false
    resourceNames:
      - gitlab-runner

metrics:
  enabled: false
  portName: metrics
  port: 9252
  serviceMonitor:
    enabled: false

service:
  enabled: false
  type: ClusterIP

runners:
  config: |
    [[runners]]

      [runners.cache]

        Type = "s3"
        Path = "runner/"
        Shared = true
        MaxUploadedArchiveSize = 0

        [runners.cache.s3]
          ServerAddress = "s3.amazonaws.com"
          BucketName = "example-ci"
          BucketLocation = "eu-west-1"

      [runners.kubernetes]

        image = "alpine"
        pull_policy = [
          "if-not-present",
          "always"
        ]
        allowed_pull_policies = [
          "if-not-present",
          "always",
          "never"
        ]

        namespace = "{{.Release.Namespace}}"

        cpu_limit = "2"
        cpu_limit_overwrite_max_allowed = "15"
        cpu_request = "0"
        cpu_request_overwrite_max_allowed = "15"
        ephemeral_storage_limit = "512Mi"
        ephemeral_storage_limit_overwrite_max_allowed = "49Gi"
        ephemeral_storage_request = "0"
        ephemeral_storage_request_overwrite_max_allowed = "49Gi"
        helper_cpu_limit = "0.5"
        helper_cpu_limit_overwrite_max_allowed = "0.9"
        helper_cpu_request = "0"
        helper_cpu_request_overwrite_max_allowed = "0.9"
        helper_ephemeral_storage_limit = "64Mi"
        helper_ephemeral_storage_limit_overwrite_max_allowed = "1Gi"
        helper_ephemeral_storage_request = "0"
        helper_ephemeral_storage_request_overwrite_max_allowed = "1Gi"
        helper_memory_limit = "128Mi"
        helper_memory_limit_overwrite_max_allowed = "1Gi"
        helper_memory_request = "0"
        helper_memory_request_overwrite_max_allowed = "1Gi"
        memory_limit = "2Gi"
        memory_limit_overwrite_max_allowed = "62Gi"
        memory_request = "0"
        memory_request_overwrite_max_allowed = "62Gi"
        service_cpu_limit = "1"
        service_cpu_limit_overwrite_max_allowed = "3.9"
        service_cpu_request = "0"
        service_cpu_request_overwrite_max_allowed = "3.9"
        service_ephemeral_storage_limit_overwrite_max_allowed = "15Gi"
        service_ephemeral_storage_request_overwrite_max_allowed = "15Gi"
        service_memory_limit = "0.5Gi"
        service_memory_limit_overwrite_max_allowed = "15.5Gi"
        service_memory_request = "0"
        service_memory_request_overwrite_max_allowed = "15.5Gi"

        [runners.kubernetes.affinity]
          [runners.kubernetes.affinity.node_affinity]

            [runners.kubernetes.affinity.node_affinity.required_during_scheduling_ignored_during_execution]
              [[runners.kubernetes.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_terms]]
                [[runners.kubernetes.affinity.node_affinity.required_during_scheduling_ignored_during_execution.node_selector_terms.match_expressions]]
                  key = "app.example.org"
                  operator = "In"
                  values = [ "gitlab-runner" ]

            [[runners.kubernetes.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution]]
              weight = 1

              [runners.kubernetes.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference]
                [[runners.kubernetes.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.preference.match_expressions]]
                  key = "eks.amazonaws.com/capacityType"
                  operator = "In"
                  values = [ "ON_DEMAND" ]

        [runners.kubernetes.node_tolerations]
          "app.example.org=gitlab-runner" = "NoSchedule"
          "node-role.kubernetes.io/master" = "NoSchedule"


  configPath: ""
  name: "test-runner-on-k8s"
  secret: gitlab-runner-token
  cache: {}

securityContext:
  allowPrivilegeEscalation: false
  readOnlyRootFilesystem: false
  runAsNonRoot: true
  privileged: false
  capabilities:
    drop: ["ALL"]

strategy: {}

podSecurityContext:
  runAsUser: 100
  fsGroup: 65533

resources: {}

affinity: {}
topologySpreadConstraints: {}
nodeSelector: {}
tolerations: []

extraEnv: {}
extraEnvFrom: {}

hostAliases: []

deploymentAnnotations: {}
deploymentLabels:
  team: infra

podAnnotations: {}
podLabels:
  team: infra

priorityClassName: ""

secrets: []
configMaps: {}

volumeMounts: []
volumes: []

extraObjects: []
