drush icon indicating copy to clipboard operation
drush copied to clipboard

Add support for rsync and sql:sync with kubectl

Open froboy opened this issue 3 months ago • 3 comments

This is heavily based on https://github.com/drush-ops/drush/pull/6213, and related to #6180 and #5912.

It needs tests.

Working locally I was able to get things working with a drush alias config like so:

develop:
  options:
    ...
  kubectl:
    namespace: "${env.CUSTOMER_NAME}-dev"
    resource: 'deploy/${env.CUSTOMER_NAME}-dev'
    container: 'php'
    tty: true
    interactive: true
  paths:
    drush-script: /usr/src/app/vendor/bin/drush
  uri: "https://${env.CUSTOMER_NAME}-dev.k8s.myserver.net/"

froboy avatar Nov 19 '25 16:11 froboy

As mentioned at https://github.com/drush-ops/drush/pull/6213#issuecomment-2603328059, I'd prefer for transport-specifics (e.g. kubectl) to stay out of the Drush codebase. Thats currently handled in consolidation/site-process.

weitzman avatar Nov 19 '25 18:11 weitzman

@weitzman thanks for the feedback. I reviewed the kubectl transport PR and came across this unanswered question. Any thoughts on that? Where would rsync stuff go in consolidation/site-process?

froboy avatar Nov 19 '25 19:11 froboy

rsync is a layer above Process so thats why there is no rsync stuff on consolidation/process. i dont know offhand how to structure the feature thats being suggested here. its a complex feature that is needed by relatively few users. thats why I am picky about adding the complexity.

weitzman avatar Nov 19 '25 19:11 weitzman