2022-09-29 14:22:08 +00:00
|
|
|
# convention 4 kubernetes: c4k-website
|
2022-11-11 13:01:08 +00:00
|
|
|
|
2022-11-08 15:23:10 +00:00
|
|
|
[![Clojars Project](https://img.shields.io/clojars/v/org.domaindrivenarchitecture/c4k-website.svg)](https://clojars.org/org.domaindrivenarchitecture/c4k-website) [![pipeline status](https://gitlab.com/domaindrivenarchitecture/c4k-website/badges/master/pipeline.svg)](https://gitlab.com/domaindrivenarchitecture/c4k-website/-/commits/main)
|
2022-07-27 07:14:01 +00:00
|
|
|
|
2024-08-06 11:15:10 +00:00
|
|
|
[<img src="https://domaindrivenarchitecture.org/img/delta-chat.svg" width=20 alt="DeltaChat"> chat over e-mail](mailto:buero@meissa-gmbh.de?subject=community-chat) | [<img src="https://meissa.de/images/parts/contact/mastodon36_hue9b2464f10b18e134322af482b9c915e_5501_filter_14705073121015236177.png" width=20 alt="M"> meissa@social.meissa-gmbh.de](https://social.meissa-gmbh.de/@meissa) | [Blog](https://domaindrivenarchitecture.org) | [Website](https://meissa.de)
|
2022-07-27 07:14:01 +00:00
|
|
|
|
2022-09-29 14:22:08 +00:00
|
|
|
## Purpose
|
2022-07-27 07:14:01 +00:00
|
|
|
|
2024-02-21 17:14:57 +00:00
|
|
|
**GitOps for static generated Websites.**
|
|
|
|
|
|
|
|
c4k-website generates k8s-manifest for a webserver serving static html.
|
|
|
|
|
|
|
|
c4k-website is an example how to create k8s manifests for OneShotDeployments with https://repo.prod.meissa.de/meissa/c4k-common.
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
- [convention 4 kubernetes: c4k-website](#convention-4-kubernetes-c4k-website)
|
|
|
|
- [Purpose](#purpose)
|
|
|
|
- [Features](#features)
|
|
|
|
- [Serving multiple websites](#serving-multiple-websites)
|
|
|
|
- [https \& Letsencrypt Certificates](#https--letsencrypt-certificates)
|
|
|
|
- [Ratelimiting](#ratelimiting)
|
|
|
|
- [Monitoring](#monitoring)
|
|
|
|
- [GitOps your Websites](#gitops-your-websites)
|
|
|
|
- [Support Hugo and Cryogene](#support-hugo-and-cryogene)
|
|
|
|
- [Try out](#try-out)
|
|
|
|
- [Usage](#usage)
|
|
|
|
- [Development \& mirrors](#development--mirrors)
|
|
|
|
- [License](#license)
|
|
|
|
|
|
|
|
### Serving multiple websites
|
|
|
|
|
|
|
|
You can serve many websites, each of can listen to a list of domain names. E.g.
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
# Config example
|
|
|
|
websites:
|
|
|
|
- unique-name: "test.io"
|
|
|
|
fqdns: ["test.de", "test.org", "www.test.de", "www.test.org"]
|
|
|
|
- unique-name: "example.io"
|
|
|
|
fqdns: ["example.org", "www.example.com"]
|
|
|
|
```
|
|
|
|
|
|
|
|
### https & Letsencrypt Certificates
|
|
|
|
|
|
|
|
The domain names listed will get their certificates from letsencrypt out of the box.
|
|
|
|
|
|
|
|
### Ratelimiting
|
2022-07-27 07:14:01 +00:00
|
|
|
|
2024-02-21 17:14:57 +00:00
|
|
|
There is a Ratelimit included for each website. This makes it harder to DOS one or all websites served.
|
2022-07-27 07:14:01 +00:00
|
|
|
|
2024-02-21 17:14:57 +00:00
|
|
|
### Monitoring
|
2022-10-21 14:09:02 +00:00
|
|
|
|
2024-02-21 17:14:57 +00:00
|
|
|
Monitoring on GrafanaCloud (or any other grafana) is included out of the box.
|
2022-11-10 12:13:55 +00:00
|
|
|
|
2024-02-21 17:14:57 +00:00
|
|
|
### GitOps your Websites
|
2022-07-27 07:14:01 +00:00
|
|
|
|
2024-02-21 17:14:57 +00:00
|
|
|
If your repository is on a frogejo or gitea repo, we included GitOps. We ask every ten minutes the repo api for new pushed content.
|
2024-02-21 07:40:39 +00:00
|
|
|
|
2024-02-21 17:14:57 +00:00
|
|
|
If there is new content we generate the new static html & serve it.
|
2022-12-28 18:52:54 +00:00
|
|
|
|
2024-02-21 17:14:57 +00:00
|
|
|
### Support Hugo and Cryogene
|
|
|
|
|
|
|
|
For static html generation we support cryogen & hugo.
|
2022-12-28 18:52:54 +00:00
|
|
|
|
2022-09-29 14:22:08 +00:00
|
|
|
## Try out
|
2022-07-27 07:14:01 +00:00
|
|
|
|
2022-11-23 11:06:43 +00:00
|
|
|
Click on the image to try out in your browser:
|
2022-07-27 07:14:01 +00:00
|
|
|
|
2022-09-29 14:22:08 +00:00
|
|
|
[![Try it out](doc/tryItOut.png "Try out yourself")](https://domaindrivenarchitecture.org/pages/dda-provision/c4k-website/)
|
2022-09-08 12:12:19 +00:00
|
|
|
|
2022-09-29 14:22:08 +00:00
|
|
|
Your input will stay in your browser. No server interaction is required.
|
2022-09-08 12:12:19 +00:00
|
|
|
|
2022-12-28 18:52:54 +00:00
|
|
|
You will also be able to try out on cli:
|
|
|
|
```
|
2024-02-21 17:14:57 +00:00
|
|
|
c4k-website src/test/resources/valid-config.yaml src/test/resources/valid-auth.yaml
|
2022-12-28 18:52:54 +00:00
|
|
|
```
|
|
|
|
|
2022-11-11 13:01:08 +00:00
|
|
|
## Usage
|
2022-07-27 07:14:01 +00:00
|
|
|
|
2024-02-21 17:14:57 +00:00
|
|
|
Prerequisites:
|
|
|
|
* DNS routes pointing to your k8s cluster.
|
|
|
|
* frogejo or gitea instance for your website repo. In doubt use https://codeberg.org
|
|
|
|
* A git repository with your hugo / cryogene website
|
|
|
|
* the project provides a `generate.sh` (maybe your generatoin needs some preprocessing)
|
|
|
|
* `generate.sh` deliver its static generated html to `target/html`
|
2022-12-01 14:26:17 +00:00
|
|
|
|
|
|
|
|
2023-05-30 13:11:19 +00:00
|
|
|
## Development & mirrors
|
|
|
|
|
|
|
|
Development happens at: https://repo.prod.meissa.de/meissa/c4k-website
|
|
|
|
|
|
|
|
Mirrors are:
|
|
|
|
|
|
|
|
* https://gitlab.com/domaindrivenarchitecture/c4k-website (issues and PR, CI)
|
2023-07-28 12:03:34 +00:00
|
|
|
* https://github.com/DomainDrivenArchitecture/c4k-website
|
2023-05-30 13:11:19 +00:00
|
|
|
|
|
|
|
For more details about our repository model see: https://repo.prod.meissa.de/meissa/federate-your-repos
|
|
|
|
|
2022-07-27 07:12:32 +00:00
|
|
|
## License
|
|
|
|
|
2024-02-21 07:40:39 +00:00
|
|
|
Copyright © 2022, 2023, 2024 meissa GmbH
|
2022-09-29 14:22:08 +00:00
|
|
|
Licensed under the [Apache License, Version 2.0](LICENSE) (the "License")
|
|
|
|
Pls. find licenses of our subcomponents [here](doc/SUBCOMPONENT_LICENSE)
|
2022-11-10 12:08:09 +00:00
|
|
|
|
2022-11-10 12:13:55 +00:00
|
|
|
[provs]: https://gitlab.com/domaindrivenarchitecture/provs/
|