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

OCPBUGS-20192: Require non-readonly filesystem in router container #981

Merged

Conversation

rfredette
Copy link
Contributor

Setting the filesystem to read only in the router container prevents it from rendering the haproxy config, and causes haproxy to be unable to start. Adding the security context constraint readOnlyRootFilesystem: false makes sure the security profile it is assigned does not require a read only filesystem.

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Oct 11, 2023
@openshift-ci-robot
Copy link
Contributor

@rfredette: This pull request references Jira Issue OCPBUGS-20192, which is invalid:

  • expected the bug to target the "4.15.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Setting the filesystem to read only in the router container prevents it from rendering the haproxy config, and causes haproxy to be unable to start. Adding the security context constraint readOnlyRootFilesystem: false makes sure the security profile it is assigned does not require a read only filesystem.

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.

@rfredette
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Oct 11, 2023
@openshift-ci-robot
Copy link
Contributor

@rfredette: This pull request references Jira Issue OCPBUGS-20192, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @ShudiLi

In response to this:

/jira refresh

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.

@rfredette
Copy link
Contributor Author

e2e-aws-ovn failed the infrastructure step, which likely resulted in other failures.
/test e2e-aws-ovn

Copy link
Contributor

@Miciah Miciah left a comment

Choose a reason for hiding this comment

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

Please add a test case in Test_deploymentConfigChanged and add the bug reference and details from the PR description to the commit message. Otherwise this looks fine.

@rfredette rfredette force-pushed the ocpbugs-20192-securityconstraints branch 2 times, most recently from f41e007 to 1a925fb Compare October 12, 2023 18:56
@rfredette
Copy link
Contributor Author

I've made the suggested changes. @Miciah and @frobware, PTAL when you have a chance.

@rfredette
Copy link
Contributor Author

Job failure looks unrelated.
/retest

Comment on lines 1576 to 1577
boolFalse := false
deployment.Spec.Template.Spec.Containers[0].SecurityContext.AllowPrivilegeEscalation = &boolFalse
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
boolFalse := false
deployment.Spec.Template.Spec.Containers[0].SecurityContext.AllowPrivilegeEscalation = &boolFalse
deployment.Spec.Template.Spec.Containers[0].SecurityContext.AllowPrivilegeEscalation = pointer.Bool(false)

Comment on lines 1584 to 1585
boolTrue := true
deployment.Spec.Template.Spec.Containers[0].SecurityContext.ReadOnlyRootFilesystem = &boolTrue
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
boolTrue := true
deployment.Spec.Template.Spec.Containers[0].SecurityContext.ReadOnlyRootFilesystem = &boolTrue

Comment on lines 1776 to 1777
AllowPrivilegeEscalation: &boolTrue,
ReadOnlyRootFilesystem: &boolFalse,
Copy link
Contributor

Choose a reason for hiding this comment

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

Use pointer.Bool here too.

Setting the filesystem to read only in the router container prevents it
from rendering the haproxy config, and causes haproxy to be unable to
start. Adding the security context constraint readOnlyRootFilesystem:
false makes sure the security profile it is assigned does not require a
read only filesystem.
@rfredette rfredette force-pushed the ocpbugs-20192-securityconstraints branch from 1a925fb to 9822f2a Compare October 13, 2023 15:01
@Miciah
Copy link
Contributor

Miciah commented Oct 13, 2023

/assign

@Miciah
Copy link
Contributor

Miciah commented Oct 13, 2023

/approve
/lgtm
/hold
for @frobware.

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Oct 13, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Miciah

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 Oct 13, 2023
@candita
Copy link
Contributor

candita commented Oct 13, 2023

/assign @frobware

@frobware
Copy link
Contributor

/hold cancel
/lgtm

@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 Oct 13, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD d8a3150 and 2 for PR HEAD 9822f2a in total

@rfredette
Copy link
Contributor Author

test failures look to be unrelated
/test e2e-azure-operator
/test e2e-gcp-operator

@rfredette
Copy link
Contributor Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 15, 2023

@rfredette: 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-ci openshift-ci bot merged commit e27d000 into openshift:master Oct 15, 2023
14 checks passed
@openshift-ci-robot
Copy link
Contributor

@rfredette: Jira Issue OCPBUGS-20192: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-20192 has been moved to the MODIFIED state.

In response to this:

Setting the filesystem to read only in the router container prevents it from rendering the haproxy config, and causes haproxy to be unable to start. Adding the security context constraint readOnlyRootFilesystem: false makes sure the security profile it is assigned does not require a read only filesystem.

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-merge-robot
Copy link
Contributor

Fix included in accepted release 4.15.0-0.nightly-2023-10-17-065657

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. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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

6 participants