Sync kubex charts from automation-controller main @ 60e9c5d#112
Sync kubex charts from automation-controller main @ 60e9c5d#112kubexautomation[bot] wants to merge 1 commit into
Conversation
| properties: | ||
| conditions: | ||
| description: |- | ||
| conditions represent the current state of the StaticPolicy resource. |
There was a problem hiding this comment.
CONTENT OF THIS REVIEW IS AI GENERATED
[Severity: Major] [Confidence: High]
Issue: Copy-paste error — conditions description says "StaticPolicy resource" instead of "PodAffinity resource".
Why it matters: This is the machine-readable description surfaced by kubectl describe and tooling dashboards. Pointing to the wrong resource type is confusing for operators debugging PodAffinity objects and indicates the file was templated from StaticPolicy without a full search-and-replace.
Suggested fix:
conditions represent the current state of the PodAffinity resource.
| spec: | ||
| group: rightsizing.kubex.ai | ||
| names: | ||
| kind: PodAffinity |
There was a problem hiding this comment.
CONTENT OF THIS REVIEW IS AI GENERATED
[Severity: Major] [Confidence: High]
Issue: The CRD kind: PodAffinity (in the rightsizing.kubex.ai group) shadows the well-known core Kubernetes type PodAffinity used inside pod.spec.affinity.
Why it matters: Many Kubernetes tools, admission webhooks, RBAC policy engines, and documentation generators match on Kind alone. This naming collision can cause confusion in audit logs, RBAC policies, and operator tooling. It also makes code and manifests harder to reason about since readers must always qualify the group to distinguish the two.
Suggested fix: Consider a disambiguating name such as NodeAffinityPolicy, WorkloadAffinityPolicy, or PodAffinityPolicy that clearly belongs to the rightsizing.kubex.ai domain and does not clash with the built-in type.
| type: string | ||
| type: array | ||
| required: | ||
| - namespaceSelector |
There was a problem hiding this comment.
CONTENT OF THIS REVIEW IS AI GENERATED
[Severity: Minor] [Confidence: High]
Issue: namespaceSelector is required inside spec.scope, but the CRD is scope: Cluster (line 15). A cluster-scoped resource has no owning namespace, so requiring a namespace filter on every instance may be surprising.
Why it matters: Users creating a truly cluster-wide PodAffinity policy must still supply a namespaceSelector, which is non-obvious. If the intent is to always restrict by namespace, a comment in the description would help; if the intent is optionality for cluster-wide coverage, namespaceSelector should be removed from required.
Suggested fix: Either add an explanatory description clarifying that namespaceSelector is mandatory even for the cluster-scoped resource, or remove it from required and handle the nil case in the controller.
| weight determines which policy wins when multiple PodAffinity policies match. | ||
| Higher weights take precedence. When weights are equal, older policies win. | ||
| format: int32 | ||
| minimum: 0 |
There was a problem hiding this comment.
CONTENT OF THIS REVIEW IS AI GENERATED
[Severity: Minor] [Confidence: Medium]
Issue: weight has minimum: 0 but no maximum constraint.
Why it matters: Without an upper bound, a user could set an arbitrarily large value (e.g. MaxInt32 = 2147483647). While the controller may handle this gracefully, documenting an expected ceiling (e.g. maximum: 1000) makes the tie-breaking semantics explicit and prevents accidental misuse of the priority scheme.
Suggested fix: Add a maximum that matches the controller's intended range, e.g.:
minimum: 0
maximum: 1000|
CONTENT OF THIS REVIEW IS AI GENERATED Overall AssessmentThis PR introduces a new Risk level: Low (the controller-generated scaffold is sound; issues are documentation quality and API ergonomics rather than functional breakage) Critical issuesNone Major issues
Minor issues
DRY / consistency observations
Suggested next steps
|
This PR was created automatically to sync managed Kubex chart content.
Source commit:
60e9c5dManaged chart scope:
charts/kubex-automation-enginecharts/kubex-crds