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

feat(capture): add managed storage account support #575

Merged
merged 20 commits into from
Aug 23, 2024

Conversation

mainred
Copy link
Contributor

@mainred mainred commented Jul 31, 2024

Description

This PR introduces a managed storage account solution to Retina Capture, which managed the storage account resources on behalf the user under the azure resource group specified in the azure credential config file.

After this, the user does not need to create even the secret and the captured network artificats will be uploaded to the storage account.

Related Issue

If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request.

Checklist

  • I have read the contributing documentation.
  • I signed and signed-off the commits (git commit -S -s ...). See this documentation on signing commits.
  • I have correctly attributed the author(s) of the code.
  • I have tested the changes locally.
  • I have followed the project's style guidelines.
  • I have updated the documentation, if necessary.
  • I have added tests, if applicable.

Screenshots (if applicable) or Testing Completed

  • After updating the helm charts
    • a storage account and a management policy rule to auto-delete blob after 7 days are created
      image
  • After applying a Capture
    • a blob container with retention policy is created
      image
    • a k8s secret is created
      image
    • network artifacts are uploaded the container after Capture duration
      image
  • After deleting the capture
    • the secret is deleted
      image

Additional Notes

Add any additional notes or context about the pull request here.


Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.

@mainred mainred requested a review from a team as a code owner July 31, 2024 07:12
Signed-off-by: Qingchuan Hao <[email protected]>
go.mod Outdated Show resolved Hide resolved
@mainred mainred force-pushed the capture-managed-storage-account branch from f327a41 to bd8452e Compare July 31, 2024 09:41
@rbtr rbtr requested review from jimassa, rbtr and nddq and removed request for MikeZappa87 and spencermckee August 5, 2024 18:23
@rbtr rbtr added type/enhancement New feature or request area/captures priority/1 P1 scope/M Change is Medium labels Aug 5, 2024
@rbtr rbtr added this to the 1.0 milestone Aug 5, 2024
Copy link
Member

@timraymond timraymond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Early feedback. Not yet finished reviewing.

docs/captures/managed-storage-account.md Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
operator/Dockerfile Outdated Show resolved Hide resolved
pkg/provider/azure/azclients/azclients.go Outdated Show resolved Hide resolved
pkg/provider/azure/azclients/azclients.go Outdated Show resolved Hide resolved
pkg/provider/azure/azclients/azclients.go Outdated Show resolved Hide resolved
pkg/provider/azure/azclients/azclients.go Outdated Show resolved Hide resolved
pkg/provider/azure/azclients/azclients.go Outdated Show resolved Hide resolved
pkg/controllers/operator/capture/doc.go Outdated Show resolved Hide resolved
@mainred mainred force-pushed the capture-managed-storage-account branch from eb502f1 to 9fd901a Compare August 6, 2024 05:31
Signed-off-by: Qingchuan Hao <[email protected]>
@mainred mainred force-pushed the capture-managed-storage-account branch from 9fd901a to 45392cb Compare August 6, 2024 05:39
Signed-off-by: Qingchuan Hao <[email protected]>
mainred added 2 commits August 6, 2024 12:29
Signed-off-by: Qingchuan Hao <[email protected]>
Signed-off-by: Qingchuan Hao <[email protected]>
Copy link
Collaborator

@rbtr rbtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few comments but mostly looks good to me

@timraymond
Copy link
Member

LGTM on @rbtr 's feedback.

rbtr
rbtr previously approved these changes Aug 23, 2024
Copy link
Collaborator

@rbtr rbtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks @mainred!

@mainred mainred added this pull request to the merge queue Aug 23, 2024
Merged via the queue into main with commit c79d94b Aug 23, 2024
22 checks passed
@mainred mainred deleted the capture-managed-storage-account branch August 23, 2024 15:30
ritwikranjan pushed a commit to ritwikranjan/retina that referenced this pull request Aug 28, 2024
This PR introduces a managed storage account solution to Retina Capture,
which managed the storage account resources on behalf the user under the
azure resource group specified in the azure credential config file.

After this, the user does not need to create even the secret and the
captured network artificats will be uploaded to the storage account.

If this pull request is related to any issue, please mention it here.
Additionally, make sure that the issue is assigned to you before
submitting this pull request.

- [x] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [x] I have followed the project's style guidelines.
- [x] I have updated the documentation, if necessary.
- [ ] I have added tests, if applicable.

- After updating the helm charts
- a storage account and a management policy rule to auto-delete blob
after 7 days are created

![image](https://github.com/user-attachments/assets/fd93d954-8008-4b04-9afa-626463691405)
- After applying a Capture
  - a blob container with retention policy is created

![image](https://github.com/user-attachments/assets/702dab18-b0a3-4468-830e-56a7449df889)
  -  a k8s secret is created

![image](https://github.com/user-attachments/assets/834f8977-09e2-4cb6-a99a-578fec33cdb0)
  - network artifacts are uploaded the container after Capture duration

![image](https://github.com/user-attachments/assets/fa147554-8c93-48fe-99f4-65277391ea5b)
- After deleting the capture
  - the secret is deleted

![image](https://github.com/user-attachments/assets/62c0fba4-7845-4792-8572-db412c704075)

Add any additional notes or context about the pull request here.

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.

---------

Signed-off-by: Qingchuan Hao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/captures priority/1 P1 scope/M Change is Medium type/enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants