Skip to content

Comments

UPSTREAM: <carry>: CFE-910: Update route external certificate validation#1659

Closed
thejasn wants to merge 6 commits intoopenshift:masterfrom
thejasn:feature/route-external-certificate-validation
Closed

UPSTREAM: <carry>: CFE-910: Update route external certificate validation#1659
thejasn wants to merge 6 commits intoopenshift:masterfrom
thejasn:feature/route-external-certificate-validation

Conversation

@thejasn
Copy link

@thejasn thejasn commented Aug 8, 2023

Description

Updates route validations based on openshift/enhancements#1307 which introduces a new field in the route API externalCertificate behind the TP feature gate.

Injects openshift feature gates into the custom validator for routes, similar to openshift/openshift-apiserver#382. Openshift feature gates were already being passed by the operator in openshift/cluster-kube-apiserver-operator#1485, this is a follow up for consuming the feature gates for route validation.

Follow up from: openshift/library-go#1549

@openshift-ci-robot openshift-ci-robot added backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Aug 8, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 8, 2023

@thejasn: This pull request references CFE-910 which is a valid jira issue.

Details

In response to this:

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


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.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 8, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 8, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot
Copy link

@thejasn: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@openshift-ci
Copy link

openshift-ci bot commented Aug 8, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Details 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 vendor-update Touching vendor dir or related files label Aug 8, 2023
@thejasn thejasn force-pushed the feature/route-external-certificate-validation branch from 93372cc to 226300b Compare August 8, 2023 12:40
@openshift-ci-robot
Copy link

@thejasn: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@thejasn thejasn changed the title [WIP] CFE-910: Feature/route external certificate validation UPSTREAM: <carry>: CFE-910: Update route external certificate validation Aug 8, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 8, 2023

@thejasn: This pull request references CFE-910 which is a valid jira issue.

Details

In response to this:

Description

Updates route validations based on openshift/enhancements#1307 which introduces a new field in the route API externalCertificate behind the TP feature gate.

Injects openshift feature gates into the custom validator for routes, similar to openshift/openshift-apiserver#382. Openshift feature gates were already being passed by the operator in openshift/cluster-kube-apiserver-operator#1485, this is a follow up for consuming the feature gates for route validation.

Follow up from: openshift/library-go#1549

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.

@thejasn thejasn marked this pull request as ready for review August 8, 2023 12:53
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 8, 2023
@openshift-ci openshift-ci bot requested review from deads2k and mfojtik August 8, 2023 12:56
go.mod Outdated
Copy link

Choose a reason for hiding this comment

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

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 8, 2023
Copy link

@p0lyn0mial p0lyn0mial left a comment

Choose a reason for hiding this comment

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

I added a few comments.
Please also check why all CI jobs failed.

Choose a reason for hiding this comment

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

How were the feature flags set before?

Copy link
Author

Choose a reason for hiding this comment

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

k8s apiserver never had the OCP feature flags being injected

Choose a reason for hiding this comment

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

If routecommon.RouteValidationOptions is a struct then I think you will need a function.

Copy link
Author

Choose a reason for hiding this comment

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

Addressed

Choose a reason for hiding this comment

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

I think that you will need a function here as well.

Choose a reason for hiding this comment

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

same for secretsGetter

Copy link
Author

Choose a reason for hiding this comment

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

Addressed

Choose a reason for hiding this comment

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

could you please add a unit test that would ensue that the getters can be injected?

Choose a reason for hiding this comment

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

should we check if a.ValidationInterface also wants SetRESTClientConfig?

Choose a reason for hiding this comment

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

I think that we should extend ObjectValidator to accept the ctx for all its methods.

type ObjectValidator interface {
	ValidateCreate(obj runtime.Object) field.ErrorList
	ValidateUpdate(obj runtime.Object, oldObj runtime.Object) field.ErrorList
	ValidateStatusUpdate(obj runtime.Object, oldObj runtime.Object) field.ErrorList
}

Copy link
Author

Choose a reason for hiding this comment

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

Addressed

Choose a reason for hiding this comment

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

How hard would it be to move this initialisation to a separate setter ?

As we did for

