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 64 forks source link

(IAC-485) Customizations incorrectly added to kustomization.yaml #184

Closed hyweldaniels closed 1 year ago

hyweldaniels commented 2 years ago

When applying a customization, in this case specifically the schedule-start-stop.yaml transformer from sas-bases/examples/kubernetes-tools/lifecycle-operations/schedule-start-stop, the transformer entry is added before the required transformers entry. However the readme states that it must be added after the required transformers entry.

**Note:** This file should be included *after* the line
- sas-bases/overlays/required/transformers.yaml

The impact of it being above is that the sas-stop-all job will incorrectly suspend the sas-start-all and sas-stop-all cronjobs, meaning that any scheduled startup will not occur.

thpang commented 2 years ago

Provide where you put your customization and the kustomization.yaml Thx.

hyweldaniels commented 2 years ago

The customization went into a directory that I created ahead of running the playbook; $HOME/viya4-deployment/deployments/{cluster-name}/{namespace}/site-config/cronjob

Which is mounted to /data inside the container when running the playbook via Docker, e.g.; --volume $HOME/viya4-deployment/deployments:/data

The resulting kustomization.yaml is attached (renamed to .txt since I couldn't attach .yaml). kustomization.txt

hyweldaniels commented 2 years ago

I'll also add that I reproduced the behavior in release 4.4.0 (the release the customer used to deploy) as well as the latest 4.6.0 release. The behavior was consistent for both.

shealym commented 2 years ago

I just started admin of a client who has 2021.2 installed using viya4-deployment, and am hitting this same issue. In order to work around this (or other cases where the autogenerated kustomization.yaml isn't correct), is it generally ok to:

a) set "DEPLOY: false" and let viya4-deployment build everything it can properly b) edit the kustomization.yaml manually to bypass an issue like this c) follow the typical manual-deployment "kubectl apply" steps to load the update?

Or are there reasons that wouldn't be a good idea...

Thanks for the help!

mikegigawatt commented 2 years ago

@shealym I have used that exact approach to fix issues with kustomization.yaml and it has worked well for me. I haven't seen a down side to it yet, and I check back every so often to see i the issues are fixed in the code so that I can go back to automatically deploying.

gerrynelson63 commented 2 years ago

Is there a plan to fix this one and allow overlays to be added to kustomization.yaml in the prescribed order?

sayeun commented 2 years ago

We are currently placing this in our next sprint which will start end of July.

biohazd commented 1 year ago

Any news on this issue ?

jarpat commented 1 year ago

Closing this issue.

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