From bf97a7d5cc1f0737c1b691dbec5b93efc55cb096 Mon Sep 17 00:00:00 2001 From: faizanahmad055 Date: Tue, 16 Oct 2018 16:20:34 +0500 Subject: [PATCH 1/2] Add xposer annotations Signed-off-by: faizanahmad055 --- grafana/templates/service.yaml | 19 +++---------------- grafana/values.yaml | 13 +++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/grafana/templates/service.yaml b/grafana/templates/service.yaml index aed8eca..9eeb149 100644 --- a/grafana/templates/service.yaml +++ b/grafana/templates/service.yaml @@ -6,23 +6,10 @@ metadata: expose: "{{ .Values.grafana.service.expose }}" {{ include "grafana.labels.stakater" . | indent 4 }} {{ include "grafana.labels.chart" . | indent 4 }} +{{- if .Values.grafana.service.annotations }} annotations: - fabric8.io/ingress.path: {{ .Values.grafana.service.ingressPath }} - fabric8.io/ingress.annotations: |- - ingress.kubernetes.io/rewrite-target: {{ .Values.grafana.service.rewriteTarget }} - ingress.kubernetes.io/force-ssl-redirect: {{ .Values.grafana.service.forceSslRedirect }} - kubernetes.io/ingress.class: {{ .Values.grafana.service.ingressClass }} - {{- with .Values.grafana.forecastle.expose }} - forecastle.stakater.com/expose: {{ . }} - {{- end }} - {{- with .Values.grafana.forecastle.icon }} - forecastle.stakater.com/icon: {{ . }} - {{- end }} - {{- with .Values.grafana.service.annotations }} - {{- range $key, $value := . }} - {{ $key }}: {{ $value }} - {{- end }} - {{- end }} +{{ toYaml .Values.grafana.service.annotations | indent 4 }} +{{- end }} spec: ports: - port: 80 diff --git a/grafana/values.yaml b/grafana/values.yaml index 92a7f4a..3be6b1c 100644 --- a/grafana/values.yaml +++ b/grafana/values.yaml @@ -75,6 +75,19 @@ grafana: forceSslRedirect: "false" ingressClass: internal-ingress annotations: + config.xposer.stakater.com/IngressURLPath: /grafana + config.xposer.stakater.com/Domain: stackator.com + config.xposer.stakater.com/IngressNameTemplate: '{{.Service}}-{{.Namespace}}' + config.xposer.stakater.com/IngressURLTemplate: '{{.Service}}.{{.Domain}}' + config.xposer.stakater.com/TLS: "true" + xposer.stakater.com/annotations: |- + kubernetes.io/ingress.class: internal-ingress + ingress.kubernetes.io/force-ssl-redirect: false + ingress.kubernetes.io/rewrite-target: / + certmanager.k8s.io/cluster-issuer: letsencrypt-production +# Add these under xposer.stakater.com/annotations +# forecastle.stakater.com/expose: true +# forecastle.stakater.com/icon: https://cdn-images-1.medium.com/max/521/0*D__TQ7qMdoq3Y7kP.png shouldUseGenericUrl: false # if true, use the init-container to replace the values in the configmaps configFiles: \ No newline at end of file From 408963186c4d1e85deb3755e8a9c10641e622110 Mon Sep 17 00:00:00 2001 From: faizanahmad055 Date: Tue, 16 Oct 2018 16:32:09 +0500 Subject: [PATCH 2/2] Remove unused service values Signed-off-by: faizanahmad055 --- grafana/values.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/grafana/values.yaml b/grafana/values.yaml index 3be6b1c..950b1a9 100644 --- a/grafana/values.yaml +++ b/grafana/values.yaml @@ -70,10 +70,6 @@ grafana: password: dummy service: expose: "true" - ingressPath: /grafana - rewriteTarget: / - forceSslRedirect: "false" - ingressClass: internal-ingress annotations: config.xposer.stakater.com/IngressURLPath: /grafana config.xposer.stakater.com/Domain: stackator.com