Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed Oct 24, 2024
1 parent 524072f commit beb0174
Show file tree
Hide file tree
Showing 30 changed files with 167 additions and 83 deletions.
66 changes: 53 additions & 13 deletions config/commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ options:
create/wait:
name: wait
type: string
default: ready
description: |
Set the resource status that the command waits for before
exiting.
Wait for the given status before exiting.
choices:
- name: pending
description: XXX
description: Pending
- name: configured
description: XXX
description: Configured
- name: ready
description: XXX
description: Ready
create/timeout:
name: timeout
type: string
Expand Down Expand Up @@ -60,6 +60,19 @@ options:
description: Produce JSON output
- name: yaml
description: Produce YAML output
update/wait:
name: wait
type: string
default: ready
description: |
Wait for the given status before exiting.
choices:
- name: pending
description: Pending
- name: configured
description: Configured
- name: ready
description: Ready
update/timeout:
name: timeout
type: string
Expand Down Expand Up @@ -119,6 +132,8 @@ options:
type: boolean
description: |
Allow access for incoming links from remote sites.
<!-- XXX reference link access type -->
links:
- name: Link access concept
url: /concepts/link-access.html
Expand Down Expand Up @@ -246,6 +261,7 @@ commands:
inherit_options: [global/*]
subcommands:
- name: create
wait: Ready
description: |
Create a site.
examples: |
Expand Down Expand Up @@ -280,6 +296,7 @@ commands:
Status: Ready
inherit_options: [status/*, context/*, global/*]
- name: update
wait: Ready
description: |
Change site settings.
examples: |
Expand All @@ -290,7 +307,7 @@ commands:
skupper site update --enable-link-access --service-account app1:alice
output: |
Waiting for update to complete...
Site "<name>" is updated.
Site "<name>" is ready.
inherit_options: [update/*, site/*, context/*, global/*]
options:
- name: name
Expand All @@ -306,10 +323,11 @@ commands:
description: |
There is no existing Skupper site resource to update.
- name: delete
wait: Deletion
description: |
Delete a site.
output: |
Waiting for deletion to complete...
Waiting for deletion...
Site "<name>" is deleted.
inherit_options: [delete/*, context/*, global/*]
options:
Expand All @@ -321,6 +339,12 @@ commands:
If not specified, the name is that of the site
associated with the current namespace.
- name: all
type: boolean
description: |
In addition the site resource, delete all of the Skupper
resources associated with the site in the current
namespace.
errors:
- message: No site resource exists
description: |
Expand All @@ -343,6 +367,7 @@ commands:
inherit_options: [global/*]
subcommands:
- name: issue
wait: Ready
resource: AccessGrant
related_concepts: ["access grant", "access token"]
related_resources: [AccessGrant, AccessToken]
Expand Down Expand Up @@ -426,6 +451,7 @@ commands:
inherit_options: [global/*]
subcommands:
- name: create
wait: Ready
description: |
Create a link.
output: |
Expand Down Expand Up @@ -456,17 +482,19 @@ commands:
Cost: 1
inherit_options: [status/*, context/*, global/*]
- name: update
wait: Ready
description: |
Change link settings.
output: |
Waiting for update to complete...
Link "<name>" is updated.
Link "<name>" is ready.
inherit_options: [create/*, link/*, context/*, global/*]
- name: delete
wait: Deletion
description: |
Delete a link.
output: |
Waiting for deletion to complete...
Waiting for deletion...
Link "<name>" is deleted.
inherit_options: [delete/*, context/*, global/*]
- name: connector
Expand Down Expand Up @@ -497,6 +525,8 @@ commands:
- name: name
- name: port
required: true
- name: wait
default: configured
- name: status
description: |
Display the status of connectors in the current site.
Expand All @@ -520,6 +550,7 @@ commands:
required: false
positional: true
- name: update
wait: Configured
related_commands: [listener/update]
description: |
Update a connector.
Expand All @@ -534,14 +565,15 @@ commands:
skupper connector update backend --port 9090 --output yaml
output: |
Waiting for update to complete...
Connector "<name>" is updated.
Connector "<name>" is configured.
inherit_options: [update/*, connector/*, context/*, global/*]
- name: delete
wait: Deletion
related_commands: [listener/delete]
description: |
Delete a connector.
output: |
Waiting for deletion to complete...
Waiting for deletion...
Connector "<name>" is deleted.
inherit_options: [delete/*, context/*, global/*]
- name: listener
Expand All @@ -568,6 +600,12 @@ commands:
Waiting for status...
Listener "<name>" is configured.
inherit_options: [create/*, listener/*, context/*, global/*]
options:
- name: name
- name: port
- name: output
- name: wait
default: configured
- name: status
description: |
Display the status of listeners in the current site.
Expand All @@ -586,6 +624,7 @@ commands:
Connectors: 1
inherit_options: [status/*, context/*, global/*]
- name: update
wait: Configured
related_commands: [connector/update]
description: |
Update a listener.
Expand All @@ -600,19 +639,20 @@ commands:
skupper listener update backend --port 9090 --output yaml
output: |
Waiting for update to complete...
Listener "<name>" is updated.
Listener "<name>" is configured.
inherit_options: [update/*, listener/*, context/*, global/*]
options:
- name: name
- name: port
required: false
positional: false
- name: delete
wait: Deletion
related_commands: [connector/delete]
description: |
Delete a listener.
output: |
Waiting for deletion to complete...
Waiting for deletion...
Listener "<name>" is deleted.
inherit_options: [delete/*, context/*, global/*]
- name: debug
Expand Down
20 changes: 10 additions & 10 deletions input/commands/connector/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ skupper connector create backend 8080 --output yaml

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

- <h3 id="wait">--wait <span class="attribute-info">string</span></h3>

Wait for the given status before exiting.

<table class="fields"><tr><th>Default</th><td><p><code>configured</code></p>
</td><tr><th>Choices</th><td><table class="choices"><tr><th><code>pending</code></th><td><p>Pending</p>
</td></tr><tr><th><code>configured</code></th><td><p>Configured</p>
</td></tr><tr><th><code>ready</code></th><td><p>Ready</p>
</td></tr></table></td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

- <h3 id="output">--output <span class="attribute-info">string</span></h3>

Print the resource to the console in a structured output format
Expand All @@ -82,16 +92,6 @@ skupper connector create backend 8080 --output yaml
</td></tr><tr><th><code>yaml</code></th><td><p>Produce YAML output</p>
</td></tr></table></td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

- <h3 id="wait">--wait <span class="attribute-info">string</span></h3>

Set the resource status that the command waits for before
exiting.

<table class="fields"><tr><th>Choices</th><td><table class="choices"><tr><th><code>pending</code></th><td><p>XXX</p>
</td></tr><tr><th><code>configured</code></th><td><p>XXX</p>
</td></tr><tr><th><code>ready</code></th><td><p>XXX</p>
</td></tr></table></td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

- <h3 id="timeout">--timeout <span class="attribute-info">string (duration)</span></h3>

Raise an error if the operation does not complete in the given
Expand Down
4 changes: 2 additions & 2 deletions input/commands/connector/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ links:

Delete a connector.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>Waits for</th><td>Ready</td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>Waits for</th><td>Deletion</td></table>

</section>

Expand All @@ -34,7 +34,7 @@ skupper connector delete <name> [options]
## Output

~~~ console
Waiting for deletion to complete...
Waiting for deletion...
Connector "<name>" is deleted.
~~~

Expand Down
2 changes: 1 addition & 1 deletion input/commands/connector/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ links:

<section>

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>Waits for</th><td>Ready</td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

</section>

Expand Down
2 changes: 1 addition & 1 deletion input/commands/connector/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ links:

Display the status of connectors in the current site.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>Waits for</th><td>Ready</td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

</section>

Expand Down
14 changes: 12 additions & 2 deletions input/commands/connector/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ links:

Update a connector.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>Waits for</th><td>Ready</td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>Waits for</th><td>Configured</td></table>

</section>

Expand All @@ -35,7 +35,7 @@ skupper connector update <name> <port> [options]

~~~ console
Waiting for update to complete...
Connector "<name>" is updated.
Connector "<name>" is configured.
~~~

</section>
Expand Down Expand Up @@ -76,6 +76,16 @@ skupper connector update backend --port 9090 --output yaml
</td></tr><tr><th><code>yaml</code></th><td><p>Produce YAML output</p>
</td></tr></table></td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

- <h3 id="wait">--wait <span class="attribute-info">string</span></h3>

Wait for the given status before exiting.

<table class="fields"><tr><th>Default</th><td><p><code>ready</code></p>
</td><tr><th>Choices</th><td><table class="choices"><tr><th><code>pending</code></th><td><p>Pending</p>
</td></tr><tr><th><code>configured</code></th><td><p>Configured</p>
</td></tr><tr><th><code>ready</code></th><td><p>Ready</p>
</td></tr></table></td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

- <h3 id="timeout">--timeout <span class="attribute-info">string (duration)</span></h3>

Raise an error if the operation does not complete in the given
Expand Down
2 changes: 1 addition & 1 deletion input/commands/debug/dump.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body_class: object command

Generate a debug dump file.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>Waits for</th><td>Ready</td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

</section>

Expand Down
2 changes: 1 addition & 1 deletion input/commands/debug/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body_class: object command

<section>

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>Waits for</th><td>Ready</td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

</section>

Expand Down
10 changes: 5 additions & 5 deletions input/commands/link/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ Link "<name>" is ready.

- <h3 id="wait">--wait <span class="attribute-info">string</span></h3>

Set the resource status that the command waits for before
exiting.
Wait for the given status before exiting.

<table class="fields"><tr><th>Choices</th><td><table class="choices"><tr><th><code>pending</code></th><td><p>XXX</p>
</td></tr><tr><th><code>configured</code></th><td><p>XXX</p>
</td></tr><tr><th><code>ready</code></th><td><p>XXX</p>
<table class="fields"><tr><th>Default</th><td><p><code>ready</code></p>
</td><tr><th>Choices</th><td><table class="choices"><tr><th><code>pending</code></th><td><p>Pending</p>
</td></tr><tr><th><code>configured</code></th><td><p>Configured</p>
</td></tr><tr><th><code>ready</code></th><td><p>Ready</p>
</td></tr></table></td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

- <h3 id="timeout">--timeout <span class="attribute-info">string (duration)</span></h3>
Expand Down
4 changes: 2 additions & 2 deletions input/commands/link/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ links:

Delete a link.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>Waits for</th><td>Ready</td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>Waits for</th><td>Deletion</td></table>

</section>

Expand All @@ -32,7 +32,7 @@ skupper link delete <name> [options]
## Output

~~~ console
Waiting for deletion to complete...
Waiting for deletion...
Link "<name>" is deleted.
~~~

Expand Down
2 changes: 1 addition & 1 deletion input/commands/link/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ links:

<section>

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>Waits for</th><td>Ready</td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

</section>

Expand Down
2 changes: 1 addition & 1 deletion input/commands/link/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ links:

Display the status of links in the current site.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>Waits for</th><td>Ready</td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

</section>

Expand Down
Loading

0 comments on commit beb0174

Please sign in to comment.