Commit fbf6fb62 authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

added ingress for ctrl-engine, loc-serv & metrics + renamed REST api basepaths & regenerated code

parent fc79b3df
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -26,9 +26,8 @@ spec:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end }}
  rules:
  {{- range .Values.ingress.hosts }}
    - host: {{ . }}
      http:
  {{- range $host := .Values.ingress.hosts }}
    - http:
        paths:
{{ if $extraPaths }}
{{ toYaml $extraPaths | indent 10 }}
@@ -37,5 +36,8 @@ spec:
            backend:
              serviceName: {{ $fullName }}
              servicePort: {{ $servicePort }}
      {{- if $host }}
      host: {{ $host }}
      {{- end }}
  {{- end }}
{{- end }}
+12 −9
Original line number Diff line number Diff line
@@ -111,10 +111,10 @@ podPortName: grafana
## ref: http://kubernetes.io/docs/user-guide/services/
##
service:
  #type: ClusterIP
  type: NodePort
  type: ClusterIP
  # type: NodePort
  port: 80
  nodePort: 30009
  # nodePort: 30009
  targetPort: 3000
    # targetPort: 4181 To be used with a proxy extraContainer
  annotations: {}
@@ -122,14 +122,15 @@ service:
  portName: service

ingress:
  enabled: false
  annotations: {}
  enabled: true
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
  labels: {}
  path: /
  path: /grafana(/|$)(.*)
  hosts:
    - chart-example.local
    - ''
  ## Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
  extraPaths: []
  # - path: /*
@@ -322,10 +323,10 @@ datasources:
#      isDefault: true
    - name: meep-influxdb
      type: influxdb
      # access: proxy
      access: proxy
      database: demo1
      # user: grafana
      url: "http://<CLUSTERIP>:30086"
      url: "http://meep-influxdb:8086"
      jsonData:
        timeInterval: "10s"
      # secureJsonData:
@@ -425,6 +426,8 @@ grafana.ini:
    mode: console
  grafana_net:
    url: https://grafana.net
  server:
    root_url: /grafana/
## LDAP Authentication can be enabled with the following values on grafana.ini
## NOTE: Grafana will fail to start if the value for ldap.toml is invalid
  # auth.ldap:
+5 −3
Original line number Diff line number Diff line
@@ -18,11 +18,13 @@ spec:
      secretName: {{ .Values.ingress.secretName }}
{{- end }}
  rules:
  - host: {{ .Values.ingress.hostname }}
    http:
  - http:
      paths:
      - path: /
      - path: {{ .Values.ingress.path }}
        backend:
          serviceName: {{ template "influxdb.fullname" . }}
          servicePort: 8086
    {{- if .Values.ingress.hostname }}
    host: {{ .Values.ingress.hostname }}
    {{- end }}
{{- end -}}
+8 −6
Original line number Diff line number Diff line
@@ -30,10 +30,10 @@ startupProbe:
service:
  ## Add annotations to service
  # annotations: {}
  # type: ClusterIP
  type: NodePort
  apiNodePort: 30086
  rpcNodePort: 30088
  type: ClusterIP
  # type: NodePort
  # apiNodePort: 30086
  # rpcNodePort: 30088
  ## Add IP Cluster
  # clusterIP: ""
  ## Add external IPs that route to one or more cluster nodes
@@ -111,11 +111,13 @@ resources: {}
podAnnotations: {}

ingress:
  enabled: false
  enabled: true
  tls: false
  # secretName: my-tls-cert # only needed if tls above is true
  hostname: influxdb.foobar.com
  hostname: ''
  path: /influxdb(/|$)(.*)
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
    # kubernetes.io/ingress.class: "nginx"
    # kubernetes.io/tls-acme: "true"

+40 −0
Original line number Diff line number Diff line
{{- if .Values.ingress.enabled -}}
{{- $serviceName := include "meep-ctrl-engine.fullname" . -}}
{{- $servicePort := .Values.service.port -}}
{{- $path := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: {{ template "meep-ctrl-engine.fullname" . }}
  labels:
    app: {{ template "meep-ctrl-engine.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
{{- if .Values.ingress.labels }}
{{ toYaml .Values.ingress.labels | indent 4 }}
{{- end }}
  annotations:
    {{- range $key, $value := .Values.ingress.annotations }}
      {{ $key }}: {{ $value | quote }}
    {{- end }}
spec:
  rules:
    {{- range .Values.ingress.hosts }}
    - http:
        paths:
          {{- range $path := .paths }}
          - path: {{ $path }}
            backend:
              serviceName: {{ $serviceName }}
              servicePort: {{ $servicePort }}
          {{- end -}}
      {{- if .name }}
      host: {{ .name }}
      {{- end }}
    {{- end -}}
  {{- if .Values.ingress.tls }}
  tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
  {{- end -}}
{{- end -}}
Loading