func (p *podNodeEnvironment) SetDefaultNodeSelector(in string) {

Copy link
Author

Choose a reason for hiding this comment

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

Addressed

Choose a reason for hiding this comment

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

Same question here.

How hard would it be to move this initialisation to a separate setter ?

As we did for

func (p *podNodeEnvironment) SetDefaultNodeSelector(in string) {

Copy link
Author

Choose a reason for hiding this comment

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

Addressed

Choose a reason for hiding this comment

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

BTW: Perhaps this question should be asked elsewhere. But could you explain why we need the SAR client? It seems to me that we want to make sure if the user can change Route.Spec.Host, right? Do you happen to know why this was implemented in this particular way?

Choose a reason for hiding this comment

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

/cc @benluddy

Copy link
Author

Choose a reason for hiding this comment

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

@openshift-ci openshift-ci bot requested a review from benluddy August 9, 2023 11:47
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 10, 2023
@thejasn thejasn force-pushed the feature/route-external-certificate-validation branch from 226300b to 934347b Compare October 9, 2023 17:46
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 9, 2023
@openshift-ci-robot
Copy link

@thejasn: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 9, 2023

@thejasn: This pull request references CFE-910 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 sub-task to target the "4.15.0" version, but no target version was set.

Details

In response to this:

Description

Updates route validations based on openshift/enhancements#1307 which introduces a new field in the route API externalCertificate behind the TP feature gate.

Injects openshift feature gates into the custom validator for routes, similar to openshift/openshift-apiserver#382. Openshift feature gates were already being passed by the operator in openshift/cluster-kube-apiserver-operator#1485, this is a follow up for consuming the feature gates for route validation.

Follow up from: openshift/library-go#1549

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.

@thejasn thejasn force-pushed the feature/route-external-certificate-validation branch from 934347b to 1edf6c9 Compare October 9, 2023 17:54
@openshift-ci-robot
Copy link

@thejasn: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@thejasn thejasn force-pushed the feature/route-external-certificate-validation branch from 1edf6c9 to c524d58 Compare October 10, 2023 09:34
@openshift-ci-robot
Copy link

@thejasn: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@thejasn thejasn force-pushed the feature/route-external-certificate-validation branch from c524d58 to 40fcceb Compare October 10, 2023 09:45
Updates api to pull externalCertificate fields
Updates library-go to pull new route validations

hack/pin-dependency.sh github.com/openshift/api 2a3e8b481cec52b6815a4c4f678529c5070c9504
hack/pin-dependency.sh github.com/openshift/library-go=github.com/thejasn/library-go 90c9115d7ae3af3b87ffe3dafc9b285fd5688b1f
hack/update-vendor.sh
@thejasn thejasn force-pushed the feature/route-external-certificate-validation branch from 40fcceb to 25188d7 Compare October 10, 2023 13:56
@openshift-ci-robot
Copy link

@thejasn: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@thejasn
Copy link
Author

thejasn commented Oct 11, 2023

/cc @alebedev87

@openshift-ci openshift-ci bot requested a review from alebedev87 October 11, 2023 08:34
@thejasn thejasn force-pushed the feature/route-external-certificate-validation branch from 25188d7 to bc0dc6e Compare October 11, 2023 09:32
@openshift-ci-robot
Copy link

@thejasn: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@thejasn thejasn force-pushed the feature/route-external-certificate-validation branch from bc0dc6e to 39def98 Compare October 11, 2023 09:46
@openshift-ci-robot
Copy link

@thejasn: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@thejasn thejasn force-pushed the feature/route-external-certificate-validation branch from 39def98 to bc8dc97 Compare October 11, 2023 09:59
@openshift-ci-robot
Copy link

@thejasn: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@openshift-ci-robot
Copy link

@thejasn: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@openshift-ci
Copy link

openshift-ci bot commented Oct 12, 2023

@thejasn: The following tests 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/artifacts 25188d72f8a60d7cddc7ad91b7c7d1d2ca15b392 link true /test artifacts
ci/prow/e2e-aws-ovn-cgroupsv2 e184cfd link true /test e2e-aws-ovn-cgroupsv2
ci/prow/k8s-e2e-aws-ovn-serial e184cfd link false /test k8s-e2e-aws-ovn-serial
ci/prow/e2e-aws-csi e184cfd link false /test e2e-aws-csi
ci/prow/e2e-agnostic-ovn-cmd e184cfd link false /test e2e-agnostic-ovn-cmd
ci/prow/k8s-e2e-gcp-ovn e184cfd link true /test k8s-e2e-gcp-ovn
ci/prow/e2e-gcp-ovn-upgrade e184cfd link true /test e2e-gcp-ovn-upgrade
ci/prow/e2e-aws-crun-wasm e184cfd link true /test e2e-aws-crun-wasm
ci/prow/e2e-gcp e184cfd link true /test e2e-gcp
ci/prow/e2e-aws-ovn-serial e184cfd link true /test e2e-aws-ovn-serial
ci/prow/k8s-e2e-conformance-aws e184cfd link true /test k8s-e2e-conformance-aws
ci/prow/k8s-e2e-gcp-serial e184cfd link true /test k8s-e2e-gcp-serial
ci/prow/e2e-aws-ovn-crun e184cfd link true /test e2e-aws-ovn-crun
ci/prow/e2e-aws-ovn-fips e184cfd link true /test e2e-aws-ovn-fips
ci/prow/integration e184cfd link true /test integration

Full PR test history. Your PR dashboard.

Details

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.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2024
@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 11, 2024
@openshift-merge-robot
Copy link

PR needs rebase.

Details

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.

@benluddy
Copy link

Are E2E tests covering the validation changes passing for MicroShift? Since none of the other flavors use the kube-apiserver admission plugin to validate routes, the presubmits give limited signal.

@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 25, 2024
@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci openshift-ci bot closed this Mar 26, 2024
@openshift-ci
Copy link

openshift-ci bot commented Mar 26, 2024

@openshift-bot: Closed this PR.

Details

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. vendor-update Touching vendor dir or related files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants