Skip to content
Snippets Groups Projects
Commit ad32fcd7 authored by Matteo Di Carlo's avatar Matteo Di Carlo
Browse files

Merge branch 'low-329-tango-util-doc-fix' into 'master'

[LOW-329] fix documentation in line with tango-examples

See merge request ska-telescope/ska-tango-images!159
parents d298e0f6 3262386c
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,7 @@ ska-tango-examples-tests: ...@@ -95,7 +95,7 @@ ska-tango-examples-tests:
for i in {1..800} for i in {1..800}
do do
response=$(curl -s --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "$pipeline_url") response=$(curl -s --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "$pipeline_url")
status=$(jq -r '.status' <<< "$response") status=$(jq -r '.status' <<< "$response" || true)
if [[ $status == "running" ]]; then if [[ $status == "running" ]]; then
response=$(curl -s --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "$jobs_url") response=$(curl -s --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "$jobs_url")
k8steststatus=$(jq -r '.[] | select(.name == "k8s-test") | .status' <<< $response) k8steststatus=$(jq -r '.[] | select(.name == "k8s-test") | .status' <<< $response)
......
.make @ f3c36666
Subproject commit 3db25005b85fc0413cdb1eb3678997f816429f23 Subproject commit f3c36666eb1b1b7fa4b01bc4047b9209ed47126b
...@@ -167,8 +167,8 @@ This templates are called by the below `template <https://gitlab.com/ska-telesco ...@@ -167,8 +167,8 @@ This templates are called by the below `template <https://gitlab.com/ska-telesco
{{ template "ska-tango-util.multidevice-sacc-role.tpl" $context }} {{ template "ska-tango-util.multidevice-sacc-role.tpl" $context }}
{{ template "ska-tango-util.multidevice-job.tpl" $context }} {{ template "ska-tango-util.multidevice-job.tpl" $context }}
{{ template "ska-tango-util.multidevice-svc.tpl" $context }} {{ template "ska-tango-util.multidevice-svc.tpl" $context }}
{{ template "ska-tango-util.deviceserver-pvc.tpl" $context }} {{- $volume_context := dict "volume" $filedeviceserver.volume "local" $localchart }}
{{ template "ska-tango-util.deviceserver-pvc.tpl" $volume_context }}
{{- else }} {{- else }}
...@@ -178,17 +178,21 @@ This templates are called by the below `template <https://gitlab.com/ska-telesco ...@@ -178,17 +178,21 @@ This templates are called by the below `template <https://gitlab.com/ska-telesco
{{ template "ska-tango-util.multidevice-sacc-role.tpl" $context }} {{ template "ska-tango-util.multidevice-sacc-role.tpl" $context }}
{{ template "ska-tango-util.multidevice-job.tpl" $context }} {{ template "ska-tango-util.multidevice-job.tpl" $context }}
{{ template "ska-tango-util.multidevice-svc.tpl" $context }} {{ template "ska-tango-util.multidevice-svc.tpl" $context }}
{{ template "ska-tango-util.deviceserver-pvc.tpl" $context }} {{- $volume_context := dict "volume" $deviceserver.volume "local" $localchart }}
{{ template "ska-tango-util.deviceserver-pvc.tpl" $volume_context }}
{{- end }} {{- end }}
{{- end }} # deviceservers {{- end }} # deviceservers
Tango-example template description: Tango-example template description:
- **Line 3** to **Line 26** : This template will iterate through each field under deviceServers on the values.yaml file. - **Line 3** to **Line 29** : This template will iterate through each field under deviceServers on the values.yaml file.
- **Line 5** to **Line 15** : If the device server has a file field we will get that configuration file and use it. (**Best Practice**: Add the deviceServer configuration in the data folder and then pass the path of it in the file field of the deviceServer). - **Line 5** to **Line 15** : If the device server has a file field we will get that configuration file and use it. (**Best Practice**: Add the deviceServer configuration in the data folder and then pass the path of it in the file field of the deviceServer).
- **Line 15** to **Line 25** : If there is no file field it means that the configuration of this device was done inside the value.yaml. (**Note:** Making the configuration of the device inside the values.yaml makes this file bigger becoming harder to read and understand) - **Line 17** to **Line 26** : If there is no file field it means that the configuration of this device was done inside the value.yaml. (**Note:** Making the configuration of the device inside the values.yaml makes this file bigger becoming harder to read and understand)
- **Line 8** : As discussed before it is possible to have a instances field in the values.yaml file and in the data file, it is also possible to have instances defined as a global field. It is being used a coalesced function that takes the first not null value of the list. The priority is, first it takes the instance value from the global variable if there is none it takes it from the values file and then from the data file. - **Line 7** : As discussed before it is possible to have a instances field in the values.yaml file and in the data file, it is also possible to have instances defined as a global field. It is being used a coalesced function that takes the first not null value of the list. The priority is, first it takes the instance value from the global variable if there is none it takes it from the values file and then from the data file.
- **Line 27** : Same as line 8 but without the possibility of having the instance field on the data file. - **Line 19** : Same as line 8 but without the possibility of having the instance field on the data file.
- **Line 9** and **Line 18** : Context is a list of variables that will passed as arguments to the templates. - **Line 9** and **Line 20** : Context is a list of variables that will passed as arguments to the templates.
- **Line 14** to **Line 15**: Use and set the context for persistent volume claims attached to teh deviceserver
- **Line 25** to **Line 26**: same as 14 to 15
- **Templates** : There are five templates already described before. Each template will be called for each deviceServer as they are inside the range loop (line 3). - **Templates** : There are five templates already described before. Each template will be called for each deviceServer as they are inside the range loop (line 3).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment