[stable/grafana] - allow for custom clusterIP to support headless services (#3101)

* allow for clusterIP to be specified in grafana svc

* bump grafana version

* move all equality checks from contains to eq

* version bump to 0.6.1
This commit is contained in:
Spencer Smith
2018-01-29 07:58:33 -08:00
committed by k8s-ci-robot
parent d276326814
commit 40668d461c
4 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: grafana
version: 0.6
version: 0.6.1
description: The leading tool for querying and visualizing time series and metrics.
home: https://grafana.net
icon: https://raw.githubusercontent.com/grafana/grafana/master/public/img/logo_transparent_400x.png
+1
View File
@@ -49,6 +49,7 @@ The command removes all the Kubernetes components associated with the chart and
| `server.service.loadBalancerSourceRanges` | List of IP CIDRs allowed access | null |
| `server.service.nodePort` | For service type "NodePort" | null |
| `server.service.externalIPs` | External IP addresses | null |
| `server.service.clusterIP` | Custom clusterIP to use for service | null |
| `server.service.type` | ClusterIP, NodePort, or LoadBalancer| ClusterIP |
| `server.setDatasource.enabled` | Creates grafana datasource with job | false |
| `server.extraEnv` | Extra environment variables to set in the server container | {} |
+7 -2
View File
@@ -18,7 +18,7 @@ spec:
port: {{ .Values.server.service.httpPort }}
protocol: TCP
targetPort: 3000
{{- if contains "NodePort" .Values.server.service.type }}
{{- if eq "NodePort" .Values.server.service.type }}
{{- if .Values.server.service.nodePort }}
nodePort: {{ .Values.server.service.nodePort }}
{{- end }}
@@ -27,11 +27,16 @@ spec:
externalIPs:
{{ toYaml .Values.server.service.externalIPs | indent 4 }}
{{- end }}
{{- if eq "ClusterIP" .Values.server.service.type }}
{{- if .Values.server.service.clusterIP }}
clusterIP: {{ .Values.server.service.clusterIP }}
{{- end }}
{{- end }}
selector:
app: {{ template "grafana.fullname" . }}
component: "{{ .Values.server.name }}"
type: "{{ .Values.server.service.type }}"
{{- if contains "LoadBalancer" .Values.server.service.type }}
{{- if eq "LoadBalancer" .Values.server.service.type }}
{{- if .Values.server.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.server.service.loadBalancerIP }}
{{- end -}}
+4
View File
@@ -133,6 +133,9 @@ server:
##
httpPort: 80
## ClusterIP to use for service
## clusterIP: None
## Load balancer IP address
## Is not required, but allows for static address with
## serviceType LoadBalancer.
@@ -161,6 +164,7 @@ server:
# externalIPs:
# - 192.168.0.1
## Grafana local config path
## Default '/etc/grafana'
##