-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add capture spec: outputConfiguration.s3Upload
#201
Comments
Thanks @parkjeongryul, we are definitely interested in the feature! I think that there's a bit of rework we need to do for #203 that could be common with your needs for this feature. Let's make sure we are aligned on the design here before we duplicate any work. How would you implement this for S3? |
CRDAre you considering managing a single integrated ConfigMap or Secret for multiple output locations(azblob, s3), or do you plan to create a separate ConfigMap for each configuration? If you decide on the latter, how about this spec for s3Upload? apiVersion: retina.sh/v1alpha1
kind: Capture
metadata:
name: example-capture
spec:
captureConfiguration:
captureOption:
duration: "30s"
maxCaptureSize: 100
packetSize: 1500
captureTarget:
namespaceSelector:
matchLabels:
app: target-app
outputConfiguration:
s3Upload:
endpoint: ""
bucket: ""
credentialsSecret:
name: s3-credentials
key: credentials
---
apiVersion: v1
kind: Secret
metadata:
name: s3-credentials
type: Opaque
stringData:
credentials: |-
[default]
aws_access_key_id = your_access_key_id
aws_secret_access_key = your_secret_access_key There are a lot of options for s3upload that will become more sophisticated like thanos, but for an initial implementation, it would be fine if only ImplementationWhen it comes to the S3 upload sdk (golang), i think we have two choices. I think they're both great libraries, good enough for uploading capture. |
@parkjeongryul, appreciate the help here! Your proposal for a separate ConfigMap per output location and the S3 config example look reasonable. As for the S3 upload SDK, we would prefer Feel free to get started with the implementation and let us know if you have any questions! |
# Description This PR implement outputConfiguration.s3Upload feature. ## Related Issue #201 ## 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. - [x] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed I've tested it working well in the two environments below. ### AWS s3 ``` ./bin/kubectl-retina capture create --s3-region ap-northeast-2 --s3-bucket retina-test-bucket --s3-access-key-id my-access-key --s3-secret-access-key my-secret-key --node-selectors "kubernetes.io/os=linux" --debug ``` <img width="1138" alt="image" src="https://github.com/microsoft/retina/assets/25222969/b7afebfc-c161-423e-8b80-10e96c83a75e"> ### minio ``` ./bin/kubectl-retina capture create --s3-endpoint https://play.min.io:9000 --s3-bucket test-jrpark-bucket --s3-access-key-id Q3AM3UQ867SPQQA43P2F --s3-secret-access-key zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG --node-selectors "kubernetes.io/os=linux" --debug ``` <img width="1194" alt="image" src="https://github.com/microsoft/retina/assets/25222969/71b15d39-30f7-48ec-8366-8afebbf4d1fb"> ## 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: dependabot[bot] <support@github.com> Signed-off-by: Park Jeong Ryul <vita400@kakao.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Timothy J. Raymond <timraymond@users.noreply.github.com>
# Description This PR implement outputConfiguration.s3Upload feature. ## Related Issue #201 ## 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. - [x] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed I've tested it working well in the two environments below. ### AWS s3 ``` ./bin/kubectl-retina capture create --s3-region ap-northeast-2 --s3-bucket retina-test-bucket --s3-access-key-id my-access-key --s3-secret-access-key my-secret-key --node-selectors "kubernetes.io/os=linux" --debug ``` <img width="1138" alt="image" src="https://github.com/microsoft/retina/assets/25222969/b7afebfc-c161-423e-8b80-10e96c83a75e"> ### minio ``` ./bin/kubectl-retina capture create --s3-endpoint https://play.min.io:9000 --s3-bucket test-jrpark-bucket --s3-access-key-id Q3AM3UQ867SPQQA43P2F --s3-secret-access-key zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG --node-selectors "kubernetes.io/os=linux" --debug ``` <img width="1194" alt="image" src="https://github.com/microsoft/retina/assets/25222969/71b15d39-30f7-48ec-8366-8afebbf4d1fb"> ## 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: dependabot[bot] <support@github.com> Signed-off-by: Park Jeong Ryul <vita400@kakao.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Timothy J. Raymond <timraymond@users.noreply.github.com>
Is your feature request related to a problem? Please describe.
In some environments, blob storage can be difficult to use. It would be nice to support s3 upload for capture.
Describe the solution you'd like
Add an s3Upload spec to the following existing outputconfiguration.
s3Upload: Specifies a s3 upload url for storing the capture data.
The s3Upload spec might require the following additional fields
Describe alternatives you've considered
Additional context
If this feature makes sense and I can be assigned to it, I'd like to work on implementing it.
The text was updated successfully, but these errors were encountered: