From 337fa3d91246813bdb2e524c7106623965016d4e Mon Sep 17 00:00:00 2001 From: Lachlan Evenson Date: Mon, 10 Jul 2017 16:17:05 -0700 Subject: [PATCH] update pilot svc name to default for nicer UX (#1464) * update pilot svc name to default for nicer UX * allow configurable mixer svc annotations * add customConfigMap support * updates based on review * istio: Update README * Update configmap.yaml --- incubator/istio/Chart.yaml | 2 +- incubator/istio/README.md | 11 ++++++++++- incubator/istio/templates/NOTES.txt | 2 +- incubator/istio/templates/configmap.yaml | 8 +++++--- incubator/istio/templates/mixer-svc.yaml | 4 ++++ incubator/istio/templates/pilot-svc.yaml | 2 +- incubator/istio/values.yaml | 4 +++- 7 files changed, 25 insertions(+), 8 deletions(-) diff --git a/incubator/istio/Chart.yaml b/incubator/istio/Chart.yaml index 265568611d..fbccf18f87 100644 --- a/incubator/istio/Chart.yaml +++ b/incubator/istio/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Istio Helm chart for Kubernetes name: istio -version: 0.2.1 +version: 0.3.0 appVersion: 0.1.6 home: https://istio.io/ icon: https://raw.githubusercontent.com/istio/istio.github.io/master/favicons/mstile-150x150.png diff --git a/incubator/istio/README.md b/incubator/istio/README.md index 57a977f036..b3738ad836 100644 --- a/incubator/istio/README.md +++ b/incubator/istio/README.md @@ -107,6 +107,15 @@ Alternatively, a YAML file that specifies the values for the above parameters ca $ helm install incubator/istio --name my-release -f values.yaml ``` +## Custom ConfigMap + +When creating a new chart with this chart as a dependency, customConfigMap can be used to override the default config map provided. To use, set the value to true and provide the file `templates/configmap.yaml` for your use case. If you start by copying `configmap.yaml` from this chart and want to access values from this chart you must change all references from `.Values` to `.Values.istio`. + +``` +pilot: + customConfigMap: true +``` + ### Addons Istio ships with several preconfigured addons * Grafana @@ -114,4 +123,4 @@ Istio ships with several preconfigured addons * ServiceGraph * Zipkin -These addons can be selectively installed by setting `addons..enabled=false` in values.yaml or by using the `--set` command \ No newline at end of file +These addons can be selectively installed by setting `addons..enabled=false` in values.yaml or by using the `--set` command diff --git a/incubator/istio/templates/NOTES.txt b/incubator/istio/templates/NOTES.txt index 7e746c6733..055f63b09e 100644 --- a/incubator/istio/templates/NOTES.txt +++ b/incubator/istio/templates/NOTES.txt @@ -47,4 +47,4 @@ Or deploy the BookInfo App! Using Istioctl - istioctl --configAPIService {{ $serviceName }}-{{ .Values.pilot.name }}:{{ .Values.pilot.service.externalHttpApiServer }} [command] + istioctl [command] diff --git a/incubator/istio/templates/configmap.yaml b/incubator/istio/templates/configmap.yaml index 45be9801d8..2b72f338ec 100644 --- a/incubator/istio/templates/configmap.yaml +++ b/incubator/istio/templates/configmap.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.pilot.customConfigMap }} {{- $serviceName := include "fullname" . -}} apiVersion: v1 kind: ConfigMap @@ -10,7 +11,8 @@ data: {{ if .Values.auth.enabled }} authPolicy: MUTUAL_TLS {{ end }} - mixerAddress: {{ $serviceName }}-mixer:{{ .Values.mixer.service.externalTcpPort }} - discoveryAddress: {{ $serviceName }}-pilot:{{ .Values.pilot.service.externalHttpDiscovery }} + mixerAddress: {{ $serviceName }}-{{ .Values.mixer.deployment.name }}:{{ .Values.mixer.service.externalTcpPort }} + discoveryAddress: {{ .Values.pilot.name }}:{{ .Values.pilot.service.externalHttpDiscovery }} ingressService: istio-ingress - zipkinAddress: {{ $serviceName }}-zipkin:{{ .Values.addons.zipkin.service.externalPort }} \ No newline at end of file + zipkinAddress: {{ $serviceName }}-{{ .Values.addons.zipkin.deployment.name }}:{{ .Values.addons.zipkin.service.externalPort }} +{{- end -}} diff --git a/incubator/istio/templates/mixer-svc.yaml b/incubator/istio/templates/mixer-svc.yaml index 8b347602d7..87633e6396 100644 --- a/incubator/istio/templates/mixer-svc.yaml +++ b/incubator/istio/templates/mixer-svc.yaml @@ -6,6 +6,10 @@ metadata: labels: {{ include "labels.standard" . | indent 4 }} istio: {{ $serviceName }}-{{ .Values.mixer.deployment.name }} + annotations: + {{- range $key, $value := .Values.mixer.service.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} spec: type: {{ .Values.mixer.service.type }} ports: diff --git a/incubator/istio/templates/pilot-svc.yaml b/incubator/istio/templates/pilot-svc.yaml index a90ed700bc..c9ed5e5396 100644 --- a/incubator/istio/templates/pilot-svc.yaml +++ b/incubator/istio/templates/pilot-svc.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ $serviceName }}-{{ .Values.pilot.name }} + name: {{ .Values.pilot.name }} labels: {{ include "labels.standard" . | indent 4 }} istio: {{ $serviceName }}-{{ .Values.pilot.name }} diff --git a/incubator/istio/values.yaml b/incubator/istio/values.yaml index e47bad2437..2ddb370bc7 100644 --- a/incubator/istio/values.yaml +++ b/incubator/istio/values.yaml @@ -15,6 +15,7 @@ mixer: service: type: ClusterIP + annotations: {} externalTcpPort: 9091 externalConfigApiPort: 9094 externalPrometheusPort: 42422 @@ -36,7 +37,8 @@ mixer: ## Pilot configuration pilot: - name: pilot + name: istio-pilot + customConfigMap: false service: type: ClusterIP