-
Bug
-
Resolution: Done
-
Major
-
1.14.0, 1.15.0
-
5
-
False
-
-
False
-
-
Bug Fix
-
-
-
-
5
-
GitOps Crimson Sprint 14
Description of Problem
The feature request - RFE-5400 raised for allowing GitOps operator to accept regular expressions in sourceNamespaces is closed now, but the feature is not working.
It seems the same was implemented in upstream already
[1]Upstream Doc: https://argo-cd.readthedocs.io/en/stable/operator-manual/app-any-namespace/#change-workload-startup-parameters
Additional Info
Followed doc[2] to enable Application resource in non-controlplane namespace in openshift-gitops
Problem Reproduction
For example,
- To match a namespace called `testgiotest`, used the regex /^test.*test$/
- The server pod logs stating that the "application namespace patterns enabled", but the namespace is not getting the `argocd.argoproj.io/managed-by-cluster-argocd` label.
sourceNamespaces: - /^test.*test$/
time="2025-03-27T07:50:04Z" level=info msg="Enabled application namespace patterns: openshift-gitops, /^test.*test$/
Tried with multiple patterns, but it seems regex is not working as explained in upstream doc[1].
Reproducibility
Always
Prerequisites/Environment
Openshift-GitOps 1.15.1
Steps to Reproduce
- Try a regex expression in sourceNamespace to match a namespace
Expected Results
- The namespace should be labelled with argocd.argoproj.io/managed-by-cluster-argocd` label
Actual Results
- The label is not getting added to namespace while using regex
Problem Analysis
- <Completed by engineering team as part of the triage/refinement process>
Root Cause
- <What is the root cause of the problem? Or, why is it not a bug?>
Workaround (If Possible)
- <Are there any workarounds we can provide to the customers?>
Fix Approaches
- <If we decide to fix this bug, how will we do it?>
Acceptance Criteria
- ...
Definition of Done
- Code Complete:
- All code has been written, reviewed, and approved.
- Tested:
- Unit tests have been written and passed.
- Ensure code coverage is not reduced with the changes.
- Integration tests have been automated.
- System tests have been conducted, and all critical bugs have been fixed.
- Tested and merged on OpenShift either upstream or downstream on a local build.
- Documentation:
- User documentation or release notes have been written (if applicable).
- Build:
- Code has been successfully built and integrated into the main repository / project.
- Midstream changes (if applicable) are done, reviewed, approved and merged.
- Review:
- Code has been peer-reviewed and meets coding standards.
- All acceptance criteria defined in the user story have been met.
- Tested by reviewer on OpenShift.
- Deployment:
- The feature has been deployed on OpenShift cluster for testing.
- links to
-
RHEA-2025:151992 Red Hat OpenShift GitOps 1.17.0 GA - Argo CD, Rollouts CLI and MicroShift GitOps