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: Skip Resolving Secrets From Restricted Namespace #4735

Merged
merged 1 commit into from Jun 27, 2023

Conversation

Indresh2410
Copy link
Contributor

@Indresh2410 Indresh2410 commented Jun 24, 2023

Provide a description of what has been changed

Checklist

Fixes #4519

Relates to #

@Indresh2410 Indresh2410 requested a review from a team as a code owner June 24, 2023 06:23
@github-actions
Copy link

Thank you for your contribution! 🙏 We will review your PR as soon as possible.

While you are waiting, make sure to:

Learn more about:

@Indresh2410
Copy link
Contributor Author

resolver % export KEDA_RESTRICT_SECRET_ACCESS=true
resolver % export KEDA_CLUSTER_OBJECT_NAMESPACE=keda
resolver % GOOS="darwin" go test -v
=== RUN TestGetPropertiesForCloud
--- PASS: TestGetPropertiesForCloud (0.00s)
=== RUN TestEnvWithRestrictSecretAccess
=== RUN TestEnvWithRestrictSecretAccess/env_reference_secret_key
=== RUN TestEnvWithRestrictSecretAccess/env_reference_secret_name
--- PASS: TestEnvWithRestrictSecretAccess (0.00s)
--- PASS: TestEnvWithRestrictSecretAccess/env_reference_secret_key (0.00s)
--- PASS: TestEnvWithRestrictSecretAccess/env_reference_secret_name (0.00s)
=== RUN TestEnvWithRestrictedNamespace
=== RUN TestEnvWithRestrictedNamespace/env_reference_secret_key
=== RUN TestEnvWithRestrictedNamespace/env_reference_secret_name
--- PASS: TestEnvWithRestrictedNamespace (0.00s)
--- PASS: TestEnvWithRestrictedNamespace/env_reference_secret_key (0.00s)
--- PASS: TestEnvWithRestrictedNamespace/env_reference_secret_name (0.00s)
PASS
ok github.com/kedacore/keda/v2/pkg/scaling/resolver 2.947s
`

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

@Indresh2410 the static check is failing, there's a whitespace end the end of the new line in Makefile

 diff --git a/Makefile b/Makefile
index 21e3aab..f6bfed8 100644
--- a/Makefile
+++ b/Makefile
Error: @@ -173,7 +173,7 @@ pkg/mock/mock_scaler/mock_scaler.go: pkg/scalers/scaler.go
 	$(MOCKGEN) -destination=$@ -package=mock_scalers -source=$^
Error:  pkg/mock/mock_secretlister/mock_interfaces.go: vendor/k8s.io/client-go/listers/core/v1/secret.go
 	mkdir -p pkg/mock/mock_secretlister
-	$(MOCKGEN) k8s.io/client-go/listers/core/v1 SecretLister,SecretNamespaceLister > $@	
+	$(MOCKGEN) k8s.io/client-go/listers/core/v1 SecretLister,SecretNamespaceLister > $@

pkg/scaling/resolver/scale_resolvers_test.go Outdated Show resolved Hide resolved
@zroubalik
Copy link
Member

zroubalik commented Jun 26, 2023

/run-e2e
Update: You can check the progress here

@zroubalik
Copy link
Member

zroubalik commented Jun 26, 2023

/run-e2e
Update: You can check the progress here

Signed-off-by: Indresh-Prakash <indreshprakash24@gmail.com>
@zroubalik
Copy link
Member

zroubalik commented Jun 26, 2023

/run-e2e
Update: You can check the progress here

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

LGTM

@Indresh2410
Copy link
Contributor Author

Hi @zroubalik . e2e tests are oscillating . Don't see any issues wrt test cases. Any suggestion on this?

@zroubalik
Copy link
Member

zroubalik commented Jun 27, 2023

/run-e2e azure
Update: You can check the progress here

@zroubalik zroubalik merged commit 406c358 into kedacore:main Jun 27, 2023
21 checks passed
@zroubalik
Copy link
Member

Thanks @Indresh2410 !

tomkerkhove pushed a commit that referenced this pull request Jun 28, 2023
Signed-off-by: Indresh-Prakash <indreshprakash24@gmail.com>
tomkerkhove added a commit that referenced this pull request Jun 29, 2023
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
Co-authored-by: Indresh2410 <130135623+Indresh2410@users.noreply.github.com>
fix: Skip Resolving Secrets From Restricted Namespace (#4735)
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.

KEDA tries to resolve secrets from restricted namespace
2 participants