From b55038ca2de0aec63851a7b94059d38ec5633d67 Mon Sep 17 00:00:00 2001
From: Mark Rouse <67111550+markjrouse@users.noreply.github.com>
Date: Tue, 19 Mar 2024 09:55:43 +0000
Subject: [PATCH] Update for stp240 and 141 (#50)

* tm - updated chart to use new image 0.4.42

* Added missing env vars
---
 charts/testmanager/Chart.yaml                |  4 ++--
 charts/testmanager/README.md                 |  8 +++++---
 charts/testmanager/templates/deployment.yaml |  4 ++++
 charts/testmanager/values.yaml               | 10 +++++++---
 4 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/charts/testmanager/Chart.yaml b/charts/testmanager/Chart.yaml
index e4de8cc..059a238 100644
--- a/charts/testmanager/Chart.yaml
+++ b/charts/testmanager/Chart.yaml
@@ -1,8 +1,8 @@
 apiVersion: v2
 name: testmanager
-appVersion: 0.4.40
+appVersion: 0.4.42
 description: A generated Helm Chart for Soniclabs T&M testmanager
-version: 1.0.14
+version: 1.0.15
 type: application
 maintainers:
   - name: cdecatapult
diff --git a/charts/testmanager/README.md b/charts/testmanager/README.md
index eb57ac9..c45c9d6 100644
--- a/charts/testmanager/README.md
+++ b/charts/testmanager/README.md
@@ -14,8 +14,10 @@
 | `config.debug`                        | Whether or not to enable debug mode for the application                 | `False`                                                                          |
 | `config.logLevel`                     | The log level to use for the application                                | `debug`                                                                          |
 | `config.rtcPort`                      | The port of the Viavi RTC                                               | `5099`                                                                           |
-| `config.protocolsFilePath`            | The location of the Protocols File                                      | `./`                                                                             |
-| `config.tmaPath`                      | The path on the "Control Host" to use to execute the TMA.               | `C:/Program Files (x86)/VIAVI/TM500/5G NR - NLA 6.16.0/Test Mobile Application/` |
+| `config.protocolsFilePath`            | The location of the Protocols File                                      | `./tmp`                                                                          |
+| `config.viaviPollIntervalSeconds`     | The Viavi polling interval in seconds.                                  | `10`                                                                             |
+| `config.viaviKpiStartDelaySeconds`    | The Viavi start delay in seconds.                                       | `30`                                                                             |
+| `config.tmaPath`                      | The path on the "Control Host" to use to execute the TMA.               | `C:/Program Files (x86)/VIAVI/TM500/5G NR - NLA 6.21.0/Test Mobile Application/` |
 | `config.sshKey`                       | The SSH key to use for accessing ORAN components                        | `blahblah
 blahblahblah
 blahblahblahblah
@@ -47,7 +49,7 @@ blahblahblahblah
 | ------------------- | -------------------------------------------------- | ---------------------------------------------- |
 | `image.repository`  | The repository to use for the Test Manager image   | `ghcr.io/cdecatapult/soniclabs-testmanager-ts` |
 | `image.pullPolicy`  | The pull policy to use for the Test Manager image  | `Always`                                       |
-| `image.tag`         | The tag to use for the Test Manager image          | `v0.4.40`                                      |
+| `image.tag`         | The tag to use for the Test Manager image          | `v0.4.42`                                      |
 | `image.pullSecrets` | The pull secrets to use for the Test Manager image | `["soniclabs"]`                                |
 
 ### TestManager Ingress parameters
diff --git a/charts/testmanager/templates/deployment.yaml b/charts/testmanager/templates/deployment.yaml
index 73bc19f..d9dc3c7 100644
--- a/charts/testmanager/templates/deployment.yaml
+++ b/charts/testmanager/templates/deployment.yaml
@@ -102,6 +102,10 @@ spec:
               value: {{ .Values.config.pcapStorage.path | quote }}
             - name: PROTOCOLS_FILE_PATH
               value: {{ .Values.config.protocolsFilePath | quote }}
+            - name: VIAVI_POLL_INTERVAL_SECONDS
+              value: {{ .Values.config.viaviPollIntervalSeconds | quote }}
+            - name: VIAVI_KPI_START_DELAY_SECONDS
+              value: {{ .Values.config.viaviKpiStartDelaySeconds | quote }}
             - name: DB_USERNAME
               valueFrom:
                 secretKeyRef:
diff --git a/charts/testmanager/values.yaml b/charts/testmanager/values.yaml
index d3b6877..769624d 100644
--- a/charts/testmanager/values.yaml
+++ b/charts/testmanager/values.yaml
@@ -18,9 +18,13 @@ config:
   ## @param config.rtcPort The port of the Viavi RTC
   rtcPort: 5099
   ## @param config.protocolsFilePath The location of the Protocols File
-  protocolsFilePath: ./
+  protocolsFilePath: ./tmp
+  ## @param config.viaviPollIntervalSeconds The Viavi polling interval in seconds.
+  viaviPollIntervalSeconds: 10
+  ## @param config.viaviKpiStartDelaySeconds The Viavi start delay in seconds.
+  viaviKpiStartDelaySeconds: 30
   ## @param config.tmaPath The path on the "Control Host" to use to execute the TMA.
-  tmaPath: 'C:/Program Files (x86)/VIAVI/TM500/5G NR - NLA 6.16.0/Test Mobile Application/'
+  tmaPath: 'C:/Program Files (x86)/VIAVI/TM500/5G NR - NLA 6.21.0/Test Mobile Application/'
   ## @param config.sshKey The SSH key to use for accessing ORAN components
   sshKey: |
     blahblah
@@ -81,7 +85,7 @@ image:
   ## @param image.pullPolicy The pull policy to use for the Test Manager image
   pullPolicy: Always
   ## @param image.tag The tag to use for the Test Manager image
-  tag: v0.4.40
+  tag: v0.4.42
   ## @param image.pullSecrets The pull secrets to use for the Test Manager image
   pullSecrets: ['soniclabs']