diff --git a/onos-e2t/Chart.yaml b/onos-e2t/Chart.yaml index 66571e6b..38fabf8e 100644 --- a/onos-e2t/Chart.yaml +++ b/onos-e2t/Chart.yaml @@ -7,7 +7,7 @@ name: onos-e2t description: ONOS E2 Termination kubeVersion: ">=1.17.0" type: application -version: 0.0.2 +version: 0.0.3 appVersion: v0.6.1 keywords: - onos diff --git a/onos-e2t/templates/_helpers.tpl b/onos-e2t/templates/_helpers.tpl index 62a335b5..2257a2b1 100644 --- a/onos-e2t/templates/_helpers.tpl +++ b/onos-e2t/templates/_helpers.tpl @@ -50,3 +50,20 @@ Selector labels app.kubernetes.io/name: {{ include "onos-e2t.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} + +{{/* +onos-e2t image name +*/}} +{{- define "onos-e2t.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 -}} diff --git a/onos-e2t/templates/deployment.yaml b/onos-e2t/templates/deployment.yaml index af9800dd..24628034 100644 --- a/onos-e2t/templates/deployment.yaml +++ b/onos-e2t/templates/deployment.yaml @@ -26,7 +26,6 @@ spec: resource: {{ template "onos-e2t.fullname" . }} {{- include "onos-e2t.selectorLabels" . | nindent 8 }} spec: - serviceAccountName: onos-e2t securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} {{- with .Values.imagePullSecrets }} @@ -35,18 +34,18 @@ spec: {{- end }} containers: - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: {{ include "onos-e2t.imagename" . | quote }} imagePullPolicy: {{ .Values.image.pullPolicy }} args: - "-caPath=/etc/onos/certs/tls.cacrt" - "-keyPath=/etc/onos/certs/tls.key" - "-certPath=/etc/onos/certs/tls.crt" - - "-sctpport={{.Values.sctp.port}}" + - "-sctpport={{ .Values.sctp.port | default 36421 }}" ports: - name: sctp - containerPort: {{.Values.sctp.port}} + containerPort: {{ .Values.sctp.port | default 36421 }} - name: grpc - containerPort: {{.Values.grpc.port}} + containerPort: {{ .Values.grpc.port }} startupProbe: exec: command: diff --git a/onos-e2t/templates/service.yaml b/onos-e2t/templates/service.yaml index b3f2acfb..11dc8495 100644 --- a/onos-e2t/templates/service.yaml +++ b/onos-e2t/templates/service.yaml @@ -22,7 +22,8 @@ spec: {{- include "onos-e2t.selectorLabels" . | nindent 4 }} ports: - name: sctp - port: {{.Values.sctp.port}} + port: {{ .Values.sctp.port | default 36421 }} + protocol: SCTP - name: exporter port: 7001 - name: grpc diff --git a/onos-e2t/templates/serviceaccount.yaml b/onos-e2t/templates/serviceaccount.yaml deleted file mode 100644 index cd2f9e1c..00000000 --- a/onos-e2t/templates/serviceaccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-FileCopyrightText: 2020-present Open Networking Foundation -# -# SPDX-License-Identifier: LicenseRef-ONF-Member-1.0 - ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: onos-e2t - namespace: {{ .Release.Namespace }} diff --git a/onos-e2t/values.yaml b/onos-e2t/values.yaml index f48f9bed..e81f4a8d 100644 --- a/onos-e2t/values.yaml +++ b/onos-e2t/values.yaml @@ -6,9 +6,15 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +global: + image: + registry: "" + tag: "" + replicaCount: 1 image: + registry: "" repository: onosproject/onos-e2t tag: v0.6.1 pullPolicy: IfNotPresent