Skip to content

Commit 55722d0

Browse files
operator gitlab-runner-operator (1.30.1)
1 parent 46f0e69 commit 55722d0

7 files changed

+925
-0
lines changed
Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: v0.14.0
6+
creationTimestamp: null
7+
name: runners.apps.gitlab.com
8+
spec:
9+
group: apps.gitlab.com
10+
names:
11+
kind: Runner
12+
listKind: RunnerList
13+
plural: runners
14+
singular: runner
15+
scope: Namespaced
16+
versions:
17+
- name: v1beta2
18+
schema:
19+
openAPIV3Schema:
20+
description: Runner is the open source project used to run your jobs and send
21+
the results back to GitLab
22+
properties:
23+
apiVersion:
24+
description: |-
25+
APIVersion defines the versioned schema of this representation of an object.
26+
Servers should convert recognized schemas to the latest internal value, and
27+
may reject unrecognized values.
28+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
29+
type: string
30+
kind:
31+
description: |-
32+
Kind is a string value representing the REST resource this object represents.
33+
Servers may infer this from the endpoint the client submits requests to.
34+
Cannot be updated.
35+
In CamelCase.
36+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
37+
type: string
38+
metadata:
39+
type: object
40+
spec:
41+
description: Specification of the desired behavior of a GitLab Runner
42+
instance
43+
properties:
44+
azure:
45+
description: |-
46+
options used to setup Azure blob
47+
storage as GitLab Runner Cache
48+
properties:
49+
container:
50+
description: Name of the Azure container in which the cache will
51+
be stored
52+
type: string
53+
credentials:
54+
description: |-
55+
Credentials secret contains 'accountName' and 'privateKey'
56+
used to authenticate against Azure blob storage
57+
type: string
58+
storageDomain:
59+
description: |-
60+
The domain name of the Azure blob storage
61+
e.g. blob.core.windows.net
62+
type: string
63+
type: object
64+
buildImage:
65+
description: |-
66+
The name of the default image to use to run
67+
build jobs, when none is specified
68+
type: string
69+
ca:
70+
description: |-
71+
Name of tls secret containing the custom certificate
72+
authority (CA) certificates
73+
type: string
74+
cachePath:
75+
description: Path defines the Runner Cache path
76+
type: string
77+
cacheShared:
78+
description: Enable sharing of cache between Runners
79+
type: boolean
80+
cacheType:
81+
description: |-
82+
Type of cache used for Runner artifacts
83+
Options are: gcs, s3, azure
84+
type: string
85+
cloneURL:
86+
description: If specified, overrides the default URL used to clone
87+
or fetch the Git ref
88+
type: string
89+
concurrent:
90+
description: |-
91+
Option to limit the number of jobs globally that can run concurrently.
92+
The operator sets this to 10, if not specified
93+
format: int32
94+
type: integer
95+
config:
96+
description: |-
97+
allow user to provide configmap name
98+
containing the user provided config.toml
99+
type: string
100+
env:
101+
description: |-
102+
Accepts configmap name. Provides user mechanism to inject environment
103+
variables in the GitLab Runner pod via the key value pairs in the ConfigMap
104+
type: string
105+
gcs:
106+
description: |-
107+
options used to setup GCS (Google
108+
Container Storage) as GitLab Runner Cache
109+
properties:
110+
bucket:
111+
description: Name of the bucket in which the cache will be stored
112+
type: string
113+
credentials:
114+
description: contains the GCS 'access-id' and 'private-key'
115+
type: string
116+
credentialsFile:
117+
description: Takes GCS credentials file, 'keys.json'
118+
type: string
119+
type: object
120+
gitlabUrl:
121+
description: |-
122+
The fully qualified domain name for the GitLab instance.
123+
For example, https://gitlab.example.com
124+
type: string
125+
helperImage:
126+
description: If specified, overrides the default GitLab Runner helper
127+
image
128+
type: string
129+
imagePullPolicy:
130+
description: |-
131+
ImagePullPolicy sets the Image pull policy.
132+
One of Always, Never, IfNotPresent.
133+
Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
134+
More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
135+
type: string
136+
interval:
137+
description: |-
138+
Option to define the number of seconds between checks for new jobs.
139+
This is set to a default of 30s by operator if not set
140+
format: int32
141+
type: integer
142+
locked:
143+
description: Specify whether the runner should be locked to a specific
144+
project. Defaults to false.
145+
type: boolean
146+
namespace:
147+
description: If specified, overrides the namespace where job pods
148+
are created
149+
type: string
150+
podSpec:
151+
items:
152+
description: |-
153+
KubernetesPodSpec represents the structure expected when adding a custom PodSpec to configure
154+
the Pod running the GitLab Runner Manager
155+
properties:
156+
name:
157+
description: Name is the name given to the custom Pod Spec
158+
type: string
159+
patch:
160+
description: |-
161+
A JSON or YAML format string that describes the changes which must be applied
162+
to the final PodSpec object before it is generated.
163+
You cannot set the patch_path and patch in the same pod_spec configuration, otherwise an error occurs.
164+
type: string
165+
patchFile:
166+
description: |-
167+
Path to the file that defines the changes to apply to the final PodSpec object before it is generated.
168+
The file must be a JSON or YAML file.
169+
You cannot set the patch_path and patch in the same pod_spec configuration, otherwise an error occurs.
170+
type: string
171+
patchType:
172+
description: |-
173+
The strategy the runner uses to apply the specified changes to the PodSpec object generated by GitLab Runner.
174+
The accepted values are merge, json, and strategic (default value).
175+
type: string
176+
required:
177+
- name
178+
- patchType
179+
type: object
180+
type: array
181+
protected:
182+
description: Specify whether the runner should only run protected
183+
branches. Defaults to false.
184+
type: boolean
185+
runUntagged:
186+
description: |-
187+
Specify if jobs without tags should be run.
188+
If not specified, runner will default to true if no tags were specified.
189+
In other case it will default to false.
190+
type: boolean
191+
runnerImage:
192+
description: If specified, overrides the default GitLab Runner image.
193+
Default is the Runner image the operator was bundled with.
194+
type: string
195+
s3:
196+
description: |-
197+
options used to setup S3
198+
object store as GitLab Runner Cache
199+
properties:
200+
bucket:
201+
description: Name of the bucket in which the cache will be stored
202+
type: string
203+
credentials:
204+
description: |-
205+
Name of the secret containing the
206+
'accesskey' and 'secretkey' used to access the object storage
207+
type: string
208+
insecure:
209+
description: Use insecure connections or HTTP
210+
type: boolean
211+
location:
212+
description: Name of the S3 region in use
213+
type: string
214+
server:
215+
type: string
216+
type: object
217+
serviceaccount:
218+
description: |-
219+
allow user to override service account
220+
used by GitLab Runner
221+
type: string
222+
tags:
223+
description: |-
224+
List of comma separated tags to be applied to the runner
225+
More info: https://docs.gitlab.com/ee/ci/runners/#use-tags-to-limit-the-number-of-jobs-using-the-runner
226+
type: string
227+
token:
228+
description: Name of secret containing the 'runner-registration-token'
229+
key used to register the runner
230+
type: string
231+
required:
232+
- gitlabUrl
233+
- token
234+
type: object
235+
status:
236+
description: |-
237+
Most recently observed status of the GitLab Runner.
238+
It is read-only to the user
239+
properties:
240+
message:
241+
description: Additional information of GitLab Runner registration
242+
type: string
243+
phase:
244+
description: Reports status of the GitLab Runner instance
245+
type: string
246+
registration:
247+
description: Reports status of GitLab Runner registration
248+
type: string
249+
type: object
250+
type: object
251+
served: true
252+
storage: true
253+
subresources:
254+
status: {}
255+
status:
256+
acceptedNames:
257+
kind: ""
258+
plural: ""
259+
conditions: null
260+
storedVersions: null
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: Role
3+
metadata:
4+
creationTimestamp: null
5+
name: gitlab-runner-app-role
6+
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- secrets
11+
- pods
12+
- services
13+
- services/status
14+
- services/proxy
15+
- services/finalizers
16+
- pods/attach
17+
- pods/exec
18+
- pods/log
19+
- persistentvolumeclaims
20+
- configmaps
21+
verbs:
22+
- create
23+
- get
24+
- list
25+
- watch
26+
- delete
27+
- patch
28+
- update
29+
- apiGroups:
30+
- ""
31+
resources:
32+
- events
33+
verbs:
34+
- get
35+
- list
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: RoleBinding
3+
metadata:
4+
creationTimestamp: null
5+
name: gitlab-runner-app-rolebinding
6+
roleRef:
7+
apiGroup: rbac.authorization.k8s.io
8+
kind: Role
9+
name: gitlab-runner-app-role
10+
subjects:
11+
- kind: ServiceAccount
12+
name: gitlab-runner-app-sa
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
creationTimestamp: null
5+
labels:
6+
app.kubernetes.io/component: controller-manager
7+
app.kubernetes.io/name: gitlab-runner-operator
8+
name: gitlab-runner-controller-manager-metrics-service
9+
spec:
10+
ports:
11+
- name: https
12+
port: 8443
13+
targetPort: https
14+
selector:
15+
app.kubernetes.io/name: gitlab-runner-operator
16+
status:
17+
loadBalancer: {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
creationTimestamp: null
5+
name: gitlab-runner-metrics-reader
6+
rules:
7+
- nonResourceURLs:
8+
- /metrics
9+
verbs:
10+
- get

0 commit comments

Comments
 (0)