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

UPSTREAM: <carry>: prevent annotation stomp #2027

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sanchezl
Copy link

@sanchezl sanchezl commented Jul 16, 2024

Forbid non-ocm service accounts from altering (typically deleting) annotations managed by the ocm.
Narrowly focused to prevent unintended impacts.

@openshift-ci-robot openshift-ci-robot added the backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. label Jul 16, 2024
@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 Jul 16, 2024
Copy link

openshift-ci bot commented Jul 16, 2024

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

@sanchezl: 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.

Copy link

openshift-ci bot commented Jul 16, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sanchezl
Once this PR has been reviewed and has the lgtm label, please assign deads2k for approval. For more information see the Kubernetes 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

@openshift-ci-robot
Copy link

@sanchezl: 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.

@sanchezl sanchezl marked this pull request as ready for review July 22, 2024 16:00
@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 Jul 22, 2024
@openshift-ci openshift-ci bot requested review from deads2k and soltysh July 22, 2024 16:00
@sanchezl sanchezl changed the title prevent annotation stomp UPSTREAM: <carry>: prevent annotation stomp Jul 22, 2024
@openshift-ci-robot
Copy link

@sanchezl: 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

@sanchezl: 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.

Copy link

openshift-ci bot commented Jul 22, 2024

@sanchezl: The /retest command does not accept any targets.
The following commands are available to trigger required jobs:

  • /test artifacts
  • /test configmap-scale
  • /test e2e-aws-crun-wasm
  • /test e2e-aws-jenkins
  • /test e2e-aws-ovn-cgroupsv2
  • /test e2e-aws-ovn-crun
  • /test e2e-aws-ovn-downgrade
  • /test e2e-aws-ovn-fips
  • /test e2e-aws-ovn-runc
  • /test e2e-aws-ovn-serial
  • /test e2e-aws-ovn-upgrade
  • /test e2e-azure-ovn-upgrade
  • /test e2e-gcp
  • /test e2e-gcp-ovn-upgrade
  • /test images
  • /test integration
  • /test k8s-e2e-conformance-aws
  • /test k8s-e2e-gcp-ovn
  • /test k8s-e2e-gcp-serial
  • /test unit
  • /test verify
  • /test verify-commits

The following commands are available to trigger optional jobs:

  • /test e2e-agnostic-ovn-cmd
  • /test e2e-aws
  • /test e2e-aws-csi
  • /test e2e-aws-disruptive
  • /test e2e-aws-ovn
  • /test e2e-aws-single-node
  • /test e2e-azure
  • /test e2e-metal-ipi-ovn-dualstack
  • /test e2e-metal-ipi-ovn-ipv6
  • /test e2e-openstack
  • /test e2e-openstack-csi-cinder
  • /test e2e-openstack-csi-manila
  • /test e2e-vsphere
  • /test k8s-e2e-aws
  • /test k8s-e2e-aws-ovn-serial
  • /test k8s-e2e-gcp-five-control-plane-replicas
  • /test okd-scos-images

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-kubernetes-master-e2e-agnostic-ovn-cmd
  • pull-ci-openshift-kubernetes-master-e2e-aws-crun-wasm
  • pull-ci-openshift-kubernetes-master-e2e-aws-csi
  • pull-ci-openshift-kubernetes-master-e2e-aws-ovn-cgroupsv2
  • pull-ci-openshift-kubernetes-master-e2e-aws-ovn-crun
  • pull-ci-openshift-kubernetes-master-e2e-aws-ovn-fips
  • pull-ci-openshift-kubernetes-master-e2e-aws-ovn-runc
  • pull-ci-openshift-kubernetes-master-e2e-aws-ovn-serial
  • pull-ci-openshift-kubernetes-master-e2e-gcp
  • pull-ci-openshift-kubernetes-master-e2e-gcp-ovn-upgrade
  • pull-ci-openshift-kubernetes-master-images
  • pull-ci-openshift-kubernetes-master-integration
  • pull-ci-openshift-kubernetes-master-k8s-e2e-aws-ovn-serial
  • pull-ci-openshift-kubernetes-master-k8s-e2e-conformance-aws
  • pull-ci-openshift-kubernetes-master-k8s-e2e-gcp-ovn
  • pull-ci-openshift-kubernetes-master-k8s-e2e-gcp-serial
  • pull-ci-openshift-kubernetes-master-unit
  • pull-ci-openshift-kubernetes-master-verify
  • pull-ci-openshift-kubernetes-master-verify-commits

In response to this:

/retest required

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.

@sanchezl
Copy link
Author

/retest-required

@openshift-ci-robot
Copy link

@sanchezl: 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

@sanchezl: 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.

func (m protectAnnotation) Validate(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error {
if a.GetResource().Resource != "serviceaccounts" {
return nil
}
Copy link

Choose a reason for hiding this comment

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

skip if any subresource is specified.

@deads2k
Copy link

deads2k commented Jul 26, 2024

lgtm.

I'd like to see an e2e test as well. Justin and Maciej recently made it possible to add an e2e test in this repo and have it run without vendoring into origin. Could you add one please.

@openshift-ci-robot
Copy link

@sanchezl: 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.

Copy link

openshift-ci bot commented Jul 29, 2024

@sanchezl: 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/k8s-e2e-aws-ovn-serial 0b5a41b link false /test k8s-e2e-aws-ovn-serial
ci/prow/verify 0b5a41b link true /test verify
ci/prow/e2e-agnostic-ovn-cmd 0b5a41b link false /test e2e-agnostic-ovn-cmd

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.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants