-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Remove experimental flags and other minor docs changes
- Loading branch information
1 parent
73cdf48
commit 0f63fdd
Showing
6 changed files
with
45 additions
and
36 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 |
---|---|---|
@@ -1,43 +1,60 @@ | ||
# ADR 8: Transition to golang | ||
# ADR 8: Transition to Golang | ||
|
||
## Status | ||
|
||
Undecided | ||
Accepted | ||
|
||
## Context | ||
|
||
Connaisseur was written in python, mostly because of a preference of language inside the team. This is completely fine and worked for many years, but over the time it became more apparent that other programming languages might be better suited for the task, namely golang. The main reasons for this are: | ||
Connaisseur was orignally written in Python, mostly because of a preference of language in the team. | ||
This was completely fine and worked for many years, but over the time it became more apparent that other programming languages might be better suited for the task, namely Golang. | ||
The main reasons for this are: | ||
|
||
- The signature schemes (cosign, notaryv1, notaryv2) are written in golang, which means that they can be directly used in that language. For python, this had to be circumvented by using either a compiled version of the schemes as binaries, which may bloat the image size and are not as easy to use, or writing an own implementation in python. Switching to golang allows for better and probably faster integration of the schemes, giving a broader choice of signature providers to the community. | ||
- The resulting Connaisseur container will be more secure, as golang is a compiled language, which means that the resulting binary can be run without any interpreter. This has implication on the use of base images, as golang can use distroless images, which are more secure than the python equivalent. | ||
- Golang is THE kubernetes language. Most of the tools in the ecosystem are written in golang, thus the broader community is a lot more familiar with it. This will make it easier for people to contribute to Connaisseur. | ||
- The signature schemes (Cosign, Notary, Notation) are written in Golang, which means that they can be directly used in that language. | ||
For Python, this had to be circumvented by using either a compiled version of the schemes as binaries, which bloat image size and are not as easy to use, or writing an own implementation in Python. | ||
Switching to Golang allows for better and probably faster integration of the schemes, giving a broader choice of signature providers to the community. | ||
- The resulting Connaisseur container will be more secure, as Golang is a compiled language, which means that the resulting binary can be run without any interpreter. | ||
This has implication on the use of base images, as Golang can use scratch images, which are more secure than the Python equivalent bringing OS and runtime. | ||
- Golang is THE Kubernetes language. | ||
Most of the tools in the ecosystem are written in Golang, thus the broader community is a lot more familiar with it. | ||
This will make it easier for people to contribute to Connaisseur. | ||
|
||
This ADR discusses whether a transition to golang is worth the effort and how it would play out. | ||
This ADR discusses whether a transition to Golang is worth the effort and how it would play out. | ||
|
||
## Considered Options | ||
|
||
### Option 1: Stay with python | ||
### Option 1: Stay with Python | ||
|
||
No transition will be made. The python code base is kept and continuously developed. Resources can be spend on improving the existing code base and adding new features. Adding new signature schemes will be more difficult, as they either have to be implemented in python, or other workarounds have to be found. | ||
No transition will be made. | ||
The Python code base is kept and continuously developed. | ||
Resources can be spend on improving the existing code base and adding new features. | ||
Adding new signature schemes will be more difficult, as they either have to be implemented in Python, or other workarounds have to be found. | ||
|
||
|
||
### Option 2: Transition to golang | ||
### Option 2: Transition to Golang | ||
|
||
The python code base is abandoned and a new code base is written in golang. This will allow for easier integration of new signature schemes and a more secure container image. It will also open up the project to the Kubernetes/golang community, while shutting down the python one. The transition will require a lot of work and will take some time | ||
The Python code base is abandoned and a new code base is written in Golang. | ||
This will allow for easier integration of new signature schemes and a more secure container image. | ||
It will also open up the project to the Kubernetes/Golang community, while shutting down the Python one. | ||
The transition will require a lot of work and will take some time. | ||
|
||
We transition to golang, which will require an entirely new code base 😥 This comes | ||
with all benefits mentioned above, but also with a lot of work. Additionally, the | ||
knowledge of the language in the team is rather limited at the given time. | ||
We transition to Golang, which will require an entirely new code base 😥 | ||
This comes with all benefits mentioned above, but also with a lot of work. | ||
Additionally, the knowledge of the language in the team is rather limited at the time. | ||
|
||
There were some efforts by @phbelitz to transition to golang, of which the following | ||
parts are still missing (compared to the python version): | ||
There were some efforts by @phbelitz to transition to Golang, of which the following | ||
parts are still missing (compared to the Python version): | ||
|
||
- rekor support for cosign | ||
- unittests for notaryv1 validator | ||
- integration tests | ||
- cicd pipeline | ||
- documentation | ||
- Rekor support for Cosign | ||
- Unit tests for Notary validator | ||
- Integration tests | ||
- CICD | ||
- Documentation | ||
|
||
Also none of the golang code was yet reviewed by a second pair of eyes. | ||
Also none of the Golang code was yet reviewed by a second pair of eyes. | ||
|
||
## Decision Outcome | ||
|
||
We develop a Golang version in parallel to continued support of the Python version. | ||
The Golang version should not be a breaking change to ensure we can use existing tests to keep confidence in the new version. | ||
Once the Golang version is developed, we switch it with the Python version in a feature release. |
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
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
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
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
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