feat: add LabelMatchMode field to Workload struct#510
Merged
ispeakc0de merged 5 commits intolitmuschaos:masterfrom Nov 18, 2025
Merged
feat: add LabelMatchMode field to Workload struct#510ispeakc0de merged 5 commits intolitmuschaos:masterfrom
ispeakc0de merged 5 commits intolitmuschaos:masterfrom
Conversation
Signed-off-by: XploY04 <2004agarwalyash@gmail.com>
…tting Signed-off-by: XploY04 <2004agarwalyash@gmail.com>
…pport - Generated by controller-gen v0.16.5 - Includes CRDs with labelMatchMode field in OpenAPI schema - Follows Kubebuilder v3+ project layout Signed-off-by: XploY04 <2004agarwalyash@gmail.com>
Signed-off-by: XploY04 <2004agarwalyash@gmail.com>
9 tasks
ispeakc0de
previously approved these changes
Nov 18, 2025
Member
|
Hi @XploY04 , The changes look good to me. Could you also fix the pre-checks? The gofmt step is failing. |
Contributor
Author
|
I will do it right away. |
Signed-off-by: XploY04 <2004agarwalyash@gmail.com>
ispeakc0de
approved these changes
Nov 18, 2025
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.
What this PR does / why we need it:
This PR implements the prerequisite changes in chaos-operator to support label intersection mode for precise pod targeting in chaos experiments. This is required for the litmus-go PR #777 which adds the actual intersection logic for pod selection.
Changes Made:
LabelMatchModefield toApplicationParamsstruct (for appinfo-based targeting)LabelMatchModefield toWorkloadstruct (for workload-based targeting)getTargets()function to append the label match mode (union/intersection) as a 4th parameter to theTARGETSenvironment variablelabelMatchModefield in the OpenAPI schemaconfig/crd/bases/)TARGETS Environment Variable Format:
labelMatchModedefaults tounion(OR logic - matches ANY label)intersection(AND logic - matches ALL labels)Example:
Which issue this PR fixes: fixes litmuschaos/litmus-go#774
Special notes for your reviewer:
TARGETSenv variableconfig/crd/bases/(modern Kubebuilder structure) while keepingdeploy/crds/for backward compatibilityunionbehaviorChecklist:
documentationtagbreaking-changestag - Not applicable (backward compatible)requires-upgradetag - Not applicable (optional field with default)Related PRs: