Skip to content

Commit

Permalink
Add support for private Docker registries to onos-ric-ho chart (#115)
Browse files Browse the repository at this point in the history
* Add values for configuring Docker registry in onos-ric-ho chart

* Fix bugs in imagename helper

* Fix incorrect template name
  • Loading branch information
kuujo authored Oct 21, 2020
1 parent 4593b86 commit b3ce951
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
4 changes: 2 additions & 2 deletions onos-ric-ho/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ name: onos-ric-ho
description: ONOS Radio Access Network Handover
kubeVersion: ">=1.17.0"
type: application
version: 0.0.14
appVersion: v0.6.17
version: 0.0.15
appVersion: v0.6.20
keywords:
- onos
- sdn
Expand Down
17 changes: 17 additions & 0 deletions onos-ric-ho/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,20 @@ Selector labels
app.kubernetes.io/name: {{ include "onos-ric-ho.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}

{{/*
onos-ric-ho image name
*/}}
{{- define "onos-ric-ho.imagename" -}}
{{- if .Values.global.image.registry -}}
{{- printf "%s/" .Values.global.image.registry -}}
{{- else if .Values.image.registry -}}
{{- printf "%s/" .Values.image.registry -}}
{{- end -}}
{{- printf "%s:" .Values.image.repository -}}
{{- if .Values.global.image.tag -}}
{{- .Values.global.image.tag -}}
{{- else -}}
{{- .Values.image.tag -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion onos-ric-ho/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image: {{ include "onos-ric-ho.imagename" . | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "-caPath=/etc/onos/certs/tls.cacrt"
Expand Down
7 changes: 6 additions & 1 deletion onos-ric-ho/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@

replicaCount: 1

global:
image:
registry: ""
tag: ""

image:
repository: onosproject/onos-ric-ho
tag: v0.6.17
tag: v0.6.20
pullPolicy: IfNotPresent
pullSecrets: []

Expand Down

0 comments on commit b3ce951

Please sign in to comment.