Commit 274a8a31 authored by Abhishek Chowdhry's avatar Abhishek Chowdhry Committed by MANISH KUMAR
Browse files

Changing Redis Instance Used by Airflow

parent 2fa41e11
...@@ -192,10 +192,10 @@ airflow: ...@@ -192,10 +192,10 @@ airflow:
enabled: false enabled: false
externalRedis: externalRedis:
## Azure Redis Cache host ## Azure Redis Cache host
host: $(az keyvault secret show --id https://${ENV_VAULT}.vault.azure.net/secrets/base-name-sr --query value -otsv)-cache.redis.cache.windows.net host: $(az keyvault secret show --id https://${ENV_VAULT}.vault.azure.net/secrets/base-name-sr --query value -otsv)-queue.redis.cache.windows.net
port: 6380 port: 6380
passwordSecret: "redis" passwordSecret: "redis"
passwordSecretKey: "redis-password" passwordSecretKey: "redis-queue-password"
databaseNumber: 1 #<-- Adding redis database number according to the Redis config map https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-azure-provisioning/-/blob/master/charts/osdu-common/templates/redis-map.yaml#L7 databaseNumber: 1 #<-- Adding redis database number according to the Redis config map https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-azure-provisioning/-/blob/master/charts/osdu-common/templates/redis-map.yaml#L7
......
...@@ -131,10 +131,10 @@ airflow: ...@@ -131,10 +131,10 @@ airflow:
redis: redis:
enabled: false enabled: false
externalRedis: externalRedis:
host: #{base-name-dp}#-cache.redis.cache.windows.net #<-- Azure Redis Cache host host: #{base-name-dp}#-queue.redis.cache.windows.net #<-- Azure Redis Cache host
port: 6380 port: 6380
passwordSecret: "redis" passwordSecret: "redis"
passwordSecretKey: "redis-password" passwordSecretKey: "redis-queue-password"
databaseNumber: 1 #<-- Adding redis database number according to the Redis config map https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-azure-provisioning/-/blob/master/charts/osdu-common/templates/redis-map.yaml#L7 databaseNumber: 1 #<-- Adding redis database number according to the Redis config map https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-azure-provisioning/-/blob/master/charts/osdu-common/templates/redis-map.yaml#L7
################################### ###################################
......
...@@ -114,10 +114,10 @@ airflow: ...@@ -114,10 +114,10 @@ airflow:
redis: redis:
enabled: false enabled: false
externalRedis: externalRedis:
host: #{base-name-sr}#-cache.redis.cache.windows.net #<-- Azure Redis Cache host host: #{base-name-sr}#-queue.redis.cache.windows.net #<-- Azure Redis Cache host
port: 6380 port: 6380
passwordSecret: "redis" passwordSecret: "redis"
passwordSecretKey: "redis-password" passwordSecretKey: "redis-queue-password"
databaseNumber: 1 #<-- Adding redis database number according to the Redis config map https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-azure-provisioning/-/blob/master/charts/osdu-common/templates/redis-map.yaml#L7 databaseNumber: 1 #<-- Adding redis database number according to the Redis config map https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-azure-provisioning/-/blob/master/charts/osdu-common/templates/redis-map.yaml#L7
################################### ###################################
......
...@@ -39,8 +39,8 @@ spec: ...@@ -39,8 +39,8 @@ spec:
- secretName: redis - secretName: redis
type: Opaque type: Opaque
data: data:
- objectName: "redis-password" - objectName: "redis-queue-password"
key: redis-password key: redis-queue-password
- secretName: dp-logging - secretName: dp-logging
type: Opaque type: Opaque
data: data:
...@@ -80,7 +80,7 @@ spec: ...@@ -80,7 +80,7 @@ spec:
objectName: postgres-password objectName: postgres-password
objectType: secret objectType: secret
- | - |
objectName: redis-password objectName: redis-queue-password
objectType: secret objectType: secret
- | - |
objectName: log-workspace-id objectName: log-workspace-id
......
...@@ -101,8 +101,8 @@ spec: ...@@ -101,8 +101,8 @@ spec:
- secretName: redis - secretName: redis
type: Opaque type: Opaque
data: data:
- objectName: "redis-password" - objectName: "redis-queue-password"
key: redis-password key: redis-queue-password
parameters: parameters:
usePodIdentity: "true" usePodIdentity: "true"
useVMManagedIdentity: "false" useVMManagedIdentity: "false"
...@@ -189,5 +189,5 @@ spec: ...@@ -189,5 +189,5 @@ spec:
objectName: postgres-password objectName: postgres-password
objectType: secret objectType: secret
- | - |
objectName: redis-password objectName: redis-queue-password
objectType: secret objectType: secret
...@@ -244,4 +244,20 @@ resource "azurerm_monitor_diagnostic_setting" "redis_diagnostics" { ...@@ -244,4 +244,20 @@ resource "azurerm_monitor_diagnostic_setting" "redis_diagnostics" {
} }
} }
resource "azurerm_monitor_diagnostic_setting" "redis_queue_diagnostics" {
name = "redis_queue_diagnostics"
target_resource_id = module.redis_queue.id
log_analytics_workspace_id = data.terraform_remote_state.central_resources.outputs.log_analytics_id
metric {
category = "AllMetrics"
retention_policy {
days = var.log_retention_days
enabled = local.retention_policy
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment