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

Adding ingress for monitoring endpoints #108

Merged
merged 2 commits into from
Jan 5, 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: 2 additions & 0 deletions .github/workflows/terraform_deployments_preprod_apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- main
paths:
- "terraform/deployments/preprod/**"
- "terraform/deployments/modules/**"
- "terraform/deployments/releases/**"
- ".github/workflows/terraform_deployments_preprod_apply.yaml"
workflow_dispatch:

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/terraform_deployments_preprod_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
pull_request:
paths:
- "terraform/deployments/preprod/**"
- "terraform/deployments/modules/**"
- "terraform/deployments/releases/**"
- ".github/workflows/terraform_deployments_preprod_plan.yaml"
workflow_dispatch:

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/terraform_deployments_prod_apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- main
paths:
- "terraform/deployments/prod/**"
- "terraform/deployments/modules/**"
- "terraform/deployments/releases/**"
- ".github/workflows/terraform_deployments_prod_apply.yaml"
workflow_dispatch:

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/terraform_deployments_prod_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
pull_request:
paths:
- "terraform/deployments/prod/**"
- "terraform/deployments/modules/**"
- "terraform/deployments/releases/**"
- ".github/workflows/terraform_deployments_prod_plan.yaml"
workflow_dispatch:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- main
paths:
- "terraform/provisioning/preprod/**"
- "terraform/provisioning/modules/**"
- ".github/workflows/terraform_provisioning_preprod_apply.yaml"
workflow_dispatch:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/terraform_provisioning_preprod_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
paths:
- "terraform/provisioning/preprod/**"
- "terraform/provisioning/modules/**"
- ".github/workflows/terraform_provisioning_preprod_plan.yaml"
workflow_dispatch:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/terraform_provisioning_prod_apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- main
paths:
- "terraform/provisioning/prod/**"
- "terraform/provisioning/modules/**"
- ".github/workflows/terraform_provisioning_prod_apply.yaml"
workflow_dispatch:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/terraform_provisioning_prod_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
paths:
- "terraform/provisioning/prod/**"
- "terraform/provisioning/modules/**"
- ".github/workflows/terraform_provisioning_prod_plan.yaml"
workflow_dispatch:

Expand Down
24 changes: 24 additions & 0 deletions helm/monitoring-ingress/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: monitoring-ingress-chart
description: A Helm chart for the ingress configuration of the monitoring applications.

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
37 changes: 37 additions & 0 deletions helm/monitoring-ingress/templates/grafana-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: monitoring-ingress
namespace: {{ .Values.namespace }}
labels:
name: {{ .Values.ingress.name }}
annotations:
cert-manager.io/cluster-issuer: {{ .Values.clusterIssuer.name }}
spec:
ingressClassName: traefik
tls:
- secretName: monitoring-ingress-secret
hosts:
- {{ .Values.ingress.grafanaHostname }}
- {{ .Values.ingress.prometheusHostname }}
rules:
- host: {{ .Values.ingress.grafanaHostname }}
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: {{ .Values.grafanaService.name }}
port:
number: 80
- host: {{ .Values.ingress.prometheusHostname }}
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: {{ .Values.prometheusService.name }}
port:
number: 9090
11 changes: 11 additions & 0 deletions helm/monitoring-ingress/values-preprod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace: "prod"
ingress:
name: "monitoring-ingress"
grafanaHostname: "grafana.devops-fastapi-staging.kvark.fr"
prometheusHostname: "prometheus.devops-fastapi-staging.kvark.fr"
grafanaService:
name: "kube-prom-stack-grafana"
prometheusService:
name: "kube-prom-stack-kube-prome-prometheus"
clusterIssuer:
name: "cluster-issuer"
11 changes: 11 additions & 0 deletions helm/monitoring-ingress/values-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace: "prod"
ingress:
name: "monitoring-ingress"
grafanaHostname: "grafana.devops-fastapi-prod.kvark.fr"
prometheusHostname: "prometheus.devops-fastapi-prod.kvark.fr"
grafanaService:
name: "kube-prom-stack-grafana"
prometheusService:
name: "kube-prom-stack-kube-prome-prometheus"
clusterIssuer:
name: "cluster-issuer"
5 changes: 5 additions & 0 deletions terraform/deployments/releases/monitoring-ingress.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "helm_release" "monitoring_ingress" {
name = "monitoring-ingress"
chart = "${path.module}/../../../helm/monitoring-ingress"
version = "0.1.2"
}