Hi,
We are installing gitlab runner through gitlab operator following this guideline Install GitLab Runner Operator | GitLab
cat > gitlab-runner.yml << EOF
apiVersion: apps.gitlab.com/v1beta2
kind: Runner
metadata:
name: gitlab-runner
spec:
gitlabUrl: https://gitlab.example.com
buildImage: alpine
token: gitlab-runner-secret
EOF
And we would like to customize kind: Deployment to add tolerations, affinity and this Deployment is generated from this kind: Runner however when we check crd of kind: Runner then there is no property to customize it.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: gitlab-runner-system/gitlab-runner-serving-cert
controller-gen.kubebuilder.io/version: v0.6.1
operatorframework.io/installed-alongside-359e220c2d1a4988: operators/gitlab-runner-operator.v1.15.1
creationTimestamp: "2024-03-26T06:00:48Z"
generation: 40
labels:
olm.managed: "true"
operators.coreos.com/gitlab-runner-operator.operators: ""
name: runners.apps.gitlab.com
resourceVersion: "628361908"
uid: 04fce7c5-5c8e-4578-bda6-6b3835e5ae4f
spec:
conversion:
strategy: Webhook
webhook:
clientConfig:
caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ1ekNDQVdLZ0F3SUJBZ0lJWit6SlB4YmtKdW93Q2dZSUtvWkl6ajBFQXdJd1FqRVdNQlFHQTFVRUNoTU4KVW1Wa0lFaGhkQ3dnU1c1akxqRW9NQ1lHQTFVRUF4TWZiMnh0TFhObGJHWnphV2R1WldRdE5qZGxZMk01TTJZeApObVUwTWpabFlUQWVGdzB5TkRBME1EUXdOREl6TXpCYUZ3MHlOakEwTURRd05ESXpNekJhTUVJeEZqQVVCZ05WCkJBb1REVkpsWkNCSVlYUXNJRWx1WXk0eEtEQW1CZ05WQkFNVEgyOXNiUzF6Wld4bWMybG5ibVZrTFRZM1pXTmoKT1RObU1UWmxOREkyWldFd1dUQVRCZ2NxaGtqT1BRSUJCZ2dxaGtqT1BRTUJCd05DQUFTeUhuWmJscnpaR2YvNwp2K2sycC9YNktHYTczWXBDU3ZYN0hlY0V5MjF0VEwyK2xkZS9Kd3JCbmpWa3g2Z1J3Y3JHemdsVTB3UUh4clpPClFyQjNmQWtUbzBJd1FEQU9CZ05WSFE4QkFmOEVCQU1DQWdRd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlYKSFE0RUZnUVVMemZwQXVXL0RaY2Z5Ty9BcllWdkZhRGpWamd3Q2dZSUtvWkl6ajBFQXdJRFJ3QXdSQUlnZThOQgpETTFlaE42bTVPdC82aTQ0Y2I3NzlvUC9PTG43VVR4UjhYL2ljWnNDSUhlbUp4SnhvVnJla01lc2JRZ2t1YWhXClNlNEpoeEg2eGhtYVhjNWt1Zk9PCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
service:
name: gitlab-runner-controller-manager-service
namespace: operators
path: /convert
port: 443
conversionReviewVersions:
- v1
group: apps.gitlab.com
names:
kind: Runner
listKind: RunnerList
plural: runners
singular: runner
scope: Namespaced
versions:
- name: v1beta2
schema:
openAPIV3Schema:
description: Runner is the open source project used to run your jobs and send
the results back to GitLab
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: Specification of the desired behavior of a GitLab Runner
instance
properties:
azure:
description: options used to setup Azure blob storage as GitLab Runner
Cache
properties:
container:
description: Name of the Azure container in which the cache will
be stored
type: string
credentials:
description: Credentials secret contains 'accountName' and 'privateKey'
used to authenticate against Azure blob storage
type: string
storageDomain:
description: The domain name of the Azure blob storage e.g. blob.core.windows.net
type: string
type: object
buildImage:
description: The name of the default image to use to run build jobs,
when none is specified
type: string
ca:
description: Name of tls secret containing the custom certificate
authority (CA) certificates
type: string
cachePath:
description: Path defines the Runner Cache path
type: string
cacheShared:
description: Enable sharing of cache between Runners
type: boolean
cacheType:
description: 'Type of cache used for Runner artifacts Options are:
gcs, s3, azure'
type: string
cloneURL:
description: If specified, overrides the default URL used to clone
or fetch the Git ref
type: string
concurrent:
description: Option to limit the number of jobs globally that can
run concurrently. The operator sets this to 10, if not specified
format: int32
type: integer
config:
description: allow user to provide configmap name containing the user
provided config.toml
type: string
env:
description: Accepts configmap name. Provides user mechanism to inject
environment variables in the GitLab Runner pod via the key value
pairs in the ConfigMap
type: string
gcs:
description: options used to setup GCS (Google Container Storage)
as GitLab Runner Cache
properties:
bucket:
description: Name of the bucket in which the cache will be stored
type: string
credentials:
description: contains the GCS 'access-id' and 'private-key'
type: string
credentialsFile:
description: Takes GCS credentials file, 'keys.json'
type: string
type: object
gitlabUrl:
description: The fully qualified domain name for the GitLab instance.
For example, https://gitlab.example.com
type: string
helperImage:
description: If specified, overrides the default GitLab Runner helper
image
type: string
imagePullPolicy:
description: 'ImagePullPolicy sets the Image pull policy. One of Always,
Never, IfNotPresent. Defaults to Always if :latest tag is specified,
or IfNotPresent otherwise. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
type: string
interval:
description: Option to define the number of seconds between checks
for new jobs. This is set to a default of 30s by operator if not
set
format: int32
type: integer
locked:
description: Specify whether the runner should be locked to a specific
project. Defaults to false.
type: boolean
protected:
description: Specify whether the runner should only run protected
branches. Defaults to false.
type: boolean
runUntagged:
description: Specify if jobs without tags should be run. If not specified,
runner will default to true if no tags were specified. In other
case it will default to false.
type: boolean
runnerImage:
description: If specified, overrides the default GitLab Runner image.
Default is the Runner image the operator was bundled with.
type: string
s3:
description: options used to setup S3 object store as GitLab Runner
Cache
properties:
bucket:
description: Name of the bucket in which the cache will be stored
type: string
credentials:
description: Name of the secret containing the 'accesskey' and
'secretkey' used to access the object storage
type: string
insecure:
description: Use insecure connections or HTTP
type: boolean
location:
description: Name of the S3 region in use
type: string
server:
type: string
type: object
serviceaccount:
description: allow user to override service account used by GitLab
Runner
type: string
tags:
description: 'List of comma separated tags to be applied to the runner
More info: https://docs.gitlab.com/ee/ci/runners/#use-tags-to-limit-the-number-of-jobs-using-the-runner'
type: string
token:
description: Name of secret containing the 'runner-registration-token'
key used to register the runner
type: string
required:
- gitlabUrl
- token
type: object
status:
description: Most recently observed status of the GitLab Runner. It is
read-only to the user
properties:
message:
description: Additional information of GitLab Runner registration
type: string
phase:
description: Reports status of the GitLab Runner instance
type: string
registration:
description: Reports status of GitLab Runner registration
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: Runner
listKind: RunnerList
plural: runners
singular: runner
conditions:
- lastTransitionTime: "2024-03-26T06:00:48Z"
message: no conflicts found
reason: NoConflicts
status: "True"
type: NamesAccepted
- lastTransitionTime: "2024-03-26T06:00:48Z"
message: the initial names have been accepted
reason: InitialNamesAccepted
status: "True"
type: Established
storedVersions:
- v1beta2
Any suggestion to resolve this issue would be very much appreciated!
Thanks!