Skip to content

CM-553: Rebase for operator v1.16.0 release with upstream cert-manager v1.16.4 #263

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

Closed

Conversation

siddhibhor-56
Copy link
Contributor

@siddhibhor-56 siddhibhor-56 commented Apr 2, 2025

Rebases downstream operator with upstream cert-manager v1.16.4 for next release [v1.16.4] :

@openshift-ci openshift-ci bot requested review from deads2k and swghosh April 2, 2025 11:01
Copy link
Contributor

openshift-ci bot commented Apr 2, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: siddhibhor-56
Once this PR has been reviewed and has the lgtm label, please assign swghosh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -1,4 +1,4 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder

ARG RELEASE_BRANCH=release-1.15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ARG RELEASE_BRANCH=release-1.15
ARG RELEASE_BRANCH=release-1.16

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@swghosh
Copy link
Member

swghosh commented Apr 9, 2025

/test e2e-operator

@siddhibhor-56 siddhibhor-56 force-pushed the cert-manager-1-16 branch 2 times, most recently from e850cf9 to e35df1c Compare April 10, 2025 09:28
@swghosh
Copy link
Member

swghosh commented Apr 14, 2025

/retest

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 24, 2025
Comment on lines 78 to 82
value: quay.io/jetstack/cert-manager-webhook
- name: RELATED_IMAGE_CERT_MANAGER_CA_INJECTOR
value: quay.io/jetstack/cert-manager-cainjector:v1.15.5
value: quay.io/jetstack/cert-manager-cainjector
- name: RELATED_IMAGE_CERT_MANAGER_CONTROLLER
value: quay.io/jetstack/cert-manager-controller:v1.15.5
value: quay.io/jetstack/cert-manager-controller
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to openshift/release#64190, we would need :latest appended to these. That should help the fix ImagePullBackOff on the e2e.

@siddhibhor-56
Copy link
Contributor Author

/retest

@siddhibhor-56 siddhibhor-56 force-pushed the cert-manager-1-16 branch 4 times, most recently from 798c9b1 to 0ba495d Compare April 25, 2025 10:00
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 25, 2025
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 25, 2025
- replace github.com/cert-manager/cert-manager => github.com/openshift/jetstack-cert-manager v1.16.4
- make bundle
- make update
- make update-bindata
- replaces : cert-manager-operator.v1.15.1
- olm.skipRange: '>=1.15.1 <1.16.0'
…atorSpec,PatchOperatorStatus functions

Changes
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 25, 2025
@siddhibhor-56
Copy link
Contributor Author

/retest

@siddhibhor-56 siddhibhor-56 force-pushed the cert-manager-1-16 branch 2 times, most recently from 2a9685a to 6d7c421 Compare April 29, 2025 07:11
return nil
}

func (c OperatorClient) ApplyOperatorStatus(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.OperatorStatusApplyConfiguration) (err error) {
Copy link
Member

@swghosh swghosh Apr 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're adding custom (non-auto generated) code for this ApplyOperatorStatus which is required required in the deployment_controller (and possibly other controllers) vendored from library-go (eg. traces in https://github.com/search?q=repo%3Aopenshift%2Flibrary-go%20ApplyOperatorStatus&type=code), we need to add unit tests here to ensure this is never broken.

For reference, I added a few unit test cases: f1863ac that would test such scenarios. Today, the operator only adds/updates into status.OperatorStatus.Conditions and status.OperatorStatus.Generations.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fake client unfortunately does not support client.Apply funcs yet (ref: kubernetes-sigs/controller-runtime#2341) which is why the results of testing the implementation against it are not accurate. We can follow-up with Envtest based integration test instead of unit tests based on fake client, but that'll require some work to add a new CI job where integration tests are run separately.

Copy link
Contributor

openshift-ci bot commented Apr 29, 2025

@siddhibhor-56: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-operator-tech-preview 24c1bc7 link false /test e2e-operator-tech-preview

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@swghosh
Copy link
Member

swghosh commented Apr 30, 2025

/cc @Senthamilarasu-STA
for px-approved label
This bump is required for the next 1.16.0 operator release.

@swghosh
Copy link
Member

swghosh commented Apr 30, 2025

/label docs-approved
Added docs-needed label to parent epic: CM-526, @subhtk is aware of the 1.16 docs.

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Apr 30, 2025
Copy link
Member

@swghosh swghosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please tidy up the commits to include meaningful chunks of changes in each that doesn't repeat/revert the same changes, update the ApplyOperatorStatus code so it doesn't panic and this should be good to go after.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this entire .idea directory, also you can add .idea/ to the top-level .gitignore so it's automatically ignored from future git tracking.

@@ -18,12 +18,16 @@ spec:
app.kubernetes.io/name: cainjector
template:
metadata:
annotations:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes to my self,
Future TODO: test cainjector metrics, update our ServiceMonitor docs with these metric paths.

@@ -18,12 +18,16 @@ spec:
app.kubernetes.io/name: webhook
template:
metadata:
annotations:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes to my self,
Future TODO: test webhook metrics, update our ServiceMonitor docs with these metric paths.

@@ -4,7 +4,7 @@ This repository contains Cert Manager Operator designed for OpenShift. The opera

## The operator architecture and design assumptions

The Operator uses the [upstream deployment manifests](https://github.com/jetstack/cert-manager/releases/download/v1.15.5/cert-manager.yaml). It divides them into separate files and deploys using 3 controllers:
The Operator uses the [upstream deployment manifests](https://github.com/jetstack/cert-manager/releases/download/v1.16.4/cert-manager.yaml). It divides them into separate files and deploys using 3 controllers:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we make this link generic and update it to https://github.com/cert-manager/cert-manager/releases so we don't need to update this link during every rebase manually.

@@ -1,4 +1,4 @@
build_root_image:
name: builder
namespace: ocp
tag: rhel-9-golang-1.22-openshift-4.17
tag: rhel-9-golang-1.23-openshift-4.19
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update the CI base image bumps in a different commit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to additionally update starter.go to with

       operatorClient := &operatorclient.OperatorClient{
		Informers: certManagerInformers,
		Client:    certManagerOperatorClient.OperatorV1alpha1(),
+ 		Clock:     cc.Clock,
	}

otherwise the OperatorClient's clock stays nil which'll cause panics.

@swghosh
Copy link
Member

swghosh commented Apr 30, 2025

/retitle CM-553: Rebase for operator v1.16.0 release with upstream cert-manager v1.16.4

@openshift-ci openshift-ci bot changed the title CM-553 : Rebase Upstream cert-manager v1.16.4 for cert-manager-operator.v1.16.0 release CM-553: Rebase for operator v1.16.0 release with upstream cert-manager v1.16.4 Apr 30, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 30, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 30, 2025

@siddhibhor-56: This pull request references CM-553 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

Rebases downstream operator with upstream cert-manager v1.16.4 for next release [v1.16.4] :

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@siddhibhor-56 siddhibhor-56 closed this by deleting the head repository Apr 30, 2025
@swghosh
Copy link
Member

swghosh commented Apr 30, 2025

/reopen

Copy link
Contributor

openshift-ci bot commented Apr 30, 2025

@swghosh: Failed to re-open PR: state cannot be changed. The repository that submitted this pull request has been deleted.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@swghosh
Copy link
Member

swghosh commented Apr 30, 2025

/reopen

Copy link
Contributor

openshift-ci bot commented Apr 30, 2025

@swghosh: Failed to re-open PR: state cannot be changed. The repository that submitted this pull request has been deleted.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants