Skip to content

Commit

Permalink
Update reference docs and book for kpt live
Browse files Browse the repository at this point in the history
  • Loading branch information
mortent committed Jan 12, 2022
1 parent 2ca7220 commit a2e60aa
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 36 deletions.
54 changes: 40 additions & 14 deletions site/book/06-deploying-packages/02-applying-a-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@ deployment.apps/wordpress-mysql created
persistentvolumeclaim/mysql-pv-claim created
persistentvolumeclaim/wp-pv-claim created
6 resource(s) applied. 6 created, 0 unchanged, 0 configured, 0 failed
0 resource(s) pruned, 0 skipped, 0 failed
service/wordpress reconcile pending
service/wordpress-mysql reconcile pending
deployment.apps/wordpress reconcile pending
deployment.apps/wordpress-mysql reconcile pending
persistentvolumeclaim/mysql-pv-claim reconcile pending
persistentvolumeclaim/wp-pv-claim reconcile pending
service/wordpress reconciled
service/wordpress-mysql reconciled
persistentvolumeclaim/mysql-pv-claim reconciled
persistentvolumeclaim/wp-pv-claim reconciled
deployment.apps/wordpress-mysql reconciled
deployment.apps/wordpress reconciled
6 resource(s) reconciled, 0 skipped, 0 failed to reconcile, 0 timed out
```

?> Refer to the [apply command reference][apply-doc] for usage.
Expand Down Expand Up @@ -58,14 +70,15 @@ would see that 6 resources would be created:

```shell
$ kpt live apply wordpress --dry-run
service/wordpress created (dry-run)
service/wordpress-mysql created (dry-run)
deployment.apps/wordpress created (dry-run)
deployment.apps/wordpress-mysql created (dry-run)
persistentvolumeclaim/mysql-pv-claim created (dry-run)
persistentvolumeclaim/wp-pv-claim created (dry-run)
6 resource(s) applied. 6 created, 0 unchanged, 0 configured, 0 failed (dry-run)
0 resource(s) pruned, 0 skipped, 0 failed (dry-run)
Dry-run strategy: client
service/wordpress created
service/wordpress-mysql created
deployment.apps/wordpress created
deployment.apps/wordpress-mysql created
persistentvolumeclaim/mysql-pv-claim created
persistentvolumeclaim/wp-pv-claim created
6 resource(s) applied. 6 created, 0 unchanged, 0 configured, 0 failed
0 resource(s) pruned, 0 skipped, 0 failed
```

When combined with server-side apply, the resources in the package pass through
Expand All @@ -77,12 +90,12 @@ After you have deployed the package, you can get its current status at any time:

```shell
$ kpt live status wordpress
deployment.apps/wordpress is InProgress: Available: 0/1
persistentvolumeclaim/wp-pv-claim is InProgress: PVC is not Bound. phase: Pending
service/wordpress is Current: Service is ready
service/wordpress-mysql is Current: Service is ready
deployment.apps/wordpress is Current: Deployment is available. Replicas: 1
deployment.apps/wordpress-mysql is Current: Deployment is available. Replicas: 1
persistentvolumeclaim/mysql-pv-claim is Current: PVC is Bound
deployment.apps/wordpress-mysql is InProgress: Available: 0/1
service/wordpress is Current: Service is ready
persistentvolumeclaim/wp-pv-claim is Current: PVC is Bound
```

?> Refer to the [status command reference][status-doc] for usage.
Expand All @@ -100,7 +113,20 @@ deployment.apps/wordpress-mysql deleted
deployment.apps/wordpress deleted
service/wordpress-mysql deleted
service/wordpress deleted
6 resource(s) deleted, 0 skipped
6 resource(s) deleted, 0 skipped, 0 failed to delete
persistentvolumeclaim/wp-pv-claim reconcile pending
persistentvolumeclaim/mysql-pv-claim reconcile pending
deployment.apps/wordpress-mysql reconcile pending
deployment.apps/wordpress reconcile pending
service/wordpress-mysql reconcile pending
service/wordpress reconcile pending
deployment.apps/wordpress-mysql reconciled
deployment.apps/wordpress reconciled
service/wordpress-mysql reconciled
service/wordpress reconciled
persistentvolumeclaim/mysql-pv-claim reconciled
persistentvolumeclaim/wp-pv-claim reconciled
6 resource(s) reconciled, 0 skipped, 0 failed to reconcile, 0 timed out
```

