sassoftware / viya4-deployment

This project contains Ansible code that creates a baseline in an existing Kubernetes environment for use with the SAS Viya Platform, generates the manifest for an order, and then can also deploy that order into the Kubernetes environment specified.
Apache License 2.0
71 stars 66 forks source link

sequence of yaml "overlays" files into kustomization.yaml not in line with the SAS documentation #502

Closed DATA2PLAYvf closed 12 months ago

DATA2PLAYvf commented 1 year ago

Viya4 Deployment Version Details

6.11.0

Ansible Variable File Details

not needed for the issue

Steps to Reproduce

  1. insert a patchtransformer yaml file from "sas-bases" into your namespace/site-config directory (For example, I used the file sas-bases/examples/kubernetes-tools/lifecycle-operations/schedule-start-stop/schedule-start-stop.yaml)

  2. launch viya4deployment process

  3. Check the generated file kustomization.yaml. You will see that the file is inserted before "- sas-bases/overlays/required/transformers.yaml"

In the readme of the file schedule-start-stop.yaml, SAS mentioned : "this file should be included after the line "- sas-bases/overlays/required/transformers.yaml"

Expected Behavior

Example of needed generated kustomization.yaml:

...
## user defined transformers
...
## vdm defined transformers (post)
- sas-bases/overlays/internal-elasticsearch/sysctl-transformer.yaml
- sas-bases/overlays/required/transformers.yaml
- site-config/template/scheduled-start-stop.yaml
- site-config/vdm/transformers/mirror.yaml
- ...

Actual Behavior

Example of actual generated kustomization.yaml:

...
## user defined transformers
...
- site-config/template/scheduled-start-stop.yaml
## vdm defined transformers (post)
- sas-bases/overlays/internal-elasticsearch/sysctl-transformer.yaml
- sas-bases/overlays/required/transformers.yaml
- site-config/vdm/transformers/mirror.yaml
- ...

Additional Context

We have actually an issue with this generated PatchTransformer (modify crontab to stop or start Viya). And I wonder if this is not the issue.

References

No response

Code of Conduct

jarpat commented 12 months ago

Hey We actually manage the addition of the schedule-start-stop.yaml transformer ourselves within this project.

This was resolved as part of PR #293 & #294 and officially released in 5.5.0 - October 3, 2022.

Variables have been introduced in this project to manage the start and stop transformer, V4_CFG_VIYA_START_SCHEDULE & V4_CFG_VIYA_STOP_SCHEDULE. Set one or both of these variables to a valid cron expression to configure when you want your SAS Viya deployment to be automatically stopped and started. See additional documentation here: https://github.com/sassoftware/viya4-deployment/blob/main/docs/CONFIG-VARS.md#miscellaneous

Setting one or both of these variables will include a filled out schedule-start-stop.yaml transformer and it will be correctly placed after sas-bases/overlays/required/transformers.yaml