-
Notifications
You must be signed in to change notification settings - Fork 0
Jrepp - K8s Prism Operator #199
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
Open
jrepp
wants to merge
16
commits into
main
Choose a base branch
from
jrepp/k8s-prism-operator
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
60a3244
Add MEMO-035 for Nomad local development setup with production-like o…
jrepp 041bc71
Remove build artifacts from git tracking and update .gitignore
jrepp 5e4f7af
Add MEMO-036 for Kubernetes operator development with PrismNamespace CRD
jrepp 08d66f2
Update MEMO-036 with naming conventions, proxy placement, and multi-a…
jrepp 04f5718
Simplify CRD naming and add comprehensive operator lifecycle guides
jrepp c1692fe
Add comprehensive auto-scaling architecture for proxies and pattern r…
jrepp 0a5a8b8
Implement Kubernetes operator with HPA and KEDA auto-scaling architec…
jrepp 3c0b714
Test and fix Kubernetes operator for local Docker Desktop deployment
jrepp b02f4cd
Add comprehensive test report for Kubernetes operator validation
jrepp bb1240d
Polish Kubernetes operator and add optional KEDA integration with ins…
jrepp 477eb9a
Update main documentation changelog for prism-operator improvements
jrepp 7eec0b0
Fix invalid UUID in MEMO-036 frontmatter
jrepp 954edb5
Fix all code fence validation errors in MEMO-036 with proper language…
jrepp 0941418
fix: Auto-fix Python linting errors in tooling/fix_all_code_fences.py
jrepp 4d9b538
chore: Trigger CI for Python lint fix verification
jrepp f9d036f
Merge origin/main into jrepp/k8s-prism-operator
jrepp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3,128 changes: 3,128 additions & 0 deletions
3,128
docs-cms/memos/MEMO-036-kubernetes-operator-development.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to the Prism Kubernetes Operator will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
| - **KEDA Integration**: Full support for KEDA (Kubernetes Event-Driven Autoscaling) | ||
| - Optional KEDA installer script (`scripts/install-keda.sh`) | ||
| - Automatic KEDA scheme registration in operator | ||
| - Support for 60+ KEDA scalers (Kafka, RabbitMQ, NATS, AWS SQS, etc.) | ||
| - Example patterns with KEDA configuration | ||
| - Makefile targets for KEDA management (`local-install-keda`, `local-uninstall-keda`, `local-keda-status`) | ||
|
|
||
| - **Enhanced Status Tracking**: Comprehensive PrismPattern status updates | ||
| - Three-phase lifecycle: `Pending` → `Progressing` → `Running` | ||
| - Replica count tracking (`replicas`, `availableReplicas`) | ||
| - Kubernetes Conditions with detailed messages | ||
| - ObservedGeneration tracking | ||
|
|
||
| - **Graceful Degradation**: Operator handles missing dependencies elegantly | ||
| - Informative logging when KEDA CRDs are not installed (INFO level, not ERROR) | ||
| - Patterns deploy successfully without autoscaling when KEDA is unavailable | ||
| - Comprehensive error detection using both type assertions and string matching | ||
|
|
||
| - **Installation Script**: Production-ready KEDA installer | ||
| - Multiple installation methods: Helm (default) or YAML manifests | ||
| - Version control and namespace customization | ||
| - Automatic verification of CRDs and deployments | ||
| - Graceful upgrade support | ||
| - Clean uninstall with CRD cleanup | ||
|
|
||
| - **Documentation**: | ||
| - `QUICK_START.md` - Get started in 5 minutes | ||
| - `KEDA_INSTALL_GUIDE.md` - Comprehensive KEDA installation and usage guide | ||
| - `TEST_REPORT.md` - Detailed test results and verification | ||
| - Example patterns for HPA and KEDA autoscaling | ||
|
|
||
| - **Makefile Improvements**: | ||
| - Split metrics-server and KEDA installation into separate targets | ||
| - Added Docker Desktop TLS patch for metrics-server | ||
| - Added KEDA management targets | ||
| - Improved target organization and documentation | ||
|
|
||
| ### Fixed | ||
| - **KEDA Error Handling**: Fixed errors when KEDA CRDs are not installed | ||
| - Added `isKEDANotInstalledError()` helper function to detect missing KEDA CRDs | ||
| - Applied graceful handling to all KEDA reconciliation paths (Get, Create, Delete) | ||
| - Changed log level from ERROR to INFO for missing KEDA CRDs | ||
| - Prevents reconciliation failures when KEDA is not needed | ||
|
|
||
| - **Status Update Robustness**: Improved error handling in status updates | ||
| - Handle deployment not found gracefully (early in reconciliation) | ||
| - Better phase detection logic | ||
| - Improved condition messages with replica counts | ||
| - Added verbose logging for troubleshooting | ||
|
|
||
| ### Changed | ||
| - **Operator Startup**: Added KEDA scheme registration to manager initialization | ||
| - Imports `kedav1alpha1` package | ||
| - Registers KEDA scheme in init function | ||
| - Enables KEDA CRD operations when KEDA is installed | ||
|
|
||
| - **Controller Logging**: Enhanced logging throughout reconciliation loop | ||
| - All major reconciliation steps now logged at INFO level | ||
| - Status updates logged at DEBUG/INFO with details | ||
| - Better error context in log messages | ||
|
|
||
| - **Autoscaling Architecture**: Improved separation of concerns | ||
| - HPA and KEDA reconcilers cleanly separated | ||
| - Automatic cleanup when switching scaler types | ||
| - Independent installation of autoscaling dependencies | ||
|
|
||
| ## [0.1.0] - 2025-10-17 | ||
|
|
||
| ### Added | ||
| - Initial release of Prism Kubernetes Operator | ||
| - PrismPattern CRD for managing pattern deployments | ||
| - HPA (Horizontal Pod Autoscaler) support for CPU/memory-based scaling | ||
| - Automatic Deployment and Service creation from PrismPattern | ||
| - Owner references for cascade deletion | ||
| - Docker Desktop Kubernetes compatibility | ||
| - Comprehensive test coverage on local Docker Desktop cluster | ||
| - Basic Makefile with development targets | ||
| - go.mod with controller-runtime v0.16.3 | ||
|
|
||
| ### Known Limitations | ||
| - PrismStack CRD not yet implemented (DeepCopy methods incomplete) | ||
| - KEDA AuthenticationRef support incomplete (type mismatch with v2.12 API) | ||
| - No container image published yet (run from source only) | ||
| - No Helm chart yet (manual kubectl apply required) | ||
|
|
||
| ## Release Notes | ||
|
|
||
| ### Breaking Changes | ||
| None - this is the initial release. | ||
|
|
||
| ### Migration Guide | ||
| N/A - initial release. | ||
|
|
||
| ### Deprecations | ||
| None. | ||
|
|
||
| ### Security | ||
| - All resources created with proper owner references | ||
| - RBAC manifests included in CRD definitions | ||
| - No secrets or credentials stored in operator | ||
|
|
||
| ## Links | ||
| - [Quick Start Guide](QUICK_START.md) | ||
| - [KEDA Installation Guide](KEDA_INSTALL_GUIDE.md) | ||
| - [Test Report](TEST_REPORT.md) | ||
| - [Examples](config/samples/) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The changelog date '2025-10-17' is in the future (October 2025). This should likely be '2024-10-17' or the current date.