🍒
- Libraries for building platforms with Go
Lingon - What is this?
- Who is this for?
- Project status
- Getting started
- Examples
- Motivation
- Why Go?
- Similar projects
- License
What is this?
Lingon is a collection of libraries and tools for building platforms using Go.
In short, we write Terraform (HCL) and Kubernetes (YAML) in Go. see Rationale for more details.
Lingon is not a platform, it is a library meant to be consumed in a Go application that platform engineers write to manage their platforms. It is a tool to build and automate the creation and the management of platforms regardless of the target infrastructure and services.
The following technologies are currently supported:
The only dependencies you need are:
- Go
- Terraform CLI
- kubectl
Who is this for?
Lingon is aimed at people who need to automate the lifecycle of their cloud infrastructure and have suffered the pain of configuration languages and complexity of gluing tools together with more tools.
Project status
This project is in beta. The APIs are stable, but we do not promise backward compatibility at this point. We will eventually promise backward compatibility when the project is more battle tested.
See FAQ for more details.
Getting started
Note that in the terraform case, the code generation is fast. Compiling all the generated resources will take a while. Thankfully, Go is fast at compiling and keeps a cache of compiled packages. Expect to wait a few minutes the first time you run
go build
after generating the code.
Examples
All the Examples are in the documentation.
There is a web app to showcase the conversion from kubernetes manifests from YAML to Go .
A big example is Platypus which shows how the kubernetes and terraform libraries can be used together.
Motivation
See Rationale for more details.
Lingon was developed to achieve the following goals:
Reduce cognitive load
Building a platform within a single context (i.e. Go) will reduce cognitive load by decreasing the number of tools and context switching in the process. It provides a better developer experience with out-of-the-box IDE support and a single language to learn with smooth learning curve.
Type safety
Detect misconfigurations in your text editor by using type-safe Go structs to exchange values across tool boundaries. This "shifts left" the majority of errors that occur to the earliest possible point in time.
Error handling
Go's error handling enables propagating meaningful errors to the user. This significantly reduces the effort in finding the root cause of errors and provides a better developer experience.
Limitless automation
We are only limited by what a programming language can do. We can reuse part of what we build in libraries without external tooling. That is not possible with YAML as doesn't support "includes", therefore we need a tool for that. Configuration languages are limited by the features they provide. Gluing tools together with more tools and configuration to manage more tools and configuration is not a sustainable approach. We do use a limited set of tools that we learn well and can extend, but we automate them and test them together using Go.
Note that we are in a particular situation where we need custom automation of the lifecycle of our cloud infrastructure.
Why Go?
Because most outages are caused by a configuration error.
- Why Go from us, inspired by
👇 - But Why Go from Mimic
- Not Another Markup Language from NAML
- Go for Cloud by rakyll
- The yaml document from hell by ruudvanasseldonk
- noyaml website
- YAML Considered Harmful - Philipp Krenn
🎥 - Nightmares On Cloud Street 29/10/20 - Joe Beda
🎥
Similar projects
See Comparison for more details.
License
This code is released under the Apache-2.0 License.
Bump mvdan.cc/gofumpt from 0.4.0 to 0.5.0
Bumps mvdan.cc/gofumpt from 0.4.0 to 0.5.0.
Release notes
Sourced from mvdan.cc/gofumpt's releases.
Changelog
Sourced from mvdan.cc/gofumpt's changelog.
Commits
fd93f1d
add release notes for v0.5.0e2f1a6e
skip over testdata dirs like we do with vendor48add90
add broken test case which reorders and separates imports05ac8b3
fix a case where we joined a comment with the previous line8b01b13
relax rule to insert newlines in func signatures4af70f1
remove obsolete build tags and Go version checksd5451f0
support -ldflags=main.version= again92e2be6
internal/govendor: undo upstream change to use strings.CutPrefix04a7ba7
update deps086496c
update cmd/gofmt source with Go 1.20Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump github.com/dave/jennifer from 1.6.0 to 1.6.1
Bumps github.com/dave/jennifer from 1.6.0 to 1.6.1.
Commits
ff106b2
Fixed syntax of generate commands751fd20
Upgraded hints to Go 1.20179e9cf
Removed unnecessary dependenciesDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump github.com/fatih/color from 1.14.1 to 1.15.0
Bumps github.com/fatih/color from 1.14.1 to 1.15.0.
Release notes
Sourced from github.com/fatih/color's releases.
Commits
12126ed
Merge pull request #188 from pellared/patch-1770038b
Merge branch 'main' into patch-1c5d9a2b
Merge pull request #189 from fatih/dependabot/go_modules/golang.org/x/sys-0.6.01ceb746
Bump golang.org/x/sys from 0.5.0 to 0.6.066a1b89
Merge pull request #191 from fatih/update-ci-deps3228f5a
ci: update dependencies0226ec9
Refactor color_windows.god080a5b
Merge pull request #186 from martinlindhe/main02ab2ea
windows: enable virtual terminal processing, fixes #169Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Refactor `kube.Export` and `terra.Export` to use function-option pattern
Replace
kube.Export
andkube.ExportWriter
withkube.Export
that uses function options, to declare an out directory orio.Writer
. Same forterra.Export
.Reason is for maintaining backwards compatibility in the long run.
Add terra documentation to `doc.go` in root of project
Currently the
doc.go
in the root of the project only mentions Kubernetes.Perhaps we should have:
docs/kubernetes/doc.go
docs/terra/doc.go
And
doc.go
in the root references those.Generate secrets/certs on the fly for example
It serves as a great example of what NOT to do. 😉 It is just an example and we don't have a better way to store secrets securely for that. Also, it would be very difficult for people just trying things out.
It is not impossible but would require more work to generate one in Go on the fly.
Improved CI chores
git diff
and fail if there is a differencemage
and its dependency to be usable in CI