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

Provision SSH keys that are stored in the PostgreSQL database to the user's namespace in a known to devworkspace-controller format #20832

Closed
Tracked by #20168 ...
skabashnyuk opened this issue Nov 25, 2021 · 0 comments
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. sprint/current

Comments

@skabashnyuk
Copy link
Contributor

skabashnyuk commented Nov 25, 2021

Is your task related to a problem? Please describe

The goal of this task is to mount existing SSH keys that used to be mounted in Che7 workspaces to devworkspaces.
See more about format @JPinkney 's comment devfile/devworkspace-operator#613 (comment)

Describe the solution you'd like

Implement new NamespaceConfigurator. in such a form

cat > /tmp/gitconfig <<EOF
host *
  IdentityFile /.ssh/id_rsa
  StrictHostKeyChecking = no
EOF

kubectl create secret generic git-ssh-key \
  --from-file=id_rsa=/path/to/private-key \
  --from-file=id_rsa.pub=/path/to/public-key \
  --from-file=config=/tmp/gitconfig

kubectl patch secret git-ssh-key --type merge -p \
  '{"metadata": {
     "labels": {
        "controller.devfile.io/mount-to-devworkspace": "true",
        "controller.devfile.io/watch-secret": "true"
      }, 
      "annotations": {
        "controller.devfile.io/mount-path": "/.ssh/"
      }
    }
  }'

Describe alternatives you've considered

No response

Additional context

devfile/devworkspace-operator#613

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. sprint/current
Projects
None yet
Development

No branches or pull requests

2 participants