-
Notifications
You must be signed in to change notification settings - Fork 22
feat: Remove API Dependency on Tekton and cert-manager #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Remove API Dependency on Tekton and cert-manager #274
Conversation
434ba0a to
9bbbd14
Compare
9bbbd14 to
b9b7e37
Compare
Fixed unit tests: Added CRD establishment wait and Switched to controller-runtime client Updated the e2e test script (hack/run-operator-catalog.sh) to install Tekton and cert-manager before creating the ShipwrightBuild. Signed-off-by: Hasan Awad <[email protected]>
b9b7e37 to
eac8bf1
Compare
adambkaplan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
Looks fantastic! I identified one "nice to have"/follow up item that IMO shouldn't block merge. The e2e test is passing, which is good enough for me.
| ## Prerequisites | ||
| Before installing the Shipwright operator, ensure the following components are installed: | ||
| - **Tekton**: Follow the [Tekton installation instructions](https://tekton.dev/docs/setup/) to install Tekton Pipelines. | ||
| - **cert-manager**: Follow the [cert-manager installation instructions](https://cert-manager.io/docs/installation/) to install cert-manager for webhook certificate provisioning. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 - we can't rely on Operator Lifecycle Manager to install these with this change.
We will also need to update the "Getting Started" instructions once we get the release working on OperatorHub.
|
|
||
| // Wait for the CRD to be established before proceeding | ||
| Eventually(func() bool { | ||
| crd := &crdv1.CustomResourceDefinition{} | ||
| if err := k8sClient.Get(ctx, types.NamespacedName{Name: "tektonconfigs.operator.tekton.dev"}, crd); err != nil { | ||
| return false | ||
| } | ||
| for _, condition := range crd.Status.Conditions { | ||
| if condition.Type == crdv1.Established && condition.Status == crdv1.ConditionTrue { | ||
| return true | ||
| } | ||
| } | ||
| return false | ||
| }).Should(BeTrue(), "TektonConfig CRD should be established") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also do this for the cert-manager Issuer or Certificate CRDs? I think we can address this in a follow-up PR if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good looking out. I’ll look into this in a future pr
| // Use controller-runtime client instead of REST client for better compatibility with envtest | ||
| err := k8sClient.Create(ctx, tektonConfig, &client.CreateOptions{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 - thank you for this! Much needed payoff for old tech debt.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adambkaplan The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
SaschaSchwarze0
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Changes
#270
Submitter Checklist
Release Notes