Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Fix adding unnecessary new line to the end of entries (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeployInBinary authored Jul 9, 2021
1 parent 504fb44 commit c4aafb2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
14 changes: 7 additions & 7 deletions tyk-headless/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{/* vim: set filetype=mustache: */}}
{{/*
{{- /* vim: set filetype=mustache: */}}
{{- /*
Expand the name of the chart.
*/}}
{{- define "tyk-headless.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
{{- /*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
Expand All @@ -24,22 +24,22 @@ If release name contains chart name it will be used as a full name.
{{- end -}}
{{- end -}}

{{/*
{{- /*
Create chart name and version as used by the chart label.
*/}}
{{- define "tyk-headless.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/* Create Sematic Version of gateway without prefix v */}}
{{- /* Create Sematic Version of gateway without prefix v */}}
{{- define "tyk-headless.gateway-version" -}}
{{- printf "%s" .Values.gateway.image.tag | replace "v" "" -}}
{{- end -}}

{{- define "tyk-headless.redis_url" -}}
{{- if .Values.redis.addrs -}}
{{ join "," .Values.redis.addrs }}
{{/* Adds support for older charts with the host and port options */}}
{{- /* Adds support for older charts with the host and port options */}}
{{- else if and .Values.redis.host .Values.redis.port -}}
{{ .Values.redis.host }}:{{ .Values.redis.port }}
{{- else -}}
Expand All @@ -50,7 +50,7 @@ redis.{{ .Release.Namespace }}.svc.cluster.local:6379
{{- define "tyk-headless.mongo_url" -}}
{{- if .Values.mongo.mongoURL -}}
{{ .Values.mongo.mongoURL }}
{{/* Adds support for older charts with the host and port options */}}
{{- /* Adds support for older charts with the host and port options */}}
{{- else if and .Values.mongo.host .Values.mongo.port -}}
mongodb://{{ .Values.mongo.host }}:{{ .Values.mongo.port }}/tyk_analytics
{{- else -}}
Expand Down
12 changes: 6 additions & 6 deletions tyk-hybrid/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{/* vim: set filetype=mustache: */}}
{{/*
{{- /* vim: set filetype=mustache: */}}
{{- /*
Expand the name of the chart.
*/}}
{{- define "tyk-hybrid.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
{{- /*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
Expand All @@ -24,7 +24,7 @@ If release name contains chart name it will be used as a full name.
{{- end -}}
{{- end -}}

{{/*
{{- /*
Create chart name and version as used by the chart label.
*/}}
{{- define "tyk-hybrid.chart" -}}
Expand All @@ -42,10 +42,10 @@ http
{{- define "tyk-hybrid.redis_url" -}}
{{- if .Values.redis.addrs -}}
{{ join "," .Values.redis.addrs }}
{{/* Adds support for older charts with the host and port options */}}
{{- /* Adds support for older charts with the host and port options */}}
{{- else if and .Values.redis.host .Values.redis.port -}}
{{ .Values.redis.host }}:{{ .Values.redis.port }}
{{- else -}}
redis.{{ .Release.Namespace }}.svc.cluster.local:6379
{{- end -}}
{{- end -}}
{{- end -}}
14 changes: 7 additions & 7 deletions tyk-pro/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{/* vim: set filetype=mustache: */}}
{{/*
{{- /* vim: set filetype=mustache: */}}
{{- /*
Expand the name of the chart.
*/}}
{{- define "tyk-pro.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
{{- /*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
Expand All @@ -24,7 +24,7 @@ If release name contains chart name it will be used as a full name.
{{- end -}}
{{- end -}}

{{/*
{{- /*
Create chart name and version as used by the chart label.
*/}}
{{- define "tyk-pro.chart" -}}
Expand Down Expand Up @@ -58,7 +58,7 @@ http
{{- define "tyk-pro.redis_url" -}}
{{- if .Values.redis.addrs -}}
{{ join "," .Values.redis.addrs }}
{{/* Adds support for older charts with the host and port options */}}
{{- /* Adds support for older charts with the host and port options */}}
{{- else if and .Values.redis.host .Values.redis.port -}}
{{ .Values.redis.host }}:{{ .Values.redis.port }}
{{- else -}}
Expand All @@ -69,15 +69,15 @@ redis.{{ .Release.Namespace }}.svc.cluster.local:6379
{{- define "tyk-pro.mongo_url" -}}
{{- if .Values.mongo.mongoURL -}}
{{ .Values.mongo.mongoURL }}
{{/* Adds support for older charts with the host and port options */}}
{{- /* Adds support for older charts with the host and port options */}}
{{- else if and .Values.mongo.host .Values.mongo.port -}}
mongodb://{{ .Values.mongo.host }}:{{ .Values.mongo.port }}/tyk_analytics
{{- else -}}
mongodb://mongo.{{ .Release.Namespace }}.svc.cluster.local:27017/tyk_analytics
{{- end -}}
{{- end -}}

{{/* Create Sematic Version of gateway without prefix v */}}
{{- /* Create Sematic Version of gateway without prefix v */}}
{{- define "tyk-pro.gateway-version" -}}
{{- printf "%s" .Values.gateway.image.tag | replace "v" "" -}}
{{- end -}}

0 comments on commit c4aafb2

Please sign in to comment.