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'"
SELECT namespace1, namespace2
FROM context1, context2
WHERE pod.status.phase = 'Running' AND deployment.metadata.name = 'my-awesome-deployment'
+----------------+---------------------------------+---------------------------------+
| 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 | |
| | +--------------+--------------+ | +--------------+--------------+ |
+----------------+---------------------------------+---------------------------------+
- Printer should not insert
pod
row if does not given in WHERE
statement
- Printer should not insert
deployment
row if does not given in WHERE
statement