Skip to content

Commit f244a06

Browse files
Merge pull request #140 from jkhelil/support_v1beta1
Add v1beta1 API with Conversion Webhook and Cert-Manager
2 parents bc1ab18 + 30d77ba commit f244a06

22 files changed

+12648
-8110
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ Once OLM has been deployed, use the following command to install the latest oper
1313
$ kubectl apply -f https://operatorhub.io/install/shipwright-operator.yaml
1414
```
1515

16+
## OLM Dependencies
17+
When installed via OLM using the provided SHipwright Operator Bundle, the Shipwright operator has two dependencies to:
18+
- The Tekton operator needed by the Shipright Build Controller
19+
- The Cert-Manager operator needed in case you delegate to the Shipwright operator the ssl certificates management of the Shipwright Conversion webhook
20+
The two operators are then installed automatically by OLM.
21+
1622
## Usage
1723

1824
To deploy and manage [Shipwright Builds](https://github.com/shipwright-io/build) in your cluster,
@@ -36,11 +42,15 @@ Refer to the [ShipwrightBuild documentation](docs/shipwrightbuild.md) for more i
3642

3743
The operator handles differents environment variables to customize Shiprwright controller installation:
3844
- KO_DATA_PATH : defines the shipwright controller manifest to install
45+
- USE_MANAGED_WEBHOOK_CERTS: defines wether the webook ssl certificate is installed by the operator. It requires cert-manager to be installed in the cluster.
3946
- IMAGE_SHIPWRIGHT_SHIPWRIGHT_BUILD : defines the Shipwright Build Controller Image to use
4047
- IMAGE_SHIPWRIGHT_GIT_CONTAINER_IMAGE: defines the Shipwright Git Container Image to use
41-
- IMAGE_SHIPWRIGHT_MUTATE_IMAGE_CONTAINER_IMAGE: defines the Shipwright Mutate Image to use
48+
- IMAGE_SHIPWRIGHT_IMAGE_PROCESSING_CONTAINER_IMAGE: defines the Shipwright Processing Image to use
4249
- IMAGE_SHIPWRIGHT_BUNDLE_CONTAINER_IMAGE: defines the Shipwright Bundle Image to use
4350
- IMAGE_SHIPWRIGHT_WAITER_CONTAINER_IMAGE: defines the Shipwright Waiter Image to use
51+
- IMAGE_SHIPWRIGHT_SHIPWRIGHT_BUILD_WEBHOOK: defines the Shipwright Build Webhook Image to use
52+
53+
For more information about the function of these images, please consider the Shipwright Build doc https://github.com/shipwright-io/build/blob/main/docs/configuration.md
4454

4555
## Contributing
4656

bundle/manifests/shipwright-operator.clusterserviceversion.yaml

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ spec:
4040
- kind: TektonConfig
4141
name: tektonconfigs.operator.tekton.dev
4242
version: v1alpha1
43+
- kind: Certificate
44+
name: certificates.cert-manager.io
45+
version: v1
4346
description: |
4447
Shipwright is a framework for building container images on Kubernetes.
4548
@@ -380,6 +383,30 @@ spec:
380383
- events
381384
verbs:
382385
- create
386+
- apiGroups:
387+
- admissionregistration.k8s.io
388+
resources:
389+
- validatingwebhookconfigurations
390+
verbs:
391+
- create
392+
- delete
393+
- get
394+
- list
395+
- patch
396+
- update
397+
- watch
398+
- apiGroups:
399+
- admissionregistration.k8s.io/v1beta1
400+
resources:
401+
- validatingwebhookconfigurations
402+
verbs:
403+
- create
404+
- delete
405+
- get
406+
- list
407+
- patch
408+
- update
409+
- watch
383410
- apiGroups:
384411
- apiextensions.k8s.io
385412
resources:
@@ -421,6 +448,16 @@ spec:
421448
- delete
422449
- patch
423450
- update
451+
- apiGroups:
452+
- apps
453+
resourceNames:
454+
- shipwright-build-webhook
455+
resources:
456+
- deployments
457+
verbs:
458+
- delete
459+
- patch
460+
- update
424461
- apiGroups:
425462
- apps
426463
resourceNames:
@@ -429,6 +466,52 @@ spec:
429466
- deployments/finalizers
430467
verbs:
431468
- update
469+
- apiGroups:
470+
- apps
471+
resourceNames:
472+
- shipwright-build-webhook
473+
resources:
474+
- deployments/finalizers
475+
verbs:
476+
- update
477+
- apiGroups:
478+
- cert-manager.io
479+
resources:
480+
- certificates
481+
verbs:
482+
- create
483+
- get
484+
- list
485+
- watch
486+
- apiGroups:
487+
- cert-manager.io
488+
resourceNames:
489+
- shipwright-build-webhook-cert
490+
resources:
491+
- certificates
492+
verbs:
493+
- delete
494+
- patch
495+
- update
496+
- apiGroups:
497+
- cert-manager.io
498+
resources:
499+
- issuers
500+
verbs:
501+
- create
502+
- get
503+
- list
504+
- watch
505+
- apiGroups:
506+
- cert-manager.io
507+
resourceNames:
508+
- selfsigned-issuer
509+
resources:
510+
- issuers
511+
verbs:
512+
- delete
513+
- patch
514+
- update
432515
- apiGroups:
433516
- ""
434517
resources:
@@ -441,6 +524,25 @@ spec:
441524
- patch
442525
- update
443526
- watch
527+
- apiGroups:
528+
- ""
529+
resources:
530+
- secrets
531+
verbs:
532+
- create
533+
- get
534+
- list
535+
- watch
536+
- apiGroups:
537+
- ""
538+
resourceNames:
539+
- shipwright-build-webhook-cert
540+
resources:
541+
- secrets
542+
verbs:
543+
- delete
544+
- patch
545+
- update
444546
- apiGroups:
445547
- ""
446548
resources:
@@ -460,6 +562,35 @@ spec:
460562
- delete
461563
- patch
462564
- update
565+
- apiGroups:
566+
- ""
567+
resourceNames:
568+
- shipwright-build-webhook
569+
resources:
570+
- serviceaccounts
571+
verbs:
572+
- delete
573+
- patch
574+
- update
575+
- apiGroups:
576+
- ""
577+
resources:
578+
- services
579+
verbs:
580+
- create
581+
- get
582+
- list
583+
- watch
584+
- apiGroups:
585+
- ""
586+
resourceNames:
587+
- shipwright-build-controller
588+
resources:
589+
- services
590+
verbs:
591+
- delete
592+
- patch
593+
- update
463594
- apiGroups:
464595
- operator.shipwright.io
465596
resources:
@@ -511,6 +642,16 @@ spec:
511642
- delete
512643
- patch
513644
- update
645+
- apiGroups:
646+
- rbac.authorization.k8s.io
647+
resourceNames:
648+
- shipwright-build-webhook
649+
resources:
650+
- clusterrolebindings
651+
verbs:
652+
- delete
653+
- patch
654+
- update
514655
- apiGroups:
515656
- rbac.authorization.k8s.io
516657
resources:
@@ -550,6 +691,16 @@ spec:
550691
- delete
551692
- patch
552693
- update
694+
- apiGroups:
695+
- rbac.authorization.k8s.io
696+
resourceNames:
697+
- shipwright-build-webhook
698+
resources:
699+
- clusterroles
700+
verbs:
701+
- delete
702+
- patch
703+
- update
553704
- apiGroups:
554705
- rbac.authorization.k8s.io
555706
resources:
@@ -569,6 +720,16 @@ spec:
569720
- delete
570721
- patch
571722
- update
723+
- apiGroups:
724+
- rbac.authorization.k8s.io
725+
resourceNames:
726+
- shipwright-build-webhook
727+
resources:
728+
- rolebindings
729+
verbs:
730+
- delete
731+
- patch
732+
- update
572733
- apiGroups:
573734
- rbac.authorization.k8s.io
574735
resources:
@@ -588,6 +749,16 @@ spec:
588749
- delete
589750
- patch
590751
- update
752+
- apiGroups:
753+
- rbac.authorization.k8s.io
754+
resourceNames:
755+
- shipwright-build-webhook
756+
resources:
757+
- roles
758+
verbs:
759+
- delete
760+
- patch
761+
- update
591762
- apiGroups:
592763
- authentication.k8s.io
593764
resources:
@@ -639,6 +810,9 @@ spec:
639810
- --health-probe-bind-address=:8081
640811
- --metrics-bind-address=127.0.0.1:8080
641812
- --leader-elect
813+
env:
814+
- name: USE_MANAGED_WEBHOOK_CERTS
815+
value: "true"
642816
image: ko://github.com/shipwright-io/operator
643817
livenessProbe:
644818
httpGet:

config/manager/manager.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ spec:
2929
containers:
3030
- args:
3131
- --leader-elect
32+
env:
33+
- name: USE_MANAGED_WEBHOOK_CERTS
34+
value: "true"
3235
image: ko://github.com/shipwright-io/operator
3336
name: operator
3437
securityContext:

config/manifests/bases/shipwright-operator.clusterserviceversion.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ spec:
2626
- kind: TektonConfig
2727
name: tektonconfigs.operator.tekton.dev
2828
version: v1alpha1
29+
- kind: Certificate
30+
name: certificates.cert-manager.io
31+
version: v1
2932
description: |
3033
Shipwright is a framework for building container images on Kubernetes.
3134

0 commit comments

Comments
 (0)