?> Refer to the [destroy command reference][destroy-doc] for usage.
Expand Down
35 changes: 19 additions & 16 deletions site/book/06-deploying-packages/03-handling-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,18 @@ and `Service` are created and reconciled before the Wordpress `Deployment` and `
$ kpt live apply wordpress-with-dependencies --reconcile-timeout=2m
service/wordpress-mysql created
statefulset.apps/wordpress-mysql created
2 resource(s) applied. 2 created, 0 unchanged, 0 configured, 0 failed
statefulset.apps/wordpress-mysql is NotFound: Resource not found
service/wordpress-mysql is NotFound: Resource not found
service/wordpress-mysql is Current: Service is ready
statefulset.apps/wordpress-mysql is InProgress: Ready: 0/1
statefulset.apps/wordpress-mysql is InProgress: Ready: 0/1
statefulset.apps/wordpress-mysql is Current: Partition rollout complete. updated: 1
deployment.apps/wordpress created
service/wordpress-mysql reconcile pending
statefulset.apps/wordpress-mysql reconcile pending
service/wordpress-mysql reconciled
statefulset.apps/wordpress-mysql reconciled
service/wordpress created
2 resource(s) applied. 2 created, 0 unchanged, 0 configured, 0 failed
deployment.apps/wordpress is NotFound: Resource not found
service/wordpress is NotFound: Resource not found
service/wordpress is Current: Service is ready
deployment.apps/wordpress is InProgress: Available: 0/1
deployment.apps/wordpress is Current: Deployment is available. Replicas: 1
deployment.apps/wordpress created
4 resource(s) applied. 4 created, 0 unchanged, 0 configured, 0 failed
service/wordpress reconcile pending
deployment.apps/wordpress reconcile pending
service/wordpress reconciled
deployment.apps/wordpress reconciled
4 resource(s) reconciled, 0 skipped, 0 failed to reconcile, 0 timed out
```

When you delete the package from the cluster, you can see that
Expand All @@ -74,10 +71,16 @@ resources are deleted in reverse order:
$ kpt live destroy wordpress-with-dependencies
deployment.apps/wordpress deleted
service/wordpress deleted
2 resource(s) deleted, 0 skipped
deployment.apps/wordpress reconciled
service/wordpress reconciled
statefulset.apps/wordpress-mysql deleted
service/wordpress-mysql deleted
2 resource(s) deleted, 0 skipped
4 resource(s) deleted, 0 skipped, 0 failed to delete
statefulset.apps/wordpress-mysql reconcile pending
service/wordpress-mysql reconcile pending
statefulset.apps/wordpress-mysql reconciled
service/wordpress-mysql reconciled
4 resource(s) reconciled, 0 skipped, 0 failed to reconcile, 0 timed out
```

See [depends-on] for more information.
Expand Down
18 changes: 12 additions & 6 deletions site/reference/cli/live/apply/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,24 @@ PKG_PATH | -:
--prune-timeout:
The threshold for how long to wait for all pruned resources to be
deleted before giving up. If this flag is not set, kpt live apply will not
wait. In most cases, it would also make sense to set the
deleted before giving up. If this flag is not set, kpt live apply will wait
until interrupted. In most cases, it would also make sense to set the
--prune-propagation-policy to Foreground when this flag is set.
--reconcile-timeout:
The threshold for how long to wait for all resources to reconcile before
giving up. If this flag is not set, kpt live apply will not wait for
resources to reconcile.
giving up. If this flag is not set, kpt live apply will wait until
interrupted.
--server-side:
Perform the apply operation server-side rather than client-side.
Default value is false (client-side).
--status-events:
The output will include the details on the reconciliation status
for all resources.
Does not apply for the `table` output format.
```

<!--mdtogo-->
Expand All @@ -114,8 +120,8 @@ $ kpt live apply
```

```shell
# apply resources in the my-dir directory and wait for all the resources to be
# reconciled before pruning
# apply resources in the my-dir directory and wait up until 15 minutes
# for all the resources to be reconciled before pruning
$ kpt live apply --reconcile-timeout=15m my-dir
```

Expand Down
6 changes: 6 additions & 0 deletions site/reference/cli/live/destroy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ PKG_PATH | -:
as the status of resources become available.
The default value is ‘events’.
--status-events:
The output will include the details on the reconciliation status
for all resources.
Does not apply for the `table` output format.
```

<!--mdtogo-->
Expand Down

0 comments on commit a2e60aa

Please sign in to comment.