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

fix(capture): remove only managed secret #653

Merged
merged 2 commits into from
Oct 8, 2024
Merged

fix(capture): remove only managed secret #653

merged 2 commits into from
Oct 8, 2024

Conversation

mainred
Copy link
Contributor

@mainred mainred commented Aug 26, 2024

Description

This change allows the operator to remove only the managed secret, and ignore NOTFOUND error.

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

Please add any relevant screenshots or GIFs to showcase the changes made.

  • When removing the Capture with managed secret, it will delete the jobs and secret
ts=2024-08-26T07:51:27.757Z level=info caller=capture/controller.go:369 msg="Removing Capture" Capture=default/capture-pod-blobupload
ts=2024-08-26T07:51:27.774Z level=info caller=capture/controller.go:387 msg="Capture jobs are removed" Capture=default/capture-pod-blobupload
ts=2024-08-26T07:51:27.783Z level=info caller=capture/controller.go:402 msg="Capture secret is removed" Capture=default/capture-pod-blobupload Secret=managed-capture-pod-blobupload
  • When removing the Capture with user owned secret, the secret will not be deleted
ts=2024-08-26T07:57:36.847Z level=info caller=capture/controller.go:369 msg="Removing Capture" Capture=default/capture-pod-blobupload
ts=2024-08-26T07:57:36.862Z level=info caller=capture/controller.go:387 msg="Capture jobs are removed" Capture=default/capture-pod-blobupload

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 August 26, 2024 08:00
@mainred mainred changed the title fix: remove only managed secret fix(capture): remove only managed secret Aug 27, 2024
@mainred
Copy link
Contributor Author

mainred commented Aug 27, 2024

ping @rbtr and @timraymond to help take a look.

@mainred
Copy link
Contributor Author

mainred commented Aug 28, 2024

ping @timraymond for another review.

@mainred mainred enabled auto-merge August 28, 2024 23:29
@mainred mainred disabled auto-merge August 29, 2024 00:27
@mainred mainred added the type/fix Fixes something label Aug 31, 2024
Copy link

github-actions bot commented Oct 4, 2024

This PR will be closed in 7 days due to inactivity.

@github-actions github-actions bot added the meta/waiting-for-author Blocked and waiting on the author label Oct 4, 2024
@mainred mainred added this pull request to the merge queue Oct 8, 2024
Merged via the queue into main with commit 2c5886e Oct 8, 2024
22 checks passed
@mainred mainred deleted the fix-remove-secret branch October 8, 2024 06:45
vakalapa pushed a commit that referenced this pull request Oct 9, 2024
# Description

This change allows the operator to remove only the managed secret, and
ignore NOTFOUND error.

## 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

- [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.

## Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes
made.

- When removing the Capture with managed secret, it will delete the jobs
and secret
```
ts=2024-08-26T07:51:27.757Z level=info caller=capture/controller.go:369 msg="Removing Capture" Capture=default/capture-pod-blobupload
ts=2024-08-26T07:51:27.774Z level=info caller=capture/controller.go:387 msg="Capture jobs are removed" Capture=default/capture-pod-blobupload
ts=2024-08-26T07:51:27.783Z level=info caller=capture/controller.go:402 msg="Capture secret is removed" Capture=default/capture-pod-blobupload Secret=managed-capture-pod-blobupload
```

- When removing the Capture with user owned secret, the secret will not
be deleted
```
ts=2024-08-26T07:57:36.847Z level=info caller=capture/controller.go:369 msg="Removing Capture" Capture=default/capture-pod-blobupload
ts=2024-08-26T07:57:36.862Z level=info caller=capture/controller.go:387 msg="Capture jobs are removed" Capture=default/capture-pod-blobupload
```

## Additional Notes

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 meta/waiting-for-author Blocked and waiting on the author type/fix Fixes something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants