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

Add azure-workload auth to MSSQL scaler #6161

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

rickbrouwer
Copy link
Contributor

@rickbrouwer rickbrouwer commented Sep 13, 2024

  • Refactor the scaler to match the new metadata guidelines.
  • Added azure-workload auth

Checklist

Fixes #6104
Relates to #5797

@rickbrouwer rickbrouwer requested a review from a team as a code owner September 13, 2024 13:38
@rickbrouwer rickbrouwer marked this pull request as draft September 13, 2024 13:38
@rickbrouwer rickbrouwer force-pushed the mssql branch 8 times, most recently from 877148b to e253199 Compare September 13, 2024 19:03
@rickbrouwer rickbrouwer force-pushed the mssql branch 19 times, most recently from 633987e to 8cd724e Compare September 16, 2024 07:05
@rickbrouwer rickbrouwer marked this pull request as ready for review September 17, 2024 08:58
@rickbrouwer
Copy link
Contributor Author

Let's not poke random people and wait for the group that I have mentioned please =)

my sincere apologies

@tomkerkhove
Copy link
Member

No worries

@tomkerkhove
Copy link
Member

tomkerkhove commented Sep 17, 2024

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

@JorTurFer
Copy link
Member

I think that we could cover this with e2e test as we have an Azure subscription. Could you open a PR to the testing infra repo to spin up and configure the database?

@rickbrouwer
Copy link
Contributor Author

I think that we could cover this with e2e test as we have an Azure subscription. Could you open a PR to the testing infra repo to spin up and configure the database?

Is a feature request in https://github.com/kedacore/testing-infrastructure ok?

@JorTurFer
Copy link
Member

Is a feature request in kedacore/testing-infrastructure ok?

yes 😄

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.

@rickbrouwer @JorTurFer any update on this please?

@JorTurFer
Copy link
Member

The testing infrastructure has to be deployed but @rickbrouwer needs help with that and I've not had time yet

Copy link

stale bot commented Jan 4, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Jan 4, 2025
Copy link

stale bot commented Jan 11, 2025

This issue has been automatically closed due to inactivity.

@stale stale bot closed this Jan 11, 2025
@JorTurFer
Copy link
Member

This is a good remainder to add the missing envs, I'll try to apply the changes during the weekend

@JorTurFer JorTurFer reopened this Jan 17, 2025
@JorTurFer
Copy link
Member

The MSSQL server is already created and configured -> kedacore/testing-infrastructure#160 (comment)

Signed-off-by: rickbrouwer <rickbrouwer@gmail.com>
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label Jan 29, 2025
Signed-off-by: Rick Brouwer <rickbrouwer@gmail.com>
Signed-off-by: rickbrouwer <rickbrouwer@gmail.com>
Signed-off-by: rickbrouwer <rickbrouwer@gmail.com>
Signed-off-by: rickbrouwer <rickbrouwer@gmail.com>
Signed-off-by: rickbrouwer <rickbrouwer@gmail.com>
@@ -4,7 +4,9 @@
package mssql_test
Copy link
Member

Choose a reason for hiding this comment

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

I think that we should split this file into 2, the old one just testing base mssql and another one within the azure folder to cover the workload identity integration. This will improve the readability of the test and also will help to detect the root cause of the failures (we did the same with prometheus e2e for example)

@JorTurFer
Copy link
Member

JorTurFer commented Feb 3, 2025

/run-e2e mssql
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.

Agree with splitting the test,

the rest looks good, thanks!

@raorugan
Copy link

raorugan commented Mar 7, 2025

Great!! to see the PR progressing!! I see that the E2E test failed? Can some one share the issue here? What set of things are remaining for the PR to get merged?

@rickbrouwer
Copy link
Contributor Author

Great!! to see the PR progressing!! I see that the E2E test failed? Can some one share the issue here? What set of things are remaining for the PR to get merged?

The e2e test still needs to be split and there are definitely still one or more errors in the design of the e2e test.
If you want to contribute or help with this PR (or possibly even take it over), please do so (and would be appreciated :))

Otherwise I will continue with this later, but that may take a while.

azureSQLServerFQDN = os.Getenv("TF_AZURE_SQL_SERVER_FQDN")
azureSQLDBName = os.Getenv("TF_AZURE_SQL_SERVER_DB_NAME")
azureADTenantID = os.Getenv("TF_AZURE_SP_TENANT")
azureClientID = os.Getenv("AZURE_CLIENT_ID")
Copy link
Member

Choose a reason for hiding this comment

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

The env var that contains the app id is this:

Suggested change
azureClientID = os.Getenv("AZURE_CLIENT_ID")
azureClientID = os.Getenv("TF_AZURE_IDENTITY_1_APP_ID")

Copy link
Member

Choose a reason for hiding this comment

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

I case of necessity (to spin up the database or so), the admin credentials are in these envs:

  • TF_AZURE_SQL_SERVER_ADMIN_USERNAME
  • TF_AZURE_SQL_SERVER_ADMIN_PASSWORD

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.

MSSQL trigger can't connect to SQL Server on Azure using azure-workload auth
5 participants