---
apiVersion: v1
kind: ConfigMap
metadata:
  name: runner-staging-patch
  namespace: gitlab
  annotations:
    cd.spack.io/staged-resource: "1"
data:
  apiVersion: helm.fluxcd.io/v1
  kind: HelmRelease
  name: runner-small-x86-pub
  patch: |
    - op: replace
      path: /metadata/name
      value: runner-{ENV}
    - op: replace
      path: /spec/releaseName
      value: runner-{ENV}
    - op: replace
      path: /spec/values/gitlabUrl
      value: "https://gitlab.{ENV}.spack.io/"
    - op: replace
      path: /spec/values/terminationGracePeriodSeconds
      value: 300  # five minutes
    - op: replace
      path: /spec/values/concurrent
      value: 3
    - op: replace
      path: /spec/values/checkInterval
      value: 1
    - op: replace
      path: /spec/values/runners/requestConcurrency
      value: 3
    - op: replace
      path: /spec/values/runners/tags
      value: "x86_64,avx,{ENV},public,aws,spack"
    - op: replace
      path: /spec/values/runners/secret
      value: gitlab-{ENV}-gitlab-runner-secret
    - op: replace
      path: /spec/values/runners/namespace
      value: gitlab
    - op: replace
      path: /spec/values/runners/pollTimeout
      value: 30
    - op: replace
      path: /spec/values/runners/nodeSelector/spack.io~1node-pool
      value: base
    - op: remove
      path: /spec/values/runners/builds/cpuRequests
    - op: remove
      path: /spec/values/runners/nodeSelector/kubernetes.io~1arch
