From 0d94704ff116513ad10793affef8cc10a7ec08d3 Mon Sep 17 00:00:00 2001 From: G33tha Date: Mon, 10 May 2021 12:43:42 +0530 Subject: [PATCH] updated apimanager helmcharts with godns --- .../core/apimanager/templates/deployment.yaml | 27 +++++++++++++------ .../helm_charts/core/apimanager/values.j2 | 15 +++++++++++ 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml index ad1977b9b4..7d95ded428 100755 --- a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml @@ -27,7 +27,11 @@ spec: containers: - name: {{ .Chart.Name }} image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - imagePullPolicy: Always + env: + - name: KONG_DNS_RESOLVER + value: "127.0.0.1:53" + - name: KONG_DNSMASQ + value: "off" envFrom: - configMapRef: name: {{ .Chart.Name }}-config @@ -44,12 +48,19 @@ spec: readinessProbe: {{ toYaml .Values.readinessProbe | indent 10 }} {{- end }} - lifecycle: - preStop: - exec: - command: - - kong - - quit + - name: go-dns + image: "{{ .Values.godns.repository }}:{{ .Values.godns.image_tag }}" + env: + - name: DNSMASQ_ENABLE_SEARCH + value: "true" + - name: DNSMASQ_VERBOSE + value: {{ .Values.godns.env.verbose | quote }} + - name: DNSMASQ_RCACHE + value: {{ .Values.godns.env.cache | quote }} + - name: DNSMASQ_RCACHE_TTL + value: {{ .Values.godns.env.cache_ttl | quote }} + resources: +{{ toYaml .Values.godns.resources | indent 10 }} --- apiVersion: v1 @@ -70,4 +81,4 @@ spec: port: {{ .Values.service.port }} targetPort: {{ .Values.service.targetport }} selector: - app: {{ .Chart.Name }} # metadataname of deployment + app: {{ .Chart.Name }} # metadataname of deployment \ No newline at end of file diff --git a/kubernetes/helm_charts/core/apimanager/values.j2 b/kubernetes/helm_charts/core/apimanager/values.j2 index 4270bc727b..87f9296028 100755 --- a/kubernetes/helm_charts/core/apimanager/values.j2 +++ b/kubernetes/helm_charts/core/apimanager/values.j2 @@ -26,3 +26,18 @@ strategy: maxunavailable: {{ apimanager_maxunavailable|default('25%') }} {{ apimanager_liveness_readiness | to_nice_yaml }} + +godns: + repository: {{ go_dns_repository | default('docker.io/sunbird/go-dns') }} + image_tag: {{ go_dns_image_tag | default('v1.2') }} + resources: + requests: + cpu: {{ go_dns_cpu_req | default('100m') }} + memory: {{ go_dns_mem_req | default('100Mi') }} + limits: + cpu: {{ go_dns_cpu_limit | default('500m') }} + memory: {{ go_dns_mem_limit | default('500Mi') }} + env: + verbose: {{ go_dns_verbosity | default('False') }} + cache: {{ go_dns_cache | default('1000') }} + cache_ttl: {{ go_dns_cache_ttl | default('7200') }}