Skip to content

Commit

Permalink
Merge branch 'main' into chore/add-redis-postgres-health-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad authored Oct 1, 2024
2 parents 02c13b0 + 28a9c8b commit edb9f93
Show file tree
Hide file tree
Showing 50 changed files with 647 additions and 575 deletions.
14 changes: 12 additions & 2 deletions .azure/applications/sync-subject-resource-mappings-job/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ var containerAppEnvVars = [
name: 'Infrastructure__DialogDbConnectionString'
secretRef: 'dbconnectionstring'
}
{
name: 'Infrastructure__Redis__ConnectionString'
secretRef: 'redisconnectionstring'
}
{
name: 'DOTNET_ENVIRONMENT'
value: environment
Expand All @@ -61,13 +65,19 @@ var containerAppEnvVars = [
}
]

// Base URL for accessing secrets in the Key Vault
// https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-deployment#example-1
var keyVaultUrl = 'https://${environmentKeyVaultName}${az.environment().suffixes.keyvaultDns}/secrets/dialogportenAdoConnectionString'
var keyVaultBaseUrl = 'https://${environmentKeyVaultName}${az.environment().suffixes.keyvaultDns}/secrets'

var secrets = [
{
name: 'dbconnectionstring'
keyVaultUrl: keyVaultUrl
keyVaultUrl: '${keyVaultBaseUrl}/dialogportenAdoConnectionString'
identity: 'System'
}
{
name: 'redisconnectionstring'
keyVaultUrl: '${keyVaultBaseUrl}/dialogportenRedisConnectionString'
identity: 'System'
}
]
Expand Down
4 changes: 2 additions & 2 deletions .azure/modules/virtualMachine/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ type StorageProfile = {
version: string
}
osDisk: {
osType: string
osType: 'Linux' | 'Windows' | null
name: string
createOption: string
caching: string
caching: 'None' | 'ReadOnly' | 'ReadWrite' | null
managedDisk: {
storageAccountType: string
}
Expand Down
14 changes: 10 additions & 4 deletions .github/tools/revisionVerifier.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
if ! command -v jq 2>&1 >/dev/null
then
echo "jq could not be found, attempting to install from tdnf ..."
tdnf install -y jq
fi

if [ -z "$1" ]; then
echo "Usage: $0 <revision-name>"
exit 1
Expand All @@ -14,10 +20,10 @@ query_filter="{name:name, runningState:properties.runningState, healthState:prop

verify_revision() {
local json_output

# Fetch app revision
json_output=$(az containerapp revision show -g "$resource_group" --revision "$revision_name" --query "$query_filter" 2>/dev/null)

health_state=$(echo $json_output | jq -r '.healthState')
running_state=$(echo $json_output | jq -r '.runningState')

Expand All @@ -26,7 +32,7 @@ verify_revision() {
echo "Health state: $health_state"
echo "Running state: $running_state"
echo " "

# Check health and running status
if [[ $health_state == "Healthy" && ($running_state == "Running" || $running_state == "RunningAtMaxScale") ]]; then
return 0 # OK!
Expand All @@ -47,4 +53,4 @@ while true; do
sleep 10 # Sleep for 10 seconds
attempt=$((attempt+1))
fi
done
done
2 changes: 1 addition & 1 deletion .github/workflows/action-check-for-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# fetch-depth needs to be 0 in cases where we want to fetch changes since previous tag for example
fetch-depth: 0

- uses: tj-actions/changed-files@v44
- uses: tj-actions/changed-files@v45
id: filter
with:
files_yaml: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/action-deploy-apps.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Deploy apps
env:
AZ_CLI_VERSION: 2.61.0
AZ_CLI_VERSION: 2.64.0
on:
workflow_call:
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/action-deploy-infra.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Deploy infrastructure

env:
AZ_CLI_VERSION: 2.61.0
AZ_CLI_VERSION: 2.64.0

on:
workflow_call:
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## [1.20.0](https://github.com/digdir/dialogporten/compare/v1.19.0...v1.20.0) (2024-09-30)


### Features

* **GraphQL:** Add DialogToken requirement for subscriptions ([#1124](https://github.com/digdir/dialogporten/issues/1124)) ([651ca62](https://github.com/digdir/dialogporten/commit/651ca62fdec02dec48b674b80acf52737036cf13))

## [1.19.0](https://github.com/digdir/dialogporten/compare/v1.18.1...v1.19.0) (2024-09-24)


### Features

* **breaking:** Move notification check endpoint to /actions ([#1175](https://github.com/digdir/dialogporten/issues/1175)) ([e0c1cf2](https://github.com/digdir/dialogporten/commit/e0c1cf205c66200f024431dc3392c988b99fdb30))


### Bug Fixes

* **janitor:** ensure Redis is configured correctly ([#1182](https://github.com/digdir/dialogporten/issues/1182)) ([37fe982](https://github.com/digdir/dialogporten/commit/37fe982ea9f08e48c75481008d614aaacf19a57d))

## [1.18.1](https://github.com/digdir/dialogporten/compare/v1.18.0...v1.18.1) (2024-09-23)


### Bug Fixes

* Add missing events to dialog subscription ([#1163](https://github.com/digdir/dialogporten/issues/1163)) ([162ce9a](https://github.com/digdir/dialogporten/commit/162ce9a9a0c4183d10e8edfe0f8c5589110b7a59))
* Fix BaseUri on localhost trailing slash discrepancy on OAuth metadata ([#1145](https://github.com/digdir/dialogporten/issues/1145)) ([09ce878](https://github.com/digdir/dialogporten/commit/09ce878cb537bf2e495e3801e0c769e25008246a))

## [1.18.0](https://github.com/digdir/dialogporten/compare/v1.17.0...v1.18.0) (2024-09-16)


Expand Down
Loading

0 comments on commit edb9f93

Please sign in to comment.