diff --git a/terraform/gitops/generate-files/templates/monitoring/install/values-loki.yaml.tpl b/terraform/gitops/generate-files/templates/monitoring/install/values-loki.yaml.tpl index 81b1140cf..531f0d5bd 100644 --- a/terraform/gitops/generate-files/templates/monitoring/install/values-loki.yaml.tpl +++ b/terraform/gitops/generate-files/templates/monitoring/install/values-loki.yaml.tpl @@ -13,12 +13,66 @@ loki: access_key_id: $${MINIO_LOKI_USERNAME} secret_access_key: $${MINIO_LOKI_PASSWORD} bucketnames: ${minio_loki_bucket} + +# NOTE: make sure all components which are running have node affinity enabled for monitoring nodes ingester: persistence: size: ${loki_ingester_pvc_size} storageClass: ${storage_class_name} extraArgs: ["-config.expand-env"] extraEnvVarsSecret: ${minio_credentials_secret_name} + nodeAffinityPreset: + type: hard + key: workload-class.mojaloop.io/MONITORING + values: ["enabled"] +compactor: + nodeAffinityPreset: + type: hard + key: workload-class.mojaloop.io/MONITORING + values: ["enabled"] +distributor: + nodeAffinityPreset: + type: hard + key: workload-class.mojaloop.io/MONITORING + values: ["enabled"] +gateway: + nodeAffinityPreset: + type: hard + key: workload-class.mojaloop.io/MONITORING + values: ["enabled"] +querier: + nodeAffinityPreset: + type: hard + key: workload-class.mojaloop.io/MONITORING + values: ["enabled"] +queryFrontend: + nodeAffinityPreset: + type: hard + key: workload-class.mojaloop.io/MONITORING + values: ["enabled"] + +memcachedchunks: + nodeAffinityPreset: + type: hard + key: workload-class.mojaloop.io/MONITORING + values: ["enabled"] +memcachedfrontend: + nodeAffinityPreset: + type: hard + key: workload-class.mojaloop.io/MONITORING + values: ["enabled"] +memcachedindexqueries: + nodeAffinityPreset: + type: hard + key: workload-class.mojaloop.io/MONITORING + values: ["enabled"] +memcachedindexwrites: + nodeAffinityPreset: + type: hard + key: workload-class.mojaloop.io/MONITORING + values: ["enabled"] + + promtail: # reference: https://github.com/bitnami/charts/blob/5f843aec99a13573f67e59b5e3193916ca01f308/bitnami/grafana-loki/values.yaml#L4440 diff --git a/terraform/k8s/default-config/cluster-config.yaml b/terraform/k8s/default-config/cluster-config.yaml index 019fa85d7..a41fcf63b 100644 --- a/terraform/k8s/default-config/cluster-config.yaml +++ b/terraform/k8s/default-config/cluster-config.yaml @@ -31,6 +31,7 @@ nodes: workload-class.mojaloop.io/KAFKA-DATA-PLANE: "enabled" workload-class.mojaloop.io/RDBMS-CENTRAL-LEDGER-LIVE: "enabled" workload-class.mojaloop.io/RDBMS-ALS-LIVE: "enabled" + workload-class.mojaloop.io/MONITORING: "enabled" vpc_cidr: "10.106.0.0/23" enable_k6s_test_harness: false k6s_docker_server_instance_type: "m5.large"