capsule icon indicating copy to clipboard operation
capsule copied to clipboard

[WIP] convert create-user.sh to pure go functions

Open 9trocode opened this issue 1 year ago • 3 comments

The result of this code would look like this it generates ${tenant}-${user}.kubeconfig

{
  "apiVersion": "v1",
  "kind": "Config",
  "clusters": [
    {
      "name": "orbstack",
      "cluster": {
        "certificate-authority-data": "<data>",
        "server": "https://127.0.0.1:26443"
      }
    }
  ],
  "contexts": [
    {
      "name": "oil-oil",
      "context": {
        "cluster": "orbstack",
        "user": "oil"
      }
    }
  ],
  "current-context": "oil-oil",
  "preferences": null,
  "users": [
    {
      "name": "oil",
      "user": {
        "client-certificate-data": "<data>",
        "client-key-data": "<data>"
      }
    }
  ]
}

9trocode avatar Feb 27 '24 08:02 9trocode

Deploy Preview for capsule-documentation canceled.

Name Link
Latest commit 89801be068d40306561fa41a81285d220a76a22e
Latest deploy log https://app.netlify.com/sites/capsule-documentation/deploys/65dda207df41a5000819cca5

netlify[bot] avatar Feb 27 '24 08:02 netlify[bot]

@9trocode I'm very welcoming to your PR, and I'd like to know if you could revamp it.

prometherion avatar May 01 '24 08:05 prometherion