blob: 5d03cf517aa504fa052031ea7d3281267b5a1c52 [file] [log] [blame] [view]
Giorgi Lekveishvili285ab622023-11-22 13:50:45 +04001# Gerrit Operator - API Reference
2
3- [Gerrit Operator - API Reference](#gerrit-operator---api-reference)
4 - [General Remarks](#general-remarks)
5 - [Inheritance](#inheritance)
6 - [GerritCluster](#gerritcluster)
7 - [Gerrit](#gerrit)
8 - [Receiver](#receiver)
9 - [GitGarbageCollection](#gitgarbagecollection)
10 - [GerritNetwork](#gerritnetwork)
11 - [GerritClusterSpec](#gerritclusterspec)
12 - [GerritClusterStatus](#gerritclusterstatus)
13 - [StorageConfig](#storageconfig)
14 - [GerritStorageConfig](#gerritstorageconfig)
15 - [StorageClassConfig](#storageclassconfig)
16 - [NfsWorkaroundConfig](#nfsworkaroundconfig)
17 - [SharedStorage](#sharedstorage)
18 - [PluginCacheConfig](#plugincacheconfig)
19 - [ExternalPVCConfig](#externalpvcconfig)
20 - [ContainerImageConfig](#containerimageconfig)
21 - [BusyBoxImage](#busyboximage)
22 - [GerritRepositoryConfig](#gerritrepositoryconfig)
23 - [GerritClusterIngressConfig](#gerritclusteringressconfig)
24 - [GerritIngressTlsConfig](#gerritingresstlsconfig)
25 - [GerritIngressAmbassadorConfig](#gerritingressambassadorconfig)
26 - [GlobalRefDbConfig](#globalrefdbconfig)
27 - [RefDatabase](#refdatabase)
28 - [SpannerRefDbConfig](#spannerrefdbconfig)
29 - [ZookeeperRefDbConfig](#zookeeperrefdbconfig)
30 - [GerritTemplate](#gerrittemplate)
31 - [GerritTemplateSpec](#gerrittemplatespec)
32 - [GerritProbe](#gerritprobe)
33 - [GerritServiceConfig](#gerritserviceconfig)
34 - [GerritSite](#gerritsite)
35 - [GerritModule](#gerritmodule)
36 - [GerritPlugin](#gerritplugin)
37 - [GerritMode](#gerritmode)
38 - [GerritDebugConfig](#gerritdebugconfig)
39 - [GerritSpec](#gerritspec)
40 - [GerritStatus](#gerritstatus)
41 - [IngressConfig](#ingressconfig)
42 - [ReceiverTemplate](#receivertemplate)
43 - [ReceiverTemplateSpec](#receivertemplatespec)
44 - [ReceiverSpec](#receiverspec)
45 - [ReceiverStatus](#receiverstatus)
46 - [ReceiverProbe](#receiverprobe)
47 - [ReceiverServiceConfig](#receiverserviceconfig)
48 - [GitGarbageCollectionSpec](#gitgarbagecollectionspec)
49 - [GitGarbageCollectionStatus](#gitgarbagecollectionstatus)
50 - [GitGcState](#gitgcstate)
51 - [GerritNetworkSpec](#gerritnetworkspec)
52 - [NetworkMember](#networkmember)
53 - [NetworkMemberWithSsh](#networkmemberwithssh)
54
55## General Remarks
56
57### Inheritance
58
59Some objects inherit the fields of other objects. In this case the section will
60contain an **Extends:** label to link to the parent object, but it will not repeat
61inherited fields.
62
63## GerritCluster
64
65---
66
67**Group**: gerritoperator.google.com \
68**Version**: v1alpha17 \
69**Kind**: GerritCluster
70
71---
72
73
74| Field | Type | Description |
75|---|---|---|
76| `apiVersion` | `String` | APIVersion of this resource |
77| `kind` | `String` | Kind of this resource |
78| `metadata` | [`ObjectMeta`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#objectmeta-v1-meta) | Metadata of the resource |
79| `spec` | [`GerritClusterSpec`](#gerritclusterspec) | Specification for GerritCluster |
80| `status` | [`GerritClusterStatus`](#gerritclusterstatus) | Status for GerritCluster |
81
82Example:
83
84```yaml
85apiVersion: "gerritoperator.google.com/v1alpha17"
86kind: GerritCluster
87metadata:
88 name: gerrit
89spec:
90 containerImages:
91 imagePullSecrets: []
92 imagePullPolicy: Always
93 gerritImages:
94 registry: docker.io
95 org: k8sgerrit
96 tag: latest
97 busyBox:
98 registry: docker.io
99 tag: latest
100
101 storage:
102 storageClasses:
103 readWriteOnce: default
104 readWriteMany: shared-storage
105 nfsWorkaround:
106 enabled: false
107 chownOnStartup: false
108 idmapdConfig: |-
109 [General]
110 Verbosity = 0
111 Domain = localdomain.com
112
113 [Mapping]
114 Nobody-User = nobody
115 Nobody-Group = nogroup
116
117 sharedStorage:
118 externalPVC:
119 enabled: false
120 claimName: ""
121 size: 1Gi
122 volumeName: ""
123 selector:
124 matchLabels:
125 volume-type: ssd
126 aws-availability-zone: us-east-1
127
128 pluginCache:
129 enabled: false
130
131 ingress:
132 enabled: true
133 host: example.com
134 annotations: {}
135 tls:
136 enabled: false
137 secret: ""
138 ambassador:
139 id: []
140 createHost: false
141
142 refdb:
143 database: NONE
144 spanner:
145 projectName: ""
146 instance: ""
147 database: ""
148 zookeeper:
149 connectString: ""
150 rootNode: ""
151
152 serverId: ""
153
154 gerrits:
155 - metadata:
156 name: gerrit
157 labels:
158 app: gerrit
159 spec:
160 serviceAccount: gerrit
161
162 tolerations:
163 - key: key1
164 operator: Equal
165 value: value1
166 effect: NoSchedule
167
168 affinity:
169 nodeAffinity:
170 requiredDuringSchedulingIgnoredDuringExecution:
171 nodeSelectorTerms:
172 - matchExpressions:
173 - key: disktype
174 operator: In
175 values:
176 - ssd
177
178 topologySpreadConstraints: []
179 - maxSkew: 1
180 topologyKey: zone
181 whenUnsatisfiable: DoNotSchedule
182 labelSelector:
183 matchLabels:
184 foo: bar
185
186 priorityClassName: ""
187
188 replicas: 1
189 updatePartition: 0
190
191 resources:
192 requests:
193 cpu: 1
194 memory: 5Gi
195 limits:
196 cpu: 1
197 memory: 6Gi
198
199 startupProbe:
200 initialDelaySeconds: 0
201 periodSeconds: 10
202 timeoutSeconds: 1
203 successThreshold: 1
204 failureThreshold: 3
205
206 readinessProbe:
207 initialDelaySeconds: 0
208 periodSeconds: 10
209 timeoutSeconds: 1
210 successThreshold: 1
211 failureThreshold: 3
212
213 livenessProbe:
214 initialDelaySeconds: 0
215 periodSeconds: 10
216 timeoutSeconds: 1
217 successThreshold: 1
218 failureThreshold: 3
219
220 gracefulStopTimeout: 30
221
222 service:
223 type: NodePort
224 httpPort: 80
225 sshPort: 29418
226
227 mode: REPLICA
228
229 debug:
230 enabled: false
231 suspend: false
232
233 site:
234 size: 1Gi
235
236 plugins:
237 # Installs a packaged plugin
238 - name: delete-project
239
240 # Downloads and installs a plugin
241 - name: javamelody
242 url: https://gerrit-ci.gerritforge.com/view/Plugins-stable-3.6/job/plugin-javamelody-bazel-master-stable-3.6/lastSuccessfulBuild/artifact/bazel-bin/plugins/javamelody/javamelody.jar
243 sha1: 40ffcd00263171e373a24eb6a311791b2924707c
244
245 # If the `installAsLibrary` option is set to `true` the plugin's jar-file will
246 # be symlinked to the lib directory and thus installed as a library as well.
247 - name: saml
248 url: https://gerrit-ci.gerritforge.com/view/Plugins-stable-3.6/job/plugin-saml-bazel-master-stable-3.6/lastSuccessfulBuild/artifact/bazel-bin/plugins/saml/saml.jar
249 sha1: 6dfe8292d46b179638586e6acf671206f4e0a88b
250 installAsLibrary: true
251
252 libs:
253 - name: global-refdb
254 url: https://example.com/global-refdb.jar
255 sha1: 3d533a536b0d4e0184f824478c24bc8dfe896d06
256
257 configFiles:
258 gerrit.config: |-
259 [gerrit]
260 serverId = gerrit-1
261 disableReverseDnsLookup = true
262 [index]
263 type = LUCENE
264 [auth]
265 type = DEVELOPMENT_BECOME_ANY_ACCOUNT
266 [httpd]
267 requestLog = true
268 gracefulStopTimeout = 1m
269 [transfer]
270 timeout = 120 s
271 [user]
272 name = Gerrit Code Review
273 email = gerrit@example.com
274 anonymousCoward = Unnamed User
275 [container]
276 javaOptions = -Xms200m
277 javaOptions = -Xmx4g
278
279 secretRef: gerrit-secure-config
280
281 receiver:
282 metadata:
283 name: receiver
284 labels:
285 app: receiver
286 spec:
287 tolerations:
288 - key: key1
289 operator: Equal
290 value: value2
291 effect: NoSchedule
292
293 affinity:
294 nodeAffinity:
295 requiredDuringSchedulingIgnoredDuringExecution:
296 nodeSelectorTerms:
297 - matchExpressions:
298 - key: disktype
299 operator: In
300 values:
301 - ssd
302
303 topologySpreadConstraints: []
304 - maxSkew: 1
305 topologyKey: zone
306 whenUnsatisfiable: DoNotSchedule
307 labelSelector:
308 matchLabels:
309 foo: bar
310
311 priorityClassName: ""
312
313 replicas: 2
314 maxSurge: 1
315 maxUnavailable: 1
316
317 resources:
318 requests:
319 cpu: 1
320 memory: 5Gi
321 limits:
322 cpu: 1
323 memory: 6Gi
324
325 readinessProbe:
326 initialDelaySeconds: 0
327 periodSeconds: 10
328 timeoutSeconds: 1
329 successThreshold: 1
330 failureThreshold: 3
331
332 livenessProbe:
333 initialDelaySeconds: 0
334 periodSeconds: 10
335 timeoutSeconds: 1
336 successThreshold: 1
337 failureThreshold: 3
338
339 service:
340 type: NodePort
341 httpPort: 80
342
343 credentialSecretRef: receiver-credentials
344```
345
346## Gerrit
347
348---
349
350**Group**: gerritoperator.google.com \
351**Version**: v1alpha17 \
352**Kind**: Gerrit
353
354---
355
356
357| Field | Type | Description |
358|---|---|---|
359| `apiVersion` | `String` | APIVersion of this resource |
360| `kind` | `String` | Kind of this resource |
361| `metadata` | [`ObjectMeta`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#objectmeta-v1-meta) | Metadata of the resource |
362| `spec` | [`GerritSpec`](#gerritspec) | Specification for Gerrit |
363| `status` | [`GerritStatus`](#gerritstatus) | Status for Gerrit |
364
365Example:
366
367```yaml
368apiVersion: "gerritoperator.google.com/v1alpha17"
369kind: Gerrit
370metadata:
371 name: gerrit
372spec:
373 serviceAccount: gerrit
374
375 tolerations:
376 - key: key1
377 operator: Equal
378 value: value1
379 effect: NoSchedule
380
381 affinity:
382 nodeAffinity:
383 requiredDuringSchedulingIgnoredDuringExecution:
384 nodeSelectorTerms:
385 - matchExpressions:
386 - key: disktype
387 operator: In
388 values:
389 - ssd
390
391 topologySpreadConstraints:
392 - maxSkew: 1
393 topologyKey: zone
394 whenUnsatisfiable: DoNotSchedule
395 labelSelector:
396 matchLabels:
397 foo: bar
398
399 priorityClassName: ""
400
401 replicas: 1
402 updatePartition: 0
403
404 resources:
405 requests:
406 cpu: 1
407 memory: 5Gi
408 limits:
409 cpu: 1
410 memory: 6Gi
411
412 startupProbe:
413 initialDelaySeconds: 0
414 periodSeconds: 10
415 timeoutSeconds: 1
416 successThreshold: 1
417 failureThreshold: 3
418
419 readinessProbe:
420 initialDelaySeconds: 0
421 periodSeconds: 10
422 timeoutSeconds: 1
423 successThreshold: 1
424 failureThreshold: 3
425
426 livenessProbe:
427 initialDelaySeconds: 0
428 periodSeconds: 10
429 timeoutSeconds: 1
430 successThreshold: 1
431 failureThreshold: 3
432
433 gracefulStopTimeout: 30
434
435 service:
436 type: NodePort
437 httpPort: 80
438 sshPort: 29418
439
440 mode: PRIMARY
441
442 debug:
443 enabled: false
444 suspend: false
445
446 site:
447 size: 1Gi
448
449 plugins:
450 # Installs a plugin packaged into the gerrit.war file
451 - name: delete-project
452
453 # Downloads and installs a plugin
454 - name: javamelody
455 url: https://gerrit-ci.gerritforge.com/view/Plugins-stable-3.6/job/plugin-javamelody-bazel-master-stable-3.6/lastSuccessfulBuild/artifact/bazel-bin/plugins/javamelody/javamelody.jar
456 sha1: 40ffcd00263171e373a24eb6a311791b2924707c
457
458 # If the `installAsLibrary` option is set to `true` the plugin jar-file will
459 # be symlinked to the lib directory and thus installed as a library as well.
460 - name: saml
461 url: https://gerrit-ci.gerritforge.com/view/Plugins-stable-3.6/job/plugin-saml-bazel-master-stable-3.6/lastSuccessfulBuild/artifact/bazel-bin/plugins/saml/saml.jar
462 sha1: 6dfe8292d46b179638586e6acf671206f4e0a88b
463 installAsLibrary: true
464
465 libs:
466 - name: global-refdb
467 url: https://example.com/global-refdb.jar
468 sha1: 3d533a536b0d4e0184f824478c24bc8dfe896d06
469
470 configFiles:
471 gerrit.config: |-
472 [gerrit]
473 serverId = gerrit-1
474 disableReverseDnsLookup = true
475 [index]
476 type = LUCENE
477 [auth]
478 type = DEVELOPMENT_BECOME_ANY_ACCOUNT
479 [httpd]
480 requestLog = true
481 gracefulStopTimeout = 1m
482 [transfer]
483 timeout = 120 s
484 [user]
485 name = Gerrit Code Review
486 email = gerrit@example.com
487 anonymousCoward = Unnamed User
488 [container]
489 javaOptions = -Xms200m
490 javaOptions = -Xmx4g
491
492 secretRef: gerrit-secure-config
493
494 serverId: ""
495
496 containerImages:
497 imagePullSecrets: []
498 imagePullPolicy: Always
499 gerritImages:
500 registry: docker.io
501 org: k8sgerrit
502 tag: latest
503 busyBox:
504 registry: docker.io
505 tag: latest
506
507 storage:
508 storageClasses:
509 readWriteOnce: default
510 readWriteMany: shared-storage
511 nfsWorkaround:
512 enabled: false
513 chownOnStartup: false
514 idmapdConfig: |-
515 [General]
516 Verbosity = 0
517 Domain = localdomain.com
518
519 [Mapping]
520 Nobody-User = nobody
521 Nobody-Group = nogroup
522
523 sharedStorage:
524 externalPVC:
525 enabled: false
526 claimName: ""
527 size: 1Gi
528 volumeName: ""
529 selector:
530 matchLabels:
531 volume-type: ssd
532 aws-availability-zone: us-east-1
533
534 pluginCache:
535 enabled: false
536
537 ingress:
538 host: example.com
539 tlsEnabled: false
540
541 refdb:
542 database: NONE
543 spanner:
544 projectName: ""
545 instance: ""
546 database: ""
547 zookeeper:
548 connectString: ""
549 rootNode: ""
550```
551
552## Receiver
553
554---
555
556**Group**: gerritoperator.google.com \
557**Version**: v1alpha6 \
558**Kind**: Receiver
559
560---
561
562
563| Field | Type | Description |
564|---|---|---|
565| `apiVersion` | `String` | APIVersion of this resource |
566| `kind` | `String` | Kind of this resource |
567| `metadata` | [`ObjectMeta`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#objectmeta-v1-meta) | Metadata of the resource |
568| `spec` | [`ReceiverSpec`](#receiverspec) | Specification for Receiver |
569| `status` | [`ReceiverStatus`](#receiverstatus) | Status for Receiver |
570
571Example:
572
573```yaml
574apiVersion: "gerritoperator.google.com/v1alpha6"
575kind: Receiver
576metadata:
577 name: receiver
578spec:
579 tolerations:
580 - key: key1
581 operator: Equal
582 value: value1
583 effect: NoSchedule
584
585 affinity:
586 nodeAffinity:
587 requiredDuringSchedulingIgnoredDuringExecution:
588 nodeSelectorTerms:
589 - matchExpressions:
590 - key: disktype
591 operator: In
592 values:
593 - ssd
594
595 topologySpreadConstraints:
596 - maxSkew: 1
597 topologyKey: zone
598 whenUnsatisfiable: DoNotSchedule
599 labelSelector:
600 matchLabels:
601 foo: bar
602
603 priorityClassName: ""
604
605 replicas: 1
606 maxSurge: 1
607 maxUnavailable: 1
608
609 resources:
610 requests:
611 cpu: 1
612 memory: 5Gi
613 limits:
614 cpu: 1
615 memory: 6Gi
616
617 readinessProbe:
618 initialDelaySeconds: 0
619 periodSeconds: 10
620 timeoutSeconds: 1
621 successThreshold: 1
622 failureThreshold: 3
623
624 livenessProbe:
625 initialDelaySeconds: 0
626 periodSeconds: 10
627 timeoutSeconds: 1
628 successThreshold: 1
629 failureThreshold: 3
630
631 service:
632 type: NodePort
633 httpPort: 80
634
635 credentialSecretRef: apache-credentials
636
637 containerImages:
638 imagePullSecrets: []
639 imagePullPolicy: Always
640 gerritImages:
641 registry: docker.io
642 org: k8sgerrit
643 tag: latest
644 busyBox:
645 registry: docker.io
646 tag: latest
647
648 storage:
649 storageClasses:
650 readWriteOnce: default
651 readWriteMany: shared-storage
652 nfsWorkaround:
653 enabled: false
654 chownOnStartup: false
655 idmapdConfig: |-
656 [General]
657 Verbosity = 0
658 Domain = localdomain.com
659
660 [Mapping]
661 Nobody-User = nobody
662 Nobody-Group = nogroup
663
664 sharedStorage:
665 externalPVC:
666 enabled: false
667 claimName: ""
668 size: 1Gi
669 volumeName: ""
670 selector:
671 matchLabels:
672 volume-type: ssd
673 aws-availability-zone: us-east-1
674
675 ingress:
676 host: example.com
677 tlsEnabled: false
678```
679
680## GitGarbageCollection
681
682---
683
684**Group**: gerritoperator.google.com \
685**Version**: v1alpha1 \
686**Kind**: GitGarbageCollection
687
688---
689
690
691| Field | Type | Description |
692|---|---|---|
693| `apiVersion` | `String` | APIVersion of this resource |
694| `kind` | `String` | Kind of this resource |
695| `metadata` | [`ObjectMeta`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#objectmeta-v1-meta) | Metadata of the resource |
696| `spec` | [`GitGarbageCollectionSpec`](#gitgarbagecollectionspec) | Specification for GitGarbageCollection |
697| `status` | [`GitGarbageCollectionStatus`](#gitgarbagecollectionstatus) | Status for GitGarbageCollection |
698
699Example:
700
701```yaml
702apiVersion: "gerritoperator.google.com/v1alpha1"
703kind: GitGarbageCollection
704metadata:
705 name: gitgc
706spec:
707 cluster: gerrit
708 schedule: "*/5 * * * *"
709
710 projects: []
711
712 resources:
713 requests:
714 cpu: 100m
715 memory: 256Mi
716 limits:
717 cpu: 100m
718 memory: 256Mi
719
720 tolerations:
721 - key: key1
722 operator: Equal
723 value: value1
724 effect: NoSchedule
725
726 affinity:
727 nodeAffinity:
728 requiredDuringSchedulingIgnoredDuringExecution:
729 nodeSelectorTerms:
730 - matchExpressions:
731 - key: disktype
732 operator: In
733 values:
734 - ssd
735```
736
737## GerritNetwork
738
739---
740
741**Group**: gerritoperator.google.com \
742**Version**: v1alpha2 \
743**Kind**: GerritNetwork
744
745---
746
747
748| Field | Type | Description |
749|---|---|---|
750| `apiVersion` | `String` | APIVersion of this resource |
751| `kind` | `String` | Kind of this resource |
752| `metadata` | [`ObjectMeta`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#objectmeta-v1-meta) | Metadata of the resource |
753| `spec` | [`GerritNetworkSpec`](#gerritnetworkspec) | Specification for GerritNetwork |
754
755Example:
756
757```yaml
758apiVersion: "gerritoperator.google.com/v1alpha2"
759kind: GerritNetwork
760metadata:
761 name: gerrit-network
762spec:
763 ingress:
764 enabled: true
765 host: example.com
766 annotations: {}
767 tls:
768 enabled: false
769 secret: ""
770 receiver:
771 name: receiver
772 httpPort: 80
773 primaryGerrit: {}
774 # name: gerrit-primary
775 # httpPort: 80
776 # httpPort: 29418
777 gerritReplica:
778 name: gerrit
779 httpPort: 80
780 httpPort: 29418
781```
782
783## GerritClusterSpec
784
785| Field | Type | Description |
786|---|---|---|
787| `storage` | [`GerritStorageConfig`](#gerritstorageconfig) | Storage used by Gerrit instances |
788| `containerImages` | [`ContainerImageConfig`](#containerimageconfig) | Container images used inside GerritCluster |
789| `ingress` | [`GerritClusterIngressConfig`](#gerritclusteringressconfig) | Ingress traffic handling in GerritCluster |
790| `refdb` | [`GlobalRefDbConfig`](#globalrefdbconfig) | The Global RefDB used by Gerrit |
791| `serverId` | `String` | The serverId to be used for all Gerrit instances (default: `<namespace>/<name>`) |
792| `gerrits` | [`GerritTemplate`](#gerrittemplate)-Array | A list of Gerrit instances to be installed in the GerritCluster. Only a single primary Gerrit and a single Gerrit Replica is permitted. |
793| `receiver` | [`ReceiverTemplate`](#receivertemplate) | A Receiver instance to be installed in the GerritCluster. |
794
795## GerritClusterStatus
796
797| Field | Type | Description |
798|---|---|---|
799| `members` | `Map<String, List<String>>` | A map listing all Gerrit and Receiver instances managed by the GerritCluster by name |
800
801## StorageConfig
802
803| Field | Type | Description |
804|---|---|---|
805| `storageClasses` | [`StorageClassConfig`](#storageclassconfig) | StorageClasses used in the GerritCluster |
806| `sharedStorage` | [`SharedStorage`](#sharedstorage) | Volume used for resources shared between Gerrit instances except git repositories |
807
808## GerritStorageConfig
809
810Extends [StorageConfig](#StorageConfig).
811
812| Field | Type | Description |
813|---|---|---|
814| `pluginCache` | [`PluginCacheConfig`](#plugincacheconfig) | Configuration of cache for downloaded plugins |
815
816## StorageClassConfig
817
818| Field | Type | Description |
819|---|---|---|
820| `readWriteOnce` | `String` | Name of a StorageClass allowing ReadWriteOnce access. (default: `default`) |
821| `readWriteMany` | `String` | Name of a StorageClass allowing ReadWriteMany access. (default: `shared-storage`) |
822| `nfsWorkaround` | [`NfsWorkaroundConfig`](#nfsworkaroundconfig) | NFS is not well supported by Kubernetes. These options provide a workaround to ensure correct file ownership and id mapping |
823
824## NfsWorkaroundConfig
825
826| Field | Type | Description |
827|---|---|---|
828| `enabled` | `boolean` | If enabled, below options might be used. (default: `false`) |
829| `chownOnStartup` | `boolean` | If enabled, the ownership of the mounted NFS volumes will be set on pod startup. Note that this is not done recursively. It is expected that all data already present in the volume was created by the user used in accessing containers. (default: `false`) |
830| `idmapdConfig` | `String` | The idmapd.config file can be used to e.g. configure the ID domain. This might be necessary for some NFS servers to ensure correct mapping of user and group IDs. (optional) |
831
832## SharedStorage
833
834| Field | Type | Description |
835|---|---|---|
836| `externalPVC` | [`ExternalPVCConfig`](#externalpvcconfig) | Configuration regarding the use of an external / manually created PVC |
837| `size` | [`Quantity`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#quantity-resource-core) | Size of the volume (mandatory) |
838| `volumeName` | `String` | Name of a specific persistent volume to claim (optional) |
839| `selector` | [`LabelSelector`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#labelselector-v1-meta) | Selector to select a specific persistent volume (optional) |
840
841## PluginCacheConfig
842
843| Field | Type | Description |
844|---|---|---|
845| `enabled` | `boolean` | If enabled, downloaded plugins will be cached. (default: `false`) |
846
847## ExternalPVCConfig
848
849| Field | Type | Description |
850|---|---|---|
851| `enabled` | `boolean` | If enabled, a provided PVC will be used instead of creating one. (default: `false`) |
852| `claimName` | `String` | Name of the PVC to be used. |
853
854## ContainerImageConfig
855
856| Field | Type | Description |
857|---|---|---|
858| `imagePullPolicy` | `String` | Image pull policy (https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy) to be used in all containers. (default: `Always`) |
859| `imagePullSecrets` | [`LocalObjectReference`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#localobjectreference-v1-core)-Array | List of names representing imagePullSecrets available in the cluster. These secrets will be added to all pods. (optional) |
860| `busyBox` | [`BusyBoxImage`](#busyboximage) | The busybox container is used for some init containers |
861| `gerritImages` | [`GerritRepositoryConfig`](#gerritrepositoryconfig) | The container images in this project are tagged with the output of git describe. All container images are published for each version, even when the image itself was not updated. This ensures that all containers work well together. Here, the data on how to get those images can be configured. |
862
863## BusyBoxImage
864
865| Field | Type | Description |
866|---|---|---|
867| `registry` | `String` | The registry from which to pull the "busybox" image. (default: `docker.io`) |
868| `tag` | `String` | The tag/version of the "busybox" image. (default: `latest`) |
869
870## GerritRepositoryConfig
871
872| Field | Type | Description |
873|---|---|---|
874| `registry` | `String` | The registry from which to pull the images. (default: `docker.io`) |
875| `org` | `String` | The organization in the registry containing the images. (default: `k8sgerrit`) |
876| `tag` | `String` | The tag/version of the images. (default: `latest`) |
877
878## GerritClusterIngressConfig
879
880| Field | Type | Description |
881|---|---|---|
882| `enabled` | `boolean` | Whether to configure an ingress provider to manage the ingress traffic in the GerritCluster (default: `false`) |
883| `host` | `string` | Hostname to be used by the ingress. For each Gerrit deployment a new subdomain using the name of the respective Gerrit CustomResource will be used. |
884| `annotations` | `Map<String, String>` | Annotations to be set for the ingress. This allows to configure the ingress further by e.g. setting the ingress class. This will be only used for type INGRESS and ignored otherwise. (optional) |
885| `tls` | [`GerritIngressTlsConfig`](#gerritingresstlsconfig) | Configuration of TLS to be used in the ingress |
886| `ambassador` | [`GerritIngressAmbassadorConfig`](#gerritingressambassadorconfig) | Ambassador configuration. Only relevant when the INGRESS environment variable is set to "ambassador" in the operator |
887
888## GerritIngressTlsConfig
889
890| Field | Type | Description |
891|---|---|---|
892| `enabled` | `boolean` | Whether to use TLS (default: `false`) |
893| `secret` | `String` | Name of the secret containing the TLS key pair. The certificate should be a wildcard certificate allowing for all subdomains under the given host. |
894
895## GerritIngressAmbassadorConfig
896
897| Field | Type | Description |
898|---|---|---|
899| `id` | `List<String>` | The operator uses the ids specified in `ambassadorId` to set the [ambassador_id](https://www.getambassador.io/docs/edge-stack/1.14/topics/running/running#ambassador_id) spec field in the Ambassador CustomResources it creates (`Mapping`, `TLSContext`). (optional) |
900| `createHost`| `boolean` | Specify whether you want the operator to create a `Host` resource. This will be required if you don't have a wildcard host set up in your cluster. Default is `false`. (optional) |
901
902## GlobalRefDbConfig
903
904Note, that the operator will not deploy or operate the database used for the
905global refdb. It will only configure Gerrit to use it.
906
907| Field | Type | Description |
908|---|---|---|
909| `database` | [`RefDatabase`](#refdatabase) | Which database to use for the global refdb. Choices: `NONE`, `SPANNER`, `ZOOKEEPER`. (default: `NONE`) |
910| `spanner` | [`SpannerRefDbConfig`](#spannerrefdbconfig) | Configuration of spanner. Only used if spanner was configured to be used for the global refdb. |
911| `zookeeper` | [`ZookeeperRefDbConfig`](#zookeeperrefdbconfig) | Configuration of zookeeper. Only used, if zookeeper was configured to be used for the global refdb. |
912
913## RefDatabase
914
915| Value | Description|
916|---|---|
917| `NONE` | No global refdb will be used. Not allowed, if a primary Gerrit with 2 or more instances will be installed. |
918| `SPANNER` | Spanner will be used as a global refdb |
919| `ZOOKEEPER` | Zookeeper will be used as a global refdb |
920
921## SpannerRefDbConfig
922
923Note that the spanner ref-db plugin requires google credentials to be mounted to /var/gerrit/etc/gcp-credentials.json. Instructions for generating those credentials can be found [here](https://developers.google.com/workspace/guides/create-credentials) and may be provided in the optional secretRef in [`GerritTemplateSpec`](#gerrittemplatespec).
924
925| Field | Type | Description |
926|---|---|---|
927| `projectName` | `String` | Spanner project name to be used |
928| `instance` | `String` | Spanner instance name to be used |
929| `database` | `String` | Spanner database name to be used |
930
931## ZookeeperRefDbConfig
932
933| Field | Type | Description |
934|---|---|---|
935| `connectString` | `String` | Hostname and port of the zookeeper instance to be used, e.g. `zookeeper.example.com:2181` |
936| `rootNode` | `String` | Root node that will be used to store the global refdb data. Will be set automatically, if `GerritCluster` is being used. |
937
938## GerritTemplate
939
940| Field | Type | Description |
941|---|---|---|
942| `metadata` | [`ObjectMeta`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#objectmeta-v1-meta) | Metadata of the resource. A name is mandatory. Labels can optionally be defined. Other fields like the namespace are ignored. |
943| `spec` | [`GerritTemplateSpec`](#gerrittemplatespec) | Specification for GerritTemplate |
944
945## GerritTemplateSpec
946
947| Field | Type | Description |
948|---|---|---|
949| `serviceAccount` | `String` | ServiceAccount to be used by Gerrit. Required for service discovery when using the high-availability plugin |
950| `tolerations` | [`Toleration`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#toleration-v1-core)-Array | Pod tolerations (optional) |
951| `affinity` | [`Affinity`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#affinity-v1-core) | Pod affinity (optional) |
952| `topologySpreadConstraints` | [`TopologySpreadConstraint`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#topologyspreadconstraint-v1-core)-Array | Pod topology spread constraints (optional) |
953| `priorityClassName` | `String` | [PriorityClass](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/) to be used with the pod (optional) |
954| `replicas` | `int` | Number of pods running Gerrit in the StatefulSet (default: 1) |
955| `updatePartition` | `int` | Ordinal at which to start updating pods. Pods with a lower ordinal will not be updated. (default: 0) |
956| `resources` | [`ResourceRequirements`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#resourcerequirements-v1-core) | Resource requirements for the Gerrit container |
957| `startupProbe` | [`GerritProbe`](#gerritprobe) | [Startup probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). The action will be set by the operator. All other probe parameters can be set. |
958| `readinessProbe` | [`GerritProbe`](#gerritprobe) | [Readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). The action will be set by the operator. All other probe parameters can be set. |
959| `livenessProbe` | [`GerritProbe`](#gerritprobe) | [Liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). The action will be set by the operator. All other probe parameters can be set. |
960| `gracefulStopTimeout` | `long` | Seconds the pod is allowed to shutdown until it is forcefully killed (default: 30) |
961| `service` | [`GerritServiceConfig`](#gerritserviceconfig) | Configuration for the service used to manage network access to the StatefulSet |
962| `site` | [`GerritSite`](#gerritsite) | Configuration concerning the Gerrit site directory |
963| `plugins` | [`GerritPlugin`](#gerritplugin)-Array | List of Gerrit plugins to install. These plugins can either be packaged in the Gerrit war-file or they will be downloaded. (optional) |
964| `libs` | [`GerritModule`](#gerritmodule)-Array | List of Gerrit library modules to install. These lib modules will be downloaded. (optional) |
965| `configFiles` | `Map<String, String>` | Configuration files for Gerrit that will be mounted into the Gerrit site's etc-directory (gerrit.config is mandatory) |
966| `secretRef` | `String` | Name of secret containing configuration files, e.g. secure.config, that will be mounted into the Gerrit site's etc-directory (optional) |
967| `mode` | [`GerritMode`](#gerritmode) | In which mode Gerrit should be run. (default: PRIMARY) |
968| `debug` | [`GerritDebugConfig`](#gerritdebugconfig) | Enable the debug-mode for Gerrit |
969
970## GerritProbe
971
972**Extends:** [`Probe`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#probe-v1-core)
973
974The fields `exec`, `grpc`, `httpGet` and `tcpSocket` cannot be set manually anymore
975compared to the parent object. All other options can still be configured.
976
977## GerritServiceConfig
978
979| Field | Type | Description |
980|---|---|---|
981| `type` | `String` | Service type (default: `NodePort`) |
982| `httpPort` | `int` | Port used for HTTP requests (default: `80`) |
983| `sshPort` | `Integer` | Port used for SSH requests (optional; if unset, SSH access is disabled). If Istio is used, the Gateway will be automatically configured to accept SSH requests. If an Ingress controller is used, SSH requests will only be served by the Service itself! |
984
985## GerritSite
986
987| Field | Type | Description |
988|---|---|---|
989| `size` | [`Quantity`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#quantity-resource-core) | Size of the volume used to persist not otherwise persisted site components (e.g. git repositories are persisted in a dedicated volume) (mandatory) |
990
991## GerritModule
992
993| Field | Type | Description |
994|---|---|---|
995| `name` | `String` | Name of the module/plugin |
996| `url` | `String` | URL of the module/plugin, if it should be downloaded. If the URL is not set, the plugin is expected to be packaged in the war-file (not possible for lib-modules). (optional) |
997| `sha1` | `String` | SHA1-checksum of the module/plugin JAR-file. (mandatory, if `url` is set) |
998
999## GerritPlugin
1000
1001**Extends:** [`GerritModule`](#gerritmodule)
1002
1003| Field | Type | Description |
1004|---|---|---|
1005| `installAsLibrary` | `boolean` | Some plugins also need to be installed as a library. If set to `true` the plugin JAR will be symlinked to the `lib`-directory in the Gerrit site. (default: `false`) |
1006
1007## GerritMode
1008
1009| Value | Description|
1010|---|---|
1011| `PRIMARY` | A primary Gerrit |
1012| `REPLICA` | A Gerrit Replica, which only serves git fetch/clone requests |
1013
1014## GerritDebugConfig
1015
1016These options allow to debug Gerrit. It will enable debugging in all pods and
1017expose the port 8000 in the container. Port-forwarding is required to connect the
1018debugger.
1019Note, that all pods will be restarted to enable the debugger. Also, if `suspend`
1020is enabled, ensure that the lifecycle probes are configured accordingly to prevent
1021pod restarts before Gerrit is ready.
1022
1023| Field | Type | Description |
1024|---|---|---|
1025| `enabled` | `boolean` | Whether to enable debugging. (default: `false`) |
1026| `suspend` | `boolean` | Whether to suspend Gerrit on startup. (default: `false`) |
1027
1028## GerritSpec
1029
1030**Extends:** [`GerritTemplateSpec`](#gerrittemplatespec)
1031
1032| Field | Type | Description |
1033|---|---|---|
1034| `storage` | [`GerritStorageConfig`](#gerritstorageconfig) | Storage used by Gerrit instances |
1035| `containerImages` | [`ContainerImageConfig`](#containerimageconfig) | Container images used inside GerritCluster |
1036| `ingress` | [`IngressConfig`](#ingressconfig) | Ingress configuration for Gerrit |
1037| `refdb` | [`GlobalRefDbConfig`](#globalrefdbconfig) | The Global RefDB used by Gerrit |
1038| `serverId` | `String` | The serverId to be used for all Gerrit instances |
1039
1040## GerritStatus
1041
1042| Field | Type | Description |
1043|---|---|---|
1044| `ready` | `boolean` | Whether the Gerrit instance is ready |
1045| `appliedConfigMapVersions` | `Map<String, String>` | Versions of each ConfigMap currently mounted into Gerrit pods |
1046| `appliedSecretVersions` | `Map<String, String>` | Versions of each secret currently mounted into Gerrit pods |
1047
1048## IngressConfig
1049
1050| Field | Type | Description |
1051|---|---|---|
1052| `host` | `string` | Hostname that is being used by the ingress provider for this Gerrit instance. |
1053| `tlsEnabled` | `boolean` | Whether the ingress provider enables TLS. (default: `false`) |
1054
1055## ReceiverTemplate
1056
1057| Field | Type | Description |
1058|---|---|---|
1059| `metadata` | [`ObjectMeta`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#objectmeta-v1-meta) | Metadata of the resource. A name is mandatory. Labels can optionally be defined. Other fields like the namespace are ignored. |
1060| `spec` | [`ReceiverTemplateSpec`](#receivertemplatespec) | Specification for ReceiverTemplate |
1061
1062## ReceiverTemplateSpec
1063
1064| Field | Type | Description |
1065|---|---|---|
1066| `tolerations` | [`Toleration`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#toleration-v1-core)-Array | Pod tolerations (optional) |
1067| `affinity` | [`Affinity`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#affinity-v1-core) | Pod affinity (optional) |
1068| `topologySpreadConstraints` | [`TopologySpreadConstraint`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#topologyspreadconstraint-v1-core)-Array | Pod topology spread constraints (optional) |
1069| `priorityClassName` | `String` | [PriorityClass](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/) to be used with the pod (optional) |
1070| `replicas` | `int` | Number of pods running the receiver in the Deployment (default: 1) |
1071| `maxSurge` | `IntOrString` | Ordinal or percentage of pods that are allowed to be created in addition during rolling updates. (default: `1`) |
1072| `maxUnavailable` | `IntOrString` | Ordinal or percentage of pods that are allowed to be unavailable during rolling updates. (default: `1`) |
1073| `resources` | [`ResourceRequirements`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#resourcerequirements-v1-core) | Resource requirements for the Receiver container |
1074| `readinessProbe` | [`ReceiverProbe`](#receiverprobe) | [Readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). The action will be set by the operator. All other probe parameters can be set. |
1075| `livenessProbe` | [`ReceiverProbe`](#receiverprobe) | [Liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). The action will be set by the operator. All other probe parameters can be set. |
1076| `service` | [`ReceiverServiceConfig`](#receiverserviceconfig) | Configuration for the service used to manage network access to the Deployment |
1077| `credentialSecretRef` | `String` | Name of the secret containing the .htpasswd file used to configure basic authentication within the Apache server (mandatory) |
1078
1079## ReceiverSpec
1080
1081**Extends:** [`ReceiverTemplateSpec`](#receivertemplatespec)
1082
1083| Field | Type | Description |
1084|---|---|---|
1085| `storage` | [`StorageConfig`](#storageconfig) | Storage used by Gerrit/Receiver instances |
1086| `containerImages` | [`ContainerImageConfig`](#containerimageconfig) | Container images used inside GerritCluster |
1087| `ingress` | [`IngressConfig`](#ingressconfig) | Ingress configuration for Gerrit |
1088
1089## ReceiverStatus
1090
1091| Field | Type | Description |
1092|---|---|---|
1093| `ready` | `boolean` | Whether the Receiver instance is ready |
1094| `appliedCredentialSecretVersion` | `String` | Version of credential secret currently mounted into Receiver pods |
1095
1096## ReceiverProbe
1097
1098**Extends:** [`Probe`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#probe-v1-core)
1099
1100The fields `exec`, `grpc`, `httpGet` and `tcpSocket` cannot be set manually anymore
1101compared to the parent object. All other options can still be configured.
1102
1103## ReceiverServiceConfig
1104
1105| Field | Type | Description |
1106|---|---|---|
1107| `type` | `String` | Service type (default: `NodePort`) |
1108| `httpPort` | `int` | Port used for HTTP requests (default: `80`) |
1109
1110## GitGarbageCollectionSpec
1111
1112| Field | Type | Description |
1113|---|---|---|
1114| `cluster` | `string` | Name of the Gerrit cluster this Gerrit is a part of. (mandatory) |
1115| `tolerations` | [`Toleration`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#toleration-v1-core)-Array | Pod tolerations (optional) |
1116| `affinity` | [`Affinity`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#affinity-v1-core) | Pod affinity (optional) |
1117| `schedule` | `string` | Cron schedule defining when to run git gc (mandatory) |
1118| `projects` | `Set<String>` | List of projects to gc. If omitted, all projects not handled by other Git GC jobs will be gc'ed. Only one job gc'ing all projects can exist. (default: `[]`) |
1119| `resources` | [`ResourceRequirements`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#resourcerequirements-v1-core) | Resource requirements for the GitGarbageCollection container |
1120
1121## GitGarbageCollectionStatus
1122
1123| Field | Type | Description |
1124|---|---|---|
1125| `replicateAll` | `boolean` | Whether this GitGarbageCollection handles all projects |
1126| `excludedProjects` | `Set<String>` | List of projects that were excluded from this GitGarbageCollection, since they are handled by other Jobs |
1127| `state` | [`GitGcState`](#gitgcstate) | State of the GitGarbageCollection |
1128
1129## GitGcState
1130
1131| Value | Description|
1132|---|---|
1133| `ACTIVE` | GitGarbageCollection is scheduled |
1134| `INACTIVE` | GitGarbageCollection is not scheduled |
1135| `CONFLICT` | GitGarbageCollection conflicts with another GitGarbageCollection |
1136| `ERROR` | Controller failed to schedule GitGarbageCollection |
1137
1138## GerritNetworkSpec
1139
1140| Field | Type | Description |
1141|---|---|---|
1142| `ingress` | [`GerritClusterIngressConfig`](#gerritclusteringressconfig) | Ingress traffic handling in GerritCluster |
1143| `receiver` | [`NetworkMember`](#networkmember) | Receiver in the network. |
1144| `primaryGerrit` | [`NetworkMemberWithSsh`](#networkmemberwithssh) | Primary Gerrit in the network. |
1145| `gerritReplica` | [`NetworkMemberWithSsh`](#networkmemberwithssh) | Gerrit Replica in the network. |
1146
1147## NetworkMember
1148
1149| Field | Type | Description |
1150|------------|----------|----------------------------|
1151| `name` | `String` | Name of the network member |
1152| `httpPort` | `int` | Port used for HTTP(S) |
1153
1154## NetworkMemberWithSsh
1155
1156**Extends:** [`NetworkMember`](#networkmember)
1157
1158| Field | Type | Description |
1159|-----------|-------|-------------------|
1160| `sshPort` | `int` | Port used for SSH |