Skip to content

ILS-2361 Namespace exclusion#1135

Draft
Michal-Szczygiel wants to merge 3 commits into
developfrom
ILS-2361-namespace-exclusion
Draft

ILS-2361 Namespace exclusion#1135
Michal-Szczygiel wants to merge 3 commits into
developfrom
ILS-2361-namespace-exclusion

Conversation

@Michal-Szczygiel

@Michal-Szczygiel Michal-Szczygiel commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds spec.features.excludeNamespace to 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 the EXCLUDE_NAMESPACE environment variable. The env var is suppressed entirely when namespace scoping (nssEnabled) is active. The helm chart (helm-no-operator and 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 x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Feature change (non-breaking change which modifies existing functionality)
  • Dependency/version upgrade/CVE remediation
  • Velocity-improvement (enhancing testing strategy, tidy code, CICD update)

Extra information

  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)
  • Lint and unit tests pass locally with my changes
  • Tester is needed
  • This change requires a documentation update - create separate issue with input for doc team

Testing

  • Manual tests
  • Automated sert tests:
    Before merging your PR, ensure Jenkins tests pass by following these steps:
  1. Run the tests on the clustered environment (OCP/IKS depending on the content of the pull request) using Jenkins pipelines.
  2. If the build fails due to being unstable, restart it.
  3. If the failure is due to other issues unrelated to the tests themselves, address the underlying problem before proceeding.

Test images for further QA testing (if applicable):

@Michal-Szczygiel
Michal-Szczygiel changed the base branch from latest-4.x to develop July 17, 2026 11:52
customResourcesEnabled:
description: Enables access to License Service custom resources. Defaults to true.
type: boolean
excludeNamespace:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This change was not autogenerated, added CRD parameter was hand-picked and moved here to helm CRD

httpsEnable: true
features:
nssEnabled: false
excludeNamespace: ""

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Do we want to have "" as default or maybe just hide excludeNamespace param in values.yaml?

enableInstanaMetricCollection: false
features:
nssEnabled: false
excludeNamespace: ""

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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 }}

@Michal-Szczygiel Michal-Szczygiel Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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 }}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

1 participant