-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 Git
storage + SSH documentation
#4539
Conversation
I don't see a compelling reason to add ssh clients to our base Docker image and would oppose doing so until convinced otherwise. Is there any way to just install at runtime when using git storage? Putting ssh clients in all flow containers feels heavy, though I can't make a complete argument that it's prohibitively insecure |
Because of security concerns, we've decided not to add I'll update this PR to provide documentation on adding |
Git
storage + SSH documentation
kubectl create secret generic my-ssh-key --from-file=<ssh-key-name>=/path/to/<ssh-key-name> --from-file=known_hosts=/path/to/known_hosts | ||
``` | ||
|
||
Next, create a custom job template to mount the secret volume to `/root/.ssh`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's kinda weird that the example is not a full "job template" even though it is minimally viable to be properly merged with the default job template. this story continues to haunt me but this is good imo
Finally, [configure the agent or flow to use the custom job template](https://docs.prefect.io/orchestration/agents/kubernetes.html#custom-job-template). | ||
|
||
|
||
Creating a [Kubernetes service account](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) to permission the Secret properly is recommended. Once configured in Kubernetes, service account can be set either [on agent start or on the run config](https://docs.prefect.io/orchestration/agents/kubernetes.html#service-account). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the RBAC config is a must for this to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zangell44 Does this need a change before merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@madkinsz this is okay to merge as is, I've followed these instructions successfully myself
I have my eye on this documentation to update it as we get feedback
New docs look good. Definitely an improvement |
Summary
Adds ssh agent to Dockerfile, allowing the use of ssh cloning when using the image for
Git
storage.Changes
Importance
Resolves #4538.
Checklist
This PR:
changes/
directory (if appropriate)docs/outline.toml
for API reference docs (if appropriate)