Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for known hosts on ssh secret in Fleet Git Repo #13168

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nwmac
Copy link
Member

@nwmac nwmac commented Jan 21, 2025

Summary

Fixes #11236

Occurred changes and/or fixed issues

This PR enhances the SelectOrCreateAuthSecret component so that for the SSH secret type, it can also support the known_hosts field. Note that this is non-standard in that known hosts is not part of the standard k8s SSH secret type. This is only used by Fleet.

The Fleet GitRepo use of the above control enables the new field, so that when creating a GitRepo, you can specify the known hosts information.

Lastly, the secret view is updated, so that if an SSH secret has the known_hosts data key, we will show this on the detail screen and also allow the user to edit via the config screen.

Areas or cases that should be tested

Creating a Git Repo with a secret with known hosts. Validate that the secret that is created has the known_hosts data field and validate that this can be edited in the secrets screen.

Screenshot/Video

The updated auth secret control:

Screenshot 2025-01-21 at 13 57 30

The edit dialog for this control when you click the three dots:

Screenshot 2025-01-21 at 13 57 42

Secrets edit view when known_hosts is present in an SSH secret:
Screenshot 2025-01-21 at 13 27 13

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@nwmac nwmac requested a review from torchiaf January 21, 2025 16:01
@rancher-ui-project-bot rancher-ui-project-bot bot added this to the v2.11.0 milestone Jan 21, 2025
@nwmac nwmac assigned torchiaf and unassigned nwmac Jan 24, 2025
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.

Add SSH_KNOWN_HOSTS field in Rancher UI when creating a private Git Repository
2 participants