ILS-2361 Namespace exclusion#1135
Draft
Michal-Szczygiel wants to merge 3 commits into
Draft
Conversation
| customResourcesEnabled: | ||
| description: Enables access to License Service custom resources. Defaults to true. | ||
| type: boolean | ||
| excludeNamespace: |
Collaborator
Author
There was a problem hiding this comment.
This change was not autogenerated, added CRD parameter was hand-picked and moved here to helm CRD
| httpsEnable: true | ||
| features: | ||
| nssEnabled: false | ||
| excludeNamespace: "" |
Collaborator
Author
There was a problem hiding this comment.
Do we want to have "" as default or maybe just hide excludeNamespace param in values.yaml?
| enableInstanaMetricCollection: false | ||
| features: | ||
| nssEnabled: false | ||
| excludeNamespace: "" |
Collaborator
Author
There was a problem hiding this comment.
Do we want to have "" as default or maybe just hide excludeNamespace param in values.yaml?
Comment on lines
+69
to
+72
| {{- if and (not .Values.ibmLicensing.spec.features.nssEnabled) (.Values.ibmLicensing.spec.features.excludeNamespace) }} | ||
| - name: EXCLUDE_NAMESPACE | ||
| value: {{ .Values.ibmLicensing.spec.features.excludeNamespace | quote }} | ||
| {{- end }} |
Collaborator
Author
There was a problem hiding this comment.
Helm chart follows the logic of the operator here: create EXCLUDE_NAMESPACE only when nssEnabled=false and excludeNamespace not empty (warning: no sanitization in helm version)
Comment on lines
+165
to
+168
| {{- if and (not .Values.ibmLicensing.spec.features.nssEnabled) (.Values.ibmLicensing.spec.features.excludeNamespace) }} | ||
| - name: EXCLUDE_NAMESPACE | ||
| value: {{ .Values.ibmLicensing.spec.features.excludeNamespace | quote }} | ||
| {{- end }} |
Collaborator
Author
There was a problem hiding this comment.
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.
Description
Adds
spec.features.excludeNamespaceto the IBMLicensing CR - a comma-separated list of namespace names or regex patterns that the operand should skip during aggregation. The operator sanitizes the value (trims whitespace, removes duplicates and empty entries) and injects it into the operand pod as theEXCLUDE_NAMESPACEenvironment variable. The env var is suppressed entirely when namespace scoping (nssEnabled) is active. The helm chart (helm-no-operatorand the ArgoCD deployment) is updated with the new field, and the CRD manifests are regenerated.Parent issue
ILS-2361
Type
What types of changes does your code introduce?
Put an
xin the boxes that applyExtra information
Testing
Before merging your PR, ensure Jenkins tests pass by following these steps:
Test images for further QA testing (if applicable):