Make the remaining bash script part of the installer image instead of the KOTS job template.
Motivation
The installation script of the installer job in KOTS is currently a bash script defined in the K8s job template YAML file. That's hard to maintain, hard to test, makes it rather cumbersome to write that script, and prevents re-using stuff from this script (e.g. for implementing a preflight check that checks the KOTS config. For that reason, the functionality of the bash script should be part of the installer image instead. That allows re-using it in preflight checks and gives this functionality a proper home. Where appropriate, functions should be moved to the Gitpod installer binary and simply called from the bash script.
Objectives
- Improve maintainability. Maintaining a bash script as part of a YAML file is rather cumbersome.
- Moving parts of the functionality to the installer brings type safety and allows better code testing.
- Allow re-using functions.
- Break the functionality into parts so that they can be tested separately. (Currently, the bash script can hardly be tested.)
Tasks
- [x] #12197
- [x] #12259
- [x] #12678
- [x] #12198
- [x] #12199
- [x] #12984
- [x] #12847
- [ ] #12015
- [x] #13114
- [ ] #13151
Is there a way we could make the shell script go away entirely, and instead make it part of the installer (without incurring a hard KOTS dependency)?
Motivation:
- Go is often easier to maintain than bash
- This might be a path how we can empower the other teams to understand the installation process completely again
- We might learn things that could come in handy should we need to move to away from KOTS
@csweichel yeah, that's basically the intention
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.