Add support for known hosts on ssh secret in Fleet Git Repo #13168
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theknown_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:
The edit dialog for this control when you click the three dots:
Secrets edit view when
known_hosts
is present in an SSH secret:Checklist