Skip to content

[patch] remove logging operator file when CLUSTER_LOGGING_OPERATOR_INSTALL is false - #2627

Open
vfobid wants to merge 1 commit into
masterfrom
mascore-11744
Open

vfobid wants to merge 1 commit into
masterfrom
mascore-11744

Conversation

@vfobid

@vfobid vfobid commented Oct 1, 2026

Copy link
Copy Markdown

Problem
MASCORE-11744 - https://jsw.ibm.com/browse/MASCORE-11744

When the upstream configuration sets the Cluster Logging Operator install value to "false", the pipeline reports the value correctly. However, the GitOps update reports no files to add or commit.

As a result, the requested configuration change is not reflected in the GitOps repository.

Cause
The CLI code that generates the Cluster Logging Operator configuration creates cluster-logging-operator.yaml when CLUSTER_LOGGING_OPERATOR_INSTALL is "true". When the value is "false", the existing logic skips generation but does not remove a previously generated cluster-logging-operator.yaml file. If that file already exists and remains unchanged, the Git operation detects no file change to commit or push.

Solution
In image/cli/mascli/functions/gitops_cluster, add an elif branch that removes cluster-logging-operator.yaml when CLUSTER_LOGGING_OPERATOR_INSTALL is "false" and the file exists in the GitOps working directory. This makes the deletion visible to the existing Git operation so the change can be committed and pushed to the configured GitOps repository.

Testing
A local behavioral test was performed using the real gitops_cluster function from the modified CLI file. Unrelated AWS, secret-management, validation, and template operations were stubbed so the test could reach the changed branch without requiring external services.

The following cases were verified:

  1. CLUSTER_LOGGING_OPERATOR_INSTALL=false with an existing cluster-logging-operator.yaml file: the file was deleted.

  2. CLUSTER_LOGGING_OPERATOR_INSTALL=false with no existing cluster-logging-operator.yaml file: the file remained absent.

  3. CLUSTER_LOGGING_OPERATOR_INSTALL=true with an existing cluster-logging-operator.yaml file: the file remained present.

@vfobid
vfobid requested a review from a team as a code owner October 1, 2026 23:47

This branch has not been deployed

No deployments
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