Skip to content

Conversation

kcarmichael08
Copy link
Contributor

@kcarmichael08 kcarmichael08 commented Oct 3, 2025

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

openshift-ci-robot commented Oct 3, 2025

@kcarmichael08: This pull request references ROX-30372 which is a valid jira issue.

In response to this:

Version(s): 4.9+

Issue

Link to docs preview:

QE review:

  • QE has approved this change.

Additional information:

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 3, 2025
@kcarmichael08 kcarmichael08 added rhacs-docs-4.9 RHACS Label for RHACS related PRs that go in the rhacs-docs branch and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 3, 2025
@kcarmichael08 kcarmichael08 force-pushed the ROX-30372-admission-controller-changes branch from 61c2867 to 660b10b Compare October 6, 2025 14:08
@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 6, 2025
@kcarmichael08 kcarmichael08 force-pushed the ROX-30372-admission-controller-changes branch from 660b10b to e225770 Compare October 6, 2025 19:21
@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 6, 2025
@kcarmichael08 kcarmichael08 force-pushed the ROX-30372-admission-controller-changes branch from e225770 to 459b305 Compare October 6, 2025 20:33
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 6, 2025

@kcarmichael08: This pull request references ROX-30372 which is a valid jira issue.

In response to this:

Version(s): 4.9+

Issue

Links to docs previews:

QE review:

  • QE has approved this change.

Additional information:

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 openshift-eng/jira-lifecycle-plugin repository.

@kcarmichael08 kcarmichael08 force-pushed the ROX-30372-admission-controller-changes branch from 459b305 to 6c3789a Compare October 6, 2025 21:22
Copy link

openshift-ci bot commented Oct 6, 2025

@kcarmichael08: 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-sigs/prow repository. I understand the commands that are listed here.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 6, 2025

@kcarmichael08: This pull request references ROX-30372 which is a valid jira issue.

In response to this:

Version(s): 4.9+

Issue

Links to docs previews:

QE review:

  • QE has approved this change.

Additional information:

Related PRs:

#100082 - Installation changes

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 openshift-eng/jira-lifecycle-plugin repository.

= Bypassing admission controller enforcement

[role="_abstract"]
To bypass the admission controller, add the `admission.stackrox.io/break-glass` annotation to your configuration YAML.
Copy link

Choose a reason for hiding this comment

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

This reads incorrectly to me. The annotation is used on the deployment that will then be excluded from admission controller based detection and enforcement. The configuration of whether the annotation will be honored or not by the admission controller is in the cluster configuration.

. In the {product-title-short} portal, select *Platform Configuration* -> *Clusters*.
. Select an existing cluster from the list.
. In the *Dynamic configuration* section, in the *Admission controller enforcement behavior* field, select one of the following options:
* Enforce policies: If enforcement is configured for a policy, the admission controller enforces the policy by rejecting the deployment or update attempt.
Copy link

Choose a reason for hiding this comment

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

enforces policies that are configured for enforcement

. Select an existing cluster from the list.
. In the *Dynamic configuration* section, in the *Admission controller enforcement behavior* field, select one of the following options:
* Enforce policies: If enforcement is configured for a policy, the admission controller enforces the policy by rejecting the deployment or update attempt.
* No enforcement: Even if enforcement is configured for a policy, if this option is selected, the admission controller does not enforce the policy and allows a deployment or update to the cluster that violates the policy conditions.
Copy link

Choose a reason for hiding this comment

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

allows workload admission attempts or updates that violate the policy

. Disable enforcement on the default policies that you do not want to enforce. For example:
** In the policies view, click the *Kubernetes Actions: Exec into Pod* policy. Selection *Actions* -> *Disable policy*.
. In the {product-title-short} portal, go to *Platform Configuration* -> *Policy Management*. Depending on the policy, do one of the following steps:
* For default policies, you cannot edit enforcement options. If you do not want the policy enforced, select *Actions* -> *Disable policy*.
Copy link

Choose a reason for hiding this comment

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

If you do not want the policy to be evaluated against workload operations, select ....

* For default policies, you cannot edit enforcement options. If you do not want the policy enforced, select *Actions* -> *Disable policy*.
* For custom policies, to disable enforcement, do these steps:
** Select *Actions* -> *Edit policy*.
** Go to *Policy behavior* -> *Actions* and in the *Enforcement* section, select *Inform*. If the policy is violated, a policy violation is included in the violations list, but the admission controller does not prevent deployment or updates that violate the policy.
Copy link

