Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display summary data per deployment #296

Open
vishnusomank opened this issue Mar 23, 2023 · 0 comments
Open

Display summary data per deployment #296

vishnusomank opened this issue Mar 23, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@vishnusomank
Copy link
Contributor

The karmor summary command return summary data per pod. This will become difficult and noisy if the user selects a namespace with multiple pods for the same deployment/replicasets.
Eg: WordPress deployment with 6 replicas

kubectl -n wordpress-mysql get po

NAME                         READY   STATUS             RESTARTS      AGE
wordpress-787f45786f-9nddp   1/1     Running            0             2m5s
wordpress-787f45786f-28vbs   1/1     Running            0             2m5s
wordpress-787f45786f-v4v2s   1/1     Running            0             2m5s
wordpress-787f45786f-nmrvb   1/1     Running            0             2m5s
wordpress-787f45786f-hgksb   1/1     Running            0             2m5s
wordpress-787f45786f-tspm8   1/1     Running            0             2m5s
mysql-76ddc6ddc4-2sc65       0/1     CrashLoopBackOff   4 (28s ago)   2m5s

When we do karmor summary on namespace wordpress-mysql we'll get multiple tables with data

  Pod Name        wordpress-787f45786f-4x8cj  
  Namespace Name  wordpress-mysql             
  Cluster Name    default                     
  Container Name  wordpress                   
  Labels          app=wordpress               

File Data
+--------------------+-----------------------+-------+------------------------------+--------+
|    SRC PROCESS     | DESTINATION FILE PATH | COUNT |      LAST UPDATED TIME       | STATUS |
+--------------------+-----------------------+-------+------------------------------+--------+
| /usr/local/bin/php | /etc/hosts            | 7     | Thu Mar 23 13:40:29 UTC 2023 | Allow  |
+--------------------+-----------------------+-------+------------------------------+--------+


Egress connections
+----------+--------------------+------------+------+-----------------+-----------+-------+------------------------------+
| PROTOCOL |      COMMAND       | POD/SVC/IP | PORT |    NAMESPACE    |  LABELS   | COUNT |      LAST UPDATED TIME       |
+----------+--------------------+------------+------+-----------------+-----------+-------+------------------------------+
| TCP      | /usr/local/bin/php | svc/mysql  | 3306 | wordpress-mysql | app=mysql | 8     | Thu Mar 23 13:40:29 UTC 2023 |
+----------+--------------------+------------+------+-----------------+-----------+-------+------------------------------+


  Pod Name        wordpress-787f45786f-jn22p  
  Namespace Name  wordpress-mysql             
  Cluster Name    default                     
  Container Name  wordpress                   
  Labels          app=wordpress               

File Data
+--------------------+-----------------------+-------+------------------------------+--------+
|    SRC PROCESS     | DESTINATION FILE PATH | COUNT |      LAST UPDATED TIME       | STATUS |
+--------------------+-----------------------+-------+------------------------------+--------+
| /usr/local/bin/php | /etc/hosts            | 8     | Thu Mar 23 13:40:29 UTC 2023 | Allow  |
+--------------------+-----------------------+-------+------------------------------+--------+


Egress connections
+----------+--------------------+------------+------+-----------------+-----------+-------+------------------------------+
| PROTOCOL |      COMMAND       | POD/SVC/IP | PORT |    NAMESPACE    |  LABELS   | COUNT |      LAST UPDATED TIME       |
+----------+--------------------+------------+------+-----------------+-----------+-------+------------------------------+
| TCP      | /usr/local/bin/php | svc/mysql  | 3306 | wordpress-mysql | app=mysql | 8     | Thu Mar 23 13:40:29 UTC 2023 |
+----------+--------------------+------------+------+-----------------+-----------+-------+------------------------------+


  Pod Name        wordpress-787f45786f-466dn  
  Namespace Name  wordpress-mysql             
  Cluster Name    default                     
  Container Name  wordpress                   
  Labels          app=wordpress               

File Data
+--------------------+-----------------------+-------+------------------------------+--------+
|    SRC PROCESS     | DESTINATION FILE PATH | COUNT |      LAST UPDATED TIME       | STATUS |
+--------------------+-----------------------+-------+------------------------------+--------+
| /usr/local/bin/php | /etc/hosts            | 8     | Thu Mar 23 13:40:29 UTC 2023 | Allow  |
+--------------------+-----------------------+-------+------------------------------+--------+


Egress connections
+----------+--------------------+------------+------+-----------------+-----------+-------+------------------------------+
| PROTOCOL |      COMMAND       | POD/SVC/IP | PORT |    NAMESPACE    |  LABELS   | COUNT |      LAST UPDATED TIME       |
+----------+--------------------+------------+------+-----------------+-----------+-------+------------------------------+
| TCP      | /usr/local/bin/php | svc/mysql  | 3306 | wordpress-mysql | app=mysql | 7     | Thu Mar 23 13:40:29 UTC 2023 |
+----------+--------------------+------------+------+-----------------+-----------+-------+------------------------------+


  Pod Name        wordpress-787f45786f-hcxz9  
  Namespace Name  wordpress-mysql             
  Cluster Name    default                     
  Container Name  wordpress                   
  Labels          app=wordpress               

File Data
+--------------------+-----------------------+-------+------------------------------+--------+
|    SRC PROCESS     | DESTINATION FILE PATH | COUNT |      LAST UPDATED TIME       | STATUS |
+--------------------+-----------------------+-------+------------------------------+--------+
| /usr/local/bin/php | /etc/hosts            | 7     | Thu Mar 23 13:40:28 UTC 2023 | Allow  |
+--------------------+-----------------------+-------+------------------------------+--------+


Egress connections
+----------+--------------------+------------+------+-----------------+-----------+-------+------------------------------+
| PROTOCOL |      COMMAND       | POD/SVC/IP | PORT |    NAMESPACE    |  LABELS   | COUNT |      LAST UPDATED TIME       |
+----------+--------------------+------------+------+-----------------+-----------+-------+------------------------------+
| TCP      | /usr/local/bin/php | svc/mysql  | 3306 | wordpress-mysql | app=mysql | 8     | Thu Mar 23 13:40:28 UTC 2023 |
+----------+--------------------+------------+------+-----------------+-----------+-------+------------------------------+

We should ideally have a single table which displays all the information (summary per deployment)

@vishnusomank vishnusomank self-assigned this Mar 23, 2023
@vishnusomank vishnusomank added the enhancement New feature or request label Mar 27, 2023
@vishnusomank vishnusomank linked a pull request Mar 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant