diff --git a/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/resources/scripts/init/ptptracking_start.sh b/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/resources/scripts/init/ptptracking_start.sh index 5bf7836..c03613e 100644 --- a/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/resources/scripts/init/ptptracking_start.sh +++ b/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/resources/scripts/init/ptptracking_start.sh @@ -57,7 +57,16 @@ PTP_DEVICE_SIMULATED = os.environ.get("PTP_DEVICE_SIMULATED", True) PTP_HOLDOVER_SECONDS = os.environ.get("PTP_HOLDOVER_SECONDS", 30) PTP_POLL_FREQ_SECONDS = os.environ.get("PTP_POLL_FREQ_SECONDS", 2) -GNSS_CONFIGS = os.environ.get("TS2PHC_CONFIGS", ["/ptp/ptpinstance/ts2phc-ts1.conf"]) +GNSS_HOLDOVER_SECONDS = os.environ.get("GNSS_HOLDOVER_SECONDS", 30) +GNSS_POLL_FREQ_SECONDS = os.environ.get("GNSS_POLL_FREQ_SECONDS", 2) + +OS_CLOCK_HOLDOVER_SECONDS = os.environ.get("OS_CLOCK_HOLDOVER_SECONDS", 30) +OS_CLOCK_POLL_FREQ_SECONDS = os.environ.get("OS_CLOCK_POLL_FREQ_SECONDS", 2) + +OVERALL_HOLDOVER_SECONDS = os.environ.get("OVERALL_HOLDOVER_SECONDS", 30) +OVERALL_POLL_FREQ_SECONDS = os.environ.get("OVERALL_POLL_FREQ_SECONDS", 2) + +GNSS_CONFIGS = json.loads(os.environ.get("TS2PHC_CONFIGS", ["/ptp/ptpinstance/ts2phc-ts1.conf"])) PHC2SYS_CONFIG = os.environ.get("PHC2SYS_CONFIG", "/ptp/ptpinstance/phc2sys-phc-inst1.conf") context = { @@ -73,6 +82,18 @@ context = { 'device_simulated': PTP_DEVICE_SIMULATED, 'holdover_seconds': PTP_HOLDOVER_SECONDS, 'poll_freq_seconds': PTP_POLL_FREQ_SECONDS + }, + 'gnsstracker_context': { + 'holdover_seconds': GNSS_HOLDOVER_SECONDS, + 'poll_freq_seconds': GNSS_POLL_FREQ_SECONDS + }, + 'osclocktracker_context': { + 'holdover_seconds': OS_CLOCK_HOLDOVER_SECONDS, + 'poll_freq_seconds': OS_CLOCK_POLL_FREQ_SECONDS + }, + 'overalltracker_context': { + 'holdover_seconds': OVERALL_HOLDOVER_SECONDS, + 'poll_freq_seconds': OVERALL_POLL_FREQ_SECONDS } } diff --git a/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/templates/daemonset.yaml b/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/templates/daemonset.yaml index c998b76..8454ce6 100644 --- a/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/templates/daemonset.yaml +++ b/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/templates/daemonset.yaml @@ -111,6 +111,18 @@ spec: value: "{{ .Values.ptptracking.device.holdover_seconds }}" - name: PTP_POLL_FREQ_SECONDS value: "{{ .Values.ptptracking.device.poll_freq_seconds }}" + - name: GNSS_HOLDOVER_SECONDS + value: "{{ .Values.ptptracking.gnss.holdover_seconds }}" + - name: GNSS_POLL_FREQ_SECONDS + value: "{{ .Values.ptptracking.gnss.poll_freq_seconds }}" + - name: OS_CLOCK_HOLDOVER_SECONDS + value: "{{ .Values.ptptracking.osclock.holdover_seconds }}" + - name: OS_CLOCK_POLL_FREQ_SECONDS + value: "{{ .Values.ptptracking.osclock.poll_freq_seconds }}" + - name: OVERALL_HOLDOVER_SECONDS + value: "{{ .Values.ptptracking.overall.holdover_seconds }}" + - name: OVERALL_POLL_FREQ_SECONDS + value: "{{ .Values.ptptracking.overall.poll_freq_seconds }}" - name: NOTIFICATIONSERVICE_USER value: "admin" - name: NOTIFICATIONSERVICE_PASS @@ -129,6 +141,12 @@ spec: value: "{{ .Values.ptptracking.ptp4lServiceName }}" - name: PHC2SYS_SERVICE_NAME value: "{{ .Values.ptptracking.phc2sysServiceName }}" + - name: PHC2SYS_CONFIG + value: "/ptp/ptpinstance/phc2sys-{{.Values.ptptracking.phc2sysServiceName}}.conf" + - name: TS2PHC_SERVICE_NAME + value: "{{ .Values.ptptracking.ts2phcServiceName }}" + - name: TS2PHC_CONFIGS + value: '["/ptp/ptpinstance/ts2phc-{{.Values.ptptracking.ts2phcServiceName}}.conf"]' command: ["/bin/bash", "/mnt/ptptracking_start.sh"] securityContext: privileged: true @@ -149,10 +167,24 @@ spec: - name: pmc mountPath: /usr/sbin/pmc readOnly: false + - name: phcctl + mountPath: /usr/sbin/phc_ctl + readOnly: false {{ end }} - name: conf mountPath: /ptp/ readOnly: true + - name: logs + mountPath: /logs/ + readOnly: true + - name: ice + mountPath: /ice/ + readOnly: true + - name: proc + mountPath: /host/proc/ + - name: hostsys + mountPath: /hostsys/ + readOnly: true volumes: - name: scripts configMap: @@ -170,10 +202,29 @@ spec: - name: pmc hostPath: path: /usr/sbin/pmc + - name: phcctl + hostPath: + path: /usr/sbin/phc_ctl - name: conf hostPath: path: /etc/ type: Directory + - name: logs + hostPath: + path: /var/log/ + type: Directory + - name: ice + hostPath: + path: /sys/kernel/debug/ice/ + type: Directory + - name: proc + hostPath: + path: /proc + type: Directory + - name: hostsys + hostPath: + path: /sys/ + type: Directory tolerations: - key: "node-role.kubernetes.io/master" operator: "Exists" diff --git a/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/values.yaml b/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/values.yaml index 16f1561..60df241 100644 --- a/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/values.yaml +++ b/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/values.yaml @@ -69,6 +69,7 @@ ptptracking: ptp4lSocket: /var/run/ptp4l-ptp4l-legacy ptp4lServiceName: ptp4l-legacy phc2sysServiceName: phc2sys-legacy + ts2phcServiceName: ts2phc-legacy image: repository: starlingx/notificationservice-base tag: stx.7.0-v1.0.5 @@ -77,3 +78,12 @@ ptptracking: simulated: false holdover_seconds: 15 poll_freq_seconds: 2 + gnss: + holdover_seconds: 15 + poll_freq_seconds: 2 + osclock: + holdover_seconds: 15 + poll_freq_seconds: 2 + overall: + holdover_seconds: 15 + poll_freq_seconds: 2