Skip to content

MLE-20428: add labels and annotation in group level #82

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

Merged
merged 21 commits into from
Jun 24, 2025

Conversation

pengzhouml
Copy link
Collaborator

No description provided.

@pengzhouml pengzhouml force-pushed the feature/MLE-20428-group-label-annotation branch from b5b3cc0 to c9cf1d3 Compare June 18, 2025 06:09
Copilot

This comment was marked as outdated.

Copy link
Collaborator

@rwinieski rwinieski left a comment

Choose a reason for hiding this comment

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

Please review Copilot comments.

@pengzhouml pengzhouml requested a review from rwinieski June 23, 2025 17:12
@rwinieski rwinieski requested a review from Copilot June 24, 2025 08:05
Copy link

@Copilot Copilot AI left a 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 adds support for specifying labels and annotations at the group level across multiple resources and configuration files. Key changes include:

  • Incorporation of new label and annotation fields in statefulset, service, MarkLogic server definitions, CRDs, and sample configurations.
  • Updates to controller predicates to reconcile on label/annotation changes.
  • Minor adjustments such as timeout updates in tests and logging improvements.

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/e2e/2_marklogic_cluster_test.go Added label to the test feature and increased pod wait timeout.
pkg/k8sutil/statefulset.go Merged group-level labels/annotations into object meta used to reconcile statefulsets.
pkg/k8sutil/service.go Merged provided group labels into the common labels for Services.
pkg/k8sutil/networkPolicy.go Removed excessive patch diff logging.
pkg/k8sutil/marklogicServer.go Added label/annotation fields to MarkLogicGroup parameters and updated logging messages.
pkg/k8sutil/ingress.go Removed patch diff logging for Ingress updates.
pkg/k8sutil/haProxy.go Updated HAProxy resource creation/updating and enhanced logging with last applied annotations.
pkg/k8sutil/common.go Introduced helper functions for HAProxy label generation and cleaned common annotations.
internal/controller/marklogicgroup_controller.go Added an event filter predicate to trigger reconciliations for label/annotation changes.
internal/controller/marklogiccluster_controller.go Added similar predicate logic for MarkLogicCluster and fixed reconcile conditions.
config/, charts/, api/v1/* Updated CRD schemas, sample manifests, and deep copy functions to include labels and annotations.
Comments suppressed due to low confidence (2)

internal/controller/marklogicgroup_controller.go:116

  • [nitpick] The variable 'oldLables' appears to be misspelled. Consider renaming it to 'oldLabels' for consistency and clarity.
				oldLables := e.ObjectOld.GetLabels()

internal/controller/marklogiccluster_controller.go:104

  • [nitpick] The variable 'oldLables' is misspelled and should be renamed to 'oldLabels' to improve code clarity.
				oldLables := e.ObjectOld.GetLabels()

@pengzhouml pengzhouml merged commit b726317 into develop Jun 24, 2025
3 checks passed
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