-
Notifications
You must be signed in to change notification settings - Fork 23
feat: extend Fulcio by affinity, tolerations, resources and replicas #1153
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 enhances the Fulcio CRD (and the SecureSign wrapper) with routable Pod scheduling and resource customization by introducing affinity, tolerations, resources, and replicas fields, updating the API and controller to handle these PodRequirements, and adding corresponding OLM UI descriptors. ER diagram for FulcioSpec and PodRequirements fields in CRDerDiagram
FULCIOSPEC ||--o| PODREQUIREMENTS : inlines
PODREQUIREMENTS ||--o| AFFINITY : has
PODREQUIREMENTS ||--o{ TOLERATION : has
PODREQUIREMENTS ||--o| RESOURCEREQUIREMENTS : has
PODREQUIREMENTS {
int replicas
}
AFFINITY {
NodeAffinity nodeAffinity
PodAffinity podAffinity
PodAntiAffinity podAntiAffinity
}
TOLERATION {
string key
string operator
string value
string effect
int tolerationSeconds
}
RESOURCEREQUIREMENTS {
map limits
map requests
}
RESOURCEREQUIREMENTS ||--o{ RESOURCECLAIM : has
RESOURCECLAIM {
string name
string request
}
Class diagram for updated FulcioSpec and PodRequirementsclassDiagram
class FulcioSpec {
+PodRequirements (inlined)
+ExternalAccess externalAccess
+Ctlog ctlog
+Config config
...
}
class PodRequirements {
+Affinity affinity
+Toleration[] tolerations
+ResourceRequirements resources
+int replicas
}
class Affinity {
+NodeAffinity nodeAffinity
+PodAffinity podAffinity
+PodAntiAffinity podAntiAffinity
}
class Toleration {
+string key
+string operator
+string value
+string effect
+int tolerationSeconds
}
class ResourceRequirements {
+map limits
+map requests
+ResourceClaim[] claims
}
class ResourceClaim {
+string name
+string request
}
FulcioSpec --|> PodRequirements : inlined
PodRequirements o-- Affinity
PodRequirements o-- Toleration
PodRequirements o-- ResourceRequirements
ResourceRequirements o-- ResourceClaim
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
748e7ff to
cfab4e1
Compare
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.
Hey @osmman - I've reviewed your changes - here's some feedback:
- The OpenAPI schema for affinity, resources and tolerations is duplicated across both CRDs—consider extracting them into a shared component or referencing the upstream k8s definitions to avoid drift and reduce maintenance.
- Tests only cover the new PodRequirements fields on the Fulcio CRD—add equivalent validation tests for replicas, resources, tolerations and affinity in the Securesign CRD as well.
- The
fulcio_descriptors.yamlpatch uses hard-coded array indices for your CRD descriptors; this can break if you reorder or insert other CRDs—consider matching bynameor using a strategic merge to target the right entry more robustly.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The OpenAPI schema for affinity, resources and tolerations is duplicated across both CRDs—consider extracting them into a shared component or referencing the upstream k8s definitions to avoid drift and reduce maintenance.
- Tests only cover the new PodRequirements fields on the Fulcio CRD—add equivalent validation tests for replicas, resources, tolerations and affinity in the Securesign CRD as well.
- The `fulcio_descriptors.yaml` patch uses hard-coded array indices for your CRD descriptors; this can break if you reorder or insert other CRDs—consider matching by `name` or using a strategic merge to target the right entry more robustly.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Refs: SECURESIGN-2520 Signed-off-by: Tomas Turek <tturek@redhat.com>
cfab4e1 to
b62a13a
Compare
Refs: SECURESIGN-2520
Summary by Sourcery
Extend Fulcio custom resource to support PodRequirements—including replica count, resource requirements, affinity rules, and tolerations—by updating the CRDs, API types, controller deployment logic, tests, and OLM descriptors.
New Features:
Enhancements:
Documentation:
Tests: