-
Notifications
You must be signed in to change notification settings - Fork 44
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
parameterize azure PG config and use psql-client container to connect #790
base: main
Are you sure you want to change the base?
Conversation
It looks good to me |
@@ -7,7 +7,7 @@ NAMESPACE=$4 | |||
SA_NAME=$5 | |||
|
|||
# prep creds and configs | |||
PGHOST=$(az postgres flexible-server list --resource-group ${RESOURCEGROUP} --query "[?starts_with(name, '${DB_SERVER_NAME_PREFIX}')].fullyQualifiedDomainName" -o tsv) | |||
export PGHOST=$(az postgres flexible-server list --resource-group ${RESOURCEGROUP} --query "[?starts_with(name, '${DB_SERVER_NAME_PREFIX}')].fullyQualifiedDomainName" -o tsv) | |||
AZURE_TENANT_ID=$(az account show -o json | jq .homeTenantId -r) | |||
AZURE_CLIENT_ID=$(az identity show -g ${RESOURCEGROUP} -n ${MANAGED_IDENTITY_NAME} --query clientId -o tsv) | |||
SA_TOKEN=$(kubectl create token ${SA_NAME} --namespace=${NAMESPACE} --audience api://AzureADTokenExchange) |
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.
Should we make the expiration of this token short-lived? I.e. 24 hrs?
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.
- the default SA token on AKS expires in 1h, i made it explicit though
- for
az account get-access-token
there is no way to set the expiration - it defaults to 24h
Please rebase pull request. |
Please rebase pull request. |
Please rebase pull request. |
* installing the psql client tool locally brings a log of dependencies on most systems. by using a container we avoid having to install too many things on developer machines * parameterize all fields required for CS and Maestro DB setup so we can have consistency between infra RBAC deployment, service deployment and DB deployment Signed-off-by: Gerd Oberlechner <[email protected]>
Please rebase pull request. |
What this PR does
Jira:
Link to demo recording:
Special notes for your reviewer