Skip to content

Commit

Permalink
Merge pull request #6 from jessebot/fix-image-tag
Browse files Browse the repository at this point in the history
fix image tag issue
  • Loading branch information
jessebot authored Jul 25, 2023
2 parents 4c27583 + b494cfb commit b27f629
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 9 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Lint Charts

on:
push:
branches:
- '*'
pull_request:
paths-ignore:
- '.github/**'
- 'LICENSE'
- 'README.md'

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion charts/coturn/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ appVersion: 4.6.2
maintainers:
- name: "jessebot"
email: "[email protected]"
url: "https://github.com/jessebot/"
url: "https://github.com/jessebot/"
4 changes: 2 additions & 2 deletions charts/coturn/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coturn

![Version: 3.0.3](https://img.shields.io/badge/Version-3.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.6.2](https://img.shields.io/badge/AppVersion-4.6.2-informational?style=flat-square)
![Version: 3.0.4](https://img.shields.io/badge/Version-3.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.6.2](https://img.shields.io/badge/AppVersion-4.6.2-informational?style=flat-square)

A Helm chart to deploy coturn

Expand All @@ -16,7 +16,7 @@ A Helm chart to deploy coturn
| config.turnserver | string | `"realm={{ .Values.certificate.host }}\nlistening-ip=0.0.0.0\nlistening-port={{ .Values.ports.listening }}\ntls-listening-port={{ .Values.ports.tlsListening }}\nmin-port={{ .Values.ports.min }}\nmax-port={{ .Values.ports.max }}\nlog-file=stdout\nverbose\npidfile=/var/tmp/turnserver.pid\nlt-cred-mech\npkey=/tls/tls.key\ncert=/tls/tls.crt\n"` | configuration for turnserver.conf |
| image.pullPolicy | string | `"IfNotPresent"` | image pull policy, set to Always if using image.tag: latest |
| image.repository | string | `"coturn/coturn"` | container registry and repo for coturn docker image |
| image.tag | string | `"{{ .Chart.AppVersion }}"` | docker tag for coturn server |
| image.tag | string | `""` | docker tag for coturn server |
| labels | object | `{"component":"coturn"}` | Coturn specific labels |
| ports | object | `{"listening":3478,"max":65535,"min":49152,"tlsListening":5349}` | ports for coturn |
| replicas | int | `2` | |
Expand Down
15 changes: 14 additions & 1 deletion charts/coturn/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,25 @@
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}


{{- define "labels" -}}
helm.sh/chart: {{ include "coturn.chart" . }}

{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}

app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/name: "coturn"
{{- end -}}


{{/*
Create image name that is used in the deployment
*/}}
{{- define "coturn.image" -}}
{{- if .Values.image.tag -}}
{{- printf "%s:%s" .Values.image.repository .Values.image.tag -}}
{{- else -}}
{{- printf "%s:%s" .Values.image.repository .Chart.AppVersion -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/coturn/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
runAsGroup: 1000
containers:
- name: "coturn"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image: {{ include "coturn.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: ["-c", "/turnserver.conf"]
ports:
Expand Down
2 changes: 1 addition & 1 deletion charts/coturn/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ image:
# -- container registry and repo for coturn docker image
repository: "coturn/coturn"
# -- docker tag for coturn server
tag: "{{ .Chart.AppVersion }}"
tag: ""
# -- image pull policy, set to Always if using image.tag: latest
pullPolicy: IfNotPresent

Expand Down

0 comments on commit b27f629

Please sign in to comment.