MG-240: Proposal to optionally skip rotated pod logs from must-gather#1964
Conversation
|
@shivprakashmuley: This pull request references MG-240 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
|
||
| The Must Gather Operator is an OLM-installable operator deployed on an OpenShift cluster that closely integrates with the must-gather tool. This enhancement describes how the operator provides a user-configurable interface (a new CustomResource) to gather data, diagnostic information from a cluster using must-gather and upload it to a Red Hat support case. | ||
|
|
||
| Gather behavior is configured under `spec.gatherSpec`: `audit` toggles audit log collection, and optional `command` / `args` override the gather container entrypoint and arguments. For optional skip of rotated pod logs, set `gatherSpec.command` to `/bin/bash`, `-c`, and a third element that is the shell command line passed to `-c`: a per-invocation environment assignment plus `gather`, i.e. `REDUCE_LOGS=skip_rotated_logs gather`. This omits `oc adm inspect --rotated-pod-logs` on the paths covered by the [must-gather image](https://github.com/openshift/must-gather). When those overrides are not used, behavior matches today’s default (rotated pod logs are collected). |
There was a problem hiding this comment.
maybe make this bulleted and not this verbose
| - User provides a reference to the service account to be used for the collection Job | ||
| - User sets `spec.serviceAccountName` for the ServiceAccount that runs the collection Job | ||
| - User provides a reference to the secret to be used to authenticate to sftp.access.redhat.com | ||
| - Optionally, user sets `spec.gatherSpec` (`command` for the gather container); to skip rotated pod logs, use `gatherSpec.command` with `/bin/bash`, `-c`, and a third element that runs `gather` with `REDUCE_LOGS=skip_rotated_logs` set for that invocation only (see example below) |
There was a problem hiding this comment.
just mention that we need to set the env variable and point to the example below rather than saying the same thing over again?
|
@shivprakashmuley: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This PR addresses https://redhat.atlassian.net/browse/MG-240 .
Context
The default must-gather image uses --rotated-pod-logs on its main inspect paths. That improves diagnostics but can grow archives, lengthen collection, and add API/node load. The must-gather image is expected to honor MUST_GATHER_SKIP_ROTATED_POD_LOGS=True (strict string equality) to omit that flag on covered invocations.
What changed
Describes the mapping from spec.additionalConfig.skipRotatedPodLogs to MUST_GATHER_SKIP_ROTATED_POD_LOGS=True on the gather container, references the must-gather implementation (collection-scripts/common.sh, get_log_collection_args / rotated_pod_logs_arg), and states that omitted, null, or false preserves today’s default (rotated pod logs collected).
Workflow: Optional additionalConfig step, including skipRotatedPodLogs: true and env injection on the gather container only.