Skip to content

Commit

Permalink
Merge pull request #972 from spack/enable-karpenter-metrics
Browse files Browse the repository at this point in the history
Enable karpenter prometheus metrics
  • Loading branch information
jjnesbitt authored Oct 11, 2024
2 parents 84422a0 + d787338 commit 13a704c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/custom_docker_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- docker-image: ./images/cache-indexer
image-tags: ghcr.io/spack/cache-indexer:0.0.3
- docker-image: ./analytics
image-tags: ghcr.io/spack/django:0.3.16
image-tags: ghcr.io/spack/django:0.3.17
- docker-image: ./images/ci-prune-buildcache
image-tags: ghcr.io/spack/ci-prune-buildcache:0.0.4
- docker-image: ./images/protected-publish
Expand Down
2 changes: 1 addition & 1 deletion analytics/analytics/job_processor/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def get_pod_node_data(self, pod: str, start: datetime, end: datetime) -> NodeDat
# lifetime, we return all values from this query and average them.
zone = node_labels["label_topology_kubernetes_io_zone"]
price_query = f"""
karpenter_cloudprovider_instance_type_price_estimate{{
karpenter_cloudprovider_instance_type_offering_price_estimate{{
capacity_type='{capacity_type}',
instance_type='{instance_type}',
zone='{zone}'
Expand Down
16 changes: 13 additions & 3 deletions k8s/production/custom/webhook-handler/deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
serviceAccountName: webhook-handler
containers:
- name: webhook-handler
image: ghcr.io/spack/django:0.3.16
image: ghcr.io/spack/django:0.3.17
imagePullPolicy: Always
resources:
requests:
Expand Down Expand Up @@ -146,8 +146,18 @@ spec:
serviceAccountName: webhook-handler
containers:
- name: webhook-handler-worker
image: ghcr.io/spack/django:0.3.16
command: ["celery", "-A", "analytics.celery", "worker", "-l", "info", "-Q", "celery"]
image: ghcr.io/spack/django:0.3.17
command:
[
"celery",
"-A",
"analytics.celery",
"worker",
"-l",
"info",
"-Q",
"celery",
]
imagePullPolicy: Always
resources:
requests:
Expand Down
2 changes: 2 additions & 0 deletions terraform/modules/spack_aws_k8s/karpenter.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ resource "helm_release" "karpenter" {
clusterName: ${module.eks.cluster_name}
clusterEndpoint: ${module.eks.cluster_endpoint}
interruptionQueueName: ${module.karpenter.queue_name}
serviceMonitor:
enabled: true
EOT
]

Expand Down

0 comments on commit 13a704c

Please sign in to comment.