Aehter-1255 - Add a new container to push the netcfg to ONOS
- Change the apiversion to v2. (v1 for Helmv2, v2 for Helmv3).
Change-Id: Ia1d4a4662ca55d97196ff63d5874a83b03432e04
diff --git a/apps/dbuf/templates/deployment.yaml b/apps/dbuf/templates/deployment.yaml
index d364ece..b820acb 100644
--- a/apps/dbuf/templates/deployment.yaml
+++ b/apps/dbuf/templates/deployment.yaml
@@ -47,6 +47,36 @@
- name: exporter
containerPort: 8080
protocol: {{ .Values.service.stats.protocol }}
+ # Push data plane address to ONOS via netcfgc
+ - name: push-onos
+ image: curlimages/curl:7.75.0
+ imagePullPolicy: IfNotPresent
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: ONOS_SERVER
+ value: "{{ .Values.onos.server }}"
+ - name: ONOS_PORT
+ value: "{{ .Values.onos.port }}"
+ - name: ONOS_USERNAME
+ value: "{{ .Values.onos.username }}"
+ - name: ONOS_PASSWORD
+ value: "{{ .Values.onos.password }}"
+ - name: GRPC_SERVICE_NAME
+ value: {{ include "dbuf.fullname" . }}
+ - name: GRPC_PORT
+ value: "{{ .Values.service.grpc.port }}"
+ - name: DP_INTERFACE
+ value: "{{ .Values.dataplane.interface }}"
+ - name: DP_PORT
+ value: "{{ .Values.dataplane.port }}"
+ volumeMounts:
+ - name: onos-push-script
+ mountPath: /tmp/push-onos
+ subPath: push-onos
+ command: ["sh", "-c", "/tmp/push-onos"]
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
@@ -59,3 +89,8 @@
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
+ volumes:
+ - name: onos-push-script
+ configMap:
+ name: {{ include "dbuf.fullname" . }}
+ defaultMode: 0755