Skip to content

MG-53: Proposal for FTPHost in must-gather-operator spec - #1831

Merged
openshift-merge-bot[bot] merged 8 commits into
openshift:masterfrom
shivprakashmuley:ftpHost-enhancement
Oct 9, 2025
Merged

openshift-merge-bot[bot] merged 8 commits into
openshift:masterfrom
shivprakashmuley:ftpHost-enhancement

Conversation

@shivprakashmuley

@shivprakashmuley shivprakashmuley commented Aug 18, 2025 •

Copy link
Copy Markdown
Contributor

This PR is part of https://issues.redhat.com/browse/MG-53.

This PR includes proposal to introduce a new API field in must-gather-operator spec for adding FTPHost target. This target is basically used for uploading collected must-gather artifacts.
Proposal includes various aspects of the proposed changes.

#1839 for PVC reference.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 18, 2025
@openshift-ci-robot

openshift-ci-robot commented Aug 18, 2025 •

Copy link
Copy Markdown

@shivprakashmuley: This pull request references MG-53 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.20.0" version, but no target version was set.

Details

In 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.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 18, 2025
@openshift-ci

openshift-ci Bot commented Aug 18, 2025

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@shivprakashmuley
shivprakashmuley marked this pull request as ready for review August 19, 2025 05:36
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 19, 2025
@openshift-ci
openshift-ci Bot requested review from lmzuccarelli and runcom August 19, 2025 05:37
@openshift-ci-robot

openshift-ci-robot commented Aug 20, 2025 •

Copy link
Copy Markdown

@shivprakashmuley: This pull request references MG-53 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.20.0" version, but no target version was set.

Details

In response to this:

This PR is part of https://issues.redhat.com/browse/MG-53.

This PR includes proposal to introduce a new API field in must-gather-operator spec for adding FTPHost target. This target is basically used for uploading collected must-gather artifacts.
Proposal includes various aspects of the proposed changes.

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.


Add an optional field `ftpHost` to `MustGather.spec` that allows directing must-gather artifacts to a designated FTP/SFTP endpoint during the upload phase. This provides a supported, secure, and validated path for environments that require alternate upload targets beyond the default Red Hat case management destination.

Supported values: `access.redhat.com`, `access.stage.redhat.com`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if the only reason for this is to have an internal endpoint for QE testing - can't we somehow change the must-gather template when building the CI/QE image rather than having this be controlled through the API?

@swghosh swghosh Sep 4, 2025 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

alternative to the API field,

i.e. we can inject:

  • OPENSHIFT_CI env var from the CI's test pod
    • -> Subscription spec.config.env (will reflect in operator pod, via OLM)
      • -> upon observing this env var in the operator, also inject the same/similar env var into Job's pod spec
        • -> upload container script when detects this env, uses access.stage.redhat.com instead of the default access.redhat.com.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

had a brief discussion with @TrilokGeer , some of the cases he raised were

  1. if the ftp target endpoint changes in future
  2. if DNS does not resolve name properly but IP works
    in these cases it'd be better to have API field for ftpHost

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

in these cases it'd be better to have API field for ftpHost

but even then we have hardcoded set of values right? we are not going to let the user define any value for the ftpHost, correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed the enum and enum validation now @Prashanth684

@Prashanth684

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 25, 2025
@TrilokGeer

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci

openshift-ci Bot commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: TrilokGeer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 26, 2025
@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD c0d0570 and 2 for PR HEAD d7cb3cb in total

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 29, 2025

@swghosh swghosh left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

a few nits only.


Add an optional field `ftpHost` to `MustGather.spec` that allows directing must-gather artifacts to a designated FTP/SFTP endpoint during the upload phase. This provides a supported, secure, and validated path for environments that require alternate upload targets beyond the default Red Hat case management destination.

Default: `access.redhat.com` (used when ftpHost is unset)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: the current default upload host is sftp.access.redhat.com.


* Add `spec.ftpHost` with a safe default.
* Ensure the upload container honors ftpHost and existing proxy settings.
* Maintain full backward compatibility.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To attain this goal (in the future), should we adhere with adding spec.uploadTargets?

ref: #1830 (comment)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes, this should reflect the same change in #1830 so we are unified on the API changes

@swghosh swghosh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

small nits, otherwise LGTM

@openshift-ci-robot

openshift-ci-robot commented Oct 9, 2025 •

Copy link
Copy Markdown

@shivprakashmuley: This pull request references MG-53 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.21.0" version, but no target version was set.

Details

In response to this:

This PR is part of https://issues.redhat.com/browse/MG-53.

This PR includes proposal to introduce a new API field in must-gather-operator spec for adding FTPHost target. This target is basically used for uploading collected must-gather artifacts.
Proposal includes various aspects of the proposed changes.

#1839 for PVC reference.

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.

@swghosh swghosh Oct 9, 2025 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: should we move the enhancement into enhancements/support-log-gather/upload-targets.md instead? That way all our operator enhancements can live in a common directory.

Comment on lines +128 to +137

#### Hypershift / Hosted Control Planes


#### Standalone Clusters

This change is fully relevant for standalone clusters where must-gather operations are performed directly.

#### Single-node Deployments or MicroShift

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
#### Hypershift / Hosted Control Planes
#### Standalone Clusters
This change is fully relevant for standalone clusters where must-gather operations are performed directly.
#### Single-node Deployments or MicroShift
No specific topology considerations exist.
The operator behaves identically on a dedicated OpenShift cluster as that on a hosted HyperShift cluster. Single node OpenShift clusters running the operator and gather pod could itself be some overhead but there is no difference in the uploadTarget behaviour.
MicroShift is well out of scope for now as it does not ship with an OLM and the default must-gather script will not be useful there.


// caseManagementAccountSecretRef references a secret containing the upload credentials.
// +required
CaseManagementAccountSecretRef corev1.LocalObjectReference `json:"caseManagementAccountSecretRef"`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we need to add the InternalUser field here too, as this specific to the SFTP upload process itself.
Or, in future we can add a new field for BasePath to make this more generic. Upload will then land into: $user@$host:$basePath/$caseId-must-gather.tar.

Comment on lines +191 to +193
### Removing a deprecated feature

The deprecated fields `caseID`, `caseManagementAccountSecretRef`, and `ftpHost` are removed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
### Removing a deprecated feature
The deprecated fields `caseID`, `caseManagementAccountSecretRef`, and `ftpHost` are removed.

I don't think we need this as we technically do not have a supported offering at this time, in case there is need to retain this section we can probably mention that these field were present the community operator which are being removed through this enhancement.

@swghosh

swghosh commented Oct 9, 2025 •

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 9, 2025
@swghosh

swghosh commented Oct 9, 2025

Copy link
Copy Markdown
Member

/label tide/merge-method-merge

@openshift-ci openshift-ci Bot added the tide/merge-method-merge Denotes a PR that should use a standard merge by tide when it merges. label Oct 9, 2025
@openshift-ci

openshift-ci Bot commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

@shivprakashmuley: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. tide/merge-method-merge Denotes a PR that should use a standard merge by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants