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

HOSTEDCP-1308: Add e2e to ensure SA token not mounted on mgmt workloa… #3301

Merged
merged 2 commits into from Jan 23, 2024

Conversation

Patryk-Stefanski
Copy link
Contributor

@Patryk-Stefanski Patryk-Stefanski commented Dec 8, 2023

What this PR does / why we need it: Adds e2e to ensure SA token not mounted on mgmt workloa…

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes # HOSTEDCP-1308

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 8, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 8, 2023

@Patryk-Stefanski: This pull request references HOSTEDCP-1308 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.16.0" version, but no target version was set.

In response to this:

What this PR does / why we need it: Adds e2e to ensure SA token not mounted on mgmt workloa…

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes # HOSTEDCP-1308](https://issues.redhat.com/browse/HOSTEDCP-1308)

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 Dec 8, 2023
Copy link
Contributor

openshift-ci bot commented Dec 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

@Patryk-Stefanski
Copy link
Contributor Author

/test all

@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 8, 2023

@Patryk-Stefanski: This pull request references HOSTEDCP-1308 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.16.0" version, but no target version was set.

In response to this:

What this PR does / why we need it: Adds e2e to ensure SA token not mounted on mgmt workloa…

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes # HOSTEDCP-1308](https://issues.redhat.com/browse/HOSTEDCP-1308)

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 do-not-merge/needs-area area/testing Indicates the PR includes changes for e2e testing and removed do-not-merge/needs-area labels Dec 8, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 8, 2023

@Patryk-Stefanski: This pull request references HOSTEDCP-1308 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.16.0" version, but no target version was set.

In response to this:

What this PR does / why we need it: Adds e2e to ensure SA token not mounted on mgmt workloa…

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes # HOSTEDCP-1308

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@Patryk-Stefanski
Copy link
Contributor Author

/retest-required

break
}
}
if !hasPrefix {
Copy link
Member

Choose a reason for hiding this comment

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

why is this not checking Spec.AutomountServiceAccountToken?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm wasnt aware of it, that makes things cleaner. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just looking into it not many pods actually use this. I think keeping it the way it is may not be as clean as checking a spec in a pod but its a more accurate way of checking atm.

I can do some refactoring so the expected pods use spec.AutomountServiceAccountToken but think it falls outside of the scope of this Jira. WDYT @enxebre

@Patryk-Stefanski Patryk-Stefanski marked this pull request as ready for review December 20, 2023 11:16
@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 Dec 20, 2023
Copy link

netlify bot commented Dec 20, 2023

Deploy Preview for hypershift-docs ready!

Name Link
🔨 Latest commit 72e7f8f
🔍 Latest deploy log https://app.netlify.com/sites/hypershift-docs/deploys/6596cce8bea02e0008f3f779
😎 Deploy Preview https://deploy-preview-3301--hypershift-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@openshift-ci openshift-ci bot added the area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release label Dec 20, 2023
@Patryk-Stefanski Patryk-Stefanski force-pushed the HOSTEDCP-1308 branch 4 times, most recently from 8fe197e to 54a5dc2 Compare December 21, 2023 10:57
@Patryk-Stefanski
Copy link
Contributor Author

/hold found more pods that mount the SA token, will look into this in the new year.

@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 Dec 21, 2023
@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 4, 2024
@Patryk-Stefanski Patryk-Stefanski force-pushed the HOSTEDCP-1308 branch 2 times, most recently from c3d8315 to 72e7f8f Compare January 4, 2024 15:21
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 4, 2024
@Patryk-Stefanski
Copy link
Contributor Author

/retest

@Patryk-Stefanski
Copy link
Contributor Author

/retest-required

1 similar comment
@Patryk-Stefanski
Copy link
Contributor Author

/retest-required

@Patryk-Stefanski
Copy link
Contributor Author

/test e2e-aws

@Patryk-Stefanski
Copy link
Contributor Author

/test e2e-kubevirt-aws-ovn

1 similar comment
@Patryk-Stefanski
Copy link
Contributor Author

/test e2e-kubevirt-aws-ovn

@Patryk-Stefanski Patryk-Stefanski force-pushed the HOSTEDCP-1308 branch 3 times, most recently from 574c5f0 to 1ef63af Compare January 18, 2024 11:00
@Patryk-Stefanski
Copy link
Contributor Author

/test e2e-kubevirt-aws-ovn

@Patryk-Stefanski
Copy link
Contributor Author

/test e2e-aws

1 similar comment
@Patryk-Stefanski
Copy link
Contributor Author

/test e2e-aws

@muraee
Copy link
Contributor

muraee commented Jan 22, 2024

/approve

Copy link
Contributor

openshift-ci bot commented Jan 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: muraee, Patryk-Stefanski

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 Jan 22, 2024
@csrwng
Copy link
Contributor

csrwng commented Jan 22, 2024

/lgtm

@csrwng
Copy link
Contributor

csrwng commented Jan 22, 2024

/override "Red Hat Trusted App Pipeline / hypershift-operator-main-on-pull-request"

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 22, 2024
Copy link
Contributor

openshift-ci bot commented Jan 22, 2024

@csrwng: Overrode contexts on behalf of csrwng: Red Hat Trusted App Pipeline / hypershift-operator-main-on-pull-request

In response to this:

/override "Red Hat Trusted App Pipeline / hypershift-operator-main-on-pull-request"

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.

@Patryk-Stefanski
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 22, 2024
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 78d585e and 2 for PR HEAD 76d9195 in total

Copy link
Contributor

openshift-ci bot commented Jan 23, 2024

@Patryk-Stefanski: all tests passed!

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.

@openshift-merge-bot openshift-merge-bot bot merged commit ef43500 into openshift:main Jan 23, 2024
11 of 12 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-hypershift-container-v4.16.0-202401230706.p0.gef43500.assembly.stream for distgit hypershift.
All builds following this will include this PR.

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. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/testing Indicates the PR includes changes for e2e testing 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants