Comprehensive Bug Fixes, Feature Enhancements, and Documentation Improvements#244
Open
ephico2real2 wants to merge 73 commits into
Open
Conversation
Issue 3: Controller reconciliation not triggering for resources stuck in deletion - Add ResourceGenerationOrFinalizerOrDeletionTimestampChangedPredicate in controllers/common/common.go - Extends standard predicate to also trigger on deletion timestamp changes - Update all three controllers (NamespaceConfig, GroupConfig, UserConfig) to use new predicate - Ensures resources marked for deletion are properly reconciled for finalizer cleanup - Prevents resources from getting stuck in 'Terminating' state Fixes: Resources stuck in deletion due to restrictive predicate filtering
Issue 4: Display version, commit hash, and build date at operator startup - Create internal/version package with version management functions - Implement PrintStartupBanner() with prominent ASCII art display - Add automatic version detection with fallback chain: 1. ldflags (from Makefile) 2. Go 1.18+ debug.ReadBuildInfo() VCS info 3. Default values - Call banner at startup in main.go - Banner printed to stderr for visibility Provides clear visibility of which version/commit is running in production
- Update Makefile build target to auto-detect version from git tags - Update PodmanMakefile build target with same version detection - Add -buildvcs flag to Makefile for consistency with PodmanMakefile - Update Dockerfile to accept VERSION, COMMIT, BUILD_DATE as build args - Inject version info via ldflags for local builds and --build-arg for container builds - Version detection uses: git describe --tags --always --dirty - Commit detection uses: git rev-parse --short HEAD - Build date uses: date -u +%Y-%m-%dT%H:%M:%SZ Enables automatic version embedding without manual specification
- Update issues-and-resolution.md with Issue 3 and Issue 4 details - Add Issue 4 section documenting startup banner and versioning implementation - Create REVIEW-REDUNDANCY.md with complete code review analysis - Document version detection priority and fallback mechanisms - Include manual build instructions for Podman/Docker and direct Go builds Provides complete documentation of all changes and fixes
- Remove REVIEW-REDUNDANCY.md (temporary review document) - Add REVIEW-REDUNDANCY.md, issues-193.md, WARP.md to .gitignore - These are temporary/local documentation files not needed in repo
- Add build.sh: Wrapper script that automatically sets VERSION, COMMIT, and BUILD_DATE via ldflags, eliminating need to manually specify build parameters - Add run-go.sh: Script to build and run operator locally with log configuration - Supports --log-level, --dev, --skip-build, --stop options - Automatically stops existing operator before starting - Auto-builds if binary missing even with --skip-build - Add BUILD-RUN.md: Comprehensive documentation for both scripts with examples and test cases
- Add internal/version package for version management - GetVersion(): Detects version from git describe or ldflags - GetCommitHash(): Gets commit hash from git or ldflags - GetBuildDate(): Gets build date from ldflags or current time - PrintStartupBanner(): Displays formatted startup banner - Update main.go to display startup banner on operator start - Banner shows VERSION, COMMIT, and BUILD_DATE for easy identification
- Add ResourceGenerationOrFinalizerOrDeletionTimestampChangedPredicate in controllers/common/common.go to handle deletion timestamp changes - Update all controllers to use new predicate instead of standard one - Fixes Issue 3: Resources stuck in deletion now trigger reconciliation - Ensures proper cleanup of finalizers when resources are marked for deletion
- Add ZAP_LOG_LEVEL and ZAP_DEVEL environment variable support in main.go - Update config/manager/manager.yaml with default log level settings - Add docs/LOG_LEVEL_CONFIGURATION.md with OLM-compatible configuration methods - Support for Subscription config and Kyverno policy mutation - Default: info level, JSON format (production-ready)
Kyverno Policies: - Add image replacement policies (Docker Hub, internal registry) - Add operator log level configuration policy - Add template files (env-*.yaml.tpl) for environment variable substitution - Add generate-policies.sh utility for policy generation - Update README with customization guide Local Utilities: - Add create-dockerhub-secret.sh: Simple utility to create Docker Hub secrets - Add generate-policies.sh: Generate Kyverno policies from templates - Add monitor-operator-logs.sh: Monitor operator logs with filtering - Add comprehensive README documentation
Dockerfile: - Add ARG VERSION, COMMIT, BUILD_DATE with defaults - Update go build to use ldflags for version injection - Add default ZAP_LOG_LEVEL and ZAP_DEVEL environment variables PodmanMakefile: - Update container_build to automatically detect and pass version info - Add echo statement to show version info during build - Fix EXTERNAL_USER variable expansion using strip - Replace hardcoded credentials with placeholders - Make test dependency optional via SKIP_TESTS variable - Update CONTROLLER_TOOLS_VERSION to v0.19.0 Makefile: - Update build target to automatically set version info via ldflags - Add -buildvcs flag for consistency
- Restore blanket charts/ pattern to ignore all generated files - Prevents accidental commits of generated Helm chart artifacts
- Add docs/LOG_LEVEL_CONFIGURATION.md with OLM-compatible configuration methods - Update config/manager/manager.yaml with default log level settings - Document support for Subscription config and Kyverno policy mutation - Note: Log level environment variable parsing code is in main.go (committed in version banner commit) - Default: info level, JSON format (production-ready)
- Add detection of '{{- if and' or '{{ if and' in templates
- Require ALL patterns to match when AND logic is detected
- Fall back to OR logic (any match) when no 'and' keyword found
- Add debug logging at V(2) level for template filtering decisions
- Fixes Bug 3: Templates with AND conditions now work correctly
The implementation:
- Detects AND logic by checking for 'and' keyword in conditional statements
- When AND logic detected, requires all hasSuffix and contains patterns to match
- When OR logic (no 'and' keyword), uses original behavior (any pattern match)
- Maintains backward compatibility with existing OR logic templates
- Add test cases for AND logic requiring all patterns to match - Add test cases for OR logic with multiple patterns - Add test cases demonstrating 'first match wins' behavior - Verify pattern extraction and matching logic - All tests passing (9 test cases total) Test coverage: - AND logic: group matches all patterns, matches only one (should fail), matches none (should fail) - OR logic: multiple patterns, any condition matches - Pattern extraction: hasSuffix and contains patterns
Add complete test suite demonstrating template filtering logic: Test YAML files: - test-and-logic-groupconfig.yaml: AND logic + simple OR logic test - test-or-logic-groupconfig.yaml: Comprehensive OR logic with 3 test cases Documentation: - test-and-logic-groupconfig-explanation.md: Detailed stanza-by-stanza explanation - test-or-logic-groupconfig-explanation.md: Detailed stanza-by-stanza explanation - test-and-logic-results.md: Test results from production cluster - test-or-logic-results.md: Test results from production cluster - README.md: Overview and usage instructions All examples tested and verified in production OpenShift cluster: - AND logic: 6 ClusterRoleBindings created (all groups matched both conditions) - OR logic: 25 ClusterRoleBindings created across 3 test cases - All test cases passing with documented results
…operator-utils fix - Add three consolidated docs: ROOT-CAUSE-SUMMARY, FIX-IMPLEMENTATION, VERIFICATION-GUIDE\n- Include server-side apply timestamps, before/after oc get -o yaml, and explicit commands used to identify the right module (grep/go doc/go list)\n- Update go.mod/go.sum to use forked operator-utils fix (pseudo-version v0.0.0-20251208075852-9569465257c1)
…0.0.0-20251208075852-9569465257c1)
… markdown files (no YAML changes)
- Create resolved-issues-tracker/ directory for better organization - Move and rename work-in-progress.md to resolved-issues-tracker/resolved-issues-tracker.md - Add README.md explaining the purpose of the tracker - Update title from 'Work in Progress' to 'Resolved Issues Tracker' - Fix broken link in examples/test-and-logic/README.md
…pretty JSON conversion feature - Add prominent banner highlighting automatic compact-to-pretty JSON conversion - Document that operator outputs compact JSON but script converts to readable format - Update examples with comments explaining the conversion feature - Expand JSON Pretty-Printing Enhancement section with before/after example - Clarify that conversion happens in real-time as logs are streamed
…e before status update - Re-fetch instance before calling ManageSuccess to get latest resourceVersion - Prevents optimistic concurrency conflicts when updating status - Applied to all three controllers: GroupConfig, NamespaceConfig, UserConfig - Fixes issue where status updates failed with 'object has been modified' error - Tested locally: zero errors after 60+ seconds of operation
…dle optimistic concurrency conflicts - Implement manageSuccessWithRetry() helper function in all three controllers - Retry up to 5 times with exponential backoff (50ms, 100ms, 200ms, 400ms, 800ms) - Re-fetch instance before each retry to ensure latest resourceVersion - Only retry on conflict errors, return immediately for other errors - Reduces 'object has been modified' errors during concurrent reconciliations
…lready deleted - Add NotFound error check when removing finalizers during deletion - If resource is already deleted, return success instead of erroring - Prevents StorageError/UID mismatch errors when resources are deleted while operator is processing them - Applied to all three controllers (GroupConfig, NamespaceConfig, UserConfig)
- Add retry success log when ManageSuccess succeeds after retries - Add deletion detection logs when resource not found - Add deletion processing logs when IsBeingDeleted is true - Add deletion completion logs when deletion finishes successfully - Update 'already deleted' log to info level for better visibility - Applied to all three controllers: GroupConfig, NamespaceConfig, UserConfig
- Move deletion tracking test files to examples/test-and-logic/ - Add comprehensive documentation for deletion tracking tests - Document expected log messages for deletion detection, processing, and completion - Add cleanup instructions for deletion tracking test resources - Update related documentation section
…_ENHANCEMENTS.md - Updated manual build examples to clarify they are for local builds only - Added note that production builds should use Makefile targets in CI/CD - Consistent with MAKEFILE_VERSION_INJECTION.md documentation
…sion injection - Updated Makefile docker-build to inject VERSION, COMMIT, BUILD_DATE - Matches PodmanMakefile behavior for consistency - Created CI_CD_VERSION_INJECTION.md documenting: - How version injection works in CI/CD (GitHub Actions) - Difference between Dockerfile and ci.Dockerfile - How shared workflows handle version injection - Tiltfile version injection considerations - CI/CD best practices and troubleshooting
- Documented that root Dockerfile is used (not ci.Dockerfile) - Explained why Dockerfile is used vs ci.Dockerfile - Updated version injection flow to reflect Dockerfile usage - ci.Dockerfile is only for Tiltfile/local development
…S_AND_ISSUES_RESOLUTION.md - Renamed file to better reflect its purpose (features and issues) - Added all recent work including: - Issue redhat-cop#134: Log level configuration (resolved) - Issue redhat-cop#194: Field removal with value 0 (root cause identified) - Enhanced template filtering with AND/OR logic - Deletion tracking and logging - Retry success logging - Skipping resource logging - Version information injection - Build system improvements - Comprehensive documentation - Organized into clear sections with table of contents - Added references to detailed documentation - Maintains all original issue documentation - Better structure for finding information
- Removed old issues-and-resolution.md file - Updated reference in examples/test-and-logic/README.md - FEATURES_AND_ISSUES_RESOLUTION.md is now the comprehensive document
…SSUES_RESOLUTION.md - Updated reference in resolved-issues-tracker/README.md - Removed old issues-and-resolution.md file - All references now point to the new comprehensive document
- Moved file from root to docs/ for better organization - Updated all references to point to new location - All documentation now centralized in docs/ folder
…cs/ location - Updated all relative paths to reflect file is now in docs/ folder - Changed docs/ references to ./ for same-directory files - Changed examples/ references to ../examples/ for parent directory - Changed BUILD-RUN.md to ../BUILD-RUN.md - All paths now correctly reference from docs/ location
- Updated examples/test-and-logic/ reference to ../examples/test-and-logic/ - All paths now correctly reference from docs/ location
- Fix broken file references in examples/test-and-logic/README.md - Remove references to non-existent files (test-issue-194-field-removal-explanation.md, test-issue-194-field-removal-results.md, test-issue-194-field-removal-fix-options.md) - Update references to point to existing ISSUE-194 documentation files - Fix incorrect filename: ISSUE-194-ROOT-CAUSE-ANALYSIS.md → ISSUE-194-ROOT-CAUSE-SUMMARY.md - Fix typos: - controllers/common/common.go: 'exlcuded' → 'excluded' (lines 11, 14) - README.md: 'multitentant' → 'multitenant' (line 19) - config/manifests CSV: 'multitentant' → 'multitenant' (line 58) - Add comment to go.mod explaining temporary replace directive for operator-utils PR redhat-cop#103 - Documents the fork usage and PR link - Notes that replace will be removed once PR is merged
- Added production cluster example showing deletion tracking logs - Demonstrates complete deletion lifecycle with actual log output - Shows deletion processing, completion, and detection logs - Includes benefits and use cases for deletion tracking feature
- Add 'reconciling started' log to GroupConfig and UserConfig controllers - Add 'resources processed successfully' log to all three controllers after UpdateLockedResources - Provides clear visibility into reconciliation lifecycle for creation/recreation events - Includes counts of groups/users/namespaces and resources processed
…ocumentation - Extract manageSuccessWithRetry logic into controllers/common/reconciler_helpers.go - Refactor groupconfig, namespaceconfig, and userconfig controllers to use common helpers - Remove duplicate retry logic from individual controllers - Add centralized logging helpers (LogReconcilingStarted, LogResourcesProcessedSuccessfully) - Add groups-and-bindings-examples.md documentation with practical examples and commands
…esults - Add Issue redhat-cop#50 section to FEATURES_AND_ISSUES_RESOLUTION.md with: - Problem statement and solution - Complete test results (metadata verification, cleanup, recreation) - NetworkPolicy example test demonstrating resource identification issue - Full YAML template example showing proper metadata specification - All commands and outputs from verification tests - Update resolved-issues-tracker.md with Issue redhat-cop#50 resolution - Fix multitenant-networkpolicy.yaml: Add required podSelector: {} field - Add cross-references to Issue redhat-cop#50 in other issue sections - Update table of contents to include Issue redhat-cop#50 This documents that resources can be identified via manual labels/annotations in templates, and proves automatic cleanup/recreation works correctly.
- Change status from RESOLVED to FIXED in FEATURES_AND_ISSUES_RESOLUTION.md - Update resolved-issues-tracker.md to mark Issue redhat-cop#50 as FIXED - Add explicit status note that the issue has been fixed
- Add resource identification examples and commands - Include log level configuration guidance - Add troubleshooting commands and examples
- Add full YAML output demonstrating NetworkPolicies have no labels/annotations - Explain that operator can manage resources without metadata (internal tracking) - Clarify that users must manually add metadata to templates for identification - Contrast with RBAC example showing manual metadata addition
…e repetition - Remove redundant Step 6 label/annotation checks (Step 6a full YAML already shows this) - Remove duplicate 'Key Finding' section (keep 'Important Observation' which is more detailed) - Remove redundant 'Alternative verification command' in Test 2 - Remove unnecessary echo command outputs - Standardize empty output formatting - Remove 39 lines of redundant content while preserving all important information
Author
|
@raffaelespazzoli - Please see ==> #244 |
- Add CEL-based MutatingPolicy versions for future Kyverno 1.17+ migration: - mutating-inject-dockerhub-secret.yaml (JSONPatch-based) - mutating-operator-log-level-config.yaml - mutating-replace-operator-image-to-dockerhub.yaml - Add sample-cel-mutating-pullsecret.yaml as reference - Add kyverno-install-guide.md with OpenShift-specific instructions - Add subscription-with-config.yaml for OLM log level/resource configuration - Document version strategy: staying on 3.6.1 (v1.16.1) for ClusterPolicy stability - Prepare migration path to CEL-based policies for future upgrade
- Add Method 2: Git Repository Installation section - Document how to clone Kyverno repo and access v1.16.3 - Include both Helm and Kustomize installation options from git - Explain when to use git installation vs Helm charts - Note that v1.16.2 and v1.16.3 exist in git but not yet in Helm - Clarify v1.16.1 (Helm 3.6.1) is sufficient for most use cases
- Add kyverno-3.6.1.tgz (504KB) for air-gapped/proxy-restricted environments - Add helm-charts/README.md with offline installation guide - Include helm repo add/update/pull procedures for maintainers - Add docs/OLM-IMAGE-OVERRIDE-GUIDE.md for OLM catalog image overrides - Add config/overlays/image-override/ Kustomize overlay - Simplify kyverno-install-guide.md by removing git clone method - Remove complex OLM tricks, focus on Helm installation - Add reference to offline chart for proxy-restricted environments - Document image mirroring strategies for air-gapped clusters
- Removed docs/OLM-IMAGE-OVERRIDE-GUIDE.md (not needed) - Using Kyverno policies for image overrides instead - Keeps implementation simpler and focused
- Add kyverno-values-tls-fix.yaml to enable self-signed cert generation - Update helm-charts/README.md with TLS troubleshooting - Document createSelfSignedCert: true fix for certificate errors - Include verification steps for TLS secrets - Fixes: secret 'kyverno-tls-pair' not found errors
… kyverno dir - Add kyverno-values.yaml combining TLS fix, replicas, resources, and image override options - Update README.md to document kyverno-values-tls-fix.yaml contents - Remove helm-charts/kyverno/ extracted directory (chart available as kyverno-3.6.1.tgz)
Co-Authored-By: Oz <oz-agent@warp.dev>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request Summary
PR Title
Comprehensive Bug Fixes, Feature Enhancements, and Documentation Improvements
Overview
This PR includes significant improvements to the namespace-configuration-operator, resolving multiple critical issues, adding comprehensive features, and improving maintainability through code refactoring and extensive documentation.
Key Statistics
🐛 GitHub Issues Resolved
Issue #132: Status Update Conflict Blocking Subsequent Reconciles
Status: ✅ RESOLVED
Problem: Optimistic concurrency conflicts during status updates were blocking the reconciliation queue, preventing processing of subsequent namespaceconfigs.
Solution: Implemented
ManageSuccessWithRetryfunction with automatic conflict detection, exponential backoff retry (up to 5 attempts), and re-fetch logic to ensure latest resourceVersion is used.Impact: Prevents queue blocking, enables automatic recovery from transient conflicts, and improves observability with retry logging.
Files Modified:
controllers/common/reconciler_helpers.go(NEW)controllers/groupconfig_controller.gocontrollers/namespaceconfig_controller.gocontrollers/userconfig_controller.goIssue #134: Log Level Configuration
Status: ✅ RESOLVED
Problem: Operator creating excessive Info-level logs sent to ELK via OpenShift LogForwarder. Users needed a way to reduce log volume.
Solution:
ZAP_LOG_LEVELandZAP_DEVELenvironment variable supportSubscription.spec.config.envImpact: Allows operators to control log verbosity in production environments, reducing log volume and associated costs.
Files Modified:
main.gokyverno-policies/operator-log-level-config.yaml(NEW)Issue #194: Field Removal with Value 0
Status: ✅ ROOT CAUSE IDENTIFIED
Problem: Fields with value "0" not being removed when template conditionals change from true to false.
Root Cause: Bug identified in
operator-utilsdependency (not in this operator).Workaround: Using forked operator-utils with fix:
github.com/ephico2real2/operator-utils@fix-issue-194-field-removal-zero-valueNote: This requires upstream fix in operator-utils repository.
Issue #50: Provide a way to identify operator generated resources
Status: ✅ FIXED
Problem: No easy way to identify resources created by the controller, causing confusion when teams create their own resources.
Solution: Operator supports identifying operator-generated resources through manual specification of labels and annotations in templates. Resources are automatically cleaned up when namespace labels are removed.
Benefits:
Documentation: Comprehensive examples and test results provided in documentation.
🔧 Core Issues Resolved
Issue 1: GroupConfig "Object is Null" Template Rendering Fix
Status: ✅ COMPLETED
Problem: GroupConfigReconciler was attempting to process templates for groups that don't match the template's conditional logic, resulting in "object is null" errors.
Solution: Implemented dynamic pattern extraction and template filtering with four new methods:
filterApplicableTemplates- Pre-filters templates for each groupisTemplateApplicableToGroup- Determines if template conditions match groupextractHasSuffixPatterns- ExtractshasSuffixpatterns from templatesextractContainsPatterns- Extractscontainspatterns from templatesFiles Modified:
controllers/groupconfig_controller.gocontrollers/groupconfig_controller_test.go(comprehensive test coverage)Issue 2: Fix Finalizer Domain Qualification
Status: ✅ COMPLETED
Problem: Non-domain-qualified finalizer names causing Kubernetes API warnings.
Solution: Updated all three controllers to use canonical domain-qualified finalizers:
redhatcop.redhat.io/namespaceconfig-controllerredhatcop.redhat.io/groupconfig-controllerredhatcop.redhat.io/userconfig-controllerFiles Modified:
controllers/namespaceconfig_controller.gocontrollers/groupconfig_controller.gocontrollers/userconfig_controller.goIssue 3: Controller Reconciliation Triggering (Predicates)
Status: ✅ COMPLETED
Problem: Resources stuck in deletion were not being reconciled because deletion timestamp changes weren't triggering reconciliation.
Solution: Implemented custom predicate
ResourceGenerationOrFinalizerOrDeletionTimestampChangedPredicatethat handles:Files Modified:
controllers/common/common.go(NEW - Custom predicate implementation)Issue 4: Startup Banner and Version Information Display
Status: ✅ COMPLETED
Problem: No visible indication of which version or commit was running.
Solution: Implemented startup banner with version, commit, and build date information:
internal/version/version.go)Files Modified:
internal/version/version.go(NEW)main.goMakefilePodmanMakefileDockerfile✨ Feature Enhancements
Code Refactoring: Common Reconciler Helpers
Status: ✅ COMPLETED
Description: Extracted duplicate retry logic and logging helpers from individual controllers into a centralized common package.
Features:
ManageSuccessWithRetryfunctionLogReconcilingStartedandLogResourcesProcessedSuccessfullyFiles Modified:
controllers/common/reconciler_helpers.go(NEW)Enhanced Template Filtering with AND/OR Logic
Status: ✅ COMPLETED
Description: Extended template filtering to all controllers (GroupConfig, NamespaceConfig, UserConfig) with comprehensive AND/OR logic support.
Features:
{{- if and, ALL patterns must match{{- ifor{{- else if, ANY pattern match is sufficientexamples/test-and-logic/Files Modified:
controllers/unrecognized_conditionals_test.go(NEW)controllers/groupconfig_controller_test.go(extended)controllers/namespaceconfig_controller_test.go(NEW)controllers/userconfig_controller_test.go(NEW)Unrecognized Conditional Logic Detection
Status: ✅ COMPLETED
Description: Enhanced detection of unrecognized template conditionals (eq, hasPrefix, ne, etc.) with fallback behavior.
Features:
Deletion Tracking and Logging
Status: ✅ COMPLETED
Description: Added comprehensive deletion tracking logs to prevent continuous lookups for deleted objects and avoid false positives.
Features:
Files Modified:
Retry Success Logging
Status: ✅ COMPLETED
Description: Added V(1) level logging when operations succeed after retries to distinguish retries from actual errors.
Features:
Skipping Resource Logging
Status: ✅ COMPLETED
Description: Added V(1) level logging when resources are skipped because no templates match their pattern.
Features:
ZAP_LOG_LEVEL=1or higher🔨 Build System Improvements
Version Information Injection
Status: ✅ COMPLETED
Description: Automatic version information injection in both Makefile and PodmanMakefile for consistent version tracking.
Features:
Files Modified:
MakefilePodmanMakefileDockerfileDocumentation:
docs/MAKEFILE_VERSION_INJECTION.mddocs/DOCKERFILE_ENHANCEMENTS.mddocs/CI_CD_VERSION_INJECTION.mdBuild and Run Scripts
Status: ✅ COMPLETED
Description: Simplified build and run scripts for local development.
Features:
build.sh- Wrapper script with automatic version detectionrun-go.sh- Script to build and run operator locally with log configuration--log-level,--dev,--skip-build,--stopoptionsFiles Created:
build.sh(NEW)run-go.sh(NEW)BUILD-RUN.md(NEW)📝 Logging Enhancements
Template Filtering Debug Logs
Status: ✅ COMPLETED
Description: V(2) level debug logs for template filtering to help troubleshoot template matching issues.
Features:
ZAP_LOG_LEVEL=2or higherStructured JSON Logging
Status: ✅ COMPLETED
Description: All logs use structured JSON format for easy parsing and filtering in ELK and other log aggregation systems.
Configuration:
ZAP_DEVEL=false- JSON format (production)ZAP_DEVEL=true- Console format (development)Important Note: For OLM-managed deployments, configure
ZAP_LOG_LEVELandZAP_DEVELviaSubscription.spec.config.env, NOT directly on the Deployment.📚 Documentation
Comprehensive Documentation Created
New Documentation Files (20+ files):
Issue Documentation:
docs/FEATURES_AND_ISSUES_RESOLUTION.md- Comprehensive tracking of all resolved issuesexamples/test-and-logic/ISSUE-134-ROOT-CAUSE-SUMMARY.mdexamples/test-and-logic/ISSUE-134-VERIFICATION-GUIDE.mdexamples/test-and-logic/ISSUE-134-FIX-IMPLEMENTATION.mdexamples/test-and-logic/ISSUE-194-ROOT-CAUSE-SUMMARY.mdexamples/test-and-logic/ISSUE-194-VERIFICATION-GUIDE.mdexamples/test-and-logic/ISSUE-194-FIX-IMPLEMENTATION.mdTechnical Documentation:
docs/groups-and-bindings-examples.md- Groups and bindings examples with resource identification guidancedocs/LOG_LEVEL_CONFIGURATION.md- Log level configuration guidedocs/DOCKERFILE_ENHANCEMENTS.md- Dockerfile enhancementsdocs/MAKEFILE_VERSION_INJECTION.md- Makefile version injectiondocs/CI_CD_VERSION_INJECTION.md- CI/CD version injectiondocs/TEMPLATE_FILTERING_LOGS_EXPLANATION.md- Template filtering logsBuild and Run:
BUILD-RUN.md- Build and run instructionsResolved Issues Tracker:
resolved-issues-tracker/resolved-issues-tracker.md- Comprehensive trackerTest Examples:
examples/test-and-logic/with comprehensive documentation🧪 Testing
Unit Tests Added
Integration Testing
examples/test-and-logic/📊 Summary of Changes
Code Changes
Key Improvements
Dependencies
operator-utilsdependency:github.com/ephico2real2/operator-utils@fix-issue-194-field-removal-zero-valueBreaking Changes
Migration Notes
ZAP_LOG_LEVELvia Subscription (see Issue How to set Log level to Error for this operator #134 documentation)🔍 Testing Recommendations
📝 Next Steps
🔗 Related Links
docs/FEATURES_AND_ISSUES_RESOLUTION.mdresolved-issues-tracker/resolved-issues-tracker.mdBUILD-RUN.mdexamples/test-and-logic/🙏 Acknowledgments
This PR includes extensive improvements based on real-world production usage and addresses multiple GitHub issues raised by the community. Special attention was paid to: