This repository has been archived by the owner on Oct 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1161 from cloudfoundry-incubator/vladi/adr-bash-ruby
docs: ADR for restricting scripting to ruby and bash
- Loading branch information
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# 5. Limit the languages, data formats, and tools used by kubecf | ||
|
||
Date: 2020-07-24 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
As the project grows in numbers of contributors and lines of code, we want to | ||
make sure we keep the project readable and accessible by external contributors. | ||
|
||
To do this we intentionally restrict the choices in scripting languages, data | ||
formats, and supporting tools. | ||
|
||
These restrictions apply not only to the kubecf.git repo, but also to | ||
kubecf-tools.git. | ||
|
||
## Decision | ||
|
||
### Scripting Languages | ||
|
||
Only use bash and ruby for scripting and tooling in the KubeCF project. Ruby | ||
scripts should be unit-tested if possible. | ||
|
||
### Statically Typed and/or Compiled Languages | ||
|
||
We do not anticipate the need to write any tooling in a compiled language. | ||
Should this become necessary, the Go language should be choosen. | ||
|
||
### Templating Languages | ||
|
||
Using Go `text/template` based templating is preferred whenever possible. | ||
|
||
### Data Formats | ||
|
||
Configuration data should be stored in YAML or JSON format. | ||
|
||
### External Tools | ||
|
||
External tools must be available on both Linux and macOS. | ||
|
||
Compiled tools should ideally be available as binary downloads from their Github | ||
releases page. | ||
|
||
For tools implemented via scripting languages, tools written in bash or ruby | ||
should be preferred over tools written in other languages whenever this is | ||
possible and functionality is not compromised. It is acceptable to use tools | ||
implemented in other languages if no alternative in bash/ruby exists. | ||
|
||
The number of external dependencies should be kept low whenever possible. E.g. | ||
instead of adding a dependency on `yq` use a combination of `ruby` and `jq` to | ||
achieve the same results with existing dependencies. | ||
|
||
## Consequences | ||
|
||
Any other existing scripts should be converted to bash or ruby. |