upbound / up

The @upbound CLI
Apache License 2.0
52 stars 41 forks source link

New subcommands to support Upbound Spaces #348

Closed tnthornton closed 1 year ago

tnthornton commented 1 year ago

Description of your changes

Introduce a new set of management APIs for working with Upbound Spaces.

New subcommands:

Removes subcommands:

I have:

How has this code been tested

Init

https://github.com/upbound/up/assets/2375126/4282b349-b58a-48c5-9864-804abeec5adc

https://github.com/upbound/up/assets/2375126/6f3b490d-3d83-424f-bb39-e44e5fdc6cfd

https://github.com/upbound/up/assets/2375126/3e6bfbb0-8bc7-4930-8815-7ed09fdf3f8f

Init Providing values via parameters or values.yaml

command:

./_output/bin/darwin_arm64/up space init --token-file=key.json v0.14.0-rc.0.89.g05941b93 --set account=local

result:

kubectl -n upbound-system describe po spaces-controller-7b5dd57f4d-qjtg4
...
Containers:
  spaces:
    Container ID:  containerd://5a8318d7bfde9283354b6e0ef8bf53fbc146536f7cbe7321933ae7e95e9d642f
    Image:         us-west1-docker.pkg.dev/orchestration-build/upbound-environments/mxe-controller:v0.14.0-rc.0.89.g05941b93
    Image ID:      us-west1-docker.pkg.dev/orchestration-build/upbound-environments/mxe-controller@sha256:c870a7bb6d4972ed44e397e8e45d1799b3914bb58cbb28cfb42ddb9f507c09ee
    Ports:         8085/TCP, 9443/TCP
    Host Ports:    0/TCP, 0/TCP
    Command:
      mxe-controller
    State:          Running
      Started:      Mon, 07 Aug 2023 12:26:58 -0700
    Ready:          True
    Restart Count:  0
    Limits:
      cpu:     1
      memory:  200Mi
    Requests:
      cpu:     100m
      memory:  50Mi
    Environment:
      ACCOUNT_NAME:  local
      PUBLIC_HOST:   proxy.upbound-127.0.0.1.nip.io
      SPACE_LABELS:

command:

cat values.yaml

result:

account: upbound

command:

./_output/bin/darwin_arm64/up space init --token-file=key.json v0.14.0-rc.0.89.g05941b93 -f values.yaml

result:

kubectl -n upbound-system describe po spaces-controller-5584bb7cb-26k4z

...
Containers:
  spaces:
    Container ID:  containerd://32f744121c96a33150987823122e707d102f653a37c72c69c0983f9a414e8d57
    Image:         us-west1-docker.pkg.dev/orchestration-build/upbound-environments/mxe-controller:v0.14.0-rc.0.89.g05941b93
    Image ID:      us-west1-docker.pkg.dev/orchestration-build/upbound-environments/mxe-controller@sha256:c870a7bb6d4972ed44e397e8e45d1799b3914bb58cbb28cfb42ddb9f507c09ee
    Ports:         8085/TCP, 9443/TCP
    Host Ports:    0/TCP, 0/TCP
    Command:
      mxe-controller
    State:          Running
      Started:      Mon, 07 Aug 2023 12:45:31 -0700
    Ready:          True
    Restart Count:  0
    Limits:
      cpu:     1
      memory:  200Mi
    Requests:
      cpu:     100m
      memory:  50Mi
    Environment:
      ACCOUNT_NAME:  upbound
      PUBLIC_HOST:   proxy.upbound-127.0.0.1.nip.io
      SPACE_LABELS:
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-4jdth (ro)

Upgrade

https://github.com/upbound/up/assets/2375126/98d61936-39eb-4776-ac55-afa6e71464bf

Destroy

NOTE: This command was renamed from teardown -> destroy after this video was caputured.

https://github.com/upbound/up/assets/2375126/5a5756fd-ccac-4cdc-859f-c36267e85f8f

UPDATE

Note missing required prerequisites:

Screenshot 2023-08-07 at 2 49 27 PM

AlainRoy commented 1 year ago

I'm not sure I should be the final approver on a change this big, but it looks good to me. Thanks!