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

Include StatefulSets in application list #255

Merged
merged 2 commits into from
Jul 7, 2023
Merged

Conversation

fabrizziocht
Copy link
Contributor

Changes made in instances.go

  • Get kubernetes instances including StatefulSets
  • Update GetMetadata method
  • Update GetDeploymentConfiguration method
  • Update Logstream to read container logs from StatefulSets Changes made in helmchart:
  • include statefulsets as allowed resource for Role/ClusterRole CDR
  • Update dashboard.yaml to allow statefulsets in Role/ClusterRole CDR

Changes made in instances.go
* Get kubernetes instances including StatefulSets
* Update GetMetadata method
* Update GetDeploymentConfiguration method
* Update Logstream to read container logs from StatefulSets
Changes made in helmchart:
* include statefulsets as allowed resource for Role/ClusterRole CDR
* Update dashboard.yaml to allow statefulsets in Role/ClusterRole CDR

Signed-off-by: fabrizziocht <[email protected]>
@yaron2
Copy link
Member

yaron2 commented Jul 5, 2023

Thanks for your contribution! Will review soon

@yaron2
Copy link
Member

yaron2 commented Jul 5, 2023

@fabrizziocht the FOSSA check is irrelevant for this PR so can be wavered. Did you test your current changes locally for any regressions and to verify stateful sets are visualized properly?

@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Merging #255 (c984356) into master (8f4e17a) will decrease coverage by 1.78%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##           master    #255      +/-   ##
=========================================
- Coverage   10.45%   8.67%   -1.78%     
=========================================
  Files           7       7              
  Lines         660     795     +135     
=========================================
  Hits           69      69              
- Misses        585     720     +135     
  Partials        6       6              
Impacted Files Coverage Δ
pkg/instances/instances.go 7.55% <0.00%> (-2.68%) ⬇️

@fabrizziocht
Copy link
Contributor Author

fabrizziocht commented Jul 7, 2023

Hello @yaron2 , correct I tested locally in k8s rebuilding the Dapr dashboard and deploying it inside the dapr-system namespace.
In order to reproduce the steps for this tests I've published a folder called tests_statefulset in a different branch if you want to review it: https://github.com/fabrizziocht/dapr-dashboard/tree/tests-sts/tests_statefulset

This example generates a docker image, deploys in kubernetes granting permissions to read statefulset objects and also deploys two nginx apps using deployment and statefulset. The script can include the flag --use-helm to test the helmchart that adds the resource "statefulset" in the Role/ClusterRole CDR.

Let me share you some screenshots about my local tests:

1. New Dapr dashboard pod using my local built image:

Captura de pantalla 2023-07-06 a la(s) 17 51 07

2. nginx app examples 1 deployment + 1 statefulset:
Captura de pantalla 2023-07-06 a la(s) 17 51 54

3. Angular App showing both apps:
Captura de pantalla 2023-07-06 a la(s) 17 52 17

4. Tabs about statefulset information:
Captura de pantalla 2023-07-06 a la(s) 17 52 24
Captura de pantalla 2023-07-06 a la(s) 17 52 34
Captura de pantalla 2023-07-06 a la(s) 17 52 42
Captura de pantalla 2023-07-06 a la(s) 17 52 56

5. Network traces without any bug:
Captura de pantalla 2023-07-06 a la(s) 17 53 24

Please let me know if you need additional information.
Regards,
Fabri

@yaron2 yaron2 merged commit 4c87fc7 into dapr:master Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants