From f12880fb5c65b60ed6d1bd30f698f29ca5a2f911 Mon Sep 17 00:00:00 2001 From: Prabhu Jayakumar Date: Wed, 2 Oct 2019 12:18:36 +0530 Subject: [PATCH] Allow to add annotations to router service in helm chart (#1338) --- charts/README.md | 1 + charts/fission-all/templates/svc.yaml | 4 ++++ charts/fission-all/values.yaml | 3 +++ charts/fission-core/templates/svc.yaml | 4 ++++ charts/fission-core/values.yaml | 3 +++ 5 files changed, 15 insertions(+) diff --git a/charts/README.md b/charts/README.md index f3b62d04..08d1e0b0 100644 --- a/charts/README.md +++ b/charts/README.md @@ -67,6 +67,7 @@ Parameter | Description | Default `extraCoreComponentPodConfig` | Extend the container specs for the core fission pods. Can be used to add things like affinty/tolerations/nodeSelectors/etc. | None `router.svcAddressMaxRetries` | Max retries times for router to retry on a certain service URL returns from cache/executor | `5` `router.svcAddressUpdateTimeout` | The length of update lock expiry time for router to get a service URL returns from executor | `30` +`router.svcAnnotations` | Annotations for router service | None `router.roundTrip.disableKeepAlive` | Disable transport keep-alive for fast switching function version | `true` `router.roundTrip.keepAliveTime` | The keep-alive period for an active network connection to function pod | `30s` `router.roundTrip.timeout` | HTTP transport request timeout | `50ms` diff --git a/charts/fission-all/templates/svc.yaml b/charts/fission-all/templates/svc.yaml index 212eff24..741d0840 100644 --- a/charts/fission-all/templates/svc.yaml +++ b/charts/fission-all/templates/svc.yaml @@ -6,6 +6,10 @@ metadata: svc: router application: fission-router chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +{{- if .Values.router.svcAnnotations }} + annotations: +{{ toYaml .Values.router.svcAnnotations | indent 4 }} +{{- end }} spec: type: {{ .Values.routerServiceType }} ports: diff --git a/charts/fission-all/values.yaml b/charts/fission-all/values.yaml index 91594646..a0ad2306 100644 --- a/charts/fission-all/values.yaml +++ b/charts/fission-all/values.yaml @@ -62,6 +62,9 @@ logger: router: svcAddressMaxRetries: 5 svcAddressUpdateTimeout: 30s + ## Add annotations for router + # svcAnnotations: + # cloud.google.com/load-balancer-type: Internal roundTrip: ## If true, router will disable the HTTP keep-alive which result in performance degradation. ## But it ensures that router can redirect new coming requests to new function pods. diff --git a/charts/fission-core/templates/svc.yaml b/charts/fission-core/templates/svc.yaml index 1f50196e..860374ae 100644 --- a/charts/fission-core/templates/svc.yaml +++ b/charts/fission-core/templates/svc.yaml @@ -6,6 +6,10 @@ metadata: svc: router application: fission-router chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +{{- if .Values.router.svcAnnotations }} + annotations: +{{ toYaml .Values.router.svcAnnotations | indent 4 }} +{{- end }} spec: type: {{ .Values.routerServiceType }} ports: diff --git a/charts/fission-core/values.yaml b/charts/fission-core/values.yaml index a479488a..c9ed3902 100644 --- a/charts/fission-core/values.yaml +++ b/charts/fission-core/values.yaml @@ -49,6 +49,9 @@ enableIstio: false router: svcAddressMaxRetries: 5 svcAddressUpdateTimeout: 30s + ## Add annotations for router + # svcAnnotations: + # cloud.google.com/load-balancer-type: Internal roundTrip: ## If true, router will disable the HTTP keep-alive which result in performance degradation. ## But it ensures that router can redirect new coming requests to new function pods.