diff --git a/ansible/paws.yaml b/ansible/paws.yaml index bd761c85..9e12ea8b 100644 --- a/ansible/paws.yaml +++ b/ansible/paws.yaml @@ -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 diff --git a/ansible/templates/prometheus-ingress.yaml.j2 b/ansible/templates/prometheus-ingress.yaml.j2 new file mode 100644 index 00000000..c371ca5f --- /dev/null +++ b/ansible/templates/prometheus-ingress.yaml.j2 @@ -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