Choose a reason for hiding this comment

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

I would remove the "he admission controller does not prevent deployment or updates that violate the policy."

(given even sensor cannot enforce on such policies)

Copy link

Choose a reason for hiding this comment

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

Also recommend using: workload admission and updates (since we are consciously steering clear of "deployment" verbiage even in the UI)

* Enforce policies: If enforcement is configured for a policy, the admission controller enforces the policy by rejecting the deployment or update attempt.
* No enforcement: Even if enforcement is configured for a policy, if this option is selected, the admission controller does not enforce the policy and allows a deployment or update to the cluster that violates the policy conditions.
. Select *Next*.
. Select *Finish*. {product-title-short} automatically synchronizes the Sensor and applies the changes.
Copy link

Choose a reason for hiding this comment

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

Automatically synchronizes to admission controller, not sensor.

. Select *Next*.
. Select *Finish*. {product-title-short} automatically synchronizes the Sensor and applies the changes.

.Verification
Copy link

Choose a reason for hiding this comment

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

We can get enforcement configuration behavior from the ValidatingWebhookConfiguration k8s resource. The configuration settings are available in admission controller logs.

* You cannot use admission controller enforcement for the following items:
** Any runtime behavior, such as processes
** Any policies based on port exposure
* The admission controller might fail if there are connectivity issues between the Kubernetes or {ocp} API server and {product-title-short} Sensor.
Copy link

Choose a reason for hiding this comment

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

This needs looking into for correctness. I don't think admission controller fails if there are connectivity issues between api server and sensor

** Any runtime behavior, such as processes
** Any policies based on port exposure
* The admission controller might fail if there are connectivity issues between the Kubernetes or {ocp} API server and {product-title-short} Sensor.
To resolve this issue, delete the `ValidatingWebhookConfiguration` object as described in "Disabling admission controller enforcement".
Copy link

Choose a reason for hiding this comment

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

There are several things which are incorrect in this section, and I believe talking through them might be enable us to resolve this quicker


include::modules/disable-associated-policies.adoc[leveloffset=+2]

//this module should be removed since this option no longer exists, I think - isn't it replaced by Clusters -> Admission controller enforcement behavior -> Disabled ?
Copy link

Choose a reason for hiding this comment

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

It is not replaced. Enforcement is separate from webhook enabled or not. Enforcement requires the webhook enabled (which is now not configurable, and always enabled), but enforcement is optional

.Procedure
. In the {product-title-short} portal, select *Platform Configuration* -> *Clusters*.
. Select an existing cluster from the list.
. In the *Dynamic configuration* section, in the *Admission controller enforcement behavior* field, select one of the following options:

Choose a reason for hiding this comment

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

You can disable above
select one of the following options here

@clickboo is the existing wording correct that customers can change it here versus see the result of change via Helm or Operator?

Copy link

@clickboo clickboo Oct 8, 2025

Choose a reason for hiding this comment

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

If this is indeed meant for Helm or operator clusters the wording is incorrect.

//Also add something about how it needs to be configured when installing the Operator, if you have chosen an Operator install method
* For new clusters installed by using the Operator, Helm, or `roxctl` CLI methods, follow the instructions in "Installing {product-title-short} on Red Hat OpenShift" and "Installing {product-title-short} on other platforms".
* For new clusters created in the {product-title-short} portal, select *Secure a cluster* and use the legacy installation method.
* For existing clusters, unless the cluster was installed by using the Operator, you can edit the cluster in the *Clusters* view in the {product-title-short} portal. You cannot edit Operator-managed clusters by using the portal.

Choose a reason for hiding this comment

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

Is this technically true, if you download an updated Helm chart from portal, and then apply it?

What is pro and con to rewrite specifically for clusters originally created via portal?

Because if I understand correctly, for Helm (or roxctl to get Helm chart) customers can make changes independent of portal, and will prefer to for gitops.

@openshift openshift deleted a comment from clickboo Oct 8, 2025

[role="_abstract"]
To bypass the admission controller, add the `admission.stackrox.io/break-glass` annotation to your configuration YAML.
Bypassing the admission controller triggers a policy violation which includes deployment details.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Accidentally deleted your comment @clickboo but this is existing text - I don't understand what it means either. Should we remove?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. RHACS Label for RHACS related PRs that go in the rhacs-docs branch rhacs-docs-4.9 size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants