Skip to content

Commit

Permalink
Update kanister docs (kanisterio#2684)
Browse files Browse the repository at this point in the history
Updated Kansiter docs to describe ActionSet and Blueprint Events
#k10-801
  • Loading branch information
SupriyaKasten authored Apr 6, 2018
1 parent 5639056 commit a37fee5
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,18 @@ Similarly, we can also delete the backup file using the following `kanctl` comma
# View the actionset
$ kubectl --namespace kanister get actionset delete-s3backup-j4z6f-2jj9n -oyaml
During execution, Kanister controller emits events to the respective ActionSets.
In above example, the execution transitions of ActionSet `s3backup-j4z6f` can be
seen by using the following command:

.. code-block:: bash
$ kubectl --namespace kanister describe actionset s3backup-j4z6f
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Started Action 23s Kanister Controller Executing action backup
Normal Started Phase 23s Kanister Controller Executing phase backupToS3
Normal Update Complete 19s Kanister Controller Updated ActionSet 's3backup-j4z6f' Status->complete
Normal Ended Phase 19s Kanister Controller Completed phase backupToS3
23 changes: 23 additions & 0 deletions docs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@
Troubleshooting
***************

If an ActionSet fails to perform an action, then the failure events can be seen
in the respective ActionSet as well as its associated Blueprint by using the
following commands:

.. code-block:: bash
# Example of failure events in an ActionSet:
$ kubectl --namespace kanister describe actionset <ActionSet Name>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Started Action 14s Kanister Controller Executing action delete
Normal Started Phase 14s Kanister Controller Executing phase deleteFromS3
Warning ActionSetFailed Action: delete 13s Kanister Controller Failed to run phase 0 of action delete: command terminated with exit code 1
# Example of failure events of ActionSet emitted to its associated Blueprint:
$ kubectl --namespace kanister describe blueprint <Blueprint Name>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Added 4m Kanister Controller Added blueprint 'Blueprint Name'
Warning ActionSetFailed Action: delete 1m Kanister Controller Failed to run phase 0 of action delete: command terminated with exit code 1
If you ever need to debug a live Kanister system and the information
available in ActionSets you might have created is not enough, looking
at the Kanister controller logs might help. Assuming you have deployed
Expand Down
26 changes: 26 additions & 0 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ First Blueprint
- echo /var/log/time.log
EOF
Once we create a Blueprint, we can see its events by using the following command:

.. code-block:: yaml
$ kubectl --namespace kanister describe Blueprint time-log-bp
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Added 4m Kanister Controller Added blueprint time-log-bp
The next CustomResource we'll deploy is an ActionSet. An ActionSet is created
each time you want to execute any Kanister actions. The ActionSet contains all
the runtime information the controller needs during execution. It may contain
Expand Down Expand Up @@ -152,6 +162,22 @@ look at the updated status of the ActionSet and tail the controller logs.
# check the controller log
$ kubectl --namespace kanister get pod -l app=kanister-operator
During execution, Kanister controller emits events to the respective ActionSets.
The execution transitions of an ActionSet can be seen by using the following command:

.. code-block:: bash
$ kubectl --namespace kanister describe actionset <ActionSet Name>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Started Action 23s Kanister Controller Executing action backup
Normal Started Phase 23s Kanister Controller Executing phase backupToS3
Normal Update Complete 19s Kanister Controller Updated ActionSet 'ActionSet Name' Status->complete
Normal Ended Phase 19s Kanister Controller Completed phase backupToS3
In case of an action failure, the Kanister controller will emit failure events to both
the ActionSet and its associated Blueprint.

Consuming ConfigMaps
====================
Expand Down

0 comments on commit a37fee5

Please sign in to comment.