Skip to content

Commit

Permalink
Merge pull request #2357 from replicatedhq/joshd/cmx-support-name-flag
Browse files Browse the repository at this point in the history
Support for name flag when updating ttl
  • Loading branch information
jdewinne committed May 16, 2024
2 parents c9cd07b + 90397fb commit 5844392
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/reference/replicated-cli-cluster-update-ttl.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ For more information, see [About the Compatibility Matrix](/vendor/testing-about
replicated cluster update ttl [ID] [flags]
```

The `cluster update ttl` command first looks for the target cluster based on the value supplied for `[ID]`. If `[ID]` is not specified, the command looks for the first matching cluster with the same name as specified by the `--name` flag. If `--name` is also not provided, then the command looks for a cluster with the same ID as specified by the `--id` flag.

<table>
<tr>
<th width="30%">Flag</th>
Expand All @@ -28,6 +30,20 @@ replicated cluster update ttl [ID] [flags]
<p>The updated TTL for the cluster, in hours or minutes. Must be a duration longer than the current lifespan of the cluster. <strong>Valid values:</strong> 10m through 48h. For example, <code>15h</code> or <code>120min</code>.</p>
</td>
</tr>
<tr>
<td><code>--id</code></td>
<td>string</td>
<td>
<p>ID of the cluster to update TTL (when <code>--name</code> is not provided).</p>
</td>
</tr>
<tr>
<td><code>--name</code></td>
<td>string</td>
<td>
<p>Name of the cluster to update TTL.</p>
</td>
</tr>
</table>

## Example
Expand All @@ -39,10 +55,19 @@ replicated cluster ls 81cd2169
ID NAME DISTRIBUTION VERSION STATUS CREATED EXPIRES TAGS
81cd2169 gallant_fermat gke 1.27 running 2023-12-15 19:16:56 +0000 UTC 2023-12-15 20:21:35 +0000 UTC
```

Update the TTL to two hours:

```bash
replicated cluster update ttl 81cd2169 --ttl 2h
ID NAME DISTRIBUTION VERSION STATUS CREATED EXPIRES TAGS
81cd2169 gallant_fermat gke 1.27 running 2023-12-15 19:16:56 +0000 UTC 2023-12-15 21:21:35 +0000 UTC
```

Update the TTL to two hours using the cluster name:

```bash
replicated cluster update ttl --name gallant_fermat --ttl 2h
ID NAME DISTRIBUTION VERSION STATUS CREATED EXPIRES TAGS
81cd2169 gallant_fermat gke 1.27 running 2023-12-15 19:16:56 +0000 UTC 2023-12-15 21:21:35 +0000 UTC
```

0 comments on commit 5844392

Please sign in to comment.