Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable karpenter prometheus metrics #972

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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