Skip to content

Commit

Permalink
Enabled Postgresql Database (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielscholl authored Aug 22, 2024
1 parent 23c8fed commit f478792
Show file tree
Hide file tree
Showing 30 changed files with 241 additions and 1,076 deletions.
16 changes: 16 additions & 0 deletions bicep/modules/blade_common.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,22 @@ var vaultSecrets = [
secretName: 'app-dev-sp-id'
secretValue: applicationClientId
}
{
secretName: 'cpng-user-name'
secretValue: 'dbuser'
}
{
secretName: 'cpng-user-password'
secretValue: substring(uniqueString('dbuser', resourceGroup().id, bladeConfig.sectionName), 0, 8)
}
{
secretName: 'cpng-superuser-name'
secretValue: 'dbadmin'
}
{
secretName: 'cpng-superuser-password'
secretValue: substring(uniqueString('dbadmin', resourceGroup().id, bladeConfig.sectionName), 0, 8)
}
]

var roleAssignment = {
Expand Down
15 changes: 7 additions & 8 deletions bicep/modules/blade_service.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -427,16 +427,16 @@ module federatedCredsOduInitNamespace './federated_identity.bicep' = {
]
}

module federatedCredsDevSampleNamespace './federated_identity.bicep' = {
name: '${bladeConfig.sectionName}-federated-cred-ns_dev-sample'
module federatedCredsPostgreSqlNamespace './federated_identity.bicep' = {
name: '${bladeConfig.sectionName}-federated-cred-ns_postgresql'
params: {
name: 'federated-ns_dev-sample'
name: 'federated-ns_postgresql'
audiences: [
'api://AzureADTokenExchange'
]
issuer: cluster.outputs.aksOidcIssuerUrl
userAssignedIdentityName: appIdentity.name
subject: 'system:serviceaccount:dev-sample:workload-identity-sa'
subject: 'system:serviceaccount:postgresql:workload-identity-sa'
}
dependsOn: [
federatedCredsOduInitNamespace
Expand All @@ -455,7 +455,7 @@ module federatedCredsConfigMapsNamespace './federated_identity.bicep' = {
subject: 'system:serviceaccount:azappconfig-system:az-appconfig-k8s-provider'
}
dependsOn: [
federatedCredsDevSampleNamespace
federatedCredsPostgreSqlNamespace
]
}

Expand Down Expand Up @@ -524,7 +524,6 @@ module federatedCredsOsduReference './federated_identity.bicep' = {
}



module appRoleAssignments './app_assignments.bicep' = {
name: '${bladeConfig.sectionName}-user-managed-identity-rbac'
params: {
Expand All @@ -536,7 +535,7 @@ module appRoleAssignments './app_assignments.bicep' = {
federatedCredsDefaultNamespace
federatedCredsOsduCoreNamespace
federatedCredsOduInitNamespace
federatedCredsDevSampleNamespace
federatedCredsPostgreSqlNamespace
federatedCredsConfigMapsNamespace
federatedCredsElasticNamespace
federatedCredsOsduSystem
Expand All @@ -555,7 +554,7 @@ module appRoleAssignments2 './app_assignments.bicep' = [for (name, index) in par
federatedCredsDefaultNamespace
federatedCredsOsduCoreNamespace
federatedCredsOsduReference
federatedCredsDevSampleNamespace
federatedCredsPostgreSqlNamespace
federatedCredsConfigMapsNamespace
]
}]
Expand Down
21 changes: 0 additions & 21 deletions charts/config-maps/templates/config-map-devsample.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions charts/env-debug/.helmignore

This file was deleted.

27 changes: 0 additions & 27 deletions charts/env-debug/Chart.yaml

This file was deleted.

67 changes: 0 additions & 67 deletions charts/env-debug/README.md

This file was deleted.

64 changes: 0 additions & 64 deletions charts/env-debug/templates/_helpers.tpl

This file was deleted.

8 changes: 0 additions & 8 deletions charts/env-debug/templates/config-map.yaml

This file was deleted.

Loading

0 comments on commit f478792

Please sign in to comment.