-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add include snippet for checking conditions
- Loading branch information
Showing
8 changed files
with
44 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% assign name = include.name %} | ||
{% assign kind = include.kind %} | ||
{% assign conditionType = include.conditionType | default: "Programmed" %} | ||
{% assign reason = include.reason | default: "Programmed" %} | ||
{% assign generation = include.generation | default: 1 %} | ||
|
||
{% unless include.disableDescription %} | ||
You can verify the `{{ kind }}` was reconciled successfully by checking its `{{ conditionType }}` condition. | ||
{% endunless %} | ||
|
||
```shell | ||
kubectl get {{ kind | downcase }} {{ name }} -o=jsonpath='{.status.conditions[?(@.type=="{{ conditionType }}")]}' | jq | ||
``` | ||
|
||
The output should look similar to this: | ||
|
||
```console | ||
{ | ||
"observedGeneration": {{ generation }}, | ||
"reason": "{{ reason }}", | ||
"status": "True", | ||
"type": "{{ conditionType }}" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.