Skip to content

Commit

Permalink
Install kube-state-metrics (#371)
Browse files Browse the repository at this point in the history
Bug: T355179
  • Loading branch information
vivian-rook authored Feb 1, 2024
1 parent e0de8d0 commit a9d74fd
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ansible/paws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@
- value: controller.config.allow-snippet-annotations=true
value_type: string

- name: Prometheus
kubernetes.core.helm:
name: prometheus
chart_ref: prometheus
chart_repo_url: https://prometheus-community.github.io/helm-charts
chart_version: 25.11.0
release_namespace: metrics
create_namespace: true

- name: Ingress for prometheus
kubernetes.core.k8s:
state: present
template: "templates/prometheus-ingress.yaml.j2"
namespace: metrics

- name: Add jupyterhub chart repo
kubernetes.core.helm_repository:
name: jupyterhub
Expand Down
21 changes: 21 additions & 0 deletions ansible/templates/prometheus-ingress.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: prometheus
spec:
ingressClassName: nginx
rules:
{% if datacenter == 'codfw1dev' %}
- host: prometheus-paws.codfw1dev.wmcloud.org
{% else %}
- host: prometheus-paws.wmcloud.org
{% endif %}
http:
paths:
- backend:
service:
name: prometheus-server
port:
number: 80
path: /
pathType: Prefix

0 comments on commit a9d74fd

Please sign in to comment.