Skip to content

Commit

Permalink
gpu to nvidia
Browse files Browse the repository at this point in the history
  • Loading branch information
lewinkedrs committed Jan 19, 2024
1 parent 5526f14 commit e5ee517
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions modules/eks-monitoring/dashboards.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,23 @@ YAML
depends_on = [module.external_secrets]
}

# gpu dashboards
resource "kubectl_manifest" "gpu_monitoring_dashboards" {
# nvidia dashboards
resource "kubectl_manifest" "nvidia_monitoring_dashboards" {
yaml_body = <<YAML
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: ${local.gpu_monitoring_config.flux_kustomization_name}
name: ${local.nvidia_monitoring_config.flux_kustomization_name}
namespace: flux-system
spec:
interval: 1m0s
path: ${local.gpu_monitoring_config.flux_kustomization_path}
path: ${local.nvidia_monitoring_config.flux_kustomization_path}
prune: true
sourceRef:
kind: GitRepository
name: ${local.gpu_monitoring_config.flux_gitrepository_name}
name: ${local.nvidia_monitoring_config.flux_gitrepository_name}
YAML
count = var.enable_gpu_monitoring ? 1 : 0
count = var.enable_nvidia_monitoring ? 1 : 0
depends_on = [module.external_secrets]
}

Expand Down
12 changes: 6 additions & 6 deletions modules/eks-monitoring/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ locals {
}
}

gpu_monitoring_config = {
nvidia_monitoring_config = {
# can be overriden by providing a config
flux_gitrepository_name = try(var.gpu_monitoring_config.flux_gitrepository_name, var.flux_gitrepository_name)
flux_gitrepository_url = try(var.gpu_monitoring_config.flux_gitrepository_url, var.flux_gitrepository_url)
flux_gitrepository_branch = try(var.gpu_monitoring_config.flux_gitrepository_branch, var.flux_gitrepository_branch)
flux_kustomization_name = try(var.gpu_monitoring_config.flux_kustomization_name, "grafana-dashboards-adothealth")
flux_kustomization_path = try(var.gpu_monitoring_config.flux_kustomization_path, "./artifacts/grafana-operator-manifests/eks/gpu")
flux_gitrepository_name = try(var.nvidia_monitoring_config.flux_gitrepository_name, var.flux_gitrepository_name)
flux_gitrepository_url = try(var.nvidia_monitoring_config.flux_gitrepository_url, var.flux_gitrepository_url)
flux_gitrepository_branch = try(var.nvidia_monitoring_config.flux_gitrepository_branch, var.flux_gitrepository_branch)
flux_kustomization_name = try(var.nvidia_monitoring_config.flux_kustomization_name, "grafana-dashboards-adothealth")
flux_kustomization_path = try(var.nvidia_monitoring_config.flux_kustomization_path, "./artifacts/grafana-operator-manifests/eks/gpu")
}

kubeproxy_monitoring_config = {
Expand Down
2 changes: 1 addition & 1 deletion modules/eks-monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ module "helm_addon" {
},
{
name = "enableGpuMonitoring"
value = var.enable_gpu_monitoring
value = var.enable_nvidia_monitoring
},
{
name = "serviceAccount"
Expand Down
8 changes: 4 additions & 4 deletions modules/eks-monitoring/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -552,14 +552,14 @@ variable "enable_adotcollector_metrics" {
default = true
}

variable "enable_gpu_monitoring" {
description = "Enables monitoring of GPU metrics"
variable "enable_nvidia_monitoring" {
description = "Enables monitoring of nvidia metrics"
type = bool
default = true
}

variable "gpu_monitoring_config" {
description = "Config object for GPU monitoring"
variable "nvidia_monitoring_config" {
description = "Config object for nvidia monitoring"
type = object({
flux_gitrepository_name = string
flux_gitrepository_url = string
Expand Down

0 comments on commit e5ee517

Please sign in to comment.