Skip to content
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

CM-98: Add --enable-certificate-owner-ref as supported cert-manager controller arg #137

Conversation

arkadeepsen
Copy link
Contributor

@arkadeepsen arkadeepsen commented Jul 11, 2023

This PR adds the support for the flag --enable-certificate-owner-ref. This flag can be enabled by adding it to the spec.controllerConfig.overrideArgs field of the CertManager cluster object. When the flag is enabled the certificate resource is set as an owner of secret where the tls certificate is stored and the secret will be automatically removed when the certificate resource is deleted.

…er arg

Signed-off-by: arkadeepsen <arsen@redhat.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 11, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 11, 2023

@arkadeepsen: This pull request references CM-98 which is a valid jira issue.

In response to this:

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/test-infra repository.

@arkadeepsen
Copy link
Contributor Author

/assign @thejasn

@swghosh
Copy link
Member

swghosh commented Jul 18, 2023

/test all

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 18, 2023

@arkadeepsen: 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-upgrade 24188ee link false /test e2e-operator-upgrade

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/test-infra repository. I understand the commands that are listed here.

Signed-off-by: arkadeepsen <arsen@redhat.com>
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.

Mostly lgtm, except one small suggestion.

@@ -375,7 +375,7 @@ func verifyValidControllerOperatorStatus(t *testing.T, client *certmanoperatorcl

func addValidControlleDeploymentConfig(operator *v1alpha1.CertManager) {
operator.Spec.ControllerConfig = &v1alpha1.DeploymentConfig{
OverrideArgs: []string{"--dns01-recursive-nameservers=10.10.10.10:53", "--dns01-recursive-nameservers-only"},
OverrideArgs: []string{"--dns01-recursive-nameservers=10.10.10.10:53", "--dns01-recursive-nameservers-only", "--enable-certificate-owner-ref"},
Copy link
Member

Choose a reason for hiding this comment

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

I think we should refrain from adding this flag here, as it would mean that every e2e test would end up using certificate-owner-ref which isn't something we want to test (IMO better not to change default behaviour for now) rather we add e2e(s) specific to this scenario as a follow-up PR to specifically test the effects of applying this flag (similar to discussion we had today).

"--dns01-recursive-nameservers=10.10.10.10:53", "--dns01-recursive-nameservers-only" can still remain IMHO because some certificate tests on AWS explicitly needs these flags.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The function addValidControlleDeploymentConfig is only used once inside TestContainerOverrides e2e test and not all e2e tests. Also these flags are added once and the validity of the status of the cert-manager operator is checked. After that the flags are removed. Thus this flags do not effect any other tests.

When we modularize the e2e test, we anyway need to add the flag --enable-certificate-owner-ref to check whether it is correctly working or not. Adding it here, IMO, verifies that it is working correctly and makes the PR complete.

Let me know your thoughts.

Copy link
Member

Choose a reason for hiding this comment

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

Cool, then we're good to keep it here for now.

@TrilokGeer
Copy link
Contributor

Can PR description and subject be updated? Maybe https://hypershift-docs.netlify.app/contribute/ is of help.

@swghosh
Copy link
Member

swghosh commented Jul 25, 2023

Can PR description and subject be updated? Maybe https://hypershift-docs.netlify.app/contribute/ is of help.

@arkadeepsen Could you please add a note regarding release note for this PR? So, when we do the 1.12 release, we can share the PR description to docs as a reference.

cc: @xenolinux

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 25, 2023

@arkadeepsen: This pull request references CM-98 which is a valid jira issue.

In response to this:

This PR adds the support for the flag --enable-certificate-owner-ref. This flag can be enabled by adding it to the spec.controllerConfig.overrideArgs field of the CertManager cluster object. When the flag is enabled the certificate resource is set as an owner of secret where the tls certificate is stored and the secret will be automatically removed when the certificate resource is deleted.

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/test-infra repository.

@swghosh
Copy link
Member

swghosh commented Jul 25, 2023

/lgtm

@swghosh
Copy link
Member

swghosh commented Jul 25, 2023

/cc @thejasn
for approved label
/cc @davemulford
for px-approved label
/cc @xenolinux
for docs-approved label
/cc @xingxingxia
for qe-approved label

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 25, 2023
@davemulford
Copy link

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Jul 25, 2023
@xingxingxia
Copy link
Contributor

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Jul 26, 2023
@xenolinux
Copy link

/label docs-approved

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Jul 26, 2023
@thejasn
Copy link
Contributor

thejasn commented Jul 26, 2023

/approve

@xenolinux We'll need to add a warning/note when using this field, because once this arg is added if we uninstall the operand/operator or delete the certificate this will break network connectivity since the attached secret is deleted.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 26, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arkadeepsen, swghosh, thejasn

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 26, 2023
@openshift-merge-robot openshift-merge-robot merged commit cc1af9a into openshift:master Jul 26, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. 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. lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants