From 859885189c5b77ff4eff7054ac18581e06d9689b Mon Sep 17 00:00:00 2001 From: Rasmus K Madsen Date: Tue, 5 Dec 2023 13:32:09 +0100 Subject: [PATCH] add option for grafana ingress resource --- Chart.yaml | 2 +- README.md | 4 +++- templates/ingress.yaml | 28 ++++++++++++++++++++++++++++ values.yaml | 4 ++++ 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 templates/ingress.yaml diff --git a/Chart.yaml b/Chart.yaml index 5c74c60..56df20c 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: aoi description: A Helm chart for Netic application operations infrastructure type: application -version: 0.1.1 +version: 0.1.2 dependencies: - name: grafana version: 7.0.9 diff --git a/README.md b/README.md index 021c164..20c15e6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # aoi -![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Helm chart for Netic application operations infrastructure @@ -70,6 +70,8 @@ A Helm chart for Netic application operations infrastructure | global.tsdb.high_availability.enabled | bool | `false` | | | grafana.enabled | bool | `true` | | | grafana.image.pullPolicy | string | `"Always"` | | +| grafana.ingress.enabled | bool | `false` | | +| grafana.ingress.fqdn | string | `nil` | | | grafana.podPortName | string | `"http"` | | | grafana.priorityClassName | string | `"secure-cloud-stack-tenant-namespace-application-critical"` | | | grafana.resources.limits.memory | string | `"256Mi"` | | diff --git a/templates/ingress.yaml b/templates/ingress.yaml new file mode 100644 index 0000000..8ac5149 --- /dev/null +++ b/templates/ingress.yaml @@ -0,0 +1,28 @@ +{{- if .Values.grafana.ingress.enabled }} +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + cert-manager.io/cluster-issuer: letsencrypt + kubernetes.io/tls-acme: "true" + name: {{ include "aoi.name" . }}-grafana-ingress + namespace: {{ $.Release.Namespace }} +spec: + rules: + - host: {{ include ".Values.grafana.ingress.fqdn" . }} + http: + paths: + - backend: + service: + name: {{ include "aoi.name" . }}-grafana + port: + name: service + path: / + pathType: Prefix + tls: + - hosts: + - {{ include ".Values.grafana.ingress.fqdn" . }} + secretName: {{ include "aoi.name" . }}-grafana-ingress-tls + +{{- end }} diff --git a/values.yaml b/values.yaml index 1445333..a5a499a 100644 --- a/values.yaml +++ b/values.yaml @@ -201,6 +201,10 @@ grafana: datasources: enabled: true label: aoi_grafana_datasource + ingress: + enabled: false + fqdn: null + victoria-metrics-single-1: rbac: