[VOL-2992] Expose pprof server when requested for openolt-adapter and rw-core
Change-Id: I740189d5a47957120907a1a8b33ae31b1f4ad00f
diff --git a/voltha-adapter-openolt/templates/adapters-openolt.yaml b/voltha-adapter-openolt/templates/adapters-openolt.yaml
index a62506d..6151c4b 100644
--- a/voltha-adapter-openolt/templates/adapters-openolt.yaml
+++ b/voltha-adapter-openolt/templates/adapters-openolt.yaml
@@ -13,6 +13,23 @@
# limitations under the License.
{{- $log_level := tpl .Values.adapter_open_olt.log_level . | upper }}
+{{- if .Values.profiler.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: adapter-open-olt-profiler
+ serviceAccountName: {{ .Values.serviceaccount }}
+spec:
+ serviceAccountName: {{ .Values.serviceaccount }}
+ clusterIP: None
+ ports:
+ - name: profiler
+ port: 6060
+ targetPort: 6060
+ selector:
+ app: adapter-open-olt
+---
+{{- end }}
apiVersion: apps/v1
kind: Deployment
metadata: