-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 a scaler based on number of objects in a GCP Storage bucket #2648
Conversation
Would you mind opening a PR for the docs as well please? |
/run-e2e gcp* |
@RamCohen That e2e with fake GCS is neat, though we have just get GCP account for KEDA related testing, so it might be great to rewrite the tests and point them against actual GCP storage? WDYT? |
Where can I see the credentials to use for the GCP account ? |
We usually have the credentials stored as GH Secrets and exposed via ENV variables, so the apporach would be to modify the test to expect those env variables. For example you can take a look on this PR for an inspiration: #2643 We haven't added the GCP credentials to GH yet, @tomkerkhove could you please assist with that? Thanks! |
I haven't used GCP before but if there are any docs on what I should follow then I can set it up. |
You need to create a service account in the 'IAM & Admin' panel, add a key to it by generating a new key and save the downloaded json file as the secret |
See also instructions here: https://github.com/kedacore/sample-go-gcppubsub#readme |
Sure, but what permissions do you need? :) Is Monitoring Viewer enough? |
Relates to #2648 Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Relates to #2648 Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Relates to #2648 Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Auth is added through #2662, but I did not add any other resources. What would you need in GCP from us? |
For pubsub e2e I need pubsub admin as I create and delete a topic on each
test
I we'll use the same topic which will be pre-created, pubsub editor should
be enough
The topic will need to have a message retention policy of 1 day to
automatically clean up
For GCS I need Storage admin as I create and delete a bucket each time
If the test will use the same bucket we can have object admin permissions
instead, but we'll need to make sure the bucket is empty before each test
…On Tue, Feb 22, 2022 at 9:12 AM Tom Kerkhove ***@***.***> wrote:
Auth is added through #2662 <#2662>,
but I did not add any other resources.
What would you need in GCP from us?
—
Reply to this email directly, view it on GitHub
<#2648 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATJ7GUAENPIV74F6XVEJ6TU4MZOBANCNFSM5ORIVOZA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yeah, we should create all needed resources directly from the test via API. We should just point credentials and all should be done, @tomkerkhove we should add admin rights to the credentials. |
Also, could you please update Changelog? |
I also need the GCP project ID |
Could you please rebase this PR to contain only relevant changes? |
Do you need anything else than this? https://github.com/kedacore/keda/pull/2662/files |
Yes, the GCP project ID |
That's |
@tomkerkhove would be better to store this in GitHub as ENV as well. |
The project id value can be extracted from the gcp key:
JSON.parse(process.env['GCP_SP_KEY']).project_id
…On Tue, Mar 1, 2022 at 5:24 PM Zbynek Roubalik ***@***.***> wrote:
Yes, the GCP project ID
That's cncf-keda-testing
@tomkerkhove <https://github.com/tomkerkhove> would be better to store
this in GitHub as ENV as well.
—
Reply to this email directly, view it on GitHub
<#2648 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATJ7GUSF252BTZZQOL3JDDU5YZDZANCNFSM5ORIVOZA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@RamCohen cool, so are you all set with this PR? If so, could you please resolve the conflict and we can run the test and do final reivew and merge. Thanks! |
Yes, but not as a secret - No? It can be just a variable in the workflow. |
Fixes kedacore#2628 Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Also remove now unnecessary 'endpoint' property as we are now using real GCS Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
/run-e2e gcp-storage.test.* |
The test fail with:
|
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks ❤️ ❤️ ❤️
Only 1 small nit: Could you update the changelog to
- **General:** Introduce new GCP Storage Scaler ([#2628](https://github.com/kedacore/keda/issues/2628))
/run-e2e gcp-storage.test.* |
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Test has error: |
/run-e2e gcp-storage.test.* |
It seems that the problem was also the credentials |
Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
/run-e2e gcp-storage.test.* |
Signed-off-by: Ram Cohen ram.cohen@gmail.com
/run-e2e gcp-storage.test.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot @RamCohen!
…core#2648) Signed-off-by: Ram Cohen <ram.cohen@gmail.com> Co-authored-by: Zbynek Roubalik <zroubali@redhat.com> Signed-off-by: Ram Cohen <ram.cohen@gmail.com>
Add a scaler based on number of objects in a GCP Storage bucket
Fixes #2628
Signed-off-by: Ram Cohen ram.cohen@gmail.com