-
Notifications
You must be signed in to change notification settings - Fork 23
fix: SECURESIGN-3246: restrict SBJ to OpenShift environments #1439
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
Conversation
Reviewer's GuideThis PR restricts SBJ integration to OpenShift clusters by introducing runtime guards using the kubernetes.IsOpenShift() utility in both the reconciler's cleanup logic and the action handlers' CanHandle methods. Sequence diagram for SBJ resource cleanup with OpenShift guardsequenceDiagram
participant Reconciler
participant kubernetes
participant Role
participant RoleBinding
Reconciler->>kubernetes: IsOpenShift()
alt IsOpenShift == true
Reconciler->>Role: DeleteAllOf (in openshift-monitoring)
Reconciler->>RoleBinding: DeleteAllOf (in openshift-monitoring)
else IsOpenShift == false
Reconciler-->>Role: (no action)
Reconciler-->>RoleBinding: (no action)
end
Class diagram for updated SBJ action handlers with OpenShift guardclassDiagram
class segmentBackupCronJob {
+Name() string
+CanHandle(ctx, instance) bool
}
class segmentBackupJob {
+Name() string
+CanHandle(ctx, instance) bool
}
class rbacAction {
+Name() string
+CanHandle(ctx, instance) bool
}
class kubernetes {
+IsOpenShift() bool
}
segmentBackupCronJob ..> kubernetes : uses
segmentBackupJob ..> kubernetes : uses
rbacAction ..> kubernetes : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
|
Segment Backup Job has been removed from operator by #1457 |
This PR adds guards around the SBJ integration, since this requires resources within the
openshift-monitoringnamespaceSummary by Sourcery
Guard SBJ integration to only operate in OpenShift environments and disable related actions on non-OpenShift clusters
Enhancements: