From f254abc3ed8591031d47dfa747df77c2a3c4d2f8 Mon Sep 17 00:00:00 2001 From: Jordan Halterman Date: Wed, 28 Oct 2020 13:37:02 -0700 Subject: [PATCH 1/3] Use SCTP protocol in onos-e2t service --- onos-e2t/templates/deployment.yaml | 7 +++---- onos-e2t/templates/service.yaml | 3 ++- onos-e2t/templates/serviceaccount.yaml | 10 ---------- 3 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 onos-e2t/templates/serviceaccount.yaml diff --git a/onos-e2t/templates/deployment.yaml b/onos-e2t/templates/deployment.yaml index af9800dd..1eae3931 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 }} @@ -41,12 +40,12 @@ spec: - "-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 }} From acf753f2f466c096e38e58573e413257b54a7a32 Mon Sep 17 00:00:00 2001 From: Jordan Halterman Date: Wed, 28 Oct 2020 13:38:48 -0700 Subject: [PATCH 2/3] Support image.registry value in onos-e2t chart --- onos-e2t/templates/_helpers.tpl | 17 +++++++++++++++++ onos-e2t/templates/deployment.yaml | 2 +- onos-e2t/values.yaml | 6 ++++++ 3 files changed, 24 insertions(+), 1 deletion(-) 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 1eae3931..24628034 100644 --- a/onos-e2t/templates/deployment.yaml +++ b/onos-e2t/templates/deployment.yaml @@ -34,7 +34,7 @@ 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" 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 From c38377809014e768ff8e80d0af3ddfb9780c8071 Mon Sep 17 00:00:00 2001 From: Jordan Halterman Date: Wed, 28 Oct 2020 13:39:01 -0700 Subject: [PATCH 3/3] Bump version in onos-e2t chart --- onos-e2t/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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