-
Notifications
You must be signed in to change notification settings - Fork 4
MLE-22946: Fix the bug of cluster level labels propagate #94
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
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
This PR refactors the label and annotation handling system to properly propagate cluster-level labels throughout the codebase. The main change replaces global variables for labels/annotations with context-based storage and methods, ensuring proper scoping and propagation.
Key changes:
- Replaces global label/annotation variables with context-scoped storage
- Adds new methods to ClusterContext and OperatorContext for label/annotation management
- Updates all resource generation functions to use context-based label retrieval
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
pkg/k8sutil/context.go | Adds label/annotation fields to contexts and implements getter/setter methods |
pkg/k8sutil/common.go | Removes global variables and deprecated label/annotation functions |
pkg/k8sutil/handler.go | Removes global label/annotation setup calls |
pkg/k8sutil/service.go | Updates service generation to use context-based label retrieval |
pkg/k8sutil/secret.go | Updates secret generation to use context-based label retrieval |
pkg/k8sutil/networkPolicy.go | Updates network policy generation to use context-based label retrieval |
pkg/k8sutil/marklogicServer.go | Updates MarkLogic group generation to use context-based label retrieval |
pkg/k8sutil/ingress.go | Updates ingress generation to use context-based label retrieval |
pkg/k8sutil/haProxy.go | Updates HAProxy configuration to use context-based label retrieval |
pkg/k8sutil/configmap.go | Updates config map generation to use context-based label retrieval |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
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.
LGTM
No description provided.