Skip to content

Commit

Permalink
updated apimanager helmcharts with godns
Browse files Browse the repository at this point in the history
  • Loading branch information
G33tha committed May 10, 2021
1 parent 1f46305 commit 0d94704
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
27 changes: 19 additions & 8 deletions kubernetes/helm_charts/core/apimanager/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
15 changes: 15 additions & 0 deletions kubernetes/helm_charts/core/apimanager/values.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}

0 comments on commit 0d94704

Please sign in to comment.