Releases: Dentrax/kubesql
Releases · Dentrax/kubesql
v0.1.0
v0.1.0
- Implement sqlparser
- Implement kube-rs
- Implement prettytable-rs
- Validate if given namespace(s) and context(s) are really exist
- Implement base CLI flags
-f, --file
and-q, --query
$ k8sql --file kube.sql
$ k8sql --query "SELECT namespace FROM context WHERE pod.status.phase = 'Running'"
- This should work:
SELECT namespace1, namespace2
FROM context1, context2
WHERE pod.status.phase = 'Running' AND deployment.metadata.name = 'my-awesome-deployment'
- It should print:
+----------------+---------------------------------+---------------------------------+
| KIND / CONTEXT | context1 | context2 |
+----------------+---------------------------------+---------------------------------+
| pod | +-------+-------+ | +-------+-------+ |
| | | ns1 | ns2 | | | ns1 | ns2 | |
| | +-------+-------+ | +-------+-------+ |
| | | pod-1 | pod-1 | | | pod-2 | pod-2 | |
| | +-------+-------+ | +-------+-------+ |
+----------------+---------------------------------+---------------------------------+
| deployment | +--------------+--------------+ | +--------------+--------------+ |
| | | ns1 | ns2 | | | ns1 | ns2 | |
| | +--------------+--------------+ | +--------------+--------------+ |
| | | deployment-1 | deployment-1 | | | deployment-2 | deployment-2 | |
| | +--------------+--------------+ | +--------------+--------------+ |
+----------------+---------------------------------+---------------------------------+
- Print conditions:
- Printer should not insert
pod
row if does not given inWHERE
statement - Printer should not insert
deployment
row if does not given inWHERE
statement