Add deep-insight utility charts

Change-Id: Ie1412be30da2af8be50df71862d7fe0354cbb96e
diff --git a/VERSION b/VERSION
index 2ac9634..5b09c67 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.13
+1.0.14
diff --git a/di-metrics-exporter/Chart.yaml b/di-metrics-exporter/Chart.yaml
new file mode 100644
index 0000000..b355246
--- /dev/null
+++ b/di-metrics-exporter/Chart.yaml
@@ -0,0 +1,7 @@
+# SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org>
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for host status reporter
+name: di-metrics-exporter
+version: 0.0.1
diff --git a/di-metrics-exporter/templates/deployment.yaml b/di-metrics-exporter/templates/deployment.yaml
new file mode 100644
index 0000000..b5eb2d8
--- /dev/null
+++ b/di-metrics-exporter/templates/deployment.yaml
@@ -0,0 +1,44 @@
+# SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org>
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+kind: Deployment
+apiVersion: apps/v1
+metadata:
+  name: {{ .Values.name }}
+spec:
+  replicas: {{ .Values.replicas }}
+  revisionHistoryLimit: 10
+  selector:
+    matchLabels:
+      name: {{ .Values.name }}
+  template:
+    metadata:
+      labels:
+        name: {{ .Values.name }}
+    spec:
+      initContainers:
+      - name: wait-di-api
+        image: curlimages/curl:7.78.0
+        imagePullPolicy: IfNotPresent
+        command: ['sh', '-c', "until curl -I -s -k https://{{ .Values.diAddr }}; do echo waiting for gateway svc; sleep 2; done"]
+      containers:
+      - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        name: {{ .Values.name }}
+        command:
+        - "./di-metrics-exporter"
+        - "-S"
+        - {{ .Values.diAddr | quote }}
+        - "-t"
+        - {{ .Values.periodToQuery | quote }}
+        - "--watch"
+        - "--watch-period"
+        - {{ .Values.watchPeriod | quote }}
+        {{- range $i, $val := .Values.subnets }}
+        - {{ $val | quote }}
+        {{- end }}
+      {{- if hasKey .Values.image "pullSecrets" }}
+      imagePullSecrets:
+        {{- range .Values.image.pullSecrets }}
+        - name: {{ . | quote }}
+        {{- end }}
+      {{- end }}
diff --git a/di-metrics-exporter/values.yaml b/di-metrics-exporter/values.yaml
new file mode 100644
index 0000000..2628b10
--- /dev/null
+++ b/di-metrics-exporter/values.yaml
@@ -0,0 +1,13 @@
+# SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org>
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+name: di-metrics-exporter
+image:
+  repository: registry.opennetworking.org/deepinsight/utility
+  tag: 4.2.0-ONF
+  pullPolicy: Always
+replicas: 1
+diAddr: gateway-service-internal.deepinsight:3030
+periodToQuery: 5m
+# Subnets for hosts to be reported.
+subnets: []
+watchPeriod: 1m
diff --git a/di-topology-watchdog/Chart.yaml b/di-topology-watchdog/Chart.yaml
new file mode 100644
index 0000000..4107e5a
--- /dev/null
+++ b/di-topology-watchdog/Chart.yaml
@@ -0,0 +1,7 @@
+# SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org>
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for Deep Insight topology watchdog
+name: di-topology-watchdog
+version: 0.0.1
diff --git a/di-topology-watchdog/templates/deployment.yaml b/di-topology-watchdog/templates/deployment.yaml
new file mode 100644
index 0000000..d070ef5
--- /dev/null
+++ b/di-topology-watchdog/templates/deployment.yaml
@@ -0,0 +1,41 @@
+# SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org>
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+kind: Deployment
+apiVersion: apps/v1
+metadata:
+  name: {{ .Values.name }}
+spec:
+  replicas: {{ .Values.replicas }}
+  revisionHistoryLimit: 10
+  selector:
+    matchLabels:
+      name: {{ .Values.name }}
+  template:
+    metadata:
+      labels:
+        name: {{ .Values.name }}
+    spec:
+      initContainers:
+      - name: wait-onos-api
+        image: curlimages/curl:7.78.0
+        imagePullPolicy: IfNotPresent
+        command: ['sh', '-c', "until curl -I -s {{ .Values.onosAddr }}; do echo waiting for ONOS API; sleep 2; done"]
+      - name: wait-di-api
+        image: curlimages/curl:7.78.0
+        imagePullPolicy: IfNotPresent
+        command: ['sh', '-c', "until curl -I -s -k https://{{ .Values.diAddr }}; do echo waiting for gateway svc; sleep 2; done"]
+      containers:
+      - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        name: {{ .Values.name }}
+        {{- if .Values.withEndHost }}
+        command: ["./topo_watchdog", "--di-addr", "{{ .Values.diAddr }}", "--onos-addr", "{{ .Values.onosAddr }}", "--k8s-subnet", "{{ .Values.k8sSubnet }}", "--node-iface-no", "{{ .Values.nodeIfaceNo }}"]
+        {{- else }}
+        command: ["./topo_watchdog", "--di-addr", "{{ .Values.diAddr }}", "--onos-addr", "{{ .Values.onosAddr }}"]
+        {{- end }}
+      {{- if hasKey .Values.image "pullSecrets" }}
+      imagePullSecrets:
+        {{- range .Values.image.pullSecrets }}
+        - name: {{ . | quote }}
+        {{- end }}
+      {{- end }}
diff --git a/di-topology-watchdog/values.yaml b/di-topology-watchdog/values.yaml
new file mode 100644
index 0000000..5e6c185
--- /dev/null
+++ b/di-topology-watchdog/values.yaml
@@ -0,0 +1,13 @@
+# SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org>
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+name: di-topology-watchdog
+image:
+  repository: registry.opennetworking.org/deepinsight/utility
+  tag: 4.2.0-ONF
+  pullPolicy: Always
+replicas: 1
+onosAddr: sdfabric-onos-classic-hs.tost:8181
+diAddr: gateway-service-internal.deepinsight:3030
+withEndHost: false
+# k8sSubnet: 10.128.13.0/24 # The cluster subnet
+# nodeIfaceNo: 1 # Default K8s node interface number retrieved via `ip link`.
diff --git a/sdfabric/Chart.yaml b/sdfabric/Chart.yaml
index b20dc09..b01a53a 100644
--- a/sdfabric/Chart.yaml
+++ b/sdfabric/Chart.yaml
@@ -7,7 +7,7 @@
 description: A chart to deploy all SD-Fabric components
 kubeVersion: ">=1.18.0"
 type: application
