version: 1
kind: UnideskDeploySshIdentities
metadata:
  name: unidesk-deploy-ssh-identities
  owner: unidesk
  relatedIssues:
    - 1190

defaults:
  targetId: D601
  identityId: github.com

sources:
  root: /root/.unidesk/.state/secrets

identities:
  github.com:
    host: github.com
    privateKey:
      sourceRef: deploy-ssh/github.com/id_ed25519
      sourceKey: file
    publicKey:
      sourceRef: deploy-ssh/github.com/id_ed25519.pub
      sourceKey: file
    knownHosts:
      sourceRef: deploy-ssh/github.com/known_hosts
      sourceKey: file
    createFromLocal:
      enabled: true
      privateKeyPath: /root/.ssh/id_ed25519_github_codex
      publicKeyPath: /root/.ssh/id_ed25519_github_codex.pub
      knownHostsPath: /root/.ssh/known_hosts

targets:
  D601:
    providerId: D601
    route: D601
    homeDir: /home/ubuntu
    egress:
      mode: http-connect-proxy
      proxyUrl: http://127.0.0.1:18789
    identities:
      - github.com
  D518:
    providerId: D518
    route: D518
    homeDir: /home/ubuntu
    egress:
      mode: direct
    identities:
      - github.com
  JD01:
    providerId: JD01
    route: JD01
    homeDir: /root
    egress:
      mode: http-connect-proxy
      proxyUrl: http://127.0.0.1:10808
    identities:
      - github.com
  G14:
    providerId: G14
    route: G14
    homeDir: /root
    egress:
      mode: http-connect-proxy
      proxyUrl: http://127.0.0.1:18789
    identities:
      - github.com
  NC01:
    providerId: NC01
    route: NC01
    homeDir: /root
    egress:
      mode: direct
    identities:
      - github.com
