Skip to content

Conversation

fdpeiter
Copy link
Contributor

📝 Pull Request

📖 Description

This PR implements object count quota enforcement for native and extended Kubernetes resources in the PAC Quota Controller.

What problem does this solve?

  • Enables quota enforcement for configmaps, secrets, replicationcontrollers, deployments, statefulsets, daemonsets, jobs, cronjobs, hpas, ingresses, and service subtypes.
  • Blocks over-quota resource creation via admission webhooks and updates CRQ status accordingly.

How did you solve it?

  • Added object count calculators and admission webhooks for all supported resources.
  • Updated controller logic to aggregate and enforce object count quotas.
  • Expanded CRQ spec, status, and CRD documentation to list all supported object count resources.
  • Updated Helm chart, RBAC, and webhook configuration for new resources.

Key changes:

  • New ObjectCountWebhook and ServiceWebhook for admission control.
  • Controller logic refactored for object count quota aggregation.
  • Helm chart (Chart.yaml, README.md, README.md.gotmpl, values.yaml, CRDs, RBAC, webhook config) updated.
  • Unit and e2e tests for object count quota enforcement.
  • Service resource calculator and mocks added.
  • Pod/storage helpers refactored for extended resource support.

📚 Documentation

  • Updated Helm chart documentation (README.md, README.md.gotmpl, values.yaml)

  • Expanded CRD documentation for object count quotas

  • Added API comments and examples for all supported resources

  • 📖 Updated documentation

  • 📄 Added examples

Testing & Validation

  • ✅ Added or updated tests for new/changed behavior
  • 📚 Updated documentation and Helm chart if APIs, CRDs, or configuration changed
  • 🔧 Ran pre-commit hooks to validate changes:
    • pre-commit run --all-files (runs formatting, linting, generation, and unit tests)
    • make test-e2e (ensure e2e tests pass - not included in pre-commit)

Versioning & Release

  • 📊 Bumped chart version in charts/pac-quota-controller/Chart.yaml if making a chart change
  • 🏷️ Bumped appVersion in charts/pac-quota-controller/Chart.yaml if releasing a new application version
  • 🔖 Tagged the release as vX.Y.Z for app releases or chart-vX.Y.Z for chart-only releases (if applicable)

📝 Note: Chart and app versioning are manual. See CONTRIBUTING.md for details on how to release.
🐙 Note: For Helm chart installation, use GHCR as an OCI registry. See README for instructions.

@fdpeiter fdpeiter marked this pull request as ready for review September 24, 2025 14:29
@fdpeiter fdpeiter requested a review from a team as a code owner September 24, 2025 14:29
Copy link
Contributor

@L30Bola L30Bola left a comment

Choose a reason for hiding this comment

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

LGTM!

@fdpeiter fdpeiter merged commit 78e12da into main Sep 26, 2025
6 checks passed
@fdpeiter fdpeiter deleted the feat/object-count branch September 26, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants