Spinnaker Configuration File Precedence
Many Linux services handle configuration files as follows:
/etc/sudoers ## The main config file
/etc/sudoers.d ## A directory for customizations. Add more files here, as you wish.
That’s it! Very concise.
Conversely, Spinnaker has a quagmire of different config files in various different locations. It is helpful to understand how they operate.
When each of the services come up, they will load the config files in this order (I’ll use the Rosco service as the example):
The later files override the earlier ones. /opt/rosco/config/rosco.yml has the lowest precedence, and /opt/spinnaker/config/rosco-local.yml has the highest precedence.
Next, which are auto-generated by halyard?
/opt/spinnaker/config/spinnaker.yml ## This file was autogenerated, and _will_ be overwritten by Halyard.
/opt/spinnaker/config/rosco.yml ## This file was autogenerated, and _will_ be overwritten by Halyard.
Therefore, the -local.yml versions are the place for customizations.
When customizing the files though, they should not be edited in the above mentioned location. Rather, in the /home/ubuntu/.hal/ directory, followed by running “hal deploy apply”, which copies them into place.
(By the way, check the contents of /opt/spinnaker/config/halyard-user , to see if it’s ubuntu or a different account)
So, let’s review the files again from that perspective.
|FINAL LOCATION||PLACE TO EDIT THE FILES|
Interestingly, they can all be created and then edited in /home/ubuntu/.hal/, even if they should not be, because some of the files are managed by halyard.
Prefer to create and then edit the -local.yml versions of the files since those are meant for customization.