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 ab4963f commit 524072f
Show file tree
Hide file tree
Showing 41 changed files with 474 additions and 212 deletions.
28 changes: 26 additions & 2 deletions config/commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ options:
description: Produce JSON output
- name: yaml
description: Produce YAML output
create/wait:
name: wait
type: string
description: |
Set the resource status that the command waits for before
exiting.
choices:
- name: pending
description: XXX
- name: configured
description: XXX
- name: ready
description: XXX
create/timeout:
name: timeout
type: string
Expand Down Expand Up @@ -312,6 +325,15 @@ commands:
- message: No site resource exists
description: |
There is no existing Skupper site resource to delete.
- name: start
description: Start the Skupper router for the current site
platforms: [Docker, Podman, Systemd]
- name: stop
description: Stop the Skupper router for the current site
platforms: [Docker, Podman, Systemd]
- name: reload
description: Reload the site configuration
platforms: [Docker, Podman, Systemd]
- name: token
resource: Claim
related_concepts: ["access grant", "access token"]
Expand Down Expand Up @@ -454,6 +476,7 @@ commands:
inherit_options: [global/*]
subcommands:
- name: create
wait: Configured
related_commands: [listener/create]
description: |
Create a connector.
Expand All @@ -468,7 +491,7 @@ commands:
skupper connector create backend 8080 --output yaml
output: |
Waiting for status...
Connector "<name>" is ready.
Connector "<name>" is configured.
inherit_options: [create/*, connector/*, context/*, global/*]
options:
- name: name
Expand Down Expand Up @@ -528,6 +551,7 @@ commands:
inherit_options: [global/*]
subcommands:
- name: create
wait: Configured
related_commands: [connector/create]
description: |
Create a listener.
Expand All @@ -542,7 +566,7 @@ commands:
skupper listener create backend 8080 --output yaml
output: |
Waiting for status...
Listener "<name>" is ready.
Listener "<name>" is configured.
inherit_options: [create/*, listener/*, context/*, global/*]
- name: status
description: |
Expand Down
38 changes: 25 additions & 13 deletions input/commands/connector/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ links:

Create a connector.

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

</section>

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

~~~ console
Waiting for status...
Connector "<name>" is ready.
Connector "<name>" is configured.
~~~

</section>
Expand Down Expand Up @@ -63,13 +65,13 @@ skupper connector create backend 8080 --output yaml

The name of the resource to be created.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker</td><tr><th>See also</th><td><a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names/">Kubernetes object names</a></td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>See also</th><td><a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names/">Kubernetes object names</a></td></table>

- <h3 id="port">port <span class="attribute-info">integer, required</span></h3>

The port on the target workload to forward traffic to.

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

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

Expand All @@ -78,15 +80,25 @@ skupper connector create backend 8080 --output yaml

<table class="fields"><tr><th>Choices</th><td><table class="choices"><tr><th><code>json</code></th><td><p>Produce JSON output</p>
</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</td></table>
</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
period of time.

<table class="fields"><tr><th>Default</th><td><p><code>60s</code></p>
</td><tr><th>Platforms</th><td>Kubernetes, Docker</td></table>
</td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

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

Expand All @@ -96,22 +108,22 @@ skupper connector create backend 8080 --output yaml
have matching routing keys.

<table class="fields"><tr><th>Default</th><td><p><em>Value of name</em></p>
</td><tr><th>Platforms</th><td>Kubernetes, Docker</td><tr><th>See also</th><td><a href="/concepts/routing-key.html">Routing key concept</a></td></table>
</td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

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

The hostname or IP address of the server. This is an
alternative to `selector` for specifying the target
server.

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

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

The connector type.

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

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

Expand All @@ -122,7 +134,7 @@ skupper connector create backend 8080 --output yaml
alternative, you can use `host`.

<table class="fields"><tr><th>Default</th><td><p><code>app=[value-of-name]</code></p>
</td><tr><th>Platforms</th><td>Kubernetes</td><tr><th>See also</th><td><a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors">Kubernetes label selectors</a>, <a href="https://kubernetes.io/docs/concepts/workloads/pods/">Kubernetes pods</a></td></table>
</td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

- <h3 id="workload">--workload <span class="attribute-info">string (resource name)</span></h3>

Expand All @@ -139,13 +151,13 @@ skupper connector create backend 8080 --output yaml
If set, include server pods that are not in the ready
state.

<table class="fields"><tr><th>Default</th><td>False</td><tr><th>Platforms</th><td>Kubernetes</td><tr><th>See also</th><td><a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/">Kubernetes pod lifecycle</a></td></table>
<table class="fields"><tr><th>Default</th><td>False</td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

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

Set the namespace.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker</td><tr><th>See also</th><td><a href="/concepts/namespace.html">Namespace concept</a>, <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/">Kubernetes namespaces</a></td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>See also</th><td><a href="/concepts/namespace.html">Namespace concept</a>, <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/">Kubernetes namespaces</a></td></table>

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

Expand All @@ -165,12 +177,12 @@ skupper connector create backend 8080 --output yaml

<table class="fields"><tr><th>Choices</th><td><table class="choices"><tr><th><code>kubernetes</code></th><td><p>Kubernetes</p>
</td></tr><tr><th><code>docker</code></th><td><p>Docker or Podman</p>
</td></tr></table></td><tr><th>Platforms</th><td>Kubernetes, Docker</td><tr><th>See also</th><td><a href="/concepts/platform.html">Platform concept</a></td></table>
</td></tr></table></td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>See also</th><td><a href="/concepts/platform.html">Platform concept</a></td></table>

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

Display help and exit.

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

</section>
12 changes: 7 additions & 5 deletions input/commands/connector/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ 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>

</section>

<section>
Expand Down Expand Up @@ -46,21 +48,21 @@ Connector "<name>" is deleted.

The name of the resource to be deleted.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker</td><tr><th>See also</th><td><a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names/">Kubernetes object names</a></td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>See also</th><td><a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names/">Kubernetes object names</a></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
period of time.

<table class="fields"><tr><th>Default</th><td><p><code>60s</code></p>
</td><tr><th>Platforms</th><td>Kubernetes, Docker</td></table>
</td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

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

Set the namespace.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker</td><tr><th>See also</th><td><a href="/concepts/namespace.html">Namespace concept</a>, <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/">Kubernetes namespaces</a></td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>See also</th><td><a href="/concepts/namespace.html">Namespace concept</a>, <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/">Kubernetes namespaces</a></td></table>

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

Expand All @@ -80,12 +82,12 @@ Connector "<name>" is deleted.

<table class="fields"><tr><th>Choices</th><td><table class="choices"><tr><th><code>kubernetes</code></th><td><p>Kubernetes</p>
</td></tr><tr><th><code>docker</code></th><td><p>Docker or Podman</p>
</td></tr></table></td><tr><th>Platforms</th><td>Kubernetes, Docker</td><tr><th>See also</th><td><a href="/concepts/platform.html">Platform concept</a></td></table>
</td></tr></table></td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>See also</th><td><a href="/concepts/platform.html">Platform concept</a></td></table>

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

Display help and exit.

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

</section>
2 changes: 2 additions & 0 deletions input/commands/connector/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ links:

<section>

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

</section>

<section>
Expand Down
14 changes: 8 additions & 6 deletions input/commands/connector/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ 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>

</section>

<section>
Expand Down Expand Up @@ -56,29 +58,29 @@ Listeners: 1
An optional resource name. If set, the status command reports
status for the named resource only.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker</td><tr><th>See also</th><td><a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names/">Kubernetes object names</a></td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>See also</th><td><a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names/">Kubernetes object names</a></td></table>

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

Print status to the console in a structured output format.

<table class="fields"><tr><th>Choices</th><td><table class="choices"><tr><th><code>json</code></th><td><p>Produce JSON output</p>
</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</td></table>
</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
period of time.

<table class="fields"><tr><th>Default</th><td><p><code>60s</code></p>
</td><tr><th>Platforms</th><td>Kubernetes, Docker</td></table>
</td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td></table>

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

Set the namespace.

<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker</td><tr><th>See also</th><td><a href="/concepts/namespace.html">Namespace concept</a>, <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/">Kubernetes namespaces</a></td></table>
<table class="fields"><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>See also</th><td><a href="/concepts/namespace.html">Namespace concept</a>, <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/">Kubernetes namespaces</a></td></table>

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

Expand All @@ -98,12 +100,12 @@ Listeners: 1

<table class="fields"><tr><th>Choices</th><td><table class="choices"><tr><th><code>kubernetes</code></th><td><p>Kubernetes</p>
</td></tr><tr><th><code>docker</code></th><td><p>Docker or Podman</p>
</td></tr></table></td><tr><th>Platforms</th><td>Kubernetes, Docker</td><tr><th>See also</th><td><a href="/concepts/platform.html">Platform concept</a></td></table>
</td></tr></table></td><tr><th>Platforms</th><td>Kubernetes, Docker, Podman, Systemd</td><tr><th>See also</th><td><a href="/concepts/platform.html">Platform concept</a></td></table>

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

Display help and exit.

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

</section>
Loading

0 comments on commit 524072f

Please sign in to comment.