Skip to content

Commit 79bbe69

Browse files
author
colombos
committed
docs: separate coverage from readme
1 parent ce95d9a commit 79bbe69

6 files changed

Lines changed: 50 additions & 122 deletions

File tree

.doc/resource-coverage/coverage.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Coverage
2+
3+
___COVERAGE_PLACEHOLDER___
4+
5+
## List
6+
7+
___LIST_PLACEHOLDER___
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
use /home/runner/work/nuke/nuke/fmt/mod.nu
2+
3+
let res = open .github/kube-resources/resources.yaml
4+
| where {'get' in ($in.verbs? | default [])}
5+
6+
let formatters = mod supported-formatters
7+
let unwilling_to_support = open .github/kube-resources/unwilling_to_support.yaml
8+
9+
let coverage = $res | group-by group --to-table | each {|group|
10+
let total = $group.items | length
11+
let supported_formatters = $formatters | where {|formatter| $formatter in $group.items.singularName}
12+
let supported_number = $supported_formatters | length
13+
let not_yet_supported_number = $total - $supported_number
14+
let unwilling_to_support_formatters = $unwilling_to_support | where {|formatter| $formatter in $group.items.singularName}
15+
let unwilling_to_support_number = $unwilling_to_support_formatters | length
16+
17+
let graph = open -r .github/templates/readme/resource-coverage.mmd
18+
| str replace ___SUPPORTED___ ($supported_number | into string)
19+
| str replace ___UNSUPPORTED___ ($not_yet_supported_number | into string)
20+
| str replace ___UNWILLING___ ($unwilling_to_support_number | into string)
21+
22+
let list = $group.items | each {|item|
23+
if ($item.names | any {$in in $supported_formatters}) {
24+
$"| ($item.name) | 🟢 |"
25+
} else if ($item.names | any {$in in $unwilling_to_support_formatters}) {
26+
$"| ($item.name) | 🔴 |"
27+
} else {
28+
$"| ($item.name) | ⚪ |"
29+
}
30+
} | str join "\n"
31+
32+
33+
$"### ($group.group)\n\n($graph)\n\n($list)"
34+
}
35+
36+
$"# Coverage\n\n($coverage)"
37+
| save -f .doc/resource-coverage/coverage.md

.github/scripts/generate-readme.nu

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/templates/readme/readme.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ A Nushell-native kubernetes toolkit
77

88
---
99