-version: 1.0.13
+version: 1.0.14
 keywords:
   - aether
   - sdn
@@ -37,3 +37,11 @@
     repository: file://../int-host-reporter
     version: 0.0.1
     condition: import.int-host-reporter.enabled
+  - name: di-topology-watchdog
+    repository: file://../di-topology-watchdog
+    version: 0.0.1
+    condition: import.di-topology-watchdog.enabled
+  - name: di-metrics-exporter
+    repository: file://../di-metrics-exporter
+    version: 0.0.1
+    condition: import.di-metrics-exporter.enabled
diff --git a/sdfabric/README.md b/sdfabric/README.md
index 425218c..8546e0b 100644
--- a/sdfabric/README.md
+++ b/sdfabric/README.md
@@ -136,3 +136,5 @@
 | stratum | See <https://github.com/stratum/stratum-helm-charts/tree/master/stratum> |
 | pfcp-agent | See [values.yaml](../pfcp-agent/values.yaml) file of the PFCP agent chart |
 | dbuf | See [values.yaml](../dbuf/values.yaml) file of the DBuf chart |
+| di-topology-watchdog | See [values.yaml](../di-topology-watchdog/values.yaml) file of the chart |
+| di-metrics-exporter | See [values.yaml](../di-metrics-exporter/values.yaml) file of the chart |
diff --git a/sdfabric/values.yaml b/sdfabric/values.yaml
index 39f71f5..56fd8bb 100644
--- a/sdfabric/values.yaml
+++ b/sdfabric/values.yaml
@@ -20,6 +20,10 @@
     enabled: false
   int-host-reporter:
     enabled: false
+  di-topology-watchdog:
+    enabled: false
+  di-metrics-exporter:
+    enabled: false
 
 onos-classic:
   image:
@@ -293,3 +297,14 @@
     # - protocol: "TCP"
     #   src-addr: "192.168.99.50/32"
     #   dst-addr: "192.168.99.20/32"
+
+di-topology-watchdog:
+  image:
+    pullSecrets:
+      - *image-secret-name
+  onosAddr: sdfabric-onos-classic-hs.tost:8181
+
+di-metrics-exporter:
+  image:
+    pullSecrets:
+      - *image-secret-name