Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/veggiemonk/lingonweb
Go Webapp to convert kubernetes manifests (YAML) to Go (golang) code
https://github.com/veggiemonk/lingonweb
cloud-run cloudrun developer-tools devops go golang google-cloud-run k8s kubernetes kubernetes-deployment kubernetes-manifests kubernetes-resources manifest webapp yaml
Last synced: 10 days ago
JSON representation
Go Webapp to convert kubernetes manifests (YAML) to Go (golang) code
- Host: GitHub
- URL: https://github.com/veggiemonk/lingonweb
- Owner: veggiemonk
- License: apache-2.0
- Created: 2023-04-10T07:35:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-16T18:53:57.000Z (8 months ago)
- Last Synced: 2024-10-13T03:56:31.138Z (24 days ago)
- Topics: cloud-run, cloudrun, developer-tools, devops, go, golang, google-cloud-run, k8s, kubernetes, kubernetes-deployment, kubernetes-manifests, kubernetes-resources, manifest, webapp, yaml
- Language: HTML
- Homepage: https://lingonweb.bisconti.cloud
- Size: 587 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Lingon Web
* [Intro](#intro)
* [Screenshot](#screenshot)
* [Who is this for?](#who-is-this-for)
* [Works with CRDs](#works-with-crds)
* [Output format is _txtar_](#output-format-is-txtar)## Intro
Lingon Web is a web-based interface for [Lingon](https://github.com/volvo-cars/lingon).
[Lingon](https://github.com/volvo-cars/lingon) is a library and command line tool to write HCL (Terraform)
and kubernetes manifest (YAML) in Go._This web app is an example of how to use the library to convert kubernetes manifests to Go code._
See Rationale for why we built this.
> 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.## Screenshot
## 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.
We prefer to write Go code and use the same language for everything.
It's not a popular opinion but it works for us.All the Examples are in the documentation.
A big example is Platypus which shows how
the kubernetes
and terraform libraries can be used together.## Works with CRDs
Lingon can convert CRDs (Custom Resource Definitions) as well.
Although it is not possible to convert all CRDs, as we would need to register them all.
See [serializer.go](./knowntypes/serializer.go) for an example of how to register the custom resource types.> **Open an issue or a PR if you want to add more CRDs.** π₯²
## Output format is _txtar_
A _txtar_ archive is zero or more comment lines and then a sequence of file entries.
Each file entry begins with a file marker line of the form "-- FILENAME --" and
is followed by zero or more file content lines making up the file data.
The comment or file content ends at the next file marker line.
The file marker line must begin with the three-byte sequence "-- " and end with the three-byte sequence " --",
but the enclosed file name can be surrounding by additional white space, all of which is stripped.
If the txtar file is missing a trailing newline on the final line,
parsers should consider a final newline to be present anyway.
There are no possible syntax errors in a _txtar_ archive.We are using [github.com/rogpeppe/go-internal](github.com/rogpeppe/go-internal) version.
see the doc for the API.It is also used by the [Go playground](https://go.dev/play). See the example: https://go.dev/play/p/3ThdpZyPj-b
Example:
```go
-- other.go --
package mainfunc hello() string {
return "Hello, δΈη"
}-- main.go --
package mainimport "fmt"
func main() {
fmt.Println(hello())
}```