10-
**Nuke** natively brings Kubernetes resource inspection to [Nushell](https://www.nushell.sh/).
11-
It exposes kubectl-like commands that query the Kubernetes API-Server and return results the Nushell way.
10+
**Nuke** natively brings Kubernetes resource inspection to Nushell: it exposes kubectl-like commands that query the Kubernetes API-Server and return results the Nushell way.
1211

1312
Nuke **aims** to return data that is structured, queryable and typed, enabling you to execute commands like
1413
```nu

.github/workflows/readme.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ on:
66
- main
77
paths:
88
- ".github/workflows/readme.yml"
9-
- ".github/templates/readme/*"
10-
- ".github/scripts/generate-readme.nu"
9+
- ".github/scripts/generate-coverage.nu"
1110
- ".doc/resources/*"
12-
- "fmt/formatters.nu"
11+
- "fmt/resources/*.nu"
1312

1413
defaults:
1514
run:
@@ -33,7 +32,7 @@ jobs:
3332

3433
- name: Generate Readme
3534
run: |
36-
nu .github/scripts/generate-readme.nu
35+
nu .github/scripts/generate-coverage.nu
3736
3837
- name: Commit & push changes
3938
run: |

README.md

Lines changed: 2 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ A Nushell-native kubernetes toolkit
77

88
---
99

10-
**Nuke** natively brings Kubernetes resource inspection to [Nushell](https://www.nushell.sh/).
11-
It exposes kubectl-like commands that query the Kubernetes API-Server and return results the Nushell way.
10+
**Nuke** natively brings Kubernetes resource inspection to Nushell: it exposes kubectl-like commands that query the Kubernetes API-Server and return results the Nushell way.
1211

1312
Nuke **aims** to return data that is structured, queryable and typed, enabling you to execute commands like
1413
```nu
@@ -53,6 +52,7 @@ All flags, resources and resource names support autocompletion.
5352

5453
> **Note:** Nuke is under active development.
5554
> Not all resources currently support `compact` and `wide` formats — when unavailable, Nuke falls back to `full`.
55+
> You can see [here](.doc/resource-coverage/coverage.md) the list of supported formatters for the `nuke get` method.
5656
5757
### Set-Context and Set-Namespace
5858
The config module provides two methods to switch current context and current namespace using nushell input and autoocmpletion functionalities.
@@ -121,8 +121,6 @@ Planned:
121121
- OIDC
122122
- Exec plugins
123123

124-
---
125-
126124
## Contributing
127125

128126
Contributions, bug reports, and feature requests are truly welcome.
@@ -146,78 +144,3 @@ Please open an issue or pull request if you’d like to help improve Nuke.
146144
- [ ] Implement additional authentication methods:
147145
- [ ] OIDC
148146
- [ ] Exec plugins
149-
150-
# Resources Implementation Status
151-
152-
### Coverage
153-
154-
```mermaid
155-
pie title Resource Coverage
156-
"supported" : 44
157-
"unsupported" : 13
158-
"unwilling to support" : 2
159-
160-
```
161-
162-
### List
163-
164-
| Resource | Status |
165-
|-----------------|--------|
166-
| apiservices | 🟢 |
167-
| certificatesigningrequests ||
168-
| clusterrolebindings | 🟢 |
169-
| clusterroles | 🟢 |
170-
| componentstatuses | 🔴 |
171-
| configmaps | 🟢 |
172-
| controllerrevisions | 🟢 |
173-
| cronjobs | 🟢 |
174-
| csidrivers | 🟢 |
175-
| csinodes ||
176-
| csistoragecapacities ||
177-
| customresourcedefinitions | 🟢 |
178-
| daemonsets | 🟢 |
179-
| deployments | 🟢 |
180-
| deviceclasses | 🟢 |
181-
| endpoints | 🔴 |
182-
| endpointslices | 🟢 |
183-
| events | 🟢 |
184-
| flowschemas | 🟢 |
185-
| horizontalpodautoscalers | 🟢 |
186-
| ingressclasses | 🟢 |
187-
| ingresses | 🟢 |
188-
| ipaddresses | 🟢 |
189-
| jobs | 🟢 |
190-
| leases ||
191-
| limitranges | 🟢 |
192-
| mutatingwebhookconfigurations ||
193-
| namespaces | 🟢 |
194-
| networkpolicies | 🟢 |
195-
| nodes | 🟢 |
196-
| persistentvolumeclaims | 🟢 |
197-
| persistentvolumes | 🟢 |
198-
| poddisruptionbudgets | 🟢 |
199-
| pods | 🟢 |
200-
| podtemplates | 🟢 |
201-
| priorityclasses | 🟢 |
202-
| prioritylevelconfigurations | 🟢 |
203-
| replicasets | 🟢 |
204-
| replicationcontrollers ||
205-
| resourceclaims ||
206-
| resourceclaimtemplates | 🟢 |
207-
| resourcequotas | 🟢 |
208-
| resourceslices ||
209-
| rolebindings | 🟢 |
210-
| roles | 🟢 |
211-
| runtimeclasses | 🟢 |
212-
| secrets | 🟢 |
213-
| serviceaccounts | 🟢 |
214-
| servicecidrs | 🟢 |
215-
| services | 🟢 |
216-
| statefulsets | 🟢 |
217-
| storageclasses | 🟢 |
218-
| validatingadmissionpolicies ||
219-
| validatingadmissionpolicybindings ||
220-
| validatingwebhookconfigurations ||
221-
| volumeattachments | 🟢 |
222-
| volumeattributesclasses | 🟢 |
223-

0 commit comments

Comments
